Commit 4a1c388c authored by Linus Torvalds's avatar Linus Torvalds

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
parents f0dd81db b277fc79
...@@ -366,6 +366,7 @@ void update_numa_distance(struct device_node *node) ...@@ -366,6 +366,7 @@ void update_numa_distance(struct device_node *node)
WARN(numa_distance_table[nid][nid] == -1, WARN(numa_distance_table[nid][nid] == -1,
"NUMA distance details for node %d not provided\n", nid); "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} * ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
......
...@@ -1428,6 +1428,13 @@ static int papr_scm_probe(struct platform_device *pdev) ...@@ -1428,6 +1428,13 @@ static int papr_scm_probe(struct platform_device *pdev)
return -ENODEV; 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); p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment