Commit 8ef32031 authored by Will Deacon's avatar Will Deacon

ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface

acpi_parse_gic_cpu_interface calls acpi_map_gic_cpu_interface by both
passing a 32-bit value in the u8 enabled parameter and then subsequently
ignoring its return value.

Sort it out.
Reported-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent fb094eb1
...@@ -103,9 +103,12 @@ void __init __acpi_unmap_table(char *map, unsigned long size) ...@@ -103,9 +103,12 @@ void __init __acpi_unmap_table(char *map, unsigned long size)
* *
* Returns the logical cpu number which maps to MPIDR * Returns the logical cpu number which maps to MPIDR
*/ */
static int __init acpi_map_gic_cpu_interface(u64 mpidr, u8 enabled) static int __init
acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
{ {
int i; int i;
u64 mpidr = processor->arm_mpidr & MPIDR_HWID_BITMASK;
bool enabled = !!(processor->flags & ACPI_MADT_ENABLED);
if (mpidr == INVALID_HWID) { if (mpidr == INVALID_HWID) {
pr_info("Skip MADT cpu entry with invalid MPIDR\n"); pr_info("Skip MADT cpu entry with invalid MPIDR\n");
...@@ -178,11 +181,7 @@ acpi_parse_gic_cpu_interface(struct acpi_subtable_header *header, ...@@ -178,11 +181,7 @@ acpi_parse_gic_cpu_interface(struct acpi_subtable_header *header,
return -EINVAL; return -EINVAL;
acpi_table_print_madt_entry(header); acpi_table_print_madt_entry(header);
return acpi_map_gic_cpu_interface(processor);
acpi_map_gic_cpu_interface(processor->arm_mpidr & MPIDR_HWID_BITMASK,
processor->flags & ACPI_MADT_ENABLED);
return 0;
} }
/* Parse GIC cpu interface entries in MADT for SMP init */ /* Parse GIC cpu interface entries in MADT for SMP init */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment