Skip to contentSkip to conversation

powerpc: disable OProfile for iSeries (take 2!)

PATCH In review Kelly Daly 3 participants 4 messages Jun 21, 2006 PowerPC

lore
Share & tools
lore

Kelly Daly

author
#0 lore raw

PATCH 1/1 powerpc: disable OProfile for iSeries (take 2!)

This patch removes the changes from an earlier patch that disables oProfile for iSeries within the oProfile KConfig (submitted Feb 23, 2006). Checks within the arch init for iSeries, still allowing profiling for timer interrupts.

---

arch/powerpc/oprofile/Kconfig +0 -1
diff -urdp linux-2.6.16.20/arch/powerpc/oprofile/Kconfig linux-2.6.16.20_kel/arch/powerpc/oprofile/Kconfig
@@ -1,5 +1,4 @@
 config PROFILING
-	depends on !PPC_ISERIES
 	bool "Profiling support (EXPERIMENTAL)"
 	help
 	  Say Y here to enable the extended profiling support mechanisms used
arch/powerpc/oprofile/common.c +4 -1
diff -urdp linux-2.6.16.20/arch/powerpc/oprofile/common.c linux-2.6.16.20_kel/arch/powerpc/oprofile/common.c
@@ -137,7 +137,10 @@ int __init oprofile_arch_init(struct opr
 {
 	if (!cur_cpu_spec->oprofile_cpu_type)
 		return -ENODEV;
-
+#ifdef CONFIG_PPC_ISERIES
+	return -ENODEV;
+#endif
+	
 	switch (cur_cpu_spec->oprofile_type) {
 #ifdef CONFIG_PPC64
 		case PPC_OPROFILE_RS64:
#1 lore raw
Quoted 19 lines · Kelly Daly

This patch removes the changes from an earlier patch that disables oProfile for iSeries within the oProfile KConfig (submitted Feb 23, 2006). Checks within the arch init for iSeries, still allowing profiling for timer interrupts.

---

diff -urdp linux-2.6.16.20/arch/powerpc/oprofile/Kconfig linux-2.6.16.20_kel/arch/powerpc/oprofile/Kconfig

arch/powerpc/oprofile/Kconfig +0 -1
@@ -1,5 +1,4 @@
 config PROFILING
-	depends on !PPC_ISERIES
 	bool "Profiling support (EXPERIMENTAL)"
 	help
 	  Say Y here to enable the extended profiling support mechanisms used

diff -urdp linux-2.6.16.20/arch/powerpc/oprofile/common.c linux-2.6.16.20_kel/arch/powerpc/oprofile/common.c

arch/powerpc/oprofile/common.c int __init oprofile_arch_init(struct opr · line 143

Quoted 8 lines
arch/powerpc/oprofile/common.c +4 -1
@@ -137,7 +137,10 @@ int __init oprofile_arch_init(struct opr
 {
 	if (!cur_cpu_spec->oprofile_cpu_type)
 		return -ENODEV;
-
+#ifdef CONFIG_PPC_ISERIES
+	return -ENODEV;
+#endif
+	

AFAICT that still doesn't let us build a combined kernel, but I haven't looked at the code.

cheers

Signature · 8 lines
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
author
#2 lore raw

This patch removes the changes from an earlier patch that disables oProfile for iSeries within the oProfile KConfig (submitted Feb 23, 2006). Checks within the arch init for iSeries, still allowing profiling for timer interrupts (using firmware_has_feature).

---

arch/powerpc/oprofile/Kconfig +0 -1
diff -urdp linux-2.6.16.20/arch/powerpc/oprofile/Kconfig linux-2.6.16.20_kel/arch/powerpc/oprofile/Kconfig
@@ -1,5 +1,4 @@
 config PROFILING
-	depends on !PPC_ISERIES
 	bool "Profiling support (EXPERIMENTAL)"
 	help
 	  Say Y here to enable the extended profiling support mechanisms used
arch/powerpc/oprofile/common.c +4 -0
diff -urp linux-2.6.16.20/arch/powerpc/oprofile/common.c linux-2.6.16.20_kel/arch/powerpc/oprofile/common.c
@@ -22,6 +22,7 @@
 #include <asm/pmc.h>
 #include <asm/cputable.h>
 #include <asm/oprofile_impl.h>
+#include <asm/firmware.h>
 
 static struct op_powerpc_model *model;
 
@@ -138,6 +139,9 @@ int __init oprofile_arch_init(struct opr
 	if (!cur_cpu_spec->oprofile_cpu_type)
 		return -ENODEV;
 
+	if (firmware_has_feature(FW_FEATURE_ISERIES))
+		return -ENODEV;
+
 	switch (cur_cpu_spec->oprofile_type) {
 #ifdef CONFIG_PPC64
 		case PPC_OPROFILE_RS64:
#3 lore raw
Quoted 7 lines · On Wed, 21 Jun 2006 13:52:55 +1000 Kelly Daly <[email protected]> wrote:

This patch removes the changes from an earlier patch that disables oProfile for iSeries within the oProfile KConfig (submitted Feb 23, 2006). Checks within the arch init for iSeries, still allowing profiling for timer interrupts (using firmware_has_feature).

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/