public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: compile insn.c and inat.c only for KPROBES
@ 2009-12-06 11:14 OGAWA Hirofumi
  2009-12-07  8:15 ` [tip:perf/urgent] x86: Compile " tip-bot for OGAWA Hirofumi
  2009-12-07 14:28 ` [PATCH] x86: compile " Masami Hiramatsu
  0 siblings, 2 replies; 3+ messages in thread
From: OGAWA Hirofumi @ 2009-12-06 11:14 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Masami Hiramatsu
  Cc: linux-kernel


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>
---

 arch/x86/Kconfig.debug |    4 ++--
 arch/x86/lib/Makefile  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -L arch/x86/lib/Kconfig -puN /dev/null /dev/null
diff -puN arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe arch/x86/lib/Makefile
--- linux-2.6/arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe	2009-12-06 19:49:06.000000000 +0900
+++ linux-2.6-hirofumi/arch/x86/lib/Makefile	2009-12-06 19:49:06.000000000 +0900
@@ -20,7 +20,7 @@ lib-y := delay.o
 lib-y += thunk_$(BITS).o
 lib-y += usercopy_$(BITS).o getuser.o putuser.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
 
diff -puN arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe arch/x86/Kconfig.debug
--- linux-2.6/arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe	2009-12-06 19:49:06.000000000 +0900
+++ linux-2.6-hirofumi/arch/x86/Kconfig.debug	2009-12-06 19:49:06.000000000 +0900
@@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
 	def_bool y
 
 config X86_DECODER_SELFTEST
-     bool "x86 instruction decoder selftest"
-     depends on DEBUG_KERNEL
+	bool "x86 instruction decoder selftest"
+	depends on DEBUG_KERNEL && KPROBES
 	---help---
 	 Perform x86 instruction decoder selftests at build time.
 	 This option is useful for checking the sanity of x86 instruction
_

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/urgent] x86: Compile insn.c and inat.c only for KPROBES
  2009-12-06 11:14 [PATCH] x86: compile insn.c and inat.c only for KPROBES OGAWA Hirofumi
@ 2009-12-07  8:15 ` tip-bot for OGAWA Hirofumi
  2009-12-07 14:28 ` [PATCH] x86: compile " Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for OGAWA Hirofumi @ 2009-12-07  8:15 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, hirofumi, tglx, mhiramat, mingo

Commit-ID:  cbe5c34c8c1f8ed1afbe6273f4ad57fcfad7822f
Gitweb:     http://git.kernel.org/tip/cbe5c34c8c1f8ed1afbe6273f4ad57fcfad7822f
Author:     OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
AuthorDate: Sun, 6 Dec 2009 20:14:29 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 7 Dec 2009 08:31:28 +0100

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>
---
 arch/x86/Kconfig.debug |    4 ++--
 arch/x86/lib/Makefile  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 7d0b681..0e90929 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
 	def_bool y
 
 config X86_DECODER_SELFTEST
-     bool "x86 instruction decoder selftest"
-     depends on DEBUG_KERNEL
+	bool "x86 instruction decoder selftest"
+	depends on DEBUG_KERNEL && KPROBES
 	---help---
 	 Perform x86 instruction decoder selftests at build time.
 	 This option is useful for checking the sanity of x86 instruction
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index a2d6472..442b3b3 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -20,7 +20,7 @@ lib-y := delay.o
 lib-y += thunk_$(BITS).o
 lib-y += usercopy_$(BITS).o getuser.o putuser.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
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: compile insn.c and inat.c only for KPROBES
  2009-12-06 11:14 [PATCH] x86: compile insn.c and inat.c only for KPROBES OGAWA Hirofumi
  2009-12-07  8:15 ` [tip:perf/urgent] x86: Compile " tip-bot for OGAWA Hirofumi
@ 2009-12-07 14:28 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2009-12-07 14:28 UTC (permalink / raw)
  To: OGAWA Hirofumi
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel

OGAWA Hirofumi wrote:
>
> 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>

Right, currently, the decoder is only used by kprobes.
Thank you,

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>

> ---
>
>   arch/x86/Kconfig.debug |    4 ++--
>   arch/x86/lib/Makefile  |    2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff -L arch/x86/lib/Kconfig -puN /dev/null /dev/null
> diff -puN arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe arch/x86/lib/Makefile
> --- linux-2.6/arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe	2009-12-06 19:49:06.000000000 +0900
> +++ linux-2.6-hirofumi/arch/x86/lib/Makefile	2009-12-06 19:49:06.000000000 +0900
> @@ -20,7 +20,7 @@ lib-y := delay.o
>   lib-y += thunk_$(BITS).o
>   lib-y += usercopy_$(BITS).o getuser.o putuser.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
>
> diff -puN arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe arch/x86/Kconfig.debug
> --- linux-2.6/arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe	2009-12-06 19:49:06.000000000 +0900
> +++ linux-2.6-hirofumi/arch/x86/Kconfig.debug	2009-12-06 19:49:06.000000000 +0900
> @@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
>   	def_bool y
>
>   config X86_DECODER_SELFTEST
> -     bool "x86 instruction decoder selftest"
> -     depends on DEBUG_KERNEL
> +	bool "x86 instruction decoder selftest"
> +	depends on DEBUG_KERNEL&&  KPROBES
>   	---help---
>   	 Perform x86 instruction decoder selftests at build time.
>   	 This option is useful for checking the sanity of x86 instruction
> _
>

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-07 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-06 11:14 [PATCH] x86: compile insn.c and inat.c only for KPROBES OGAWA Hirofumi
2009-12-07  8:15 ` [tip:perf/urgent] x86: Compile " tip-bot for OGAWA Hirofumi
2009-12-07 14:28 ` [PATCH] x86: compile " Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox