WSL2-Linux-Kernel/arch/powerpc/platforms
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
..
4xx powerpc/4xx/cpm: Fix return value of __setup() handler 2022-06-09 10:23:10 +02:00
8xx powerpc/8xx: export 'cpm_setbrg' for modules 2022-06-09 10:23:09 +02:00
40x
44x powerpc/44x/fsp2: add missing of_node_put 2021-11-18 19:16:57 +01:00
52xx powerpc/52xx: Fix a resource leak in an error handling path 2022-12-31 13:14:35 +01:00
82xx powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
83xx powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe() 2022-12-31 13:14:35 +01:00
85xx powerpc/85xx: Fix oops when CONFIG_FSL_PMC=n 2021-12-22 09:32:45 +01:00
86xx powerpc: retire sbc8641d board support 2021-08-27 00:48:18 +10:00
512x powerpc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
amigaone
book3s powerpc/vas: Fix potential NULL pointer dereference 2021-11-18 19:17:19 +01:00
cell powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address 2022-08-17 14:24:13 +02:00
chrp powerpc/chrp: Make hydra_init() static 2021-03-24 14:09:29 +11:00
embedded6xx powerpc/6xx: add missing of_node_put 2022-01-27 11:04:56 +01:00
maple powerpc/pci: fix warning comparing pointer to 0 2021-03-29 13:22:13 +11:00
microwatt powerpc/microwatt: wire up rng during setup_arch() 2022-06-29 09:03:30 +02:00
pasemi powerpc updates for 5.15 2021-09-03 11:22:50 -07:00
powermac powerpc/mm: Switch obsolete dssall to .long 2022-06-14 18:36:27 +02:00
powernv powerpc/powernv: add missing of_node_put() in opal_export_attrs() 2022-10-26 12:35:22 +02:00
ps3 powerpc updates for 5.15 2021-09-03 11:22:50 -07:00
pseries powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-20 12:13:56 +02:00
Kconfig powerpc/64s: Make prom_init require RELOCATABLE 2021-06-25 14:47:19 +10:00
Kconfig.cputype powerpc/32: Don't always pass -mcpu=powerpc to the compiler 2022-08-25 11:40:43 +02:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00
fsl_uli1575.c