aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/fault.c
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2012-08-23 17:27:09 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-05 01:19:36 -0400
commit41ab5266c3622354353433618edb92ab278025fa (patch)
tree5e1313a104ae877a174a88a2c93eb010f1bd5861 /arch/powerpc/mm/fault.c
parent7118e7e648e0a902bf4f38c55a25fcff730f33d7 (diff)
powerpc: Add trap_nr to thread_struct
Add thread_struct.trap_nr and use it to store the last exception the thread experienced. In this patch, we populate the field at various places where we force_sig_info() to the process. This is also used in uprobes to determine if the probed instruction caused an exception. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r--arch/powerpc/mm/fault.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 08ffcf52a856..995f924e007f 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -133,6 +133,7 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address)
133 up_read(&current->mm->mmap_sem); 133 up_read(&current->mm->mmap_sem);
134 134
135 if (user_mode(regs)) { 135 if (user_mode(regs)) {
136 current->thread.trap_nr = BUS_ADRERR;
136 info.si_signo = SIGBUS; 137 info.si_signo = SIGBUS;
137 info.si_errno = 0; 138 info.si_errno = 0;
138 info.si_code = BUS_ADRERR; 139 info.si_code = BUS_ADRERR;