diff options
author | Will Deacon <will.deacon@arm.com> | 2011-07-19 17:41:36 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2011-08-31 05:18:00 -0400 |
commit | d2b41f7456223ba6abd3b38d7b54be97914f3aa5 (patch) | |
tree | 08ffd6f54daa58de58ae3ae7f5017f26bed6f9aa /arch/arm/kernel/perf_event_xscale.c | |
parent | c691bb6249b25104fcb6dad31bd772c139ce4a50 (diff) |
ARM: perf: index Xscale and ARMv6 event counters starting from zero
Now that the ARMv7 PMU backend indexes event counters from zero, follow
suit and do the same for ARMv6 and Xscale.
Acked-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/kernel/perf_event_xscale.c')
-rw-r--r-- | arch/arm/kernel/perf_event_xscale.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 730b1c299868..54312fc45ca3 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -40,7 +40,7 @@ enum xscale_perf_types { | |||
40 | }; | 40 | }; |
41 | 41 | ||
42 | enum xscale_counters { | 42 | enum xscale_counters { |
43 | XSCALE_CYCLE_COUNTER = 1, | 43 | XSCALE_CYCLE_COUNTER = 0, |
44 | XSCALE_COUNTER0, | 44 | XSCALE_COUNTER0, |
45 | XSCALE_COUNTER1, | 45 | XSCALE_COUNTER1, |
46 | XSCALE_COUNTER2, | 46 | XSCALE_COUNTER2, |
@@ -249,7 +249,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
249 | perf_sample_data_init(&data, 0); | 249 | perf_sample_data_init(&data, 0); |
250 | 250 | ||
251 | cpuc = &__get_cpu_var(cpu_hw_events); | 251 | cpuc = &__get_cpu_var(cpu_hw_events); |
252 | for (idx = 0; idx <= armpmu->num_events; ++idx) { | 252 | for (idx = 0; idx < armpmu->num_events; ++idx) { |
253 | struct perf_event *event = cpuc->events[idx]; | 253 | struct perf_event *event = cpuc->events[idx]; |
254 | struct hw_perf_event *hwc; | 254 | struct hw_perf_event *hwc; |
255 | 255 | ||
@@ -581,7 +581,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
581 | perf_sample_data_init(&data, 0); | 581 | perf_sample_data_init(&data, 0); |
582 | 582 | ||
583 | cpuc = &__get_cpu_var(cpu_hw_events); | 583 | cpuc = &__get_cpu_var(cpu_hw_events); |
584 | for (idx = 0; idx <= armpmu->num_events; ++idx) { | 584 | for (idx = 0; idx < armpmu->num_events; ++idx) { |
585 | struct perf_event *event = cpuc->events[idx]; | 585 | struct perf_event *event = cpuc->events[idx]; |
586 | struct hw_perf_event *hwc; | 586 | struct hw_perf_event *hwc; |
587 | 587 | ||