diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-04-25 21:55:41 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-25 08:24:10 -0400 |
commit | 3cb8a39fa6695575959fc3661b5d379b4e552eaa (patch) | |
tree | b42a4d1ad63ae568d9c7e05eb3470a27f9f8784a | |
parent | 5607204755369bda4da57fe7df70ec11c2b593d9 (diff) |
Blackfin: don't touch cpu_possible_map and cpu_present_map directly
We plan to remove cpu_possible_map and cpu_present_map later and we
have proper init_cpu_possible() and init_cpu_present() APIs.
Therefore this patch rewrites platform_init_cpus and platform_prepare_cpus
by their APIs.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | arch/blackfin/mach-bf561/smp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c index 390accf17ebc..85abd8be1343 100644 --- a/arch/blackfin/mach-bf561/smp.c +++ b/arch/blackfin/mach-bf561/smp.c | |||
@@ -24,17 +24,23 @@ static DEFINE_SPINLOCK(boot_lock); | |||
24 | 24 | ||
25 | void __init platform_init_cpus(void) | 25 | void __init platform_init_cpus(void) |
26 | { | 26 | { |
27 | cpu_set(0, cpu_possible_map); /* CoreA */ | 27 | struct cpumask mask; |
28 | cpu_set(1, cpu_possible_map); /* CoreB */ | 28 | |
29 | cpumask_set_cpu(0, &mask); /* CoreA */ | ||
30 | cpumask_set_cpu(1, &mask); /* CoreB */ | ||
31 | init_cpu_possible(&mask); | ||
29 | } | 32 | } |
30 | 33 | ||
31 | void __init platform_prepare_cpus(unsigned int max_cpus) | 34 | void __init platform_prepare_cpus(unsigned int max_cpus) |
32 | { | 35 | { |
36 | struct cpumask mask; | ||
37 | |||
33 | bfin_relocate_coreb_l1_mem(); | 38 | bfin_relocate_coreb_l1_mem(); |
34 | 39 | ||
35 | /* Both cores ought to be present on a bf561! */ | 40 | /* Both cores ought to be present on a bf561! */ |
36 | cpu_set(0, cpu_present_map); /* CoreA */ | 41 | cpumask_set_cpu(0, &mask); /* CoreA */ |
37 | cpu_set(1, cpu_present_map); /* CoreB */ | 42 | cpumask_set_cpu(1, &mask); /* CoreB */ |
43 | init_cpu_present(&mask); | ||
38 | } | 44 | } |
39 | 45 | ||
40 | int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ | 46 | int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ |