__cpuinit is gone in kernel now, remove them.
__init belongs after the return type on functions, not before, correct them too.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/plat/arm/boot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..928f6c9 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -147,7 +147,7 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) }
/* Local APIC = GIC cpu interface on ARM */ -static void __cpuinit acpi_register_lapic(int id, u8 enabled) +static void acpi_register_lapic(int id, u8 enabled) { int cpu;
@@ -365,7 +365,7 @@ early_param("possible_cpus", _setup_possible_cpus); * We do this because additional CPUs waste a lot of memory. * -AK */ -__init void prefill_possible_map(void) +void __init prefill_possible_map(void) { int i; int possible, disabled_cpus; @@ -405,7 +405,7 @@ __init void prefill_possible_map(void) #ifdef CONFIG_ACPI_HOTPLUG_CPU #include <acpi/processor.h>
-static void __cpuinit acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) +static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) { #ifdef CONFIG_ACPI_NUMA int nid; @@ -418,7 +418,7 @@ static void __cpuinit acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) #endif }
-static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu) +static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; @@ -582,7 +582,7 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table) * hpet_insert_resource inserts the HPET resources used into the resource * tree. */ -static __init int hpet_insert_resource(void) +static int __init hpet_insert_resource(void) { if (!hpet_res) return 1;
'struct acpi_madt_local_apic' should be 'struct acpi_madt_generic_interrupt' instead on ARM, this will lead to cpu hot add failure because of the wrong value we used.
Tested on ARMv8 foudation model and the cpu can be hot add in ACPI way.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/plat/arm/boot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 928f6c9..4891940 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -422,7 +422,7 @@ static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; - struct acpi_madt_local_apic *lapic; + struct acpi_madt_generic_interrupt *lapic; cpumask_var_t tmp_map, new_map; u8 physid; int cpu; @@ -441,15 +441,15 @@ static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) return -EINVAL; }
- lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer; + lapic = (struct acpi_madt_generic_interrupt *)obj->buffer.pointer;
- if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC || - !(lapic->lapic_flags & ACPI_MADT_ENABLED)) { + if (lapic->header.type != ACPI_MADT_TYPE_GENERIC_INTERRUPT || + !(lapic->flags & ACPI_MADT_ENABLED)) { kfree(buffer.pointer); return -EINVAL; }
- physid = lapic->id; + physid = lapic->gic_id;
kfree(buffer.pointer); buffer.length = ACPI_ALLOCATE_BUFFER;