linux-stable/arch/x86/kernel/apic
Johan Hovold 21536d7b7e x86/apic/of: Fix CPU devicetree-node lookups
commit dd926880da upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-25 09:04:18 +01:00
..
apic.c x86/apic/of: Fix CPU devicetree-node lookups 2021-03-25 09:04:18 +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/flat64: Remove the IPI shorthand decision logic 2019-07-25 16:12:02 +02:00
apic_noop.c locking/seqlock, headers: Untangle the spaghetti monster 2020-08-06 16:13:13 +02:00
apic_numachip.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
bigsmp_32.c x86/headers: Remove APIC headers from <asm/smp.h> 2020-08-06 16:13:09 +02: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-25 09:04:16 +01:00
ipi.c x86/headers: Remove APIC headers from <asm/smp.h> 2020-08-06 16:13:09 +02: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/apic/msi: Unbreak DMAR and HPET MSI 2020-09-27 21:53:41 +02:00
probe_32.c x86/irq: Move apic_post_init() invocation to one place 2020-09-16 16:52:35 +02:00
probe_64.c x86/irq: Move apic_post_init() invocation to one place 2020-09-16 16:52:35 +02:00
vector.c x86/apic/vector: Fix ordering in vector assignment 2020-12-10 23:00:54 +01:00
x2apic_cluster.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-10 09:29:22 +01:00
x2apic_phys.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-10 09:29:22 +01:00
x2apic_uv_x.c x86/platform/uv: Fix UV4 hub revision adjustment 2020-12-03 18:09:18 +01:00