powerpc fixes for 6.3 #5

- A fix for NUMA distance handling in the pseries SCM (pmem) driver.
 
 Thanks to: Aneesh Kumar K.V
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmQ7v/wTHG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgOzwD/0fXhABiYJ3VtND7MGZzrV7sBdkYCHr
 45CkcwuHUMxrXBIrRBSbVwBcRH8xAqSILpDm/fAvw95fqmuv4t1+sOy08bC8HysN
 cmFlaRNHI962cHBAwD4S9CuUnt+uyrBGbdPOLqzOJ8dW5RZZZfO5d/Jvsq4OlgtG
 91mfSvOvIvVQKlQIPp9tf2cKi9RsjLeX8VQ0cRdE7XRNZRAKbGZgEEDfnxdikVcZ
 4msA0hSAAnOvBvb6n6wQ8mPjtEU8Fwf/cpN6D2NZc/ceoJ0z4TuN9ZDzNUl8kTlg
 7O6k4pGALITJGpt9zwO7qKNeL9Zz7LYaoB5O2Bk4Gz/kbaBc8+3r8C3OJlErvBYR
 mdZkdgIjo4KY1y/P3AWCFUf3Jnry5WGeLGuwl+KocWwuXm8nQpPz/W8yQjvrEDxR
 zurF3NtJS3Erezcu1vT7T8ApwhZ7GRjKmKO71yjxZAXrFn88XX1fBLuAnEOehFl2
 xwppVNoGmHGxlFD0Y5CIrzYczOxUzJ+pMGlG3XT1thCmLgC4MSmHZTLed4vYrsFd
 pX9TafgKlVS+Lr3Jv8+5buZSP9wcGxO7qDIxdAsZRq4yMgC8vGuEsgm0eML6xKO+
 opVkZsw5i+FERgulDDai2PXfjVMN07i2bAFjWD8FoiG1CWqIQS/S1/Kzfi784f04
 NYaL4VIDsc5e3A==
 =nIof
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:

 - A fix for NUMA distance handling in the pseries SCM (pmem) driver.

   Thanks to Aneesh Kumar K.V.

* tag 'powerpc-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/papr_scm: Update the NUMA distance table for the target node
This commit is contained in:
Linus Torvalds 2023-04-16 09:55:18 -07:00
commit 4a1c388ce0
2 changed files with 8 additions and 0 deletions

View File

@ -366,6 +366,7 @@ void update_numa_distance(struct device_node *node)
WARN(numa_distance_table[nid][nid] == -1,
"NUMA distance details for node %d not provided\n", nid);
}
EXPORT_SYMBOL_GPL(update_numa_distance);
/*
* ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}

View File

@ -1428,6 +1428,13 @@ static int papr_scm_probe(struct platform_device *pdev)
return -ENODEV;
}
/*
* open firmware platform device create won't update the NUMA
* distance table. For PAPR SCM devices we use numa_map_to_online_node()
* to find the nearest online NUMA node and that requires correct
* distance table information.
*/
update_numa_distance(dn);
p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)