Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31f80e45ea26008939790b4363a4fdcff240e0d6 Commit: 31f80e45ea26008939790b4363a4fdcff240e0d6 Parent: 9930927f36ac3e39ffa674dc23ef06f13c39cef7 Author: Harvey Harrison <[EMAIL PROTECTED]> AuthorDate: Wed Jan 30 13:32:16 2008 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Wed Jan 30 13:32:16 2008 +0100
x86: kprobes remove fix_riprel #ifdef Move #ifdef around function definiton into the function and unconditionally return on X86_32. Saves an ifdef from the one callsite. [ [EMAIL PROTECTED]: minor cleanup. ] Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index b1804e4..80bcb76 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -263,15 +263,16 @@ static int __kprobes is_IF_modifier(kprobe_opcode_t *insn) return 0; } -#ifdef CONFIG_X86_64 /* * Adjust the displacement if the instruction uses the %rip-relative * addressing mode. * If it does, Return the address of the 32-bit displacement word. * If not, return null. + * Only applicable to 64-bit x86. */ static void __kprobes fix_riprel(struct kprobe *p) { +#ifdef CONFIG_X86_64 u8 *insn = p->ainsn.insn; s64 disp; int need_modrm; @@ -335,15 +336,15 @@ static void __kprobes fix_riprel(struct kprobe *p) *(s32 *)insn = (s32) disp; } } -} #endif +} static void __kprobes arch_copy_kprobe(struct kprobe *p) { memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); -#ifdef CONFIG_X86_64 + fix_riprel(p); -#endif + if (can_boost(p->addr)) p->ainsn.boostable = 0; else - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html