linux-stable/arch/x86/kernel/apic
Johan Hovold dd926880da x86/apic/of: Fix CPU devicetree-node lookups
Architectures that describe the CPU topology in devicetree and do not have
an identity mapping between physical and logical CPU ids must override the
default implementation of arch_match_cpu_phys_id().

Failing to do so breaks CPU devicetree-node lookups using of_get_cpu_node()
and of_cpu_device_node_get() which several drivers rely on. It also causes
the CPU struct devices exported through sysfs to point to the wrong
devicetree nodes.

On x86, CPUs are described in devicetree using their APIC ids and those
do not generally coincide with the logical ids, even if CPU0 typically
uses APIC id 0.

Add the missing implementation of arch_match_cpu_phys_id() so that CPU-node
lookups work also with SMP.

Apart from fixing the broken sysfs devicetree-node links this likely does
not affect current users of mainline kernels on x86.

Fixes: 4e07db9c8d ("x86/devicetree: Use CPU description from Device Tree")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210312092033.26317-1-johan@kernel.org
2021-03-19 23:01:49 +01:00
..
apic.c x86/apic/of: Fix CPU devicetree-node lookups 2021-03-19 23:01:49 +01:00
apic_common.c x86/apic: Fix signedness bug in APIC ID validity checks 2018-04-10 16:46:39 +02:00
apic_flat_64.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
apic_noop.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
apic_numachip.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
bigsmp_32.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
hw_nmi.c locking/seqlock, headers: Untangle the spaghetti monster 2020-08-06 16:13:13 +02:00
io_apic.c x86/ioapic: Ignore IRQ2 again 2021-03-19 12:43:41 +01:00
ipi.c x86/apic: Replace pointless apic:: Dest_logical usage 2020-10-28 20:26:24 +01:00
local.h x86/headers: Remove APIC headers from <asm/smp.h> 2020-08-06 16:13:09 +02:00
Makefile x86/PCI: Remove unused HyperTransport interrupt support 2017-11-23 20:18:18 +01:00
msi.c x86/hpet: Move MSI support into hpet.c 2020-10-28 20:26:25 +01:00
probe_32.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
probe_64.c x86/irq: Move apic_post_init() invocation to one place 2020-09-16 16:52:35 +02:00
vector.c Yet another large set of x86 interrupt management updates: 2020-12-14 18:59:53 -08:00
x2apic_cluster.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-04 19:36:31 +01:00
x2apic_phys.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-04 19:36:31 +01:00
x2apic_uv_x.c Yet another large set of x86 interrupt management updates: 2020-12-14 18:59:53 -08:00