OSDN Git Service

powerpc/64: Interrupts save PPR on stack rather than thread_struct
authorNicholas Piggin <npiggin@gmail.com>
Fri, 12 Oct 2018 13:15:16 +0000 (00:15 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 14 Oct 2018 07:04:09 +0000 (18:04 +1100)
commit4c2de74cc8696154b283f241d74ec0bb24438e22
tree85fe4333599db98756971f364ef4beb654abc162
parent3eeacd9f4ea33546f272fcf131d6a11edbe3b4a6
powerpc/64: Interrupts save PPR on stack rather than thread_struct

PPR is the odd register out when it comes to interrupt handling, it is
saved in current->thread.ppr while all others are saved on the stack.

The difficulty with this is that accessing thread.ppr can cause a SLB
fault, but the SLB fault handler implementation in C change had
assumed the normal exception entry handlers would not cause an SLB
fault.

Fix this by allocating room in the interrupt stack to save PPR.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/processor.h
arch/powerpc/include/asm/ptrace.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/process.c
arch/powerpc/kernel/ptrace.c