1 What: /sys/firmware/acpi/interrupts/
3 Contact: Len Brown <lenb@kernel.org>
5 All ACPI interrupts are handled via a single IRQ,
6 the System Control Interrupt (SCI), which appears
7 as "acpi" in /proc/interrupts.
9 However, one of the main functions of ACPI is to make
10 the platform understand random hardware without
11 special driver support. So while the SCI handles a few
12 well known (fixed feature) interrupts sources, such
13 as the power button, it can also handle a variable
14 number of a "General Purpose Events" (GPE).
16 A GPE vectors to a specified handler in AML, which
17 can do a anything the BIOS writer wants from
18 OS context. GPE 0x12, for example, would vector
19 to a level or edge handler called _L12 or _E12.
20 The handler may do its business and return.
21 Or the handler may send send a Notify event
22 to a Linux device driver registered on an ACPI device,
23 such as a battery, or a processor.
25 To figure out where all the SCI's are coming from,
26 /sys/firmware/acpi/interrupts contains a file listing
27 every possible source, and the count of how many
28 times it has triggered.
30 $ cd /sys/firmware/acpi/interrupts
73 sci - The total number of times the ACPI SCI
74 has claimed an interrupt.
76 gpe_all - count of SCI caused by GPEs.
78 gpeXX - count for individual GPE source
80 ff_gbl_lock - Global Lock
84 ff_pwr_btn - Power Button
86 ff_rt_clk - Real Time Clock
88 ff_slp_btn - Sleep Button
90 error - an interrupt that can't be accounted for above.
92 invalid: it's either a wakeup GPE or a GPE/Fixed Event that
93 doesn't have an event handler.
95 disable: the GPE/Fixed Event is valid but disabled.
97 enable: the GPE/Fixed Event is valid and enabled.
99 Root has permission to clear any of these counters. Eg.
102 All counters can be cleared by clearing the total "sci":
105 None of these counters has an effect on the function
106 of the system, they are simply statistics.
108 Besides this, user can also write specific strings to these files
109 to enable/disable/clear ACPI interrupts in user space, which can be
110 used to debug some ACPI interrupt storm issues.
112 Note that only writting to VALID GPE/Fixed Event is allowed,
113 i.e. user can only change the status of runtime GPE and
114 Fixed Event with event handler installed.
116 Let's take power button fixed event for example, please kill acpid
117 and other user space applications so that the machine won't shutdown
118 when pressing the power button.
121 # press the power button for 3 times;
124 # echo disable > ff_pwr_btn
127 # press the power button for 3 times;
130 # echo enable > ff_pwr_btn
134 * this is because the status bit is set even if the enable bit is cleared,
135 * and it triggers an ACPI fixed event when the enable bit is set again
137 # press the power button for 3 times;
140 # echo disable > ff_pwr_btn
141 # press the power button for 3 times;
142 # echo clear > ff_pwr_btn /* clear the status bit */
143 # echo disable > ff_pwr_btn