diff options
author | Will Deacon <will.deacon@arm.com> | 2015-03-26 11:09:20 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-26 11:13:11 -0400 |
commit | 8ef320319592693f4a6286d80df210fd47b3e356 (patch) | |
tree | c25a982b539e212df97d21e55e56c79c8ddb6f29 /arch/arm64 | |
parent | fb094eb19900937322848beaf1a622c6afb6250b (diff) |
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: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/acpi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index cd60329da8c4..07649e413244 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c | |||
@@ -103,9 +103,12 @@ void __init __acpi_unmap_table(char *map, unsigned long size) | |||
103 | * | 103 | * |
104 | * Returns the logical cpu number which maps to MPIDR | 104 | * Returns the logical cpu number which maps to MPIDR |
105 | */ | 105 | */ |
106 | static int __init acpi_map_gic_cpu_interface(u64 mpidr, u8 enabled) | 106 | static int __init |
107 | acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) | ||
107 | { | 108 | { |
108 | int i; | 109 | int i; |
110 | u64 mpidr = processor->arm_mpidr & MPIDR_HWID_BITMASK; | ||
111 | bool enabled = !!(processor->flags & ACPI_MADT_ENABLED); | ||
109 | 112 | ||
110 | if (mpidr == INVALID_HWID) { | 113 | if (mpidr == INVALID_HWID) { |
111 | pr_info("Skip MADT cpu entry with invalid MPIDR\n"); | 114 | 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 | return -EINVAL; | 181 | return -EINVAL; |
179 | 182 | ||
180 | acpi_table_print_madt_entry(header); | 183 | acpi_table_print_madt_entry(header); |
181 | 184 | return acpi_map_gic_cpu_interface(processor); | |
182 | acpi_map_gic_cpu_interface(processor->arm_mpidr & MPIDR_HWID_BITMASK, | ||
183 | processor->flags & ACPI_MADT_ENABLED); | ||
184 | |||
185 | return 0; | ||
186 | } | 185 | } |
187 | 186 | ||
188 | /* Parse GIC cpu interface entries in MADT for SMP init */ | 187 | /* Parse GIC cpu interface entries in MADT for SMP init */ |