aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/mm/numa.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index e8d1aeb6348c..f298a7d4b2ce 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -30,6 +30,7 @@
30#include <asm/paca.h> 30#include <asm/paca.h>
31#include <asm/hvcall.h> 31#include <asm/hvcall.h>
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/vdso.h>
33 34
34static int numa_enabled = 1; 35static int numa_enabled = 1;
35 36
@@ -1434,6 +1435,7 @@ static int update_cpu_topology(void *data)
1434 unregister_cpu_under_node(update->cpu, update->old_nid); 1435 unregister_cpu_under_node(update->cpu, update->old_nid);
1435 unmap_cpu_from_node(update->cpu); 1436 unmap_cpu_from_node(update->cpu);
1436 map_cpu_to_node(update->cpu, update->new_nid); 1437 map_cpu_to_node(update->cpu, update->new_nid);
1438 vdso_getcpu_init();
1437 register_cpu_under_node(update->cpu, update->new_nid); 1439 register_cpu_under_node(update->cpu, update->new_nid);
1438 } 1440 }
1439 1441
@@ -1449,6 +1451,7 @@ int arch_update_cpu_topology(void)
1449 unsigned int cpu, changed = 0; 1451 unsigned int cpu, changed = 0;
1450 struct topology_update_data *updates, *ud; 1452 struct topology_update_data *updates, *ud;
1451 unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; 1453 unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
1454 cpumask_t updated_cpus;
1452 struct device *dev; 1455 struct device *dev;
1453 int weight, i = 0; 1456 int weight, i = 0;
1454 1457
@@ -1460,6 +1463,8 @@ int arch_update_cpu_topology(void)
1460 if (!updates) 1463 if (!updates)
1461 return 0; 1464 return 0;
1462 1465
1466 cpumask_clear(&updated_cpus);
1467
1463 for_each_cpu(cpu, &cpu_associativity_changes_mask) { 1468 for_each_cpu(cpu, &cpu_associativity_changes_mask) {
1464 ud = &updates[i++]; 1469 ud = &updates[i++];
1465 ud->cpu = cpu; 1470 ud->cpu = cpu;
@@ -1470,12 +1475,13 @@ int arch_update_cpu_topology(void)
1470 ud->new_nid = first_online_node; 1475 ud->new_nid = first_online_node;
1471 1476
1472 ud->old_nid = numa_cpu_lookup_table[cpu]; 1477 ud->old_nid = numa_cpu_lookup_table[cpu];
1478 cpumask_set_cpu(cpu, &updated_cpus);
1473 1479
1474 if (i < weight) 1480 if (i < weight)
1475 ud->next = &updates[i]; 1481 ud->next = &updates[i];
1476 } 1482 }
1477 1483
1478 stop_machine(update_cpu_topology, &updates[0], cpu_online_mask); 1484 stop_machine(update_cpu_topology, &updates[0], &updated_cpus);
1479 1485
1480 for (ud = &updates[0]; ud; ud = ud->next) { 1486 for (ud = &updates[0]; ud; ud = ud->next) {
1481 dev = get_cpu_device(ud->cpu); 1487 dev = get_cpu_device(ud->cpu);