powerpc: move norestart trap flag to bit 0
authorNicholas Piggin <npiggin@gmail.com>
Tue, 16 Mar 2021 10:42:05 +0000 (20:42 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Apr 2021 13:04:44 +0000 (23:04 +1000)
commit8f6cc75a97d162011fad3c470e5a14e298383a07
tree51d7b0474ce57c89ed8dabcb89ccb2201717a99a
parent8dc7f0229b7892ccb23e19c9f30511c68cc0fdcc
powerpc: move norestart trap flag to bit 0

Compact the trap flags down to use the low 4 bits of regs.trap.

A few 64e interrupt trap numbers set bit 4. Although they tended to be
trivial so it wasn't a real problem[1], it is not the right thing to do,
and confusing.

[*] E.g., 0x310 hypercall goes to unknown_exception, which prints
    regs->trap directly so 0x310 will appear fine, and only the syscall
    interrupt will test norestart, so it won't be confused by 0x310.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210316104206.407354-12-npiggin@gmail.com
arch/powerpc/include/asm/ptrace.h