Commit 742bd95b authored by Paul Mackerras's avatar Paul Mackerras

perfcounters/powerpc: Add support for POWER5 processors

This adds the back-end for the PMU on the POWER5 processor.  This knows
how to use the fixed-function PMC5 and PMC6 (instructions completed and
run cycles).  Unlike POWER6, PMC5/6 obey the freeze conditions and can
generate interrupts, so their use doesn't impose any extra restrictions.

POWER5+ is different and is not supported by this patch.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent d095cd46
...@@ -94,7 +94,8 @@ obj-$(CONFIG_AUDIT) += audit.o ...@@ -94,7 +94,8 @@ obj-$(CONFIG_AUDIT) += audit.o
obj64-$(CONFIG_AUDIT) += compat_audit.o obj64-$(CONFIG_AUDIT) += compat_audit.o
obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o ppc970-pmu.o power6-pmu.o obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o ppc970-pmu.o power5-pmu.o \
power6-pmu.o
obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o
......
...@@ -824,6 +824,7 @@ void hw_perf_counter_setup(int cpu) ...@@ -824,6 +824,7 @@ void hw_perf_counter_setup(int cpu)
} }
extern struct power_pmu ppc970_pmu; extern struct power_pmu ppc970_pmu;
extern struct power_pmu power5_pmu;
extern struct power_pmu power6_pmu; extern struct power_pmu power6_pmu;
static int init_perf_counters(void) static int init_perf_counters(void)
...@@ -843,6 +844,9 @@ static int init_perf_counters(void) ...@@ -843,6 +844,9 @@ static int init_perf_counters(void)
case PV_970MP: case PV_970MP:
ppmu = &ppc970_pmu; ppmu = &ppc970_pmu;
break; break;
case PV_POWER5:
ppmu = &power5_pmu;
break;
case 0x3e: case 0x3e:
ppmu = &power6_pmu; ppmu = &power6_pmu;
break; break;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment