Skip to content

ACPI: OSL/EC: Use spin locks without disabling interrupts

Rafael J. Wysocki linux-acpi lkml 1 version In review

Get series with b4
b4 am 2330034.ElGaqSPkdT@kreacher

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ACPI: OSL: Use spin locks without disabling interruptsdrivers/acpi/osl.c+4 -60 replies
2/3ACPI: EC: Use a threaded handler for dedicated IRQdrivers/acpi/ec.c+2 -20 replies
3/3ACPI: EC: Use a spin lock without disabing interruptsdrivers/acpi/ec.c+46 -660 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/3] ACPI: OSL/EC: Use spin locks without disabling interrupts

Hi Everyone,

After

https://patchwork.kernel.org/project/linux-acpi/patch/5745568.DvuYhMxLoT@kreacher/

the SCI interrupt handler is threaded, so ACPICA spin locks can be used without disabling interrupts, because they cannot be acquired from a hardirq handler running on the same CPU as any code already holding the spin lock. This patch [1/3] removes disabling interrupts from acpi_os_acquire_lock() and updates acpi_os_release_lock() accordingly.

Patch [2/2] uses the observation that if acpi_handle_interrupt() can run in a threaded interrupt handler in the GPE case, it can also run in a threaded interrupt handler in the dedicated IRQ case, so it makes the EC driver use a threaded handler for the dedicated EC interrupt.

Patch [3/3], in analogy with patch [1/3], uses the observation that after patch [2/2] all of the EC code runs in thread context, so it need not disable interrupts on the local CPU before acquiring a spin lock, so the EC driver is updated to operate its spin lock without disabling interrupts.

Thanks!