diff options
author | Olof Johansson <olof@lixom.net> | 2007-01-28 22:25:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-06 22:03:19 -0500 |
commit | 6529c13dfe413e437ad1ed0e97783dcf69137114 (patch) | |
tree | 4042f247433dd413a196764d6b3b74f05568d8e3 /arch/powerpc/kernel/pmc.c | |
parent | 7583b6e424ebaa278342f6a8c2a61211af56dad1 (diff) |
[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 <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pmc.c')
-rw-r--r-- | arch/powerpc/kernel/pmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | 18 | ||
19 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
20 | #include <asm/cputable.h> | ||
20 | #include <asm/pmc.h> | 21 | #include <asm/pmc.h> |
21 | 22 | ||
22 | #ifndef MMCR0_PMA0 | 23 | #ifndef MMCR0_PMA0 |
@@ -28,7 +29,8 @@ static void dummy_perf(struct pt_regs *regs) | |||
28 | #if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) | 29 | #if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) |
29 | mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE); | 30 | mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE); |
30 | #elif defined(CONFIG_PPC64) || defined(CONFIG_6xx) | 31 | #elif defined(CONFIG_PPC64) || defined(CONFIG_6xx) |
31 | mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0)); | 32 | if (cur_cpu_spec->pmc_type == PPC_PMC_IBM) |
33 | mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0)); | ||
32 | #else | 34 | #else |
33 | mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE); | 35 | mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE); |
34 | #endif | 36 | #endif |