aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/kprobes.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-04-30 06:56:46 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-02 06:57:39 -0400
commit9f90b997de4efd5404a8c52f89c400f0f4e2d216 (patch)
tree7dd6adc27b196e672fedd464a42700e336cd210a /arch/powerpc/kernel/kprobes.c
parenteb609e52d188775da738a1ffd1e982e6212c77d7 (diff)
[POWERPC] Minor fault path optimization
Call the kprobes pagefault handler directly instead of going through the complex notifier chain. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r--arch/powerpc/kernel/kprobes.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index ef647e7a9dc3..c27f41870c8f 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -410,7 +410,7 @@ out:
410 return 1; 410 return 1;
411} 411}
412 412
413static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) 413int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
414{ 414{
415 struct kprobe *cur = kprobe_running(); 415 struct kprobe *cur = kprobe_running();
416 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 416 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
@@ -495,14 +495,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
495 if (post_kprobe_handler(args->regs)) 495 if (post_kprobe_handler(args->regs))
496 ret = NOTIFY_STOP; 496 ret = NOTIFY_STOP;
497 break; 497 break;
498 case DIE_PAGE_FAULT:
499 /* kprobe_running() needs smp_processor_id() */
500 preempt_disable();
501 if (kprobe_running() &&
502 kprobe_fault_handler(args->regs, args->trapnr))
503 ret = NOTIFY_STOP;
504 preempt_enable();
505 break;
506 default: 498 default:
507 break; 499 break;
508 } 500 }