summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/perf_event.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-16 21:16:22 -0700
committerDavid S. Miller <davem@davemloft.net>2012-08-18 23:04:08 -0700
commit0bab20ba4c95f56355c24a0b9f03eb486c2a267d (patch)
tree906d0ca27a6c62ea01b55e24f7a4c3a7e76a723e /arch/sparc/kernel/perf_event.c
parent8c79bfa51101354853f0f5d3b02435cec429da51 (diff)
downloadop-kernel-dev-0bab20ba4c95f56355c24a0b9f03eb486c2a267d.zip
op-kernel-dev-0bab20ba4c95f56355c24a0b9f03eb486c2a267d.tar.gz
sparc64: Add 'reg_num' argument to pcr_ops methods.
SPARC-T4 and later have multiple PCR registers, one for each PIC counter. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r--arch/sparc/kernel/perf_event.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 5713957..e1c9848 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -564,7 +564,7 @@ static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_
val |= hwc->config;
cpuc->pcr = val;
- pcr_ops->write(cpuc->pcr);
+ pcr_ops->write(0, cpuc->pcr);
}
static inline void sparc_pmu_disable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx)
@@ -578,7 +578,7 @@ static inline void sparc_pmu_disable_event(struct cpu_hw_events *cpuc, struct hw
val |= nop;
cpuc->pcr = val;
- pcr_ops->write(cpuc->pcr);
+ pcr_ops->write(0, cpuc->pcr);
}
static u32 read_pmc(int idx)
@@ -736,7 +736,7 @@ static void sparc_pmu_enable(struct pmu *pmu)
cpuc->pcr = pcr | cpuc->event[0]->hw.config_base;
}
- pcr_ops->write(cpuc->pcr);
+ pcr_ops->write(0, cpuc->pcr);
}
static void sparc_pmu_disable(struct pmu *pmu)
@@ -755,7 +755,7 @@ static void sparc_pmu_disable(struct pmu *pmu)
sparc_pmu->hv_bit | sparc_pmu->irq_bit);
cpuc->pcr = val;
- pcr_ops->write(cpuc->pcr);
+ pcr_ops->write(0, cpuc->pcr);
}
static int active_event_index(struct cpu_hw_events *cpuc,
@@ -856,7 +856,7 @@ static void perf_stop_nmi_watchdog(void *unused)
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
stop_nmi_watchdog(NULL);
- cpuc->pcr = pcr_ops->read();
+ cpuc->pcr = pcr_ops->read(0);
}
void perf_event_grab_pmc(void)
@@ -1264,7 +1264,7 @@ void perf_event_print_debug(void)
cpu = smp_processor_id();
- pcr = pcr_ops->read();
+ pcr = pcr_ops->read(0);
read_pic(pic);
pr_info("\n");
@@ -1306,7 +1306,7 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
* overflow so we don't lose any events.
*/
if (sparc_pmu->irq_bit)
- pcr_ops->write(cpuc->pcr);
+ pcr_ops->write(0, cpuc->pcr);
for (i = 0; i < cpuc->n_events; i++) {
struct perf_event *event = cpuc->event[i];
OpenPOWER on IntegriCloud