Skip to content
Commit b59bc38c 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
enable() call will re-enable the event on all CPUs.

Signed-off-by: James Morse's avatarJames Morse <james.morse@arm.com>
parent 0ef392d4
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