diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-01-12 13:28:49 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-16 23:51:43 +1100 |
commit | 2271db20e4b362405bacc0e4095df4177d38129e (patch) | |
tree | a9ea74f9abb5c432b747bd0ccf95fc6316693a7e /arch/powerpc/mm | |
parent | 872e2ae4bdd4c244f7617ffc08c39462192460ee (diff) | |
download | linux-2271db20e4b362405bacc0e4095df4177d38129e.tar.bz2 |
powerpc: Use the TRAP macro whenever comparing a trap number
Trap numbers can have extra bits at the bottom that need to
be filtered out. There are a few cases where we don't do that.
It's possible that we got lucky but better safe than sorry.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 4797d08581ce..c07896c19517 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -571,7 +571,7 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) /* kernel has accessed a bad area */ - switch (regs->trap) { + switch (TRAP(regs)) { case 0x300: case 0x380: printk(KERN_ALERT "Unable to handle kernel paging request for " |