aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Nowicki <tomasz.nowicki@linaro.org>2014-02-13 18:20:53 +0100
committerGraeme Gregory <graeme.gregory@linaro.org>2014-06-03 09:24:21 +0100
commite16d20531ad50593cb8c09f8a934659be950a33e (patch)
tree9de31f280f8e40944ed4383b00c0e48f9bf82cc9
parentfd7d61fb5330fa18840131401730b3e262d083bd (diff)
downloadleg-kernel-e16d20531ad50593cb8c09f8a934659be950a33e.tar.gz
ARM64, ACPI, MADT: Remove redundant early_acpi_boot_init() code.
Since early_acpi_boot_init() does the same job as acpi_boot_init(), we can collapse the redundant parts into a single acpi_boot_init() function, and move the remaining code obtaining the boot CPU ID to where it is actually needed. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
-rw-r--r--arch/arm64/kernel/setup.c1
-rw-r--r--drivers/acpi/plat/arm-core.c27
-rw-r--r--include/linux/acpi.h1
3 files changed, 3 insertions, 26 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 448cf67b4c2f..2b624f0ff141 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -374,7 +374,6 @@ void __init setup_arch(char **cmdline_p)
/* Parse the ACPI tables for possible boot-time configuration */
acpi_boot_table_init();
- early_acpi_boot_init();
acpi_boot_init();
paging_init();
diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c
index 25c5a08d26ee..95e2edb7b3c3 100644
--- a/drivers/acpi/plat/arm-core.c
+++ b/drivers/acpi/plat/arm-core.c
@@ -454,15 +454,13 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
return 0;
}
-static void __init early_acpi_process_madt(void)
-{
- acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt);
-}
-
static void __init acpi_process_madt(void)
{
int error;
+ /* Get the boot CPU interface ID before MADT parsing */
+ boot_cpu_apic_id = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
+
if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
/*
@@ -537,25 +535,6 @@ void __init acpi_boot_table_init(void)
}
}
-int __init early_acpi_boot_init(void)
-{
- /*
- * If acpi_disabled, bail out
- */
- if (acpi_disabled)
- return -ENODEV;
-
- /* Get the boot CPU's GIC cpu interface id before MADT parsing */
- boot_cpu_apic_id = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
-
- /*
- * Process the Multiple APIC Description Table (MADT), if present
- */
- early_acpi_process_madt();
-
- return 0;
-}
-
int __init acpi_boot_init(void)
{
/*
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index b057f3a4844d..beee07815bbb 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -115,7 +115,6 @@ static inline void acpi_initrd_override(void *data, size_t size)
char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
void __acpi_unmap_table(char *map, unsigned long size);
-int early_acpi_boot_init(void);
int acpi_boot_init (void);
int acpi_gic_init(void);
void acpi_boot_table_init (void);