powerpc/64/irq: tidy soft-masked irq replay and improve documentation
authorNicholas Piggin <npiggin@gmail.com>
Mon, 26 Sep 2022 05:43:05 +0000 (15:43 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:11 +0000 (19:22 +1000)
commit1da5351f9eb9b72a7d25316b4d38bf10b6e671b1
tree398ff1eae4aa5583d3f7dd266fa8ce15083ab503
parentf7bff6e7759b1abb59334f6448f9ef3172c4c04a
powerpc/64/irq: tidy soft-masked irq replay and improve documentation

irq replay is quite complicated because of softirq processing which
itself enables and disables irqs. Several considerations need to be
accounted for due to this, and they are not clearly documented.

Refactor the irq replay code a bit to tidy and deduplicate some common
functions. Add comments, debug checks.

This has a minor functional change that irq tracing enable/disable is
done after each interrupt replayed, rather than after a batch. It also
re-sets state to IRQS_ALL_DISABLED after an interrupt, which doesn't
matter much because interrupts are hard disabled at this point, but it
is more consistent with how interrupt handlers are called.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220926054305.2671436-8-npiggin@gmail.com
arch/powerpc/kernel/irq_64.c