Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31853
Change subject: x86/acpi: Only sort CPU IDs if more than one available ......................................................................
x86/acpi: Only sort CPU IDs if more than one available
Sorting makes only sense if there are at least two entries available.
Change-Id: If40638bf1fe24dcff4b7839967445fb4218184f8 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/arch/x86/acpi.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/31853/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index b51b5a6..f08a401 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -163,7 +163,8 @@ break; apic_ids[num_cpus++] = cpu->path.apic.apic_id; } - bubblesort(apic_ids, num_cpus, NUM_ASCENDING); + if (num_cpus > 1) + bubblesort(apic_ids, num_cpus, NUM_ASCENDING); for (index = 0; index < num_cpus; index++) { current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, index, apic_ids[index]);