mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface
This part of the code will never be executed when the entry corresponds to the boot CPU. Also print an error message rather when arch_cpu_init has failed. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
This commit is contained in:
1 parent
632b7a1e08
commit
adb3149b9c
1 file changed
+8
-7
@@ -51,6 +51,7 @@ static void __init
|
||||
acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
|
||||
{
|
||||
int i;
|
||||
int rc;
|
||||
u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK;
|
||||
bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED);
|
||||
|
||||
@@ -102,16 +103,16 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
|
||||
if ( !acpi_psci_present() )
|
||||
return;
|
||||
|
||||
/* CPU 0 was already initialized */
|
||||
if ( enabled_cpus )
|
||||
if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
|
||||
{
|
||||
if ( arch_cpu_init(enabled_cpus, NULL) < 0 )
|
||||
return;
|
||||
|
||||
/* map the logical cpu id to cpu MPIDR */
|
||||
cpu_logical_map(enabled_cpus) = mpidr;
|
||||
printk("cpu%d: init failed (0x%"PRIx64" MPIDR): %d\n",
|
||||
enabled_cpus, mpidr, rc);
|
||||
return;
|
||||
}
|
||||
|
||||
/* map the logical cpu id to cpu MPIDR */
|
||||
cpu_logical_map(enabled_cpus) = mpidr;
|
||||
|
||||
enabled_cpus++;
|
||||
}
|
||||
|
||||
|
||||