linux-stable/arch/powerpc
Aneesh Kumar K.V 6d1353781b powerpc/papr_scm: Update the NUMA distance table for the target node
[ Upstream commit b277fc793d ]

Platform device helper routines won't update the NUMA distance table
while creating a platform device, even if the device is present on a
NUMA node that doesn't have memory or CPU. This is especially true for
pmem devices. If the target node of the pmem device is not online, we
find the nearest online node to the device and associate the pmem device
with that online node. To find the nearest online node, we should have
the numa distance table updated correctly. Update the distance
information during the device probe.

For a papr scm device on NUMA node 3 distance_lookup_table value for
distance_ref_points_depth = 2 before and after fix is below:

Before fix:
  node 3 distance depth 0  - 0
  node 3 distance depth 1  - 0
  node 4 distance depth 0  - 4
  node 4 distance depth 1  - 2
  node 5 distance depth 0  - 5
  node 5 distance depth 1  - 1

After fix
  node 3 distance depth 0  - 3
  node 3 distance depth 1  - 1
  node 4 distance depth 0  - 4
  node 4 distance depth 1  - 2
  node 5 distance depth 0  - 5
  node 5 distance depth 1  - 1

Without the fix, the nearest numa node to the pmem device (NUMA node 3)
will be picked as 4. After the fix, we get the correct numa node which
is 5.

Fixes: da1115fdbd ("powerpc/nvdimm: Pick nearby online node if the device node is not online")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230404041433.1781804-1-aneesh.kumar@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:13:56 +02:00
..
boot powerpc: dts: t1040rdb: fix compatible string for Rev A boards 2023-03-17 08:48:54 +01:00
configs powerpc/configs: Properly enable PAPR_SCM in pseries_defconfig 2022-10-26 12:35:21 +02:00
crypto powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
include powerpc/vmlinux.lds: Add an explicit symbol for the SRWX boundary 2023-02-25 12:06:44 +01:00
kernel powerpc: Don't try to copy PPR for task with NULL pt_regs 2023-04-05 11:25:00 +02:00
kexec powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
kvm KVM: PPC: Book3S HV: Fix "rm_exit" entry in debugfs timings 2022-08-25 11:40:40 +02:00
lib powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 12:35:21 +02:00
mm powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-20 12:13:56 +02:00
net
perf powerpc/imc-pmu: Revert nest_init_lock to being a mutex 2023-02-09 11:26:47 +01:00
platforms powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-20 12:13:56 +02:00
purgatory
sysdev powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data() 2022-12-31 13:14:35 +01:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds 2022-12-31 13:14:35 +01:00
Kbuild
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-07-07 17:53:28 +02:00
Kconfig.debug
Makefile powerpc: Remove linker flag from KBUILD_AFLAGS 2023-03-10 09:39:44 +01:00
Makefile.postlink