Commit 7d3aee9a authored by David S. Miller's avatar David S. Miller

[SPARC64]: Keep cpu_present_map in sync with phys_cpu_present_map.

Don't rely on fixup_cpu_present_map() to do this as that function
is about to be removed.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3cbb90a9
...@@ -1298,6 +1298,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -1298,6 +1298,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
while (!cpu_find_by_instance(instance, NULL, &mid)) { while (!cpu_find_by_instance(instance, NULL, &mid)) {
if (mid != boot_cpu_id) { if (mid != boot_cpu_id) {
cpu_clear(mid, phys_cpu_present_map); cpu_clear(mid, phys_cpu_present_map);
cpu_clear(mid, cpu_present_map);
if (num_possible_cpus() <= max_cpus) if (num_possible_cpus() <= max_cpus)
break; break;
} }
...@@ -1332,8 +1333,10 @@ void __init smp_setup_cpu_possible_map(void) ...@@ -1332,8 +1333,10 @@ void __init smp_setup_cpu_possible_map(void)
instance = 0; instance = 0;
while (!cpu_find_by_instance(instance, NULL, &mid)) { while (!cpu_find_by_instance(instance, NULL, &mid)) {
if (mid < NR_CPUS) if (mid < NR_CPUS) {
cpu_set(mid, phys_cpu_present_map); cpu_set(mid, phys_cpu_present_map);
cpu_set(mid, cpu_present_map);
}
instance++; instance++;
} }
} }
......
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