Skip to content

Commit fe7bf10

Browse files
author
Paul Gortmaker
committed
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 5e427ec ("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 <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]>
1 parent d23e2ae commit fe7bf10

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

drivers/acpi/acpi_processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
340340
*/
341341
static DEFINE_PER_CPU(void *, processor_device_array);
342342

343-
static int __cpuinit acpi_processor_add(struct acpi_device *device,
343+
static int acpi_processor_add(struct acpi_device *device,
344344
const struct acpi_device_id *id)
345345
{
346346
struct acpi_processor *pr;

drivers/acpi/processor_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static bool __init processor_physically_present(acpi_handle handle)
253253
return true;
254254
}
255255

256-
static void __cpuinit acpi_set_pdc_bits(u32 *buf)
256+
static void acpi_set_pdc_bits(u32 *buf)
257257
{
258258
buf[0] = ACPI_PDC_REVISION_ID;
259259
buf[1] = 1;
@@ -265,7 +265,7 @@ static void __cpuinit acpi_set_pdc_bits(u32 *buf)
265265
arch_acpi_set_pdc_bits(buf);
266266
}
267267

268-
static struct acpi_object_list *__cpuinit acpi_processor_alloc_pdc(void)
268+
static struct acpi_object_list *acpi_processor_alloc_pdc(void)
269269
{
270270
struct acpi_object_list *obj_list;
271271
union acpi_object *obj;
@@ -308,7 +308,7 @@ static struct acpi_object_list *__cpuinit acpi_processor_alloc_pdc(void)
308308
* _PDC is required for a BIOS-OS handshake for most of the newer
309309
* ACPI processor features.
310310
*/
311-
static int __cpuinit
311+
static int
312312
acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
313313
{
314314
acpi_status status = AE_OK;
@@ -336,7 +336,7 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
336336
return status;
337337
}
338338

339-
void __cpuinit acpi_processor_set_pdc(acpi_handle handle)
339+
void acpi_processor_set_pdc(acpi_handle handle)
340340
{
341341
struct acpi_object_list *obj_list;
342342

drivers/acpi/processor_driver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
118118
return;
119119
}
120120

121-
static __cpuinit int __acpi_processor_start(struct acpi_device *device);
121+
static int __acpi_processor_start(struct acpi_device *device);
122122

123-
static int __cpuinit acpi_cpu_soft_notify(struct notifier_block *nfb,
123+
static int acpi_cpu_soft_notify(struct notifier_block *nfb,
124124
unsigned long action, void *hcpu)
125125
{
126126
unsigned int cpu = (unsigned long)hcpu;
@@ -162,7 +162,7 @@ static struct notifier_block __refdata acpi_cpu_notifier =
162162
.notifier_call = acpi_cpu_soft_notify,
163163
};
164164

165-
static __cpuinit int __acpi_processor_start(struct acpi_device *device)
165+
static int __acpi_processor_start(struct acpi_device *device)
166166
{
167167
struct acpi_processor *pr = acpi_driver_data(device);
168168
acpi_status status;
@@ -226,7 +226,7 @@ static __cpuinit int __acpi_processor_start(struct acpi_device *device)
226226
return result;
227227
}
228228

229-
static int __cpuinit acpi_processor_start(struct device *dev)
229+
static int acpi_processor_start(struct device *dev)
230230
{
231231
struct acpi_device *device;
232232

drivers/acpi/processor_idle.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ static int set_max_cstate(const struct dmi_system_id *id)
9696
return 0;
9797
}
9898

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[] = {
102100
{ set_max_cstate, "Clevo 5600D", {
103101
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
104102
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
@@ -1165,7 +1163,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
11651163

11661164
static int acpi_processor_registered;
11671165

1168-
int __cpuinit acpi_processor_power_init(struct acpi_processor *pr)
1166+
int acpi_processor_power_init(struct acpi_processor *pr)
11691167
{
11701168
acpi_status status = 0;
11711169
int retval;

0 commit comments

Comments
 (0)