Skip to content

Commit

Permalink
cpumask: Use accessors for cpu_*_mask: sh
Browse files Browse the repository at this point in the history
Use the accessors rather than frobbing bits directly (the new versions
are const).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Rusty Russell authored and Paul Mundt committed Jun 14, 2009
1 parent 74c86d6 commit e09377b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions arch/sh/kernel/cpu/sh4a/smp-shx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ void __init plat_smp_setup(void)
unsigned int cpu = 0;
int i, num;

cpus_clear(cpu_possible_map);
cpu_set(cpu, cpu_possible_map);
init_cpu_possible(cpumask_of(cpu));

__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;
Expand All @@ -46,7 +45,7 @@ void __init plat_smp_setup(void)
* for the total number of cores.
*/
for (i = 1, num = 0; i < NR_CPUS; i++) {
cpu_set(i, cpu_possible_map);
set_cpu_possible(i, true);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
Expand Down
6 changes: 3 additions & 3 deletions arch/sh/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
plat_prepare_cpus(max_cpus);

#ifndef CONFIG_HOTPLUG_CPU
cpu_present_map = cpu_possible_map;
init_cpu_present(&cpu_possible_map);
#endif
}

Expand All @@ -58,8 +58,8 @@ void __devinit smp_prepare_boot_cpu(void)
__cpu_number_map[0] = cpu;
__cpu_logical_map[0] = cpu;

cpu_set(cpu, cpu_online_map);
cpu_set(cpu, cpu_possible_map);
set_cpu_online(cpu, true);
set_cpu_possible(cpu, true);
}

asmlinkage void __cpuinit start_secondary(void)
Expand Down

0 comments on commit e09377b

Please sign in to comment.