Commit 2b43dd76 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64: enable MSR[EE] in irq replay pt_regs



Similar to commit 2b48e96b ("powerpc/64: fix irq replay
pt_regs->softe value"), enable MSR_EE in pt_regs->msr. This makes the
regs look more normal. It also allows some extra debug checks to be
added to interrupt handler entry.

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/20210630074621.2109197-7-npiggin@gmail.com
parent 1b048222
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -173,6 +173,8 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrup
			BUG_ON(search_kernel_restart_table(regs->nip));
#endif
	}
	if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
		BUG_ON(!arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE));
#endif

	booke_restore_dbcr0();
@@ -268,6 +270,8 @@ static inline void interrupt_nmi_enter_prepare(struct pt_regs *regs, struct inte
		// arch_irq_disabled_regs(regs) behaves as expected.
		regs->softe = IRQS_ALL_DISABLED;
	}
	if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
		BUG_ON(!arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE));

	/* Don't do any per-CPU operations until interrupt state is fixed */

+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ void replay_soft_interrupts(void)

	ppc_save_regs(&regs);
	regs.softe = IRQS_ENABLED;
	regs.msr |= MSR_EE;

again:
	if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))