Commit fe7bf106ebc22730797ba9b51308b166d68b77f9

Authored by Paul Gortmaker
1 parent d23e2ae1aa

acpi: delete __cpuinit usage from all acpi 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/acpi uses of the __cpuinit macros
from all C files.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Showing 4 changed files with 11 additions and 13 deletions Side-by-side Diff

drivers/acpi/acpi_processor.c
... ... @@ -340,7 +340,7 @@
340 340 */
341 341 static DEFINE_PER_CPU(void *, processor_device_array);
342 342  
343   -static int __cpuinit acpi_processor_add(struct acpi_device *device,
  343 +static int acpi_processor_add(struct acpi_device *device,
344 344 const struct acpi_device_id *id)
345 345 {
346 346 struct acpi_processor *pr;
drivers/acpi/processor_core.c
... ... @@ -253,7 +253,7 @@
253 253 return true;
254 254 }
255 255  
256   -static void __cpuinit acpi_set_pdc_bits(u32 *buf)
  256 +static void acpi_set_pdc_bits(u32 *buf)
257 257 {
258 258 buf[0] = ACPI_PDC_REVISION_ID;
259 259 buf[1] = 1;
... ... @@ -265,7 +265,7 @@
265 265 arch_acpi_set_pdc_bits(buf);
266 266 }
267 267  
268   -static struct acpi_object_list *__cpuinit acpi_processor_alloc_pdc(void)
  268 +static struct acpi_object_list *acpi_processor_alloc_pdc(void)
269 269 {
270 270 struct acpi_object_list *obj_list;
271 271 union acpi_object *obj;
... ... @@ -308,7 +308,7 @@
308 308 * _PDC is required for a BIOS-OS handshake for most of the newer
309 309 * ACPI processor features.
310 310 */
311   -static int __cpuinit
  311 +static int
312 312 acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
313 313 {
314 314 acpi_status status = AE_OK;
... ... @@ -336,7 +336,7 @@
336 336 return status;
337 337 }
338 338  
339   -void __cpuinit acpi_processor_set_pdc(acpi_handle handle)
  339 +void acpi_processor_set_pdc(acpi_handle handle)
340 340 {
341 341 struct acpi_object_list *obj_list;
342 342  
drivers/acpi/processor_driver.c
... ... @@ -118,9 +118,9 @@
118 118 return;
119 119 }
120 120  
121   -static __cpuinit int __acpi_processor_start(struct acpi_device *device);
  121 +static int __acpi_processor_start(struct acpi_device *device);
122 122  
123   -static int __cpuinit acpi_cpu_soft_notify(struct notifier_block *nfb,
  123 +static int acpi_cpu_soft_notify(struct notifier_block *nfb,
124 124 unsigned long action, void *hcpu)
125 125 {
126 126 unsigned int cpu = (unsigned long)hcpu;
... ... @@ -162,7 +162,7 @@
162 162 .notifier_call = acpi_cpu_soft_notify,
163 163 };
164 164  
165   -static __cpuinit int __acpi_processor_start(struct acpi_device *device)
  165 +static int __acpi_processor_start(struct acpi_device *device)
166 166 {
167 167 struct acpi_processor *pr = acpi_driver_data(device);
168 168 acpi_status status;
... ... @@ -226,7 +226,7 @@
226 226 return result;
227 227 }
228 228  
229   -static int __cpuinit acpi_processor_start(struct device *dev)
  229 +static int acpi_processor_start(struct device *dev)
230 230 {
231 231 struct acpi_device *device;
232 232  
drivers/acpi/processor_idle.c
... ... @@ -96,9 +96,7 @@
96 96 return 0;
97 97 }
98 98  
99   -/* Actually this shouldn't be __cpuinitdata, would be better to fix the
100   - callers to only run once -AK */
101   -static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
  99 +static struct dmi_system_id processor_power_dmi_table[] = {
102 100 { set_max_cstate, "Clevo 5600D", {
103 101 DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
104 102 DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
... ... @@ -1165,7 +1163,7 @@
1165 1163  
1166 1164 static int acpi_processor_registered;
1167 1165  
1168   -int __cpuinit acpi_processor_power_init(struct acpi_processor *pr)
  1166 +int acpi_processor_power_init(struct acpi_processor *pr)
1169 1167 {
1170 1168 acpi_status status = 0;
1171 1169 int retval;