Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Move MAX_INSN_SIZE into asm/insn.h

Since there's now two users for this, place it in a common header.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <20100304140100.923774125@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Peter Zijlstra and committed by
Ingo Molnar
30a813ae 7e1a40dd

+3 -3
+2
arch/x86/include/asm/insn.h
··· 68 68 const insn_byte_t *next_byte; 69 69 }; 70 70 71 + #define MAX_INSN_SIZE 16 72 + 71 73 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) 72 74 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) 73 75 #define X86_MODRM_RM(modrm) ((modrm) & 0x07)
+1 -1
arch/x86/include/asm/kprobes.h
··· 24 24 #include <linux/types.h> 25 25 #include <linux/ptrace.h> 26 26 #include <linux/percpu.h> 27 + #include <asm/insn.h> 27 28 28 29 #define __ARCH_WANT_KPROBES_INSN_SLOT 29 30 ··· 37 36 #define RELATIVEJUMP_SIZE 5 38 37 #define RELATIVECALL_OPCODE 0xe8 39 38 #define RELATIVE_ADDR_SIZE 4 40 - #define MAX_INSN_SIZE 16 41 39 #define MAX_STACK_SIZE 64 42 40 #define MIN_STACK_SIZE(ADDR) \ 43 41 (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \
-2
arch/x86/kernel/cpu/perf_event_intel_ds.c
··· 379 379 380 380 #include <asm/insn.h> 381 381 382 - #define MAX_INSN_SIZE 16 383 - 384 382 static inline bool kernel_ip(unsigned long ip) 385 383 { 386 384 #ifdef CONFIG_X86_32