diff options
author | Paul Mackerras <paulus@samba.org> | 2009-03-06 00:30:52 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2009-03-06 00:30:57 -0500 |
commit | 880860e392d92c457e8116cdee39ec4d109174ee (patch) | |
tree | f5eb17baf4b89f15c61fd0e4499786fdb9b6030e /arch/powerpc/kernel/perf_counter.c | |
parent | aabbaa6036fd847c583f585c6bae82b5a033e6c7 (diff) |
perfcounters/powerpc: add support for POWER4 processors
Impact: more hardware support
This adds the back-end for the PMU on the POWER4 and POWER4+ processors
(GP and GQ). This is quite similar to the PPC970, with 8 PMCs, but has
fewer events than the PPC970.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/perf_counter.c')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 162f3981fa27..0e33d27cd464 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -824,6 +824,7 @@ void hw_perf_counter_setup(int cpu) | |||
824 | cpuhw->mmcr[0] = MMCR0_FC; | 824 | cpuhw->mmcr[0] = MMCR0_FC; |
825 | } | 825 | } |
826 | 826 | ||
827 | extern struct power_pmu power4_pmu; | ||
827 | extern struct power_pmu ppc970_pmu; | 828 | extern struct power_pmu ppc970_pmu; |
828 | extern struct power_pmu power5_pmu; | 829 | extern struct power_pmu power5_pmu; |
829 | extern struct power_pmu power5p_pmu; | 830 | extern struct power_pmu power5p_pmu; |
@@ -841,6 +842,10 @@ static int init_perf_counters(void) | |||
841 | /* XXX should get this from cputable */ | 842 | /* XXX should get this from cputable */ |
842 | pvr = mfspr(SPRN_PVR); | 843 | pvr = mfspr(SPRN_PVR); |
843 | switch (PVR_VER(pvr)) { | 844 | switch (PVR_VER(pvr)) { |
845 | case PV_POWER4: | ||
846 | case PV_POWER4p: | ||
847 | ppmu = &power4_pmu; | ||
848 | break; | ||
844 | case PV_970: | 849 | case PV_970: |
845 | case PV_970FX: | 850 | case PV_970FX: |
846 | case PV_970MP: | 851 | case PV_970MP: |