Skip to contentSkip to conversation

Made FSL Book-E PMC support more generic

PATCH Superseded Andy Fleming 1 participant 1 message Feb 4, 2008 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Made FSL Book-E PMC support more generic

Some of the more recent e300 cores have the same performance monitor implementation as the e500. e300 isn't book-e, so the name isn't really appropriate. In preparation for e300 support, rename a bunch of fsl_booke things to say fsl_emb (Freescale Embedded Performance Monitors).

---
 arch/powerpc/Kconfig                       |    3 +
 arch/powerpc/kernel/cputable.c             |    4 +-
 arch/powerpc/kernel/pmc.c                  |    2 +-
 arch/powerpc/oprofile/Makefile             |    2 +-
 arch/powerpc/oprofile/common.c             |    6 +-
 arch/powerpc/oprofile/op_model_fsl_booke.c |  371 ----------------------------
 arch/powerpc/oprofile/op_model_fsl_emb.c   |  369 +++++++++++++++++++++++++++
 arch/powerpc/platforms/Kconfig.cputype     |    1 +
 include/asm-powerpc/cputable.h             |    2 +-
 include/asm-powerpc/oprofile_impl.h        |    2 +-
 include/asm-powerpc/reg.h                  |    4 +
 include/asm-powerpc/reg_booke.h            |   62 -----
 include/asm-powerpc/reg_fsl_emb.h          |   72 ++++++
 13 files changed, 458 insertions(+), 442 deletions(-)
 delete mode 100644 arch/powerpc/oprofile/op_model_fsl_booke.c
 create mode 100644 arch/powerpc/oprofile/op_model_fsl_emb.c
 create mode 100644 include/asm-powerpc/reg_fsl_emb.h
arch/powerpc/Kconfig +3 -0
index 5e10838..079c0e3 100644
@@ -473,6 +473,9 @@ config FSL_PCI
  	bool
 	select PPC_INDIRECT_PCI
 
+config FSL_EMB_PERFMON
+	bool
+
 # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
 config MCA
 	bool
arch/powerpc/kernel/cputable.c +2 -2
index 14c3b07..c8af497 100644
@@ -1441,7 +1441,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.dcache_bsize		= 32,
 		.num_pmcs		= 4,
 		.oprofile_cpu_type	= "ppc/e500",
-		.oprofile_type		= PPC_OPROFILE_BOOKE,
+		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
 		.machine_check		= machine_check_e500,
 		.platform		= "ppc8540",
 	},
@@ -1459,7 +1459,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.dcache_bsize		= 32,
 		.num_pmcs		= 4,
 		.oprofile_cpu_type	= "ppc/e500",
-		.oprofile_type		= PPC_OPROFILE_BOOKE,
+		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
 		.machine_check		= machine_check_e500,
 		.platform		= "ppc8548",
 	},
arch/powerpc/kernel/pmc.c +1 -1
index ea04e0a..0516e2d 100644
@@ -26,7 +26,7 @@
 
 static void dummy_perf(struct pt_regs *regs)
 {
-#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200)
+#if defined(CONFIG_FSL_EMB_PERFMON)
 	mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
 #elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
 	if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
arch/powerpc/oprofile/Makefile +1 -1
index c5f64c3..2ef6b0d 100644
@@ -15,5 +15,5 @@ oprofile-$(CONFIG_OPROFILE_CELL) += op_model_cell.o \
 		cell/spu_profiler.o cell/vma_map.o \
 		cell/spu_task_sync.o
 oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o
-oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o
+oprofile-$(CONFIG_FSL_EMB_PERFMON) += op_model_fsl_emb.o
 oprofile-$(CONFIG_6xx) += op_model_7450.o
arch/powerpc/oprofile/common.c +3 -3
index a28cce1..4908dc9 100644
@@ -202,9 +202,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
 			model = &op_model_7450;
 			break;
 #endif
-#ifdef CONFIG_FSL_BOOKE
-		case PPC_OPROFILE_BOOKE:
-			model = &op_model_fsl_booke;
+#if defined(CONFIG_FSL_EMB_PERFMON)
+		case PPC_OPROFILE_FSL_EMB:
+			model = &op_model_fsl_emb;
 			break;
 #endif
 		default:
arch/powerpc/oprofile/op_model_fsl_booke.c deleted +0 -371

371 lines not on this page · raw message

arch/powerpc/oprofile/op_model_fsl_emb.c new file +369 -0

369 lines not on this page · raw message

arch/powerpc/platforms/Kconfig.cputype +1 -0
index 7fc4110..dce0d87 100644
@@ -94,6 +94,7 @@ config 8xx
 	bool
 
 config E500
+	select FSL_EMB_PERFMON
 	bool
 
 config PPC_FPU
include/asm-powerpc/cputable.h +1 -1
index 528ef18..1e79673 100644
@@ -46,7 +46,7 @@ enum powerpc_oprofile_type {
 	PPC_OPROFILE_RS64 = 1,
 	PPC_OPROFILE_POWER4 = 2,
 	PPC_OPROFILE_G4 = 3,
-	PPC_OPROFILE_BOOKE = 4,
+	PPC_OPROFILE_FSL_EMB = 4,
 	PPC_OPROFILE_CELL = 5,
 	PPC_OPROFILE_PA6T = 6,
 };
include/asm-powerpc/oprofile_impl.h +1 -1
index 938fefb..95035c6 100644
@@ -54,7 +54,7 @@ struct op_powerpc_model {
 	int num_counters;
 };
 
-extern struct op_powerpc_model op_model_fsl_booke;
+extern struct op_powerpc_model op_model_fsl_emb;
 extern struct op_powerpc_model op_model_rs64;
 extern struct op_powerpc_model op_model_power4;
 extern struct op_powerpc_model op_model_7450;
include/asm-powerpc/reg.h +4 -0
index 2408a29..0d62389 100644
@@ -18,6 +18,10 @@
 #include <asm/reg_booke.h>
 #endif /* CONFIG_BOOKE || CONFIG_40x */
 
+#ifdef CONFIG_FSL_EMB_PERFMON
+#include <asm/reg_fsl_emb.h>
+#endif
+
 #ifdef CONFIG_8xx
 #include <asm/reg_8xx.h>
 #endif /* CONFIG_8xx */
include/asm-powerpc/reg_booke.h +0 -62

68 lines not on this page · raw message

include/asm-powerpc/reg_fsl_emb.h new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
1.5.0.2.230.gfbe3d-dirty