Subject: Re: [PATCH] powerpc/irq: Fix another case of lazy IRQ state getting out of sync

From: Sukadev Bhattiprolu <[email-masked]>
Date: Fri, 11 May 2012 10:04:39 -0700

Benjamin Herrenschmidt [[email-masked]] wrote:
| So we have another case of paca->irq_happened getting out of
| sync with the HW irq state. This can happen when a perfmon
| interrupt occurs while soft disabled, as it will return to a
| soft disabled but hard enabled context while leaving a stale
| PACA_IRQ_HARD_DIS flag set.
| 
| This patch fixes it, and also adds a test for the condition
| of those flags being out of sync in arch_local_irq_restore()
| when CONFIG_TRACE_IRQFLAGS is enabled.
| 
| This helps catching those gremlins faster (and so far I
| can't seem see any anymore, so that's good news).
| 
| Signed-off-by: Benjamin Herrenschmidt <[email-masked]>
| ---
| 
| Please test ASAP as I need to send that to Linus today

Works for me. I was able to run my script over a 100 times. Without
the patch, it fails reliably first or second attempt.

Thanks for fixing it quickly.

Sukadev