[PATCH] powerpc: DABR exceptions should report the address not the PC

When taking a DABR exception we were reporting the PC. It makes more
sense to report the address that caused the exception, and the gdb guys
would like it that way.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Anton Blanchard and committed by
Paul Mackerras
bce6c5fd 834608f7

+4 -3
+4 -3
arch/powerpc/mm/fault.c
··· 81 81 } 82 82 83 83 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) 84 - static void do_dabr(struct pt_regs *regs, unsigned long error_code) 84 + static void do_dabr(struct pt_regs *regs, unsigned long address, 85 + unsigned long error_code) 85 86 { 86 87 siginfo_t info; 87 88 ··· 100 99 info.si_signo = SIGTRAP; 101 100 info.si_errno = 0; 102 101 info.si_code = TRAP_HWBKPT; 103 - info.si_addr = (void __user *)regs->nip; 102 + info.si_addr = (void __user *)address; 104 103 force_sig_info(SIGTRAP, &info, current); 105 104 } 106 105 #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ ··· 160 159 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) 161 160 if (error_code & DSISR_DABRMATCH) { 162 161 /* DABR match */ 163 - do_dabr(regs, error_code); 162 + do_dabr(regs, address, error_code); 164 163 return 0; 165 164 } 166 165 #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/