Commit 3cb8a39f authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Mike Frysinger

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: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 56072047
...@@ -24,17 +24,23 @@ static DEFINE_SPINLOCK(boot_lock); ...@@ -24,17 +24,23 @@ static DEFINE_SPINLOCK(boot_lock);
void __init platform_init_cpus(void) void __init platform_init_cpus(void)
{ {
cpu_set(0, cpu_possible_map); /* CoreA */ struct cpumask mask;
cpu_set(1, cpu_possible_map); /* CoreB */
cpumask_set_cpu(0, &mask); /* CoreA */
cpumask_set_cpu(1, &mask); /* CoreB */
init_cpu_possible(&mask);
} }
void __init platform_prepare_cpus(unsigned int max_cpus) void __init platform_prepare_cpus(unsigned int max_cpus)
{ {
struct cpumask mask;
bfin_relocate_coreb_l1_mem(); bfin_relocate_coreb_l1_mem();
/* Both cores ought to be present on a bf561! */ /* Both cores ought to be present on a bf561! */
cpu_set(0, cpu_present_map); /* CoreA */ cpumask_set_cpu(0, &mask); /* CoreA */
cpu_set(1, cpu_present_map); /* CoreB */ cpumask_set_cpu(1, &mask); /* CoreB */
init_cpu_present(&mask);
} }
int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */
......
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