diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-11-17 06:43:03 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-04-20 07:51:17 -0400 |
commit | 03c94fcf954d6bc5e23460e200d23a2c0fe5cd2e (patch) | |
tree | cd8c69f828afae94aaa6bc3486561e8dc64a5aeb /arch | |
parent | f2e2013f757204d4e0a009597722c75bb2332796 (diff) |
ARC: perf: make @arc_pmu static global
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/kernel/perf_event.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index ae1c485cbc68..64261c2711b1 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c | |||
@@ -25,6 +25,8 @@ struct arc_pmu { | |||
25 | int ev_hw_idx[PERF_COUNT_ARC_HW_MAX]; | 25 | int ev_hw_idx[PERF_COUNT_ARC_HW_MAX]; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | static struct arc_pmu *arc_pmu; | ||
29 | |||
28 | /* read counter #idx; note that counter# != event# on ARC! */ | 30 | /* read counter #idx; note that counter# != event# on ARC! */ |
29 | static uint64_t arc_pmu_read_counter(int idx) | 31 | static uint64_t arc_pmu_read_counter(int idx) |
30 | { | 32 | { |
@@ -47,7 +49,6 @@ static uint64_t arc_pmu_read_counter(int idx) | |||
47 | static void arc_perf_event_update(struct perf_event *event, | 49 | static void arc_perf_event_update(struct perf_event *event, |
48 | struct hw_perf_event *hwc, int idx) | 50 | struct hw_perf_event *hwc, int idx) |
49 | { | 51 | { |
50 | struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); | ||
51 | uint64_t prev_raw_count, new_raw_count; | 52 | uint64_t prev_raw_count, new_raw_count; |
52 | int64_t delta; | 53 | int64_t delta; |
53 | 54 | ||
@@ -95,7 +96,6 @@ static int arc_pmu_cache_event(u64 config) | |||
95 | /* initializes hw_perf_event structure if event is supported */ | 96 | /* initializes hw_perf_event structure if event is supported */ |
96 | static int arc_pmu_event_init(struct perf_event *event) | 97 | static int arc_pmu_event_init(struct perf_event *event) |
97 | { | 98 | { |
98 | struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); | ||
99 | struct hw_perf_event *hwc = &event->hw; | 99 | struct hw_perf_event *hwc = &event->hw; |
100 | int ret; | 100 | int ret; |
101 | 101 | ||
@@ -183,8 +183,6 @@ static void arc_pmu_stop(struct perf_event *event, int flags) | |||
183 | 183 | ||
184 | static void arc_pmu_del(struct perf_event *event, int flags) | 184 | static void arc_pmu_del(struct perf_event *event, int flags) |
185 | { | 185 | { |
186 | struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); | ||
187 | |||
188 | arc_pmu_stop(event, PERF_EF_UPDATE); | 186 | arc_pmu_stop(event, PERF_EF_UPDATE); |
189 | __clear_bit(event->hw.idx, arc_pmu->used_mask); | 187 | __clear_bit(event->hw.idx, arc_pmu->used_mask); |
190 | 188 | ||
@@ -194,7 +192,6 @@ static void arc_pmu_del(struct perf_event *event, int flags) | |||
194 | /* allocate hardware counter and optionally start counting */ | 192 | /* allocate hardware counter and optionally start counting */ |
195 | static int arc_pmu_add(struct perf_event *event, int flags) | 193 | static int arc_pmu_add(struct perf_event *event, int flags) |
196 | { | 194 | { |
197 | struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); | ||
198 | struct hw_perf_event *hwc = &event->hw; | 195 | struct hw_perf_event *hwc = &event->hw; |
199 | int idx = hwc->idx; | 196 | int idx = hwc->idx; |
200 | 197 | ||