summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_link.c
Commit message (Collapse)AuthorAgeFilesLines
* acpi: use KERN_CONT in printk() continuation linesKay Sievers2012-05-081-6/+6
| | | | | | Cc: Len Brown <lenb@kernel.org> Signed-off-by: Kay Sievers <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ACPI: Use syscore_ops instead of sysdev class and sysdevRafael J. Wysocki2011-03-181-22/+8
| | | | | | | | | | | ACPI uses a sysdev class and a sysdev for executing irqrouter_resume() before turning on interrupts on the boot CPU. However, since irqrouter_resume() ignores its argument, the entire mechanism may be replaced with a struct syscore_ops object which is considerably simpler. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: remove unused declaration of proc_fs.hZhang Rui2010-10-151-1/+0
| | | | | | | Remove unused declaration of proc_fs.h. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* acpi: make ACPI device id constantMárton Németh2010-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ids field of the struct acpi_driver is constant in <linux/acpi/acpi_bus.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Move definition of PREFIX from acpi_bus.h to internal..hLen Brown2009-08-281-0/+2
| | | | | | | | | | | | | Linux/ACPI core files using internal.h all PREFIX "ACPI: ", however, not all ACPI drivers use/want it -- and they should not have to #undef PREFIX to define their own. Add GPL commment to internal.h while we are there. This does not change any actual console output, asside from a whitespace fix. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: simplify list of link devicesBjorn Helgaas2009-03-171-26/+6
| | | | | | | | | | | | We don't need a struct containing a count and a list_head; a simple list_head is sufficient. The list iterators handle empty lists fine. Furthermore, we don't need to check for null list entries because we only add non-null entries. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: remove unnecessary null pointer checksBjorn Helgaas2009-03-171-13/+1
| | | | | | | Better to oops and learn about a bug than to silently cover it up. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: remove unnecessary casts and initializationsBjorn Helgaas2009-03-171-19/+19
| | | | | | | Remove unnecessary casts and initializations. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: clean up whitespaceBjorn Helgaas2009-03-171-46/+27
| | | | | | | This patch makes whitespace and indentation more consistent. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: add missing KERN_* constants to printksFrank Seidel2009-02-071-1/+1
| | | | | | | | | According to kerneljanitors todo list all printk calls (beginning a new line) should have an according KERN_* constant. Those are the missing peaces here for the acpi subsystem. Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'misc' into releaseLen Brown2009-01-091-4/+0
|\ | | | | | | | | | | | | Conflicts: include/acpi/acpixf.h Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Do not modify SCI_EN directlyRafael J. Wysocki2008-12-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the ACPI specification the SCI_EN flag is controlled by the hardware, which sets this flag to inform the kernel that ACPI is enabled. For this reason, we shouldn't try to modify SCI_EN directly. Also, we don't need to do it in irqrouter_resume(), since lower-level resume code takes care of enabling ACPI in case it hasn't been enabled by the BIOS before passing control to the kernel (which by the way is against the ACPI specification). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec.c, pci_link.c, video_detec.c: staticRoel Kluin2008-12-301-1/+1
|/ | | | | | | Sparse asked whether these could be static. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: remove acpi_irq_balance_set() interfaceBjorn Helgaas2008-11-111-2/+9
| | | | | | | | | | | | | | | | | | | This removes the acpi_irq_balance_set() interface from the PCI interrupt link driver. x86 used acpi_irq_balance_set() to tell the PCI interrupt link driver to configure links to minimize IRQ sharing. But the link driver can easily figure out whether to turn on IRQ balancing based on the IRQ model (PIC/IOAPIC/etc), so we can get rid of that external interface. It's better for the driver to figure this out at init-time. If we set it externally via the x86 code, the interface reduces modularity, and we depend on the fact that acpi_process_madt() happens before we process the kernel command line. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'misc' into testLen Brown2008-10-221-1/+1
|\
| * ACPI: catch calls of acpi_driver_data on pointer of wrong typePavel Machek2008-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Catch attempts to use of acpi_driver_data on pointers of wrong type. akpm: rewritten to use proper C typechecking and remove the "function"-used-as-lvalue thing. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: Fix possible null ptr dereferencedonald.d.dugger@intel.com2008-10-221-2/+2
|/ | | | | | | | | | | Code in `pci_link.c' is calling the internal routine `acpi_ut_evaluate_object' which is dangerous given that it is passing a NULL pointer when it should be passing a pointer to a real object. The patch corrects the issue by having the code call the external routine `acpi_evaluate_object', which correctly handles a NULL pointer. Signed-off-by: Don Dugger <donald.d.dugger@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: bounds check IRQ to prevent memory corruptionBjorn Helgaas2008-08-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | acpi_penalize_isa_irq() should validate irq before using it to index the acpi_irq_penalty[] table. Here's the path I'm concerned about: pnpacpi_parse_allocated_irqresource() { ... irq = acpi_register_gsi(gsi, triggering, polarity); if (irq >= 0) pcibios_penalize_isa_irq(irq, 1); There's no guarantee that acpi_register_gsi() will return an IRQ within the bounds of acpi_irq_penalty[]. I have not seen a failure I can attribute to this. However, ACPI_MAX_IRQS is only 256, and I'm pretty sure ia64 can have IRQs larger than that. I think this should go in 2.6.27. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
* ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptorsBjorn Helgaas2008-07-181-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silently ignore _PRS End Tags. We already ignore Start Dependent Functions in _PRS, and we already ignore End Tags in _CRS, so we might as well ignore End Tags in _PRS as well. Silently ignore _PRS IRQ descriptors that mention no interrupts. The spec allows this (section 6.4.2.1 in ACPI 3.0b spec), and it probably means the interrupt link can't be configured at all. This patch doesn't change any functional behavior; it just removes confusing complaints like these: ACPI: Blank IRQ resource ACPI: Resource is not an IRQ entry when parsing _PRS data "23 00 00 18 79 00" from an IBM xSeries 335 dual Pentium IV Xeon 2.40 GHz machine. For more details, see http://bugzilla.kernel.org/show_bug.cgi?id=11049 The "23 00 00 18" part is a three-byte-long small IRQ resource with no bits set in the IRQ mask ("00 00"), and level-triggered, active low, shareable ("18"). The "79 00" is an End Tag (type 0x7). It is superfluous since there is no Start Dependent Function tag and there are no resources after it, but it is harmless. Thanks to Gabriele Trombetti <g.trombetti.lkrnl1213@logicschema.com> (aka Kurk) for reporting this and testing the patch. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
* ACPI: misc cleanupsAdrian Bunk2008-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the following possible cleanups: - make the following needlessly global code static: - drivers/acpi/bay.c:dev_attr_eject - drivers/acpi/bay.c:dev_attr_present - drivers/acpi/dock.c:dev_attr_docked - drivers/acpi/dock.c:dev_attr_flags - drivers/acpi/dock.c:dev_attr_uid - drivers/acpi/dock.c:dev_attr_undock - drivers/acpi/pci_bind.c:acpi_pci_unbind() - drivers/acpi/pci_link.c:acpi_link_lock - drivers/acpi/sbs.c:acpi_sbs_callback() - drivers/acpi/sbshc.c:acpi_smbus_transaction() - drivers/acpi/sleep/main.c:acpi_sleep_prepare() - #if 0 the following unused global functions: - drivers/acpi/numa.c:acpi_unmap_pxm_to_node() - remove the following unused EXPORT_SYMBOL's: - acpi_register_gsi - acpi_unregister_gsi - acpi_strict - acpi_bus_receive_event - register_acpi_bus_type - unregister_acpi_bus_type - acpi_os_printf - acpi_os_sleep - acpi_os_stall - acpi_os_read_pci_configuration - acpi_os_create_semaphore - acpi_os_delete_semaphore - acpi_os_wait_semaphore - acpi_os_signal_semaphore - acpi_os_signal - acpi_pci_irq_enable - acpi_get_pxm Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Driver core: change sysdev classes to use dynamic kobject namesKay Sievers2008-01-241-1/+1
| | | | | | | | | | All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-231-2/+7
| | | | | | | | | | drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: drivers/acpi/pci_link.c: lower printk severityDan Aloni2007-07-221-1/+1
| | | | | | Signed-off-by: Dan Aloni <da-x@monatomic.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-121-1/+0
| | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: fix acpi_driver.name usageLen Brown2007-02-121-1/+1
| | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-121-1/+1
| | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: use new ACPI headers.Alexey Starikovskiy2007-02-021-1/+1
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove obsolete Flags parameter.Bob Moore2007-02-021-1/+1
| | | | | | | | | Remove flags parameter for acpi_{get,set}_register(). It is no longer necessary now that these functions use a spinlock for mutual exclusion. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: replace kmalloc+memset with kzallocBurman Yan2006-12-201-4/+2
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull style into test branchLen Brown2006-12-161-4/+4
|\ | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/osl.c drivers/acpi/sbs.c
| * ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt2006-10-141-4/+4
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_KERNELJiri Kosina2006-10-141-1/+1
|/ | | | | | | | | acpi_pci_link_set() allocates both with interrupts on and with interrupts off (resume-time), so check interrupts and decide on GFP_ATOMIC or GFP_KERNEL at run-time. Signed-off-by: Jiri Kosina <jikos@jikos.cz> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: acpi_os_allocate() fixesLen Brown2006-07-101-7/+0
| | | | | | | | | | | | | | | | Replace acpi_in_resume with a more general hack to check irqs_disabled() on any kmalloc() from ACPI. While setting (system_state != SYSTEM_RUNNING) on resume seemed more general, Andrew Morton preferred this approach. http://bugzilla.kernel.org/show_bug.cgi?id=3469 Make acpi_os_allocate() into an inline function to allow /proc/slab_allocators to work. Delete some memset() that could fault on allocation failure. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: Remove unneeded acpi_handle from driver.Patrick Mochel2006-06-301-4/+1
| | | | | Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: pci_link: Use acpi_device's handle instead of driver'sPatrick Mochel2006-06-301-5/+5
| | | | | Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete tracing macros from drivers/acpi/*.cPatrick Mochel2006-06-271-60/+45
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown2006-06-271-18/+18
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_WARNING() -- use printk(KERN_WARNING...)Len Brown2006-06-271-17/+17
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger2006-06-261-49/+41
| | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'release' of ↵Linus Torvalds2006-06-231-12/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits) ACPI: suppress power button event on S3 resume ACPI: resolve merge conflict between sem2mutex and processor_perflib.c ACPI: use for_each_possible_cpu() instead of for_each_cpu() ACPI: delete newly added debugging macros in processor_perflib.c ACPI: UP build fix for bugzilla-5737 Enable P-state software coordination via _PDC P-state software coordination for speedstep-centrino P-state software coordination for acpi-cpufreq P-state software coordination for ACPI core ACPI: create acpi_thermal_resume() ACPI: create acpi_fan_suspend()/acpi_fan_resume() ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend() ACPI: create acpi_device_suspend()/acpi_device_resume() ACPI: replace spin_lock_irq with mutex for ec poll mode ACPI: Allow a WAN module enable/disable on a Thinkpad X60. sem2mutex: acpi, acpi_link_lock ACPI: delete unused acpi_bus_drivers_lock sem2mutex: drivers/acpi/processor_perflib.c ACPI add ia64 exports to build acpi_memhotplug as a module ACPI: asus_acpi_init(): propagate correct return value ... Manual resolve of conflicts in: arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c include/acpi/processor.h
| * sem2mutex: acpi, acpi_link_lockIngo Molnar2006-05-131-12/+13
| | | | | | | | | | | | | | | | | | | | | | Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Make sure to re-enable SCI after an ACPI suspendLinus Torvalds2006-06-191-0/+3
|/ | | | | | | According to the ACPI spec, it should be enabled on return from suspend, but bugs happen. Apparently especially on the Apple Intel Macs. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ACPI] remove "Resource isn't an IRQ" warningLen Brown2006-01-261-1/+3
| | | | | | | | | In the case where a (broken) BIOS gives us a blank _CRS for a PCI Interrupt Link Device, the acpi_walk_resources() will not terminate, but will then give the callback the resource end tag. Ignore the end tag. Signed-off-by: Len Brown <len.brown@intel.com>
* Pull pnpacpi into acpica branchLen Brown2006-01-071-1/+1
|\
| * [PATCH] ACPI: fix sleeping whilst atomic warnings on resumeDave Jones2005-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been broken for months. On resume, we call acpi_pci_link_set() with interrupts off, so we get a warning when we try to do a kmalloc of non atomic memory. The actual allocation is just 2 long's (plus extra byte for some reason I can't fathom), so a simple conversion to GFP_ATOMIC is probably the safest way to fix this. The error looks like this.. Debug: sleeping function called from invalid context at mm/slab.c:2486 in_atomic():0, irqs_disabled():1 [<c0143f6c>] kmem_cache_alloc+0x40/0x56 [<c0206a2e>] acpi_pci_link_set+0x3f/0x17f [<c0206f96>] irqrouter_resume+0x1e/0x3c [<c0239bca>] __sysdev_resume+0x11/0x6b [<c0239e88>] sysdev_resume+0x34/0x52 [<c023de21>] device_power_up+0x5/0xa Signed-off-by: Dave Jones <davej@redhat.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [ACPI] ACPICA 20050930Bob Moore2005-12-101-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | [ACPI] handle ACPICA 20050916's acpi_resource.type renameLen Brown2005-09-221-5/+5
|/ | | | Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] Lindent all ACPI filesLen Brown2005-08-051-239/+238
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] whitespacePavel Machek2005-08-051-7/+3
| | | | | Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Len Brown <len.brown@intel.com>
OpenPOWER on IntegriCloud