浏览代码

perf/x86/intel: Mark initialization code as such

A few of the initialization functions are missing the __init annotation.
Fix this and thereby allow ~680 additional bytes of code to be released
after initialization.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1409071785-26015-1-git-send-email-minipli@googlemail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Mathias Krause 11 年之前
父节点
当前提交
066ce64c7e
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      arch/x86/kernel/cpu/perf_event_intel_ds.c
  2. 4 4
      arch/x86/kernel/cpu/perf_event_intel_lbr.c

+ 1 - 1
arch/x86/kernel/cpu/perf_event_intel_ds.c

@@ -1014,7 +1014,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)
  * BTS, PEBS probe and setup
  * BTS, PEBS probe and setup
  */
  */
 
 
-void intel_ds_init(void)
+void __init intel_ds_init(void)
 {
 {
 	/*
 	/*
 	 * No support for 32bit formats
 	 * No support for 32bit formats

+ 4 - 4
arch/x86/kernel/cpu/perf_event_intel_lbr.c

@@ -697,7 +697,7 @@ static const int snb_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
 };
 };
 
 
 /* core */
 /* core */
-void intel_pmu_lbr_init_core(void)
+void __init intel_pmu_lbr_init_core(void)
 {
 {
 	x86_pmu.lbr_nr     = 4;
 	x86_pmu.lbr_nr     = 4;
 	x86_pmu.lbr_tos    = MSR_LBR_TOS;
 	x86_pmu.lbr_tos    = MSR_LBR_TOS;
@@ -712,7 +712,7 @@ void intel_pmu_lbr_init_core(void)
 }
 }
 
 
 /* nehalem/westmere */
 /* nehalem/westmere */
-void intel_pmu_lbr_init_nhm(void)
+void __init intel_pmu_lbr_init_nhm(void)
 {
 {
 	x86_pmu.lbr_nr     = 16;
 	x86_pmu.lbr_nr     = 16;
 	x86_pmu.lbr_tos    = MSR_LBR_TOS;
 	x86_pmu.lbr_tos    = MSR_LBR_TOS;
@@ -733,7 +733,7 @@ void intel_pmu_lbr_init_nhm(void)
 }
 }
 
 
 /* sandy bridge */
 /* sandy bridge */
-void intel_pmu_lbr_init_snb(void)
+void __init intel_pmu_lbr_init_snb(void)
 {
 {
 	x86_pmu.lbr_nr	 = 16;
 	x86_pmu.lbr_nr	 = 16;
 	x86_pmu.lbr_tos	 = MSR_LBR_TOS;
 	x86_pmu.lbr_tos	 = MSR_LBR_TOS;
@@ -753,7 +753,7 @@ void intel_pmu_lbr_init_snb(void)
 }
 }
 
 
 /* atom */
 /* atom */
-void intel_pmu_lbr_init_atom(void)
+void __init intel_pmu_lbr_init_atom(void)
 {
 {
 	/*
 	/*
 	 * only models starting at stepping 10 seems
 	 * only models starting at stepping 10 seems