diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-03-29 07:09:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-02 13:52:05 -0400 |
commit | caaa8be3b6707cb9664e573a28b00f845ce9f32e (patch) | |
tree | c6cc712c547262e74cc56168248c8da121736ecd /arch/x86 | |
parent | b4cdc5c264b35c67007800dec3928e9547a9d70b (diff) |
perf, x86: Fix __initconst vs const
All variables that have __initconst should also be const.
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_amd.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p4.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p6.c | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index bbd7339f08a9..611df11ba15e 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | static DEFINE_RAW_SPINLOCK(amd_nb_lock); | 3 | static DEFINE_RAW_SPINLOCK(amd_nb_lock); |
4 | 4 | ||
5 | static __initconst u64 amd_hw_cache_event_ids | 5 | static __initconst const u64 amd_hw_cache_event_ids |
6 | [PERF_COUNT_HW_CACHE_MAX] | 6 | [PERF_COUNT_HW_CACHE_MAX] |
7 | [PERF_COUNT_HW_CACHE_OP_MAX] | 7 | [PERF_COUNT_HW_CACHE_OP_MAX] |
8 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 8 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -368,7 +368,7 @@ static void amd_pmu_cpu_dead(int cpu) | |||
368 | raw_spin_unlock(&amd_nb_lock); | 368 | raw_spin_unlock(&amd_nb_lock); |
369 | } | 369 | } |
370 | 370 | ||
371 | static __initconst struct x86_pmu amd_pmu = { | 371 | static __initconst const struct x86_pmu amd_pmu = { |
372 | .name = "AMD", | 372 | .name = "AMD", |
373 | .handle_irq = x86_pmu_handle_irq, | 373 | .handle_irq = x86_pmu_handle_irq, |
374 | .disable_all = x86_pmu_disable_all, | 374 | .disable_all = x86_pmu_disable_all, |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 30bf10c55f1e..1957e3f14c04 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -88,7 +88,7 @@ static u64 intel_pmu_event_map(int hw_event) | |||
88 | return intel_perfmon_event_map[hw_event]; | 88 | return intel_perfmon_event_map[hw_event]; |
89 | } | 89 | } |
90 | 90 | ||
91 | static __initconst u64 westmere_hw_cache_event_ids | 91 | static __initconst const u64 westmere_hw_cache_event_ids |
92 | [PERF_COUNT_HW_CACHE_MAX] | 92 | [PERF_COUNT_HW_CACHE_MAX] |
93 | [PERF_COUNT_HW_CACHE_OP_MAX] | 93 | [PERF_COUNT_HW_CACHE_OP_MAX] |
94 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 94 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -179,7 +179,7 @@ static __initconst u64 westmere_hw_cache_event_ids | |||
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static __initconst u64 nehalem_hw_cache_event_ids | 182 | static __initconst const u64 nehalem_hw_cache_event_ids |
183 | [PERF_COUNT_HW_CACHE_MAX] | 183 | [PERF_COUNT_HW_CACHE_MAX] |
184 | [PERF_COUNT_HW_CACHE_OP_MAX] | 184 | [PERF_COUNT_HW_CACHE_OP_MAX] |
185 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 185 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -270,7 +270,7 @@ static __initconst u64 nehalem_hw_cache_event_ids | |||
270 | }, | 270 | }, |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static __initconst u64 core2_hw_cache_event_ids | 273 | static __initconst const u64 core2_hw_cache_event_ids |
274 | [PERF_COUNT_HW_CACHE_MAX] | 274 | [PERF_COUNT_HW_CACHE_MAX] |
275 | [PERF_COUNT_HW_CACHE_OP_MAX] | 275 | [PERF_COUNT_HW_CACHE_OP_MAX] |
276 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 276 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -361,7 +361,7 @@ static __initconst u64 core2_hw_cache_event_ids | |||
361 | }, | 361 | }, |
362 | }; | 362 | }; |
363 | 363 | ||
364 | static __initconst u64 atom_hw_cache_event_ids | 364 | static __initconst const u64 atom_hw_cache_event_ids |
365 | [PERF_COUNT_HW_CACHE_MAX] | 365 | [PERF_COUNT_HW_CACHE_MAX] |
366 | [PERF_COUNT_HW_CACHE_OP_MAX] | 366 | [PERF_COUNT_HW_CACHE_OP_MAX] |
367 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 367 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -782,7 +782,7 @@ static int intel_pmu_hw_config(struct perf_event *event) | |||
782 | return 0; | 782 | return 0; |
783 | } | 783 | } |
784 | 784 | ||
785 | static __initconst struct x86_pmu core_pmu = { | 785 | static __initconst const struct x86_pmu core_pmu = { |
786 | .name = "core", | 786 | .name = "core", |
787 | .handle_irq = x86_pmu_handle_irq, | 787 | .handle_irq = x86_pmu_handle_irq, |
788 | .disable_all = x86_pmu_disable_all, | 788 | .disable_all = x86_pmu_disable_all, |
@@ -820,7 +820,7 @@ static void intel_pmu_cpu_dying(int cpu) | |||
820 | fini_debug_store_on_cpu(cpu); | 820 | fini_debug_store_on_cpu(cpu); |
821 | } | 821 | } |
822 | 822 | ||
823 | static __initconst struct x86_pmu intel_pmu = { | 823 | static __initconst const struct x86_pmu intel_pmu = { |
824 | .name = "Intel", | 824 | .name = "Intel", |
825 | .handle_irq = intel_pmu_handle_irq, | 825 | .handle_irq = intel_pmu_handle_irq, |
826 | .disable_all = intel_pmu_disable_all, | 826 | .disable_all = intel_pmu_disable_all, |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index acd237d29f11..15367cce66bd 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -287,7 +287,7 @@ static struct p4_event_bind p4_event_bind_map[] = { | |||
287 | p4_config_pack_cccr(cache_event | \ | 287 | p4_config_pack_cccr(cache_event | \ |
288 | P4_CCCR_ESEL(P4_OPCODE_ESEL(P4_OPCODE(event)))) | 288 | P4_CCCR_ESEL(P4_OPCODE_ESEL(P4_OPCODE(event)))) |
289 | 289 | ||
290 | static __initconst u64 p4_hw_cache_event_ids | 290 | static __initconst const u64 p4_hw_cache_event_ids |
291 | [PERF_COUNT_HW_CACHE_MAX] | 291 | [PERF_COUNT_HW_CACHE_MAX] |
292 | [PERF_COUNT_HW_CACHE_OP_MAX] | 292 | [PERF_COUNT_HW_CACHE_OP_MAX] |
293 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 293 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -780,7 +780,7 @@ done: | |||
780 | return num ? -ENOSPC : 0; | 780 | return num ? -ENOSPC : 0; |
781 | } | 781 | } |
782 | 782 | ||
783 | static __initconst struct x86_pmu p4_pmu = { | 783 | static __initconst const struct x86_pmu p4_pmu = { |
784 | .name = "Netburst P4/Xeon", | 784 | .name = "Netburst P4/Xeon", |
785 | .handle_irq = p4_pmu_handle_irq, | 785 | .handle_irq = p4_pmu_handle_irq, |
786 | .disable_all = p4_pmu_disable_all, | 786 | .disable_all = p4_pmu_disable_all, |
diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index 9123e8ec9958..34ba07be2cda 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c | |||
@@ -84,7 +84,7 @@ static void p6_pmu_enable_event(struct perf_event *event) | |||
84 | (void)checking_wrmsrl(hwc->config_base + hwc->idx, val); | 84 | (void)checking_wrmsrl(hwc->config_base + hwc->idx, val); |
85 | } | 85 | } |
86 | 86 | ||
87 | static __initconst struct x86_pmu p6_pmu = { | 87 | static __initconst const struct x86_pmu p6_pmu = { |
88 | .name = "p6", | 88 | .name = "p6", |
89 | .handle_irq = x86_pmu_handle_irq, | 89 | .handle_irq = x86_pmu_handle_irq, |
90 | .disable_all = p6_pmu_disable_all, | 90 | .disable_all = p6_pmu_disable_all, |