Skip to content
Commit 0995b2cd authored by James Morse's avatar James Morse
Browse files

UNTESTED firmware: arm_sdei: Allow events to be disabled from within their handler



The SDEI API provides a way to bind an interrupt to an event number. This
causes firmware to take ownership of the interrupt, and deliver it as an
unmaskable SDE event.

For level-triggered interrupts we may be unable to update the device that
triggered the interrupt from the NMI-like SDE context. The handler is
expected to disable the event, then schedule some work to do the update.

To avoid taking locks and walking lists, we stash the running event
number in a per-cpu variable. If a disable call is received for this
event, we know it must be registered so we make the api call directly.

We can't signal remote CPUs, so for private events an in-handler
disable() call will only disable the event on the current CPU. Any
subsequent enable() call will re-enable the event on all CPUs. If
the handler disables a private event, then cpuhotplug offlines, then
onlines the CPU, the event will become re-enabled.

Signed-off-by: James Morse's avatarJames Morse <james.morse@arm.com>
parent 2fbfac5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment