summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
Commit message (Collapse)AuthorAgeFilesLines
* ACPI: Enhance /sys/firmware/interrupts to allow enable/disable/clear from ↵Zhang Rui2008-07-161-3/+15
| | | | | | | | | | | | | | | | | | | | | | | user-space Allow users to enable/disable/clear a specific & valid GPE/Fixed Event in user space. This is useful for debugging, especially for some interrupt storm issues. All wakeup GPEs are disabled and they can not be enabled at runtime, and we mark them as invalid. All GPEs that don't have a _Lxx/_Exx method are marked as invalid. All Fixed Events that don't have an event handler are marked as invalid and they can't be enabled until an event handler is registered. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Ling Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
* ACPICA: Eliminate acpi_native_uint type v2Bob Moore2008-07-166-26/+22
| | | | | | | | | | | | | | No longer needed; replaced mostly with u32, but also acpi_size where a type that changes 32/64 bit on 32/64-bit platforms is required. v2: Fix a cast of a 32-bit int to a pointer in ACPI to avoid a compiler warning. from David Howells Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
* ACPICA: Fix for hang on GPE method invocationBob Moore2008-07-162-5/+0
| | | | | | | | | | | | Fixes problem where the new method argument count validation mechanism will enter an infinite loop when a GPE method is dispatched. Problem fixed be removing the obsolete code that passes GPE block information to the notify handler via the control method parameter pointer. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
* Make GPE disable more robustBob Moore2008-07-161-4/+14
| | | | | | | | | | | | | | Implemented another change for the GPE disable. We now perform a read-change-write of the enable register instead of simply writing out the cached enable mask. This will prevent inadvertent enabling of GPEs if a rogue GPE is received during initialization (before GPE handlers are installed.) http://bugzilla.kernel.org/show_bug.cgi?id=6217 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
*-. Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', ↵Len Brown2008-04-301-4/+0
|\ \ | | | | | | | | | 'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release
| | * ACPICA: always disable GPE when requestedDamián Viano2008-04-291-4/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_ev_disable_gpe() has an optimization where it doesn't disable a GPE that it "doesn't have to". Unfortunately, it can get tricked by AML that scribbles on register state behind its back. So when asked to disable a GPE, simply do it -- a redundant register write in the common case is a fair price to pay to be bomb-proof for the rare cases. http://bugzilla.kernel.org/show_bug.cgi?id=6217 Signed-off-by: Damián Viano <des@debian.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: update Intel copyrightLen Brown2008-04-2310-10/+10
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Update for new Notify valuesZhang Rui2008-04-221-36/+23
| | | | | | | | | | | | | | | | | | | | | | | | Implemented several changes for Notify handling: Added support for new Notify values (ACPI 2.0+) and improved the Notify debug output. Notify on PowerResource objects is no longer allowed, as per the ACPI specification. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Cosmetic changes only, no functional changesBob Moore2008-04-222-4/+5
| | | | | | | | | | | | | | | | Lint changes, fix compiler warnings, etc. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Fix for update of the Global Lock HandleBob Moore2008-04-222-8/+14
| | | | | | | | | | | | | | | | | | | | | | Fixed a problem where the global lock handle was not properly updated if a thread that acquired the global lock via executing AML code then attempted to acquire the lock via the AcpiAcquireGlobalLock interface. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Misc fixes for recent global lock code updateBob Moore2008-04-221-1/+1
| | | | | | | | | | | | | | | | Fixes as a result of running full validation test suite. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Update for mutiple global lock acquisitions by same threadBob Moore2008-04-222-9/+28
|/ | | | | | | | | | | Allows AcpiAcquireGlobalLock external interface to be called multiple times by the same thread. Allows use of AML fields that require the global lock while the running AML is already holding the global lock. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branches 'release' and 'stats' into releaseLen Brown2008-02-072-2/+2
|\
| * ACPI: create /sys/firmware/acpi/interruptsLen Brown2008-02-062-2/+2
| | | | | | | | | | | | | | | | See Documentation/ABI/testing/sysfs-firmware-acpi Based-on-original-patch-by: Luming Yu <luming.yu@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | Merge branches 'release' and 'gpe-ack' into releaseLen Brown2008-02-071-4/+13
|\ \
| * | ACPI: Defer enabling of level GPE until all pending notifies doneAlexey Starikovskiy2007-12-061-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Level GPE should not be enabled until all work caused by it is done, e.g. all Notify() methods are completed. This can be accomplished by appending enable_gpe function to the end of notify queue. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
| | |
| \ \
*-. \ \ Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', ↵Len Brown2008-02-071-4/+4
|\ \ \ \ | | |/ / | |_| / |/| | 'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release
| * | ACPI: disable stray GPE, prevent ACPI interrupt stormZhang Rui2007-11-201-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GPEs are disabled depending on their type -- WAKE, WAKE_RUN, and RUNTIME. An error is returned if we are asked to disable a GPE that has no type. But at least one system exists that enables a GPE from AML that is not the EC GPE, and has no _Lxx/_Exx AML handler, and is thus never initialized. In this case, when an external CRT is plugged in, the GPE fires, we attempt to disable the GPE, but instead just return an error. So the GPE stays asserted and an ACPI interrupt storm follows. The fix is to disable a firing GPE, even if it comes from outer space. http://bugzilla.kernel.org/show_bug.cgi?id=6217 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: fix acpi_serialize hang regressionBob Moore2008-01-101-4/+4
|/ | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=8171 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write}Alexey Starikovskiy2007-10-101-4/+2
| | | | | | | | | | use_lock flag is used once for acpi_hw_register_read, and never for acpi_hw_register_write. It will greatly simplify understanding of locking if we just drop this use_lock altogether, and wrap the only call to ..._read in lock/unlock. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - ACPICA modificationsThomas Renninger2007-07-231-1/+1
| | | | | | | Define standardized HIDs - Rename current acpi_device_id to acpica_device_id Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: fix memory leak in acpi_ev_pci_config_region_setup() error pathJesper Juhl2007-07-181-0/+1
| | | | | | | | acpi_ev_pci_config_region_setup() leaks pci_id in the error case of "if (!pci_device_node)" Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Fixed possible corruption of global GPE listBob Moore2007-07-031-0/+4
| | | | | | | | | Fixed a problem in acpi_ev_delete_gpe_xrupt where the global interrupt list could be corrupted if the interrupt being removed was at the head of the list. Reported by Linn Crosetto. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: LindentLen Brown2007-05-096-12/+11
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* Revert "Execute AML Notify() requests on stack."Len Brown2007-05-091-5/+6
| | | | | | | | | | | | | | | | | This reverts commit 5f7748cf91558a5026ded5be93c5bf6c1ac34edf. While that change fixed the HP http://bugzilla.kernel.org/show_bug.cgi?id=5534 it broke the ACER: http://bugzilla.kernel.org/show_bug.cgi?id=8385 which as AML that caused Linux go recursive and stack fault. So this commit by itself will restore the ACER and again break the HP, which we'll fix another way. Signed-off-by: Len Brown <len.brown@intel.com>
* Revert "ACPICA: revert "acpi_serialize" changes"Len Brown2007-05-093-21/+8
| | | | | | | | | | | | This reverts commit a8f4af6dc6600980885c594f52eecd60edd62013. Thus restoring ACPICA's new acpi_serialize code. This commit by itself may cause a regression, but it is reverted in this order so that subsequent reverts reverts under this one can be made without conflict. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: revert "acpi_serialize" changesLen Brown2007-03-153-8/+21
| | | | | | | | | | | | This reverts 977a6226feae3e2c10a4d8227625ff0f04b49239 and reverts 1ba753acb372c2955a4843302e92e49ce82e2fea and updates acpi_ev_queue_notify_request() to restore the previous implementation of the "acpi_serialize" workaround. http://bugzilla.kernel.org/show_bug.cgi?id=8171 Signed-off-by: Len Brown <len.brown@intel.com>
* [PATCH] misc NULL noiseAl Viro2007-03-141-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ACPICA: Fix ACPI Global Lock re-entrancyAlexey Starikovskiy2007-03-071-2/+23
| | | | | | | | | | | | patch "Delete recursive feature of ACPI Global Lock" broke re-entrancy of the Global Lock. The common routine to acquire GL is acpi_ev_acquire_global_lock, so check for re-entrancy _must_ be there, and not anywhere else. http://bugzilla.kernel.org/show_bug.cgi?id=8066#c9 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull bugzilla-5534 into release branchLen Brown2007-02-161-6/+5
|\
| * Execute AML Notify() requests on stack.Alexey Starikovskiy2007-02-151-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>
* | ACPI: Disable wake GPEs only once.Alexey Starikovskiy2007-02-131-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>
* ACPICA: Update copyright to 2007.Bob Moore2007-02-0210-10/+10
| | | | | | | | | Added 2007 copyright to all module headers and signons. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and the utilities. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Removed all 16-bit support.Bob Moore2007-02-021-5/+5
| | | | | | | | | | | | Support for 16-bit ACPICA has been completely removed since it is no longer necessary and it clutters the code. All 16-bit macros, types, and conditional compiles have been removed, cleaning up and simplifying the code across the entire subsystem. DOS support is no longer needed since the Linux firmware kit is now available. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Add include of actables.hBob Moore2007-02-021-0/+1
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Fail AcpiEnable if ACPI tables not loaded.Bob Moore2007-02-021-0/+8
| | | | | | | | AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove global lock handler on AcpiTerminate.Bob Moore2007-02-021-0/+33
| | | | | | | Added AcpiEvRemoveGlobalLockHandler Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: _CID support for PCI Root Bridge detection.Bob Moore2007-02-021-38/+125
| | | | | | | | | Implemented _CID support for PCI Root Bridge detection. If the _HID does not match the predefined root bridge IDs, the _CID list (if present) is now obtained and also checked for an ID match Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Use faster ByIndex interface to get FACSBob Moore2007-02-021-2/+2
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove obsolete Flags parameter.Bob Moore2007-02-023-12/+10
| | | | | | | | | 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>
* ACPICA: Re-implement interpreters' "serialized mode"Bob Moore2007-02-022-15/+6
| | | | | | | | | | | | | | | Enhanced the implementation of the interpreters' serialized mode (boot with "acpi_serialize" to set acpi_glb_all_methods_serialized flag.) When this mode is specified, instead of creating a serialization semaphore per control method, the interpreter lock is simply no longer released before a blocking operation during control method execution. This effectively makes the AML Interpreter single-threaded. The overhead of a semaphore per-method is eliminated. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Store GPE number instead of bitmaskAlexey Starikovskiy2007-02-022-4/+6
| | | | | | | | Update internal GPE data structure to simplify debug, use gpe_number instead of register bitmask. Signed-off-by: Bob Moore <bob.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Disable all wake GPEs after first one recievedBob Moore2007-02-021-61/+17
| | | | | | | | | | Change for GPE support: when a wake GPE is received, now all wake GPEs are immediately disabled to prevent the waking GPE from firing again, and to prevent other wake GPEs from interrupting the wake process. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Add acpi_gpe_count global to track the number of GPE eventsBob Moore2007-02-021-0/+2
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Implement simplified Table ManagerBob Moore2007-02-025-51/+48
| | | | | | | | | | | | | The Table Manager component has been completely redesigned and reimplemented. The new design is much simpler, and reduces the overall code and data size of the kernel-resident ACPICA by approximately 5%. Also, it is now possible to obtain the ACPI tables very early during kernel initialization, even before dynamic memory management is initialized. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update debug outputBob Moore2007-02-021-1/+1
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Release global lock from interrupt handlerBob Moore2007-02-021-35/+15
| | | | | | | | | | The ACPI Global Lock interrupt handler no longer queues the execution of a separate thread to signal the global lock semaphore. Instead, the semaphore is signaled directly from the interrupt handler. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Delete recursive feature of ACPI Global LockBob Moore2007-02-021-54/+59
| | | | | | | | | | | | | Completed a new design and implementation for the ACPI Global Lock support. On the OS side, the global lock is now treated as a standard AML mutex. Previously, multiple OS threads could acquire the global lock simultaneously, but this could cause the BIOS to be starved by the lock in cases such as the Embedded Controller driver, where there is a tight coupling between the OS and the BIOS. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update function headerBob Moore2007-02-021-0/+3
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Get rid of 'unused variable' warning in acpi_ev_global_lock_handler()Jesper Juhl2006-11-061-1/+0
| | | | | | | | | Fix this warning : drivers/acpi/events/evmisc.c: In function `acpi_ev_global_lock_handler': drivers/acpi/events/evmisc.c:334: warning: unused variable `status' Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
OpenPOWER on IntegriCloud