aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2013-06-24 23:08:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 17:07:22 -0400
commit910a165889c9e0c79cb96883db3948c5eea204e2 (patch)
tree65a6b2b7bcabe7d8dee64a320cfe4a8ae4a9dc23 /arch/powerpc
parent0288917da5e378ea1fc0290f824d85ac9e07570d (diff)
powerpc/numa: Do not update sysfs cpu registration from invalid context
commit dd023217e17e72b46fb4d49c7734c426938c3dba upstream. The topology update code that updates the cpu node registration in sysfs should not be called while in stop_machine(). The register/unregister calls take a lock and may sleep. This patch moves these calls outside of the call to stop_machine(). Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/numa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 88c0425dc0a8..2859a1f52279 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1433,11 +1433,9 @@ static int update_cpu_topology(void *data)
1433 if (cpu != update->cpu) 1433 if (cpu != update->cpu)
1434 continue; 1434 continue;
1435 1435
1436 unregister_cpu_under_node(update->cpu, update->old_nid);
1437 unmap_cpu_from_node(update->cpu); 1436 unmap_cpu_from_node(update->cpu);
1438 map_cpu_to_node(update->cpu, update->new_nid); 1437 map_cpu_to_node(update->cpu, update->new_nid);
1439 vdso_getcpu_init(); 1438 vdso_getcpu_init();
1440 register_cpu_under_node(update->cpu, update->new_nid);
1441 } 1439 }
1442 1440
1443 return 0; 1441 return 0;
@@ -1485,6 +1483,9 @@ int arch_update_cpu_topology(void)
1485 stop_machine(update_cpu_topology, &updates[0], &updated_cpus); 1483 stop_machine(update_cpu_topology, &updates[0], &updated_cpus);
1486 1484
1487 for (ud = &updates[0]; ud; ud = ud->next) { 1485 for (ud = &updates[0]; ud; ud = ud->next) {
1486 unregister_cpu_under_node(ud->cpu, ud->old_nid);
1487 register_cpu_under_node(ud->cpu, ud->new_nid);
1488
1488 dev = get_cpu_device(ud->cpu); 1489 dev = get_cpu_device(ud->cpu);
1489 if (dev) 1490 if (dev)
1490 kobject_uevent(&dev->kobj, KOBJ_CHANGE); 1491 kobject_uevent(&dev->kobj, KOBJ_CHANGE);