瀏覽代碼

x86: Compile insn.c and inat.c only for KPROBES

At least, insn.c and inat.c is needed for kprobe for now. So,
this compile those only if KPROBES is enabled.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <878wdg8icq.fsf@devron.myhome.or.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
OGAWA Hirofumi 15 年之前
父節點
當前提交
cbe5c34c8c
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      arch/x86/Kconfig.debug
  2. 1 1
      arch/x86/lib/Makefile

+ 2 - 2
arch/x86/Kconfig.debug

@@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
 	def_bool y
 	def_bool y
 
 
 config X86_DECODER_SELFTEST
 config X86_DECODER_SELFTEST
-     bool "x86 instruction decoder selftest"
-     depends on DEBUG_KERNEL
+	bool "x86 instruction decoder selftest"
+	depends on DEBUG_KERNEL && KPROBES
 	---help---
 	---help---
 	 Perform x86 instruction decoder selftests at build time.
 	 Perform x86 instruction decoder selftests at build time.
 	 This option is useful for checking the sanity of x86 instruction
 	 This option is useful for checking the sanity of x86 instruction

+ 1 - 1
arch/x86/lib/Makefile

@@ -20,7 +20,7 @@ lib-y := delay.o
 lib-y += thunk_$(BITS).o
 lib-y += thunk_$(BITS).o
 lib-y += usercopy_$(BITS).o getuser.o putuser.o
 lib-y += usercopy_$(BITS).o getuser.o putuser.o
 lib-y += memcpy_$(BITS).o
 lib-y += memcpy_$(BITS).o
-lib-y += insn.o inat.o
+lib-$(CONFIG_KPROBES) += insn.o inat.o
 
 
 obj-y += msr-reg.o msr-reg-export.o
 obj-y += msr-reg.o msr-reg-export.o