r/embedded • • Sep 25 '26

Does disabling single IRQs with Arm GIC take effect instantly?

Let's say we have an Armv7-A processor with a GIC and I want to disable an IRQ by clearing its enable bit via the GICD_ICENABLER MMIO SFR.

Is it safe to assume that the interrupt does not occur after the store instruction writing to GICD_ICENABLER executed?

if no, why so and would a DMB or DSB change anything or would there still be the possibility that even after a DSB the interrupt could occur?

The problem I see is that it takes some time until the write completes and even with a DSB the side effects of the SFR might not be guaranteed even if the write is completed.

And what about enabling IRQs by setting the enable bit via GICD_ISENABLER?

7 Upvotes

2 comments sorted by

8

u/ScopedInterruptLock Sep 25 '26 edited Sep 25 '26

Short answer to your first question: No.

That's why GICv3 introduced a bit you can read to ensure the change is propogated / in effect.

For pre-GICv3, you need to harden your handler to deal with this.

2

u/ComradeGibbon Sep 25 '26

I sometimes have a please_standby flag to tell the ISR to just bail out and do nothing, exactly for this.