powerpc/64: allow alternate return locations for soft-masked interrupts
authorNicholas Piggin <npiggin@gmail.com>
Thu, 17 Jun 2021 15:51:08 +0000 (01:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Jun 2021 14:06:56 +0000 (00:06 +1000)
commitf23699c93becd746295aaa506537882a46a62219
treeea44289996524915c83e6876b39babbe6a640ff8
parent63e40806eea984f770c992120bbfd71b589ea580
powerpc/64: allow alternate return locations for soft-masked interrupts

The exception table fixup adjusts a failed page fault's interrupt return
location if it was taken at an address specified in the exception table,
to a corresponding fixup handler address.

Introduce a variation of that idea which adds a fixup table for NMIs and
soft-masked asynchronous interrupts. This will be used to protect
certain critical sections that are sensitive to being clobbered by
interrupts coming in (due to using the same SPRs and/or irq soft-mask
state).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210617155116.2167984-10-npiggin@gmail.com
arch/powerpc/include/asm/interrupt.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/lib/Makefile
arch/powerpc/lib/restart_table.c [new file with mode: 0644]