aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-03-01[PATCH] ACPI: make bay depend on dockKristen Carlson Accardi1-0/+1
Since the bay driver depends on the dock driver for proper notification, make this driver depend on the dock driver. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20backlight: Separate backlight properties from backlight ops pointersRichard Purdie4-32/+22
Per device data such as brightness belongs to the indivdual device and should therefore be separate from the the backlight operation function pointers. This patch splits the two types of data and allows simplifcation of some code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20backlight: Remove unneeded owner fieldRichard Purdie4-4/+0
Remove uneeded owner field from backlight_properties structure. Nothing uses it and it is unlikely that it will ever be used. The backlight class uses other means to ensure that nothing references unloaded code. Based on a patch from Dmitry Torokhov <dtor@insightbb.com> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-16Pull bugzilla-7897 into release branchLen Brown1-11/+9
2007-02-16Pull bugzilla-7887 into release branchLen Brown3-12/+17
2007-02-16Pull bugzilla-7570 into release branchLen Brown3-20/+27
2007-02-16Pull bugzilla-7200 into release branchLen Brown1-0/+15
2007-02-16Pull bugzilla-7122 into release branchLen Brown1-21/+126
2007-02-16Pull bugzilla-5534 into release branchLen Brown5-35/+27
2007-02-16Pull remove-hotkey into release branchLen Brown7-1076/+0
2007-02-16Pull fluff into release branchLen Brown34-119/+97
Conflicts: arch/x86_64/pci/mmconfig.c drivers/acpi/bay.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: hotkey: remove driver, per feature-removal-schedule.txtLen Brown7-1076/+0
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16Pull misc-for-upstream into release branchLen Brown13-143/+110
Conflicts: drivers/usb/misc/appledisplay.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: bay: use IS_ERR for return of register_platform_device_simpleHenrique de Moraes Holschuh1-1/+1
register_platform_device_simple returns ERR_PTR(foo), so test it with IS_ERR(foo). Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: acpi_unload_table_id() always returns errorJohn Keller1-3/+4
acpi_unload_table_id() is always returning an error status. Also, once the matching table is found, don't bother looking for another match. Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: ec: add unlock in error pathAlexey Starikovskiy1-1/+3
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16[PATCH] clockevents: i386 driversThomas Gleixner1-0/+38
Add clockevent drivers for i386: lapic (local) and PIT/HPET (global). Update the timer IRQ to call into the PIT/HPET driver's event handler and the lapic-timer IRQ to call into the lapic clockevent driver. The assignement of timer functionality is delegated to the core framework code and replaces the compile and runtime evalution in do_timer_interrupt_hook() Use the clockevents broadcast support and implement the lapic_broadcast function for ACPI. No changes to existing functionality. [ kdump fix from Vivek Goyal <vgoyal@in.ibm.com> ] [ fixes based on review feedback from Arjan van de Ven <arjan@infradead.org> ] Cleanups-from: Adrian Bunk <bunk@stusta.de> Build-fixes-from: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16[PATCH] ACPI keep track of timer broadcastingThomas Gleixner1-19/+47
This is a preperatory patch for highres/dyntick: - replace the big #ifdef ARCH_APICTIMER_STOPS_ON_C3 hackery by functions - remove the double switch in the power verify function (in the worst case we switched ipi to apic and 20usec later apic to ipi) - keep track of the the state which stops local APIC timer Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Len Brown <len.brown@intel.com> Cc: <linux-acpi@vger.kernel.org> Cc: Andi Kleen <ak@suse.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16[PATCH] ACPI: fix missing include for UPThomas Gleixner1-0/+10
apic.h does not get included on UP compiles. That way the APICTIMER_STOPS_ON_C3 is not there and UP boxen have no support for timer broadcasting. This was never noticed, because the lapic timer is only used for profiling on UP. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: john stultz <johnstul@us.ibm.com> Cc: Len Brown <len.brown@intel.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16ACPI: fix fan after resume from S3Konstantin Karasyov3-20/+27
http://bugzilla.kernel.org/show_bug.cgi?id=7570 Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: update acpi_power_resume() per new acpi_op_resumeLen Brown1-2/+2
drivers/acpi/power.c:69: warning: initialization from incompatible pointer type Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: Thermal issues on HP nx6325Konstantin Karasyov1-21/+126
The previous reference counting scheme to enable power resources got confused when multiple devices were present that might repeatedly enable or disable the resource and throw off the count. The new code simply lists the referencing devices which are requesting the resource to be enabled. When there are none, then it is off. Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: thermal: fix units in debug outputSanjoy Mahajan1-1/+1
http://bugzilla.kernel.org/show_bug.cgi?id=4972 Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: include apic.h in processor driver for benefit of UP kernelsThomas Gleixner1-0/+8
apic.h does not get included on UP compiles. That way the APICTIMER_STOPS_ON_C3 is not there and UP boxen have no support for timer broadcasting. This was never noticed, because the lapic timer is only used for profiling on UP. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: john stultz <johnstul@us.ibm.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: remove non-PNPACPI version of get_rtc_dev()Len Brown1-27/+0
It isn't needed in ACPI code anymore because now ACPI always includes PNPACPI. Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: always enable CONFIG_PNPACPI on CONFIG_ACPI kernelsLen Brown1-0/+1
We removed the ACPI motherboard driver which handled the ACPI=y, PNP=n case, so now we need to enforce that PNP & PNPACPI are always enabled for ACPI kernels. Most major distros ship this way this already. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: remove acpi_os_readable(), acpi_os_writable()Len Brown1-20/+0
...which are now unused Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: Fix sparse warningsRandy Dunlap3-3/+3
Use NULL for pointers drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15Execute AML Notify() requests on stack.Alexey Starikovskiy1-6/+5
HP nx6125/nx6325/... machines have a _GPE handler with an infinite loop sending Notify() events to different ACPI subsystems. The notify handler in the ACPI thermal driver is a C-routine, which may invoke the ACPI interpreter again to get access to some ACPI variables such as temperature. (acpi_evaluate_xxx) On these HP machines such an evaluation changes state of an ASL variable and lets the loop above break. In the current ACPI implementation, Notify requests are being deferred to the same kacpid workqueue on which the above GPE handler with infinite loop is executing. Thus we have a deadlock -- loop will continue to spin, sending notify events, and at the same time preventing these notify events from being run on a workqueue. All notify events are deferred, thus we see explosion in memory consumption. Also as GPE handling is blocked, machines overheat because ACPI-based fan control is stalled. Eventually by external poll of the same acpi_evaluate, kacpid is released and all the queued notify events are free to run, thus 100% CPU utilization by kacpid for several seconds or more. To prevent this failure, Linux must not send notify events to the kacpid workqueue -- either executing them immediately or putting them on some other thread. The first attempt to create a new thread was done by Peter Wainwright He created a bunch of threads, which were stealing work from a kacpid workqueue. This patch appeared in 2.6.15-based kernel shipped with Ubuntu 6.06 LTS. Second attempt was done by Alexey Starikovskiy, who created a new thread for each Notify event. This worked OK on HP nx machines, but broke Linus' Compaq n620c, by producing threads with a speed what they stopped the machine completely. Thus this patch was reverted from 2.6.18-rc2. Alexey re-made the patch to create second workqueue just for notify events, thus hopping it will not break Linus' machine. Patch was tested on the same HP nx machines in #5534 and #7122, but this broke Linus' machine also and was reverted from 2.6.19-rc with much fanfair. The 4th patch inserted schedule_timeout(1) into deferred execution of kacpid, if we had any notify requests pending, but Linus decided that it was too complex (involved either changes to workqueue to see if it's empty or atomic inc/dec). Then a 5th attempt did a yield() to every GPE execution. Finally, this 6th generation patch simply executes the notify handler on the stack. Previous attempts to do this simple solution failed because of issues in AML mutex re-entrancy which are now fixed by the previous patch in this series. http://bugzilla.kernel.org/show_bug.cgi?id=5534 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPICA: fix AML mutex re-entrancyAlexey Starikovskiy4-29/+22
ACPI AML supports "serialized" methods which are protected by an implicit mutex. The mutex is re-entrant for that AML thread to allow recursion. However, Linux implements notify() by creating a new AML thread. So for systems where notify() re-enters a serialized method, deadlock results. The fix is to use the Linux thread_id as the key to allowing re-entrancy, not the AML thread pointer. http://bugzilla.kernel.org/show_bug.cgi?id=5534 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-14Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6Linus Torvalds1-0/+9
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (94 commits) [PATCH] x86-64: Remove mk_pte_phys() [PATCH] i386: Fix broken CONFIG_COMPAT_VDSO on i386 [PATCH] i386: fix 32-bit ioctls on x64_32 [PATCH] x86: Unify pcspeaker platform device code between i386/x86-64 [PATCH] i386: Remove extern declaration from mm/discontig.c, put in header. [PATCH] i386: Rename cpu_gdt_descr and remove extern declaration from smpboot.c [PATCH] i386: Move mce_disabled to asm/mce.h [PATCH] i386: paravirt unhandled fallthrough [PATCH] x86_64: Wire up compat epoll_pwait [PATCH] x86: Don't require the vDSO for handling a.out signals [PATCH] i386: Fix Cyrix MediaGX detection [PATCH] i386: Fix warning in cpu initialization [PATCH] i386: Fix warning in microcode.c [PATCH] x86: Enable NMI watchdog for AMD Family 0x10 CPUs [PATCH] x86: Add new CPUID bits for AMD Family 10 CPUs in /proc/cpuinfo [PATCH] i386: Remove fastcall in paravirt.[ch] [PATCH] x86-64: Fix wrong gcc check in bitops.h [PATCH] x86-64: survive having no irq mapping for a vector [PATCH] i386: geode configuration fixes [PATCH] i386: add option to show more code in oops reports ...
2007-02-14[PATCH] remove many unneeded #includes of sched.hTim Schmielau4-4/+2
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-13i2c: Declare more i2c_adapter parent devicesJean Delvare1-0/+1
Declare the parent device of i2c_adapter devices each time we can easily do so. It makes the i2c_adapter appear at the right place in the device tree, rather than as a platform device. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Len Brown <len.brown@intel.com> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: v4l-dvb-maintainer@linuxtv.org Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2007-02-13[PATCH] x86: fix laptop bootup hang in init_acpi()Ingo Molnar1-0/+9
During kernel bootup, a new T60 laptop (CoreDuo, 32-bit) hangs about 10%-20% of the time in acpi_init(): Calling initcall 0xc055ce1a: topology_init+0x0/0x2f() Calling initcall 0xc055d75e: mtrr_init_finialize+0x0/0x2c() Calling initcall 0xc05664f3: param_sysfs_init+0x0/0x175() Calling initcall 0xc014cb65: pm_sysrq_init+0x0/0x17() Calling initcall 0xc0569f99: init_bio+0x0/0xf4() Calling initcall 0xc056b865: genhd_device_init+0x0/0x50() Calling initcall 0xc056c4bd: fbmem_init+0x0/0x87() Calling initcall 0xc056dd74: acpi_init+0x0/0x1ee() It's a hard hang that not even an NMI could punch through! Frustratingly, adding printks or function tracing to the ACPI code made the hangs go away ... After some time an additional detail emerged: disabling the NMI watchdog made these occasional hangs go away. So i spent the better part of today trying to debug this and trying out various theories when i finally found the likely reason for the hang: if acpi_ns_initialize_devices() executes an _INI AML method and an NMI happens to hit that AML execution in the wrong moment, the machine would hang. (my theory is that this must be some sort of chipset setup method doing stores to chipset mmio registers?) Unfortunately given the characteristics of the hang it was sheer impossible to figure out which of the numerous AML methods is impacted by this problem. As a workaround i wrote an interface to disable chipset-based NMIs while executing _INI sections - and indeed this fixed the hang. I did a boot-loop of 100 separate reboots and none hung - while without the patch it would hang every 5-10 attempts. Out of caution i did not touch the nmi_watchdog=2 case (it's not related to the chipset anyway and didnt hang). I implemented this for both x86_64 and i686, tested the i686 laptop both with nmi_watchdog=1 [which triggered the hangs] and nmi_watchdog=2, and tested an Athlon64 box with the 64-bit kernel as well. Everything builds and works with the patch applied. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-13ACPI: acpi_table_parse_madt_family() is not MADT specificLen Brown2-19/+13
acpi_table_parse_madt_family() is also used to parse SRAT entries. So re-name it to acpi_table_parse_entries(), and re-name the madt-specific variables within it accordingly. cosmetic only. Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13ACPI: acpi_madt_entry_handler() is not MADT specificLen Brown2-4/+4
acpi_madt_entry_handler() is also used for the SRAT, so re-name it acpi_table_entry_handler(). cosmetic only. Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13ACPI: acpi_table_parse() now returns success/fail, not countLen Brown2-6/+13
Returning count for tables that are supposed to be unique was useless and confusing. Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13ACPI: Disable wake GPEs only once.Alexey Starikovskiy1-11/+0
fixes Suspend/Resume regressions due to recent ACPICA update. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-12ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown23-36/+13
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>
2007-02-12ACPI: fix acpi_driver.name usageLen Brown17-17/+17
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>
2007-02-12ACPI: clean up ACPI_MODULE_NAME() useLen Brown32-39/+39
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>
2007-02-12ACPI: IA64: fix calculation of apic_idAlexey Starikovskiy1-1/+1
fix regression from recent table re-write Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10ACPI: sbs: fix present rateVladimir Lebedev1-11/+9
http://bugzilla.kernel.org/show_bug.cgi?id=7897 Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10ACPI: battery: check for battery present on /proc/battery accessVladimir Lebedev1-0/+15
http://bugzilla.kernel.org/show_bug.cgi?id=7200 Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10ACPI: invoke acpi_sleep_init() earlierAlexey Starikovskiy2-7/+9
late_initcall() is too late for acpi_sleep_init(). Call it directly from acpi_init code. http://bugzilla.kernel.org/show_bug.cgi?id=7887 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10ACPI: Disable GPEs in preparation for sleep.Alexey Starikovskiy1-5/+8
http://bugzilla.kernel.org/show_bug.cgi?id=7887 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-09ACPI: ibm-acpi: cleanup init and exit pathsHenrique de Moraes Holschuh1-5/+8
Fix a small memory leak on module removal, and other assorted minor cleanups on the module init codepath. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-09ACPI: bay: fix wrong order of kzalloc argumentsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-09[PATCH] wrong order of kzalloc argumentsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09ACPI: toshiba_acpi: Use ARRAY_SIZE macro when appropriateAhmed S. Darwish1-1/+1
Use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>