Skip to content

Fix how CPUs are enumerated when there's more than 255 CPUs

Lukasz Anaczkowski linux-acpi linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4acpi: rename acpi_table_parse_entriesdrivers/acpi/tables.c include/linux/acpi.h+16 -10 replies
2/4x86, arm64, acpi: Added acpi_subtable_procarch/x86/kernel/acpi/boot.c drivers/acpi/numa.c drivers/acpi/tables.c +2 more+83 -340 replies
3/4acpi: multi proc supportdrivers/acpi/tables.c+26 -50 replies
4/4x86, acpi: Handle apic/x2apic entries in MADT in correct orderarch/x86/kernel/acpi/boot.c drivers/acpi/tables.c+20 -201 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchThomas GleixnerMarc Zyngier
SeriesA-b A-b R-b T-b R-b T-b
1/4
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Fix how CPUs are enumerated when there's more than 255 CPUs

This series of patches attempts to fix how CPUs are enumerated by kernel when there's more than 255 of them on single processor.
In such case, BIOS may interleave APIC/X2APIC MADT subtables, to obey requirements specified in ACPI spec. Without this patches, kernel then would first enumerate BSP, then X2APIC then APIC, resulting in low APIC IDs to be assigned with high logical IDs and high APIC IDs to be assigned low logical IDs. Biggest consequence of that could be performance penalties due to wrong L2 cache sharing. More details in patch 4/4.

Also, simpler approach has been considered, which did not required ACPI parsing interface changes, however it failed to meet requirements. More details can be found here: https://lkml.org/lkml/2015/9/7/285

I've compiled this code successfully for x86/arm64 and verified it on x86. I'd really appreciate if someone could give it a try on arm64. Although interface has changed, semantics stayed the same, thus runtime issues should not appear. Please verify, thanks!

Lukasz Anaczkowski (4):
acpi: rename acpi_table_parse_entries
x86, arm64, acpi: Added acpi_subtable_proc
acpi: multi proc support
x86, acpi: Handle apic/x2apic entries in MADT in correct order

 arch/x86/kernel/acpi/boot.c | 39 +++++++++++++++++-------
 drivers/acpi/numa.c         | 13 ++++++--
 drivers/acpi/tables.c       | 73 +++++++++++++++++++++++++++++++++++----------
 drivers/irqchip/irq-gic.c   | 15 +++++++---
 include/linux/acpi.h        | 13 ++++++--
 5 files changed, 119 insertions(+), 34 deletions(-)
Signature · 1 line
1.8.3.1