From c0ffa3a951668734a635cd1e26bf7583795854c5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:32 -0500 Subject: Fix ARM to play nicely with generic Instrumentation menu The conflicting commit for move-kconfiginstrumentation-to-arch-kconfig-and-init-kconfig.patch is the ARM fix from Linus : commit 38ad9aebe70dc72df08851bbd1620d89329129ba He just seemed to agree that my approach (just putting the missing ARM config options in arch/arm/Kconfig) works too. The main advantage it has is that it is smaller, does not need a cleanup in the future and does not break the following patches unnecessarily. It's just been discussed here http://lkml.org/lkml/2008/1/15/267 However, Linus might prefer to stay with his own patch and I would totally understand it that late in the release cycle. Therefore I submit this for the next release cycle. Signed-off-by: Mathieu Desnoyers Cc: Jeff Dike Cc: David Howells Cc: Ananth N Mavinakayanahalli CC: Russell King Signed-off-by: Sam Ravnborg --- arch/arm/Kconfig | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4b1a8e3d292..623eaa1f308 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -135,6 +135,23 @@ config FIQ config ARCH_MTD_XIP bool +if OPROFILE + +config OPROFILE_ARMV6 + def_bool y + depends on CPU_V6 && !SMP + select OPROFILE_ARM11_CORE + +config OPROFILE_MPCORE + def_bool y + depends on CPU_V6 && SMP + select OPROFILE_ARM11_CORE + +config OPROFILE_ARM11_CORE + bool + +endif + config VECTORS_BASE hex default 0xffff0000 if MMU || CPU_HIGH_VECTOR @@ -1128,7 +1145,7 @@ endmenu source "fs/Kconfig" -source "arch/arm/Kconfig.instrumentation" +source "kernel/Kconfig.instrumentation" source "arch/arm/Kconfig.debug" -- cgit v1.2.3 From 42d4b839c82fd7dd8e412145eb6d9752468478e2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:34 -0500 Subject: Add HAVE_OPROFILE Linus: On the per-architecture side, I do think it would be better to *not* have internal architecture knowledge in a generic file, and as such a line like depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 really shouldn't exist in a file like kernel/Kconfig.instrumentation. It would be much better to do depends on ARCH_SUPPORTS_KPROBES in that generic file, and then architectures that do support it would just have a bool ARCH_SUPPORTS_KPROBES default y in *their* architecture files. That would seem to be much more logical, and is readable both for arch maintainers *and* for people who have no clue - and don't care - about which architecture is supposed to support which interface... Changelog: Actually, I know I gave this as the magic incantation, but now that I see it, I realize that I should have told you to just use config ARCH_SUPPORTS_KPROBES def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... Changelog : - Moving to HAVE_*. - Add AVR32 oprofile. Signed-off-by: Mathieu Desnoyers Cc: Andrew Morton Cc: Haavard Skinnemoen Cc: David Howells Cc: Jeff Dike Cc: Ananth N Mavinakayanahalli Signed-off-by: Sam Ravnborg --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 623eaa1f308..3b3eb4ec318 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -10,6 +10,7 @@ config ARM default y select RTC_LIB select SYS_SUPPORTS_APM_EMULATION + select HAVE_OPROFILE help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and -- cgit v1.2.3 From 3f550096dede4430f83b16457da83bf429155ac2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:35 -0500 Subject: Add HAVE_KPROBES Linus: On the per-architecture side, I do think it would be better to *not* have internal architecture knowledge in a generic file, and as such a line like depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 really shouldn't exist in a file like kernel/Kconfig.instrumentation. It would be much better to do depends on ARCH_SUPPORTS_KPROBES in that generic file, and then architectures that do support it would just have a bool ARCH_SUPPORTS_KPROBES default y in *their* architecture files. That would seem to be much more logical, and is readable both for arch maintainers *and* for people who have no clue - and don't care - about which architecture is supposed to support which interface... Changelog: Actually, I know I gave this as the magic incantation, but now that I see it, I realize that I should have told you to just use config KPROBES_SUPPORT def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... - Use HAVE_KPROBES - Use a select - Yet another update : Moving to HAVE_* now. - Update ARM for kprobes support. Signed-off-by: Mathieu Desnoyers Cc: Jeff Dike Cc: David Howells Cc: Ananth N Mavinakayanahalli Signed-off-by: Sam Ravnborg --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3b3eb4ec318..ea45eefbf83 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -11,6 +11,7 @@ config ARM select RTC_LIB select SYS_SUPPORTS_APM_EMULATION select HAVE_OPROFILE + select HAVE_KPROBES if (!XIP_KERNEL) help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and -- cgit v1.2.3 From 125e564582cbce6219397fc64556438420efae4c Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 2 Feb 2008 15:10:36 -0500 Subject: Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig Move the instrumentation Kconfig to arch/Kconfig for architecture dependent options - oprofile - kprobes and init/Kconfig for architecture independent options - profiling - markers Remove the "Instrumentation Support" menu. Everything moves to "General setup". Delete the kernel/Kconfig.instrumentation file. Signed-off-by: Mathieu Desnoyers Cc: Linus Torvalds Cc: Signed-off-by: Sam Ravnborg --- arch/arm/Kconfig | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ea45eefbf83..36176f40dfd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1147,8 +1147,6 @@ endmenu source "fs/Kconfig" -source "kernel/Kconfig.instrumentation" - source "arch/arm/Kconfig.debug" source "security/Kconfig" -- cgit v1.2.3