Skip to content

Commit 230b303

Browse files
committed
powerpc: Fix missing/delayed calls to irq_work
When replaying interrupts (as a result of the interrupt occurring while soft-disabled), in the case of the decrementer, we are exclusively testing for a pending timer target. However we also use decrementer interrupts to trigger the new "irq_work", which in this case would be missed. This change the logic to force a replay in both cases of a timer boundary reached and a decrementer interrupt having actually occurred while disabled. The former test is still useful to catch cases where a CPU having been hard-disabled for a long time completely misses the interrupt due to a decrementer rollover. CC: <[email protected]> [v3.4+] Signed-off-by: Benjamin Herrenschmidt <[email protected]> Tested-by: Steven Rostedt <[email protected]>
1 parent bf59390 commit 230b303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ notrace unsigned int __check_irq_replay(void)
162162
* in case we also had a rollover while hard disabled
163163
*/
164164
local_paca->irq_happened &= ~PACA_IRQ_DEC;
165-
if (decrementer_check_overflow())
165+
if ((happened & PACA_IRQ_DEC) || decrementer_check_overflow())
166166
return 0x900;
167167

168168
/* Finally check if an external interrupt happened */

0 commit comments

Comments
 (0)