From 645c1fc5021e1f72f31b9bc43a08d885724809c5 Mon Sep 17 00:00:00 2001 From: Anil S Keshavamurthy Date: Mon, 9 Jan 2006 20:52:41 -0800 Subject: [PATCH] --- yaml --- r: 17601 b: refs/heads/master c: 2d14e39da8712cff8a92298f464a25afb4283ccf h: refs/heads/master i: 17599: 7f16c620422012c04eb76452013678571988008b v: v3 --- [refs] | 2 +- trunk/include/asm-powerpc/kprobes.h | 2 ++ trunk/include/asm-x86_64/kprobes.h | 2 ++ trunk/kernel/kprobes.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 670a1b206627..2ae1d31aac16 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1c0b8f835aeba85aa428aaec6d521ef4639c7fa +refs/heads/master: 2d14e39da8712cff8a92298f464a25afb4283ccf diff --git a/trunk/include/asm-powerpc/kprobes.h b/trunk/include/asm-powerpc/kprobes.h index 0654f79b06df..7c98e547c6d8 100644 --- a/trunk/include/asm-powerpc/kprobes.h +++ b/trunk/include/asm-powerpc/kprobes.h @@ -30,6 +30,8 @@ #include #include +#define __ARCH_WANT_KPROBES_INSN_SLOT + struct pt_regs; typedef unsigned int kprobe_opcode_t; diff --git a/trunk/include/asm-x86_64/kprobes.h b/trunk/include/asm-x86_64/kprobes.h index 4dd7a7e148d4..9e2532adf42c 100644 --- a/trunk/include/asm-x86_64/kprobes.h +++ b/trunk/include/asm-x86_64/kprobes.h @@ -27,6 +27,8 @@ #include #include +#define __ARCH_WANT_KPROBES_INSN_SLOT + struct pt_regs; typedef u8 kprobe_opcode_t; diff --git a/trunk/kernel/kprobes.c b/trunk/kernel/kprobes.c index 3bb71e63a37e..3897630d2335 100644 --- a/trunk/kernel/kprobes.c +++ b/trunk/kernel/kprobes.c @@ -52,6 +52,7 @@ static DEFINE_SPINLOCK(kprobe_lock); /* Protects kprobe_table */ DEFINE_SPINLOCK(kretprobe_lock); /* Protects kretprobe_inst_table */ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; +#ifdef __ARCH_WANT_KPROBES_INSN_SLOT /* * kprobe->ainsn.insn points to the copy of the instruction to be * single-stepped. x86_64, POWER4 and above have no-exec support and @@ -151,6 +152,7 @@ void __kprobes free_insn_slot(kprobe_opcode_t *slot) } } } +#endif /* We have preemption disabled.. so it is safe to use __ versions */ static inline void set_kprobe_instance(struct kprobe *kp)