diff options
author | Anton Blanchard <anton@samba.org> | 2006-01-08 23:47:04 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 00:03:33 -0500 |
commit | bce6c5fd8cc5d3f8d02fd34a24b591fc3e23a775 (patch) | |
tree | dc302ce765acd2388d9a6d82d7c7123223a8de0f /arch/powerpc/mm | |
parent | 834608f71a323b90f928d05c64d24df436df3011 (diff) |
[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>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/fault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 93d4fbfdb724..a4815d316722 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -81,7 +81,8 @@ static int store_updates_sp(struct pt_regs *regs) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) | 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 | siginfo_t info; | 87 | siginfo_t info; |
87 | 88 | ||
@@ -99,7 +100,7 @@ static void do_dabr(struct pt_regs *regs, unsigned long error_code) | |||
99 | info.si_signo = SIGTRAP; | 100 | info.si_signo = SIGTRAP; |
100 | info.si_errno = 0; | 101 | info.si_errno = 0; |
101 | info.si_code = TRAP_HWBKPT; | 102 | info.si_code = TRAP_HWBKPT; |
102 | info.si_addr = (void __user *)regs->nip; | 103 | info.si_addr = (void __user *)address; |
103 | force_sig_info(SIGTRAP, &info, current); | 104 | force_sig_info(SIGTRAP, &info, current); |
104 | } | 105 | } |
105 | #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ | 106 | #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ |
@@ -159,7 +160,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, | |||
159 | #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) | 160 | #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) |
160 | if (error_code & DSISR_DABRMATCH) { | 161 | if (error_code & DSISR_DABRMATCH) { |
161 | /* DABR match */ | 162 | /* DABR match */ |
162 | do_dabr(regs, error_code); | 163 | do_dabr(regs, address, error_code); |
163 | return 0; | 164 | return 0; |
164 | } | 165 | } |
165 | #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ | 166 | #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ |