aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-09-10 10:10:59 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-10 10:10:59 -0400
commit496c07e3b43475124d7f2d77fafbc1f5055abfee (patch)
tree51dbc493a8d0569146a12bc9a7d308eb9c7a2017 /arch
parent91b9286d819b821fd742c0053fe0748818374198 (diff)
sparc64: Provide a way to specify a perf counter overflow IRQ enable bit.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/perf_counter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/kernel/perf_counter.c b/arch/sparc/kernel/perf_counter.c
index d86009fa6f8d..0cd5487b3413 100644
--- a/arch/sparc/kernel/perf_counter.c
+++ b/arch/sparc/kernel/perf_counter.c
@@ -78,6 +78,7 @@ struct sparc_pmu {
78 int lower_shift; 78 int lower_shift;
79 int event_mask; 79 int event_mask;
80 int hv_bit; 80 int hv_bit;
81 int irq_bit;
81}; 82};
82 83
83static const struct perf_event_map ultra3i_perfmon_event_map[] = { 84static const struct perf_event_map ultra3i_perfmon_event_map[] = {
@@ -179,7 +180,8 @@ void hw_perf_disable(void)
179 cpuc->enabled = 0; 180 cpuc->enabled = 0;
180 181
181 val = pcr_ops->read(); 182 val = pcr_ops->read();
182 val &= ~(PCR_UTRACE | PCR_STRACE | sparc_pmu->hv_bit); 183 val &= ~(PCR_UTRACE | PCR_STRACE |
184 sparc_pmu->hv_bit | sparc_pmu->irq_bit);
183 pcr_ops->write(val); 185 pcr_ops->write(val);
184} 186}
185 187
@@ -373,7 +375,7 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
373 * turn off sampling just write 'config', and to enable 375 * turn off sampling just write 'config', and to enable
374 * things write 'config | config_base'. 376 * things write 'config | config_base'.
375 */ 377 */
376 hwc->config_base = 0; 378 hwc->config_base = sparc_pmu->irq_bit;
377 if (!attr->exclude_user) 379 if (!attr->exclude_user)
378 hwc->config_base |= PCR_UTRACE; 380 hwc->config_base |= PCR_UTRACE;
379 if (!attr->exclude_kernel) 381 if (!attr->exclude_kernel)