diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2009-11-11 21:25:34 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-12 03:18:36 -0500 |
commit | db48cccc7c709ccfa7cb4ac702bc27c216bffee7 (patch) | |
tree | 3d98ab32189e693891151bcb4b5e26bfb52d959e /arch/x86 | |
parent | 5d7bdab75cd56d2bdc0986ae5546be3b09fea70a (diff) |
perf_event, x86: Annotate init functions and data
Annotate init functions and data with __init and __initconst.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@gmail.com>
LKML-Reference: <4AFB721E.8070203@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 2e20bca3cca1..bd8743024204 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -245,7 +245,7 @@ static u64 __read_mostly hw_cache_event_ids | |||
245 | [PERF_COUNT_HW_CACHE_OP_MAX] | 245 | [PERF_COUNT_HW_CACHE_OP_MAX] |
246 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; | 246 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; |
247 | 247 | ||
248 | static const u64 nehalem_hw_cache_event_ids | 248 | static __initconst u64 nehalem_hw_cache_event_ids |
249 | [PERF_COUNT_HW_CACHE_MAX] | 249 | [PERF_COUNT_HW_CACHE_MAX] |
250 | [PERF_COUNT_HW_CACHE_OP_MAX] | 250 | [PERF_COUNT_HW_CACHE_OP_MAX] |
251 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 251 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -336,7 +336,7 @@ static const u64 nehalem_hw_cache_event_ids | |||
336 | }, | 336 | }, |
337 | }; | 337 | }; |
338 | 338 | ||
339 | static const u64 core2_hw_cache_event_ids | 339 | static __initconst u64 core2_hw_cache_event_ids |
340 | [PERF_COUNT_HW_CACHE_MAX] | 340 | [PERF_COUNT_HW_CACHE_MAX] |
341 | [PERF_COUNT_HW_CACHE_OP_MAX] | 341 | [PERF_COUNT_HW_CACHE_OP_MAX] |
342 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 342 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -427,7 +427,7 @@ static const u64 core2_hw_cache_event_ids | |||
427 | }, | 427 | }, |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static const u64 atom_hw_cache_event_ids | 430 | static __initconst u64 atom_hw_cache_event_ids |
431 | [PERF_COUNT_HW_CACHE_MAX] | 431 | [PERF_COUNT_HW_CACHE_MAX] |
432 | [PERF_COUNT_HW_CACHE_OP_MAX] | 432 | [PERF_COUNT_HW_CACHE_OP_MAX] |
433 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 433 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -536,7 +536,7 @@ static u64 intel_pmu_raw_event(u64 hw_event) | |||
536 | return hw_event & CORE_EVNTSEL_MASK; | 536 | return hw_event & CORE_EVNTSEL_MASK; |
537 | } | 537 | } |
538 | 538 | ||
539 | static const u64 amd_hw_cache_event_ids | 539 | static __initconst u64 amd_hw_cache_event_ids |
540 | [PERF_COUNT_HW_CACHE_MAX] | 540 | [PERF_COUNT_HW_CACHE_MAX] |
541 | [PERF_COUNT_HW_CACHE_OP_MAX] | 541 | [PERF_COUNT_HW_CACHE_OP_MAX] |
542 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 542 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
@@ -1964,7 +1964,7 @@ static __read_mostly struct notifier_block perf_event_nmi_notifier = { | |||
1964 | .priority = 1 | 1964 | .priority = 1 |
1965 | }; | 1965 | }; |
1966 | 1966 | ||
1967 | static struct x86_pmu p6_pmu = { | 1967 | static __initconst struct x86_pmu p6_pmu = { |
1968 | .name = "p6", | 1968 | .name = "p6", |
1969 | .handle_irq = p6_pmu_handle_irq, | 1969 | .handle_irq = p6_pmu_handle_irq, |
1970 | .disable_all = p6_pmu_disable_all, | 1970 | .disable_all = p6_pmu_disable_all, |
@@ -1992,7 +1992,7 @@ static struct x86_pmu p6_pmu = { | |||
1992 | .get_event_idx = intel_get_event_idx, | 1992 | .get_event_idx = intel_get_event_idx, |
1993 | }; | 1993 | }; |
1994 | 1994 | ||
1995 | static struct x86_pmu intel_pmu = { | 1995 | static __initconst struct x86_pmu intel_pmu = { |
1996 | .name = "Intel", | 1996 | .name = "Intel", |
1997 | .handle_irq = intel_pmu_handle_irq, | 1997 | .handle_irq = intel_pmu_handle_irq, |
1998 | .disable_all = intel_pmu_disable_all, | 1998 | .disable_all = intel_pmu_disable_all, |
@@ -2016,7 +2016,7 @@ static struct x86_pmu intel_pmu = { | |||
2016 | .get_event_idx = intel_get_event_idx, | 2016 | .get_event_idx = intel_get_event_idx, |
2017 | }; | 2017 | }; |
2018 | 2018 | ||
2019 | static struct x86_pmu amd_pmu = { | 2019 | static __initconst struct x86_pmu amd_pmu = { |
2020 | .name = "AMD", | 2020 | .name = "AMD", |
2021 | .handle_irq = amd_pmu_handle_irq, | 2021 | .handle_irq = amd_pmu_handle_irq, |
2022 | .disable_all = amd_pmu_disable_all, | 2022 | .disable_all = amd_pmu_disable_all, |
@@ -2037,7 +2037,7 @@ static struct x86_pmu amd_pmu = { | |||
2037 | .get_event_idx = gen_get_event_idx, | 2037 | .get_event_idx = gen_get_event_idx, |
2038 | }; | 2038 | }; |
2039 | 2039 | ||
2040 | static int p6_pmu_init(void) | 2040 | static __init int p6_pmu_init(void) |
2041 | { | 2041 | { |
2042 | switch (boot_cpu_data.x86_model) { | 2042 | switch (boot_cpu_data.x86_model) { |
2043 | case 1: | 2043 | case 1: |
@@ -2071,7 +2071,7 @@ static int p6_pmu_init(void) | |||
2071 | return 0; | 2071 | return 0; |
2072 | } | 2072 | } |
2073 | 2073 | ||
2074 | static int intel_pmu_init(void) | 2074 | static __init int intel_pmu_init(void) |
2075 | { | 2075 | { |
2076 | union cpuid10_edx edx; | 2076 | union cpuid10_edx edx; |
2077 | union cpuid10_eax eax; | 2077 | union cpuid10_eax eax; |
@@ -2144,7 +2144,7 @@ static int intel_pmu_init(void) | |||
2144 | return 0; | 2144 | return 0; |
2145 | } | 2145 | } |
2146 | 2146 | ||
2147 | static int amd_pmu_init(void) | 2147 | static __init int amd_pmu_init(void) |
2148 | { | 2148 | { |
2149 | /* Performance-monitoring supported from K7 and later: */ | 2149 | /* Performance-monitoring supported from K7 and later: */ |
2150 | if (boot_cpu_data.x86 < 6) | 2150 | if (boot_cpu_data.x86 < 6) |