diff options
Diffstat (limited to 'arch/sparc/kernel/perf_counter.c')
-rw-r--r-- | arch/sparc/kernel/perf_counter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sparc/kernel/perf_counter.c b/arch/sparc/kernel/perf_counter.c index f2c781450d08..d86009fa6f8d 100644 --- a/arch/sparc/kernel/perf_counter.c +++ b/arch/sparc/kernel/perf_counter.c | |||
@@ -77,6 +77,7 @@ struct sparc_pmu { | |||
77 | int upper_shift; | 77 | int upper_shift; |
78 | int lower_shift; | 78 | int lower_shift; |
79 | int event_mask; | 79 | int event_mask; |
80 | int hv_bit; | ||
80 | }; | 81 | }; |
81 | 82 | ||
82 | static const struct perf_event_map ultra3i_perfmon_event_map[] = { | 83 | static const struct perf_event_map ultra3i_perfmon_event_map[] = { |
@@ -178,7 +179,7 @@ void hw_perf_disable(void) | |||
178 | cpuc->enabled = 0; | 179 | cpuc->enabled = 0; |
179 | 180 | ||
180 | val = pcr_ops->read(); | 181 | val = pcr_ops->read(); |
181 | val &= ~(PCR_UTRACE | PCR_STRACE); | 182 | val &= ~(PCR_UTRACE | PCR_STRACE | sparc_pmu->hv_bit); |
182 | pcr_ops->write(val); | 183 | pcr_ops->write(val); |
183 | } | 184 | } |
184 | 185 | ||
@@ -377,6 +378,8 @@ static int __hw_perf_counter_init(struct perf_counter *counter) | |||
377 | hwc->config_base |= PCR_UTRACE; | 378 | hwc->config_base |= PCR_UTRACE; |
378 | if (!attr->exclude_kernel) | 379 | if (!attr->exclude_kernel) |
379 | hwc->config_base |= PCR_STRACE; | 380 | hwc->config_base |= PCR_STRACE; |
381 | if (!attr->exclude_hv) | ||
382 | hwc->config_base |= sparc_pmu->hv_bit; | ||
380 | 383 | ||
381 | if (!hwc->sample_period) { | 384 | if (!hwc->sample_period) { |
382 | hwc->sample_period = MAX_PERIOD; | 385 | hwc->sample_period = MAX_PERIOD; |