summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-06-19 13:54:04 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-07-14 19:36:57 -0400
commit2760984f6578d5a462155bb4727766d0c8b68387 (patch)
tree03bbe0b8c2b98c43f3bafa1b1363c757b9aef3f9
parent8c37bb3ac95b8ff953bd3c8bc8dd0a393d5ae989 (diff)
cpufreq: delete __cpuinit usage from all cpufreq files
The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. This removes all the drivers/cpufreq uses of the __cpuinit macros from all C files. [1] https://lkml.org/lkml/2013/5/20/589 [v2: leave 2nd lines of args misaligned as requested by Viresh] Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: cpufreq@vger.kernel.org Cc: linux-pm@vger.kernel.org Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/cpufreq/cpufreq.c2
-rw-r--r--drivers/cpufreq/cpufreq_stats.c2
-rw-r--r--drivers/cpufreq/dbx500-cpufreq.c2
-rw-r--r--drivers/cpufreq/intel_pstate.c4
-rw-r--r--drivers/cpufreq/longhaul.c6
-rw-r--r--drivers/cpufreq/longhaul.h26
-rw-r--r--drivers/cpufreq/longrun.c6
-rw-r--r--drivers/cpufreq/omap-cpufreq.c2
-rw-r--r--drivers/cpufreq/powernow-k7.c8
-rw-r--r--drivers/cpufreq/powernow-k8.c6
10 files changed, 32 insertions, 32 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0937b8d6c2a4..b7bda8d9f081 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1932,7 +1932,7 @@ no_policy:
1932} 1932}
1933EXPORT_SYMBOL(cpufreq_update_policy); 1933EXPORT_SYMBOL(cpufreq_update_policy);
1934 1934
1935static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb, 1935static int cpufreq_cpu_callback(struct notifier_block *nfb,
1936 unsigned long action, void *hcpu) 1936 unsigned long action, void *hcpu)
1937{ 1937{
1938 unsigned int cpu = (unsigned long)hcpu; 1938 unsigned int cpu = (unsigned long)hcpu;
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index cd9e81713a71..c1ec11c513c1 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -341,7 +341,7 @@ static int cpufreq_stat_notifier_trans(struct notifier_block *nb,
341 return 0; 341 return 0;
342} 342}
343 343
344static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb, 344static int cpufreq_stat_cpu_callback(struct notifier_block *nfb,
345 unsigned long action, 345 unsigned long action,
346 void *hcpu) 346 void *hcpu)
347{ 347{
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 1fdb02b9f1ec..26321cdc1946 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -82,7 +82,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)
82 return freq_table[i].frequency; 82 return freq_table[i].frequency;
83} 83}
84 84
85static int __cpuinit dbx500_cpufreq_init(struct cpufreq_policy *policy) 85static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
86{ 86{
87 int res; 87 int res;
88 88
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 07f2840ad805..b012d7600e1a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -617,7 +617,7 @@ static int intel_pstate_verify_policy(struct cpufreq_policy *policy)
617 return 0; 617 return 0;
618} 618}
619 619
620static int __cpuinit intel_pstate_cpu_exit(struct cpufreq_policy *policy) 620static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
621{ 621{
622 int cpu = policy->cpu; 622 int cpu = policy->cpu;
623 623
@@ -627,7 +627,7 @@ static int __cpuinit intel_pstate_cpu_exit(struct cpufreq_policy *policy)
627 return 0; 627 return 0;
628} 628}
629 629
630static int __cpuinit intel_pstate_cpu_init(struct cpufreq_policy *policy) 630static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
631{ 631{
632 int rc, min_pstate, max_pstate; 632 int rc, min_pstate, max_pstate;
633 struct cpudata *cpu; 633 struct cpudata *cpu;
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index b6a0a7a406b0..8c49261df57d 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -422,7 +422,7 @@ static int guess_fsb(int mult)
422} 422}
423 423
424 424
425static int __cpuinit longhaul_get_ranges(void) 425static int longhaul_get_ranges(void)
426{ 426{
427 unsigned int i, j, k = 0; 427 unsigned int i, j, k = 0;
428 unsigned int ratio; 428 unsigned int ratio;
@@ -526,7 +526,7 @@ static int __cpuinit longhaul_get_ranges(void)
526} 526}
527 527
528 528
529static void __cpuinit longhaul_setup_voltagescaling(void) 529static void longhaul_setup_voltagescaling(void)
530{ 530{
531 union msr_longhaul longhaul; 531 union msr_longhaul longhaul;
532 struct mV_pos minvid, maxvid, vid; 532 struct mV_pos minvid, maxvid, vid;
@@ -780,7 +780,7 @@ static int longhaul_setup_southbridge(void)
780 return 0; 780 return 0;
781} 781}
782 782
783static int __cpuinit longhaul_cpu_init(struct cpufreq_policy *policy) 783static int longhaul_cpu_init(struct cpufreq_policy *policy)
784{ 784{
785 struct cpuinfo_x86 *c = &cpu_data(0); 785 struct cpuinfo_x86 *c = &cpu_data(0);
786 char *cpuname = NULL; 786 char *cpuname = NULL;
diff --git a/drivers/cpufreq/longhaul.h b/drivers/cpufreq/longhaul.h
index e2dc436099d1..1928b923a57b 100644
--- a/drivers/cpufreq/longhaul.h
+++ b/drivers/cpufreq/longhaul.h
@@ -56,7 +56,7 @@ union msr_longhaul {
56/* 56/*
57 * VIA C3 Samuel 1 & Samuel 2 (stepping 0) 57 * VIA C3 Samuel 1 & Samuel 2 (stepping 0)
58 */ 58 */
59static const int __cpuinitconst samuel1_mults[16] = { 59static const int samuel1_mults[16] = {
60 -1, /* 0000 -> RESERVED */ 60 -1, /* 0000 -> RESERVED */
61 30, /* 0001 -> 3.0x */ 61 30, /* 0001 -> 3.0x */
62 40, /* 0010 -> 4.0x */ 62 40, /* 0010 -> 4.0x */
@@ -75,7 +75,7 @@ static const int __cpuinitconst samuel1_mults[16] = {
75 -1, /* 1111 -> RESERVED */ 75 -1, /* 1111 -> RESERVED */
76}; 76};
77 77
78static const int __cpuinitconst samuel1_eblcr[16] = { 78static const int samuel1_eblcr[16] = {
79 50, /* 0000 -> RESERVED */ 79 50, /* 0000 -> RESERVED */
80 30, /* 0001 -> 3.0x */ 80 30, /* 0001 -> 3.0x */
81 40, /* 0010 -> 4.0x */ 81 40, /* 0010 -> 4.0x */
@@ -97,7 +97,7 @@ static const int __cpuinitconst samuel1_eblcr[16] = {
97/* 97/*
98 * VIA C3 Samuel2 Stepping 1->15 98 * VIA C3 Samuel2 Stepping 1->15
99 */ 99 */
100static const int __cpuinitconst samuel2_eblcr[16] = { 100static const int samuel2_eblcr[16] = {
101 50, /* 0000 -> 5.0x */ 101 50, /* 0000 -> 5.0x */
102 30, /* 0001 -> 3.0x */ 102 30, /* 0001 -> 3.0x */
103 40, /* 0010 -> 4.0x */ 103 40, /* 0010 -> 4.0x */
@@ -119,7 +119,7 @@ static const int __cpuinitconst samuel2_eblcr[16] = {
119/* 119/*
120 * VIA C3 Ezra 120 * VIA C3 Ezra
121 */ 121 */
122static const int __cpuinitconst ezra_mults[16] = { 122static const int ezra_mults[16] = {
123 100, /* 0000 -> 10.0x */ 123 100, /* 0000 -> 10.0x */
124 30, /* 0001 -> 3.0x */ 124 30, /* 0001 -> 3.0x */
125 40, /* 0010 -> 4.0x */ 125 40, /* 0010 -> 4.0x */
@@ -138,7 +138,7 @@ static const int __cpuinitconst ezra_mults[16] = {
138 120, /* 1111 -> 12.0x */ 138 120, /* 1111 -> 12.0x */
139}; 139};
140 140
141static const int __cpuinitconst ezra_eblcr[16] = { 141static const int ezra_eblcr[16] = {
142 50, /* 0000 -> 5.0x */ 142 50, /* 0000 -> 5.0x */
143 30, /* 0001 -> 3.0x */ 143 30, /* 0001 -> 3.0x */
144 40, /* 0010 -> 4.0x */ 144 40, /* 0010 -> 4.0x */
@@ -160,7 +160,7 @@ static const int __cpuinitconst ezra_eblcr[16] = {
160/* 160/*
161 * VIA C3 (Ezra-T) [C5M]. 161 * VIA C3 (Ezra-T) [C5M].
162 */ 162 */
163static const int __cpuinitconst ezrat_mults[32] = { 163static const int ezrat_mults[32] = {
164 100, /* 0000 -> 10.0x */ 164 100, /* 0000 -> 10.0x */
165 30, /* 0001 -> 3.0x */ 165 30, /* 0001 -> 3.0x */
166 40, /* 0010 -> 4.0x */ 166 40, /* 0010 -> 4.0x */
@@ -196,7 +196,7 @@ static const int __cpuinitconst ezrat_mults[32] = {
196 -1, /* 1111 -> RESERVED (12.0x) */ 196 -1, /* 1111 -> RESERVED (12.0x) */
197}; 197};
198 198
199static const int __cpuinitconst ezrat_eblcr[32] = { 199static const int ezrat_eblcr[32] = {
200 50, /* 0000 -> 5.0x */ 200 50, /* 0000 -> 5.0x */
201 30, /* 0001 -> 3.0x */ 201 30, /* 0001 -> 3.0x */
202 40, /* 0010 -> 4.0x */ 202 40, /* 0010 -> 4.0x */
@@ -235,7 +235,7 @@ static const int __cpuinitconst ezrat_eblcr[32] = {
235/* 235/*
236 * VIA C3 Nehemiah */ 236 * VIA C3 Nehemiah */
237 237
238static const int __cpuinitconst nehemiah_mults[32] = { 238static const int nehemiah_mults[32] = {
239 100, /* 0000 -> 10.0x */ 239 100, /* 0000 -> 10.0x */
240 -1, /* 0001 -> 16.0x */ 240 -1, /* 0001 -> 16.0x */
241 40, /* 0010 -> 4.0x */ 241 40, /* 0010 -> 4.0x */
@@ -270,7 +270,7 @@ static const int __cpuinitconst nehemiah_mults[32] = {
270 -1, /* 1111 -> 12.0x */ 270 -1, /* 1111 -> 12.0x */
271}; 271};
272 272
273static const int __cpuinitconst nehemiah_eblcr[32] = { 273static const int nehemiah_eblcr[32] = {
274 50, /* 0000 -> 5.0x */ 274 50, /* 0000 -> 5.0x */
275 160, /* 0001 -> 16.0x */ 275 160, /* 0001 -> 16.0x */
276 40, /* 0010 -> 4.0x */ 276 40, /* 0010 -> 4.0x */
@@ -315,7 +315,7 @@ struct mV_pos {
315 unsigned short pos; 315 unsigned short pos;
316}; 316};
317 317
318static const struct mV_pos __cpuinitconst vrm85_mV[32] = { 318static const struct mV_pos vrm85_mV[32] = {
319 {1250, 8}, {1200, 6}, {1150, 4}, {1100, 2}, 319 {1250, 8}, {1200, 6}, {1150, 4}, {1100, 2},
320 {1050, 0}, {1800, 30}, {1750, 28}, {1700, 26}, 320 {1050, 0}, {1800, 30}, {1750, 28}, {1700, 26},
321 {1650, 24}, {1600, 22}, {1550, 20}, {1500, 18}, 321 {1650, 24}, {1600, 22}, {1550, 20}, {1500, 18},
@@ -326,14 +326,14 @@ static const struct mV_pos __cpuinitconst vrm85_mV[32] = {
326 {1475, 17}, {1425, 15}, {1375, 13}, {1325, 11} 326 {1475, 17}, {1425, 15}, {1375, 13}, {1325, 11}
327}; 327};
328 328
329static const unsigned char __cpuinitconst mV_vrm85[32] = { 329static const unsigned char mV_vrm85[32] = {
330 0x04, 0x14, 0x03, 0x13, 0x02, 0x12, 0x01, 0x11, 330 0x04, 0x14, 0x03, 0x13, 0x02, 0x12, 0x01, 0x11,
331 0x00, 0x10, 0x0f, 0x1f, 0x0e, 0x1e, 0x0d, 0x1d, 331 0x00, 0x10, 0x0f, 0x1f, 0x0e, 0x1e, 0x0d, 0x1d,
332 0x0c, 0x1c, 0x0b, 0x1b, 0x0a, 0x1a, 0x09, 0x19, 332 0x0c, 0x1c, 0x0b, 0x1b, 0x0a, 0x1a, 0x09, 0x19,
333 0x08, 0x18, 0x07, 0x17, 0x06, 0x16, 0x05, 0x15 333 0x08, 0x18, 0x07, 0x17, 0x06, 0x16, 0x05, 0x15
334}; 334};
335 335
336static const struct mV_pos __cpuinitconst mobilevrm_mV[32] = { 336static const struct mV_pos mobilevrm_mV[32] = {
337 {1750, 31}, {1700, 30}, {1650, 29}, {1600, 28}, 337 {1750, 31}, {1700, 30}, {1650, 29}, {1600, 28},
338 {1550, 27}, {1500, 26}, {1450, 25}, {1400, 24}, 338 {1550, 27}, {1500, 26}, {1450, 25}, {1400, 24},
339 {1350, 23}, {1300, 22}, {1250, 21}, {1200, 20}, 339 {1350, 23}, {1300, 22}, {1250, 21}, {1200, 20},
@@ -344,7 +344,7 @@ static const struct mV_pos __cpuinitconst mobilevrm_mV[32] = {
344 {675, 3}, {650, 2}, {625, 1}, {600, 0} 344 {675, 3}, {650, 2}, {625, 1}, {600, 0}
345}; 345};
346 346
347static const unsigned char __cpuinitconst mV_mobilevrm[32] = { 347static const unsigned char mV_mobilevrm[32] = {
348 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 348 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
349 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 349 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
350 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 350 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
diff --git a/drivers/cpufreq/longrun.c b/drivers/cpufreq/longrun.c
index 8bc9f5fbbaeb..0fe041d1f77f 100644
--- a/drivers/cpufreq/longrun.c
+++ b/drivers/cpufreq/longrun.c
@@ -33,7 +33,7 @@ static unsigned int longrun_low_freq, longrun_high_freq;
33 * Reads the current LongRun policy by access to MSR_TMTA_LONGRUN_FLAGS 33 * Reads the current LongRun policy by access to MSR_TMTA_LONGRUN_FLAGS
34 * and MSR_TMTA_LONGRUN_CTRL 34 * and MSR_TMTA_LONGRUN_CTRL
35 */ 35 */
36static void __cpuinit longrun_get_policy(struct cpufreq_policy *policy) 36static void longrun_get_policy(struct cpufreq_policy *policy)
37{ 37{
38 u32 msr_lo, msr_hi; 38 u32 msr_lo, msr_hi;
39 39
@@ -163,7 +163,7 @@ static unsigned int longrun_get(unsigned int cpu)
163 * TMTA rules: 163 * TMTA rules:
164 * performance_pctg = (target_freq - low_freq)/(high_freq - low_freq) 164 * performance_pctg = (target_freq - low_freq)/(high_freq - low_freq)
165 */ 165 */
166static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, 166static int longrun_determine_freqs(unsigned int *low_freq,
167 unsigned int *high_freq) 167 unsigned int *high_freq)
168{ 168{
169 u32 msr_lo, msr_hi; 169 u32 msr_lo, msr_hi;
@@ -256,7 +256,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq,
256} 256}
257 257
258 258
259static int __cpuinit longrun_cpu_init(struct cpufreq_policy *policy) 259static int longrun_cpu_init(struct cpufreq_policy *policy)
260{ 260{
261 int result = 0; 261 int result = 0;
262 262
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 29468a522ee9..f31fcfcad514 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -165,7 +165,7 @@ static inline void freq_table_free(void)
165 opp_free_cpufreq_table(mpu_dev, &freq_table); 165 opp_free_cpufreq_table(mpu_dev, &freq_table);
166} 166}
167 167
168static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) 168static int omap_cpu_init(struct cpufreq_policy *policy)
169{ 169{
170 int result = 0; 170 int result = 0;
171 171
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index b9f80b713fda..955870877935 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -563,7 +563,7 @@ static int powernow_verify(struct cpufreq_policy *policy)
563 * We will then get the same kind of behaviour already tested under 563 * We will then get the same kind of behaviour already tested under
564 * the "well-known" other OS. 564 * the "well-known" other OS.
565 */ 565 */
566static int __cpuinit fixup_sgtc(void) 566static int fixup_sgtc(void)
567{ 567{
568 unsigned int sgtc; 568 unsigned int sgtc;
569 unsigned int m; 569 unsigned int m;
@@ -597,7 +597,7 @@ static unsigned int powernow_get(unsigned int cpu)
597} 597}
598 598
599 599
600static int __cpuinit acer_cpufreq_pst(const struct dmi_system_id *d) 600static int acer_cpufreq_pst(const struct dmi_system_id *d)
601{ 601{
602 printk(KERN_WARNING PFX 602 printk(KERN_WARNING PFX
603 "%s laptop with broken PST tables in BIOS detected.\n", 603 "%s laptop with broken PST tables in BIOS detected.\n",
@@ -615,7 +615,7 @@ static int __cpuinit acer_cpufreq_pst(const struct dmi_system_id *d)
615 * A BIOS update is all that can save them. 615 * A BIOS update is all that can save them.
616 * Mention this, and disable cpufreq. 616 * Mention this, and disable cpufreq.
617 */ 617 */
618static struct dmi_system_id __cpuinitdata powernow_dmi_table[] = { 618static struct dmi_system_id powernow_dmi_table[] = {
619 { 619 {
620 .callback = acer_cpufreq_pst, 620 .callback = acer_cpufreq_pst,
621 .ident = "Acer Aspire", 621 .ident = "Acer Aspire",
@@ -627,7 +627,7 @@ static struct dmi_system_id __cpuinitdata powernow_dmi_table[] = {
627 { } 627 { }
628}; 628};
629 629
630static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy) 630static int powernow_cpu_init(struct cpufreq_policy *policy)
631{ 631{
632 union msr_fidvidstatus fidvidstatus; 632 union msr_fidvidstatus fidvidstatus;
633 int result; 633 int result;
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 78f018f2a5de..c39d189217cb 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1069,7 +1069,7 @@ struct init_on_cpu {
1069 int rc; 1069 int rc;
1070}; 1070};
1071 1071
1072static void __cpuinit powernowk8_cpu_init_on_cpu(void *_init_on_cpu) 1072static void powernowk8_cpu_init_on_cpu(void *_init_on_cpu)
1073{ 1073{
1074 struct init_on_cpu *init_on_cpu = _init_on_cpu; 1074 struct init_on_cpu *init_on_cpu = _init_on_cpu;
1075 1075
@@ -1096,7 +1096,7 @@ static const char missing_pss_msg[] =
1096 FW_BUG PFX "If that doesn't help, try upgrading your BIOS.\n"; 1096 FW_BUG PFX "If that doesn't help, try upgrading your BIOS.\n";
1097 1097
1098/* per CPU init entry point to the driver */ 1098/* per CPU init entry point to the driver */
1099static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) 1099static int powernowk8_cpu_init(struct cpufreq_policy *pol)
1100{ 1100{
1101 struct powernow_k8_data *data; 1101 struct powernow_k8_data *data;
1102 struct init_on_cpu init_on_cpu; 1102 struct init_on_cpu init_on_cpu;
@@ -1263,7 +1263,7 @@ static void __request_acpi_cpufreq(void)
1263} 1263}
1264 1264
1265/* driver entry point for init */ 1265/* driver entry point for init */
1266static int __cpuinit powernowk8_init(void) 1266static int powernowk8_init(void)
1267{ 1267{
1268 unsigned int i, supported_cpus = 0; 1268 unsigned int i, supported_cpus = 0;
1269 int ret; 1269 int ret;