powerpc/64s: Fix scv implicit soft-mask table for relocated kernels
authorNicholas Piggin <npiggin@gmail.com>
Fri, 20 Aug 2021 10:34:31 +0000 (20:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Aug 2021 12:35:18 +0000 (22:35 +1000)
commit787c70f2f9990b5a197320152d2fc32cd8a6ad1a
treea8103d3b32d9f20c026530ccf0f2a4eedfa73722
parent310d2e83cb9b7f1e7232319880e3fcb57592fa10
powerpc/64s: Fix scv implicit soft-mask table for relocated kernels

The implict soft-mask table addresses get relocated if they use a
relative symbol like a label. This is right for code that runs relocated
but not for unrelocated. The scv interrupt vectors run unrelocated, so
absolute addresses are required for their soft-mask table entry.

This fixes crashing with relocated kernels, usually an asynchronous
interrupt hitting in the scv handler, then hitting the trap that checks
whether r1 is in userspace.

Fixes: 325678fd0522 ("powerpc/64s: add a table of implicit soft-masked addresses")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210820103431.1701240-1-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64s.S