Skip to content

Commit

Permalink
[SPARC64]: Clear cpu_{core,sibling}_map[] in smp_fill_in_sib_core_maps()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jul 16, 2007
1 parent b37d40d commit 39dd992
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 39dd992

Please sign in to comment.