Commit 56adbb7a authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64/interrupt: Fix false warning in context tracking due to idle state



Commit 17147677 ("context_tracking: Convert state to atomic_t")
added a CONTEXT_IDLE state which can be encountered by interrupts from
kernel mode in the idle thread, causing a false positive warning.

Fixes: 17147677 ("context_tracking: Convert state to atomic_t")
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220926054305.2671436-2-npiggin@gmail.com
parent a5edf981
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -195,7 +195,8 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs)
		 * so avoid recursion.
		 */
		if (TRAP(regs) != INTERRUPT_PROGRAM) {
			CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
			CT_WARN_ON(ct_state() != CONTEXT_KERNEL &&
				   ct_state() != CONTEXT_IDLE);
			if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
				BUG_ON(is_implicit_soft_masked(regs));
		}