From 6529c13dfe413e437ad1ed0e97783dcf69137114 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sun, 28 Jan 2007 21:25:57 -0600 Subject: [POWERPC] PA6T PMC support Support for PA6T-style PMC registers. PMCs are completely implementation-dependent on PPC, and PA6T numbers them differently from the IBM model. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/pmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/kernel/pmc.c') diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c index e40f6ddd98a4..24d7b7c99bb9 100644 --- a/arch/powerpc/kernel/pmc.c +++ b/arch/powerpc/kernel/pmc.c @@ -17,6 +17,7 @@ #include #include +#include #include #ifndef MMCR0_PMA0 @@ -28,7 +29,8 @@ static void dummy_perf(struct pt_regs *regs) #if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE); #elif defined(CONFIG_PPC64) || defined(CONFIG_6xx) - mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0)); + if (cur_cpu_spec->pmc_type == PPC_PMC_IBM) + mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0)); #else mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE); #endif -- cgit v1.2.3