powerpc/64: Fix perf profiling asynchronous interrupt handlers
authorNicholas Piggin <npiggin@gmail.com>
Sat, 21 Jan 2023 10:01:56 +0000 (20:01 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:43 +0000 (12:59 +0100)
commit63c12d00d8565bc0d36ec32491e3f52f91498a49
treedf4c794533a67ae29e05f65d91c706387e81a508
parent07c53834ec278d49ff67fe623ded572578e6968e
powerpc/64: Fix perf profiling asynchronous interrupt handlers

[ Upstream commit c28548012ee2bac55772ef7685138bd1124b80c3 ]

Interrupt entry sets the soft mask to IRQS_ALL_DISABLED to match the
hard irq disabled state. So when should_hard_irq_enable() returns true
because we want PMI interrupts in irq handlers, MSR[EE] is enabled but
PMIs just get soft-masked. Fix this by clearing IRQS_PMI_DISABLED before
enabling MSR[EE].

This also tidies some of the warnings, no need to duplicate them in
both should_hard_irq_enable() and do_hard_irq_enable().

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230121100156.2824054-1-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/kernel/dbell.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/time.c