diff options
Diffstat (limited to 'arch/sparc/kernel/traps_64.c')
-rw-r--r-- | arch/sparc/kernel/traps_64.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index c2d153d46586..d809c4ebb48f 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* arch/sparc64/kernel/traps.c | 1 | /* arch/sparc64/kernel/traps.c |
2 | * | 2 | * |
3 | * Copyright (C) 1995,1997,2008 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995,1997,2008,2009 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
@@ -314,6 +314,21 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsig | |||
314 | return; | 314 | return; |
315 | 315 | ||
316 | if (regs->tstate & TSTATE_PRIV) { | 316 | if (regs->tstate & TSTATE_PRIV) { |
317 | /* Test if this comes from uaccess places. */ | ||
318 | const struct exception_table_entry *entry; | ||
319 | |||
320 | entry = search_exception_tables(regs->tpc); | ||
321 | if (entry) { | ||
322 | /* Ouch, somebody is trying VM hole tricks on us... */ | ||
323 | #ifdef DEBUG_EXCEPTIONS | ||
324 | printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc); | ||
325 | printk("EX_TABLE: insn<%016lx> fixup<%016lx>\n", | ||
326 | regs->tpc, entry->fixup); | ||
327 | #endif | ||
328 | regs->tpc = entry->fixup; | ||
329 | regs->tnpc = regs->tpc + 4; | ||
330 | return; | ||
331 | } | ||
317 | printk("sun4v_data_access_exception: ADDR[%016lx] " | 332 | printk("sun4v_data_access_exception: ADDR[%016lx] " |
318 | "CTX[%04x] TYPE[%04x], going.\n", | 333 | "CTX[%04x] TYPE[%04x], going.\n", |
319 | addr, ctx, type); | 334 | addr, ctx, type); |