[SPARC64]: Clear cpu_{core,sibling}_map[] in smp_fill_in_sib_core_maps()
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 15 Jul 2007 08:29:24 +0000 (01:29 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 16 Jul 2007 11:05:19 +0000 (04:05 -0700)
When we hot-plug in new cpus, the core_id and proc_id of existing
cpus can change.  So in order to set the cpu groups correctly we
need to clear the maps out completely first.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/smp.c

index 6956845b03fa9a49f489003d0f6557ae83ccf0dc..e038ae65cb62d4807f6a7753633664339e915c24 100644 (file)
@@ -1244,6 +1244,7 @@ void __devinit smp_fill_in_sib_core_maps(void)
        for_each_possible_cpu(i) {
                unsigned int j;
 
+               cpus_clear(cpu_core_map[i]);
                if (cpu_data(i).core_id == 0) {
                        cpu_set(i, cpu_core_map[i]);
                        continue;
@@ -1259,6 +1260,7 @@ void __devinit smp_fill_in_sib_core_maps(void)
        for_each_possible_cpu(i) {
                unsigned int j;
 
+               cpus_clear(cpu_sibling_map[i]);
                if (cpu_data(i).proc_id == -1) {
                        cpu_set(i, cpu_sibling_map[i]);
                        continue;