diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 21:25:14 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 21:25:14 -0400 |
commit | 127cda1e8cc282de1ca7a9dcc3866841977b9fcc (patch) | |
tree | 800169fa92dc96160044d914ca1ca9fea60339ea /arch/sparc64/kernel/kprobes.c | |
parent | 6c1142602c9c8faedbc1321892a169652a173fc7 (diff) |
[SPARC64]: Optimize fault kprobe handling just like powerpc.
And eliminate DIE_GPF while we're at it.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/kprobes.c')
-rw-r--r-- | arch/sparc64/kernel/kprobes.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index a44fe47a3c2b..c93a15b785fa 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -313,7 +313,7 @@ out: | |||
313 | return 1; | 313 | return 1; |
314 | } | 314 | } |
315 | 315 | ||
316 | static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) | 316 | int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) |
317 | { | 317 | { |
318 | struct kprobe *cur = kprobe_running(); | 318 | struct kprobe *cur = kprobe_running(); |
319 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 319 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
@@ -403,15 +403,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, | |||
403 | if (post_kprobe_handler(args->regs)) | 403 | if (post_kprobe_handler(args->regs)) |
404 | ret = NOTIFY_STOP; | 404 | ret = NOTIFY_STOP; |
405 | break; | 405 | break; |
406 | case DIE_GPF: | ||
407 | case DIE_PAGE_FAULT: | ||
408 | /* kprobe_running() needs smp_processor_id() */ | ||
409 | preempt_disable(); | ||
410 | if (kprobe_running() && | ||
411 | kprobe_fault_handler(args->regs, args->trapnr)) | ||
412 | ret = NOTIFY_STOP; | ||
413 | preempt_enable(); | ||
414 | break; | ||
415 | default: | 406 | default: |
416 | break; | 407 | break; |
417 | } | 408 | } |