Commit f5f1cc54 authored by Nathan Lynch's avatar Nathan Lynch Committed by Paul Mackerras

[PATCH] ppc64: don't create spurious symlinks under node0 sysdev

On partitioned systems we can wind up creating spurious symlinks in
/sys/devices/system/node/node0 to non-present cpus.  The symlinks are
not broken; the problem is that we're potentially misinforming
userspace that there is a relationship between node0 and cpus which
are to be added later.  There's no guarantee at all that a cpu which
is added later will belong to node 0.
Signed-off-by: default avatarNathan Lynch <ntl@pobox.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent a341ad97
...@@ -400,6 +400,11 @@ static int __init topology_init(void) ...@@ -400,6 +400,11 @@ static int __init topology_init(void)
struct cpu *c = &per_cpu(cpu_devices, cpu); struct cpu *c = &per_cpu(cpu_devices, cpu);
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
/* The node to which a cpu belongs can't be known
* until the cpu is made present.
*/
parent = NULL;
if (cpu_present(cpu))
parent = &node_devices[cpu_to_node(cpu)]; parent = &node_devices[cpu_to_node(cpu)];
#endif #endif
/* /*
......
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