]> Git Repo - linux.git/commit
ACPI: OSL: Use a threaded interrupt handler for SCI
authorRafael J. Wysocki <[email protected]>
Mon, 27 Nov 2023 19:57:43 +0000 (20:57 +0100)
committerRafael J. Wysocki <[email protected]>
Thu, 30 Nov 2023 13:29:35 +0000 (14:29 +0100)
commit7a36b901a6eb0e9945341db71ed3c45c7721cfa9
tree7697c86e4782dbcd4700f4016754facaa0cf4e81
parent2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
ACPI: OSL: Use a threaded interrupt handler for SCI

In the current arrangement, all of the acpi_ev_sci_xrupt_handler() code
is run as an interrupt handler for the SCI, in interrupt context.  Among
other things, this causes it to run with local interrupts off which
can be problematic if many GPEs are enabled and they are located in the
I/O address space, for example (because in that case local interrupts
will be off for the duration of all of the GPE hardware accesses carried
out while handling an SCI combined and that may be quite a bit of time
in extreme scenarios).

However, there is no particular reason why the code in question really
needs to run in interrupt context and in particular, it has no specific
reason to run with local interrupts off.  The only real requirement is
to prevent multiple instences of it from running in parallel with each
other, but that can be achieved regardless.

For this reason, use request_threaded_irq() instead of request_irq() for
the ACPI SCI and pass IRQF_ONESHOT to it in flags to indicate that the
interrupt needs to be masked while its handling thread is running so as
to prevent it from re-triggering while it is being handled (and in
particular until the final handled/not handled outcome is determined).

While at it, drop a redundant local variable from acpi_irq().

Signed-off-by: Rafael J. Wysocki <[email protected]>
Tested-by: Mario Limonciello <[email protected]>
Tested-by: Mika Westerberg <[email protected]>
drivers/acpi/osl.c
This page took 0.055286 seconds and 4 git commands to generate.