powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf wants PMIs to...
authorNicholas Piggin <npiggin@gmail.com>
Wed, 22 Sep 2021 14:54:49 +0000 (00:54 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Dec 2021 10:31:45 +0000 (21:31 +1100)
commit5a7745b96f43c69f9b4875bcf516a0341acbc3fb
treeaf621e8bd5a05f776d9ca90d9e5074cd2b13c372
parentff0b0d6e1a7bc202241a9b1e28d1da4b744e0312
powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf wants PMIs to be soft-NMI

Interrupt code enables MSR[EE] in some irq handlers while keeping local
irqs disabled via soft-mask, allowing PMI interrupts to be taken as
soft-NMI to improve profiling of irq handlers.

When perf is not enabled, there is no point to doing this, it's
additional overhead. So provide a function that can say if PMIs should
be taken promptly if possible.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210922145452.352571-4-npiggin@gmail.com
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/perf/core-book3s.c