Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 682f5dc4 authored by Graf Yang's avatar Graf Yang Committed by Mike Frysinger
Browse files

Blackfin: drop cpu_callin_map on SMP systems



Common API already provides functions for managing online CPUs.

Signed-off-by: default avatarGraf Yang <graf.yang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 0325f25a
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -14,8 +14,6 @@


static DEFINE_SPINLOCK(boot_lock);
static DEFINE_SPINLOCK(boot_lock);


static cpumask_t cpu_callin_map;

/*
/*
 * platform_init_cpus() - Tell the world about how many cores we
 * platform_init_cpus() - Tell the world about how many cores we
 * have. This is called while setting up the architecture support
 * have. This is called while setting up the architecture support
@@ -72,7 +70,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
	bfin_setup_cpudata(cpu);
	bfin_setup_cpudata(cpu);


	/* We are done with local CPU inits, unblock the boot CPU. */
	/* We are done with local CPU inits, unblock the boot CPU. */
	cpu_set(cpu, cpu_callin_map);
	set_cpu_online(cpu, true);
	spin_lock(&boot_lock);
	spin_lock(&boot_lock);
	spin_unlock(&boot_lock);
	spin_unlock(&boot_lock);
}
}
@@ -95,14 +93,13 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle


	timeout = jiffies + 1 * HZ;
	timeout = jiffies + 1 * HZ;
	while (time_before(jiffies, timeout)) {
	while (time_before(jiffies, timeout)) {
		if (cpu_isset(cpu, cpu_callin_map))
		if (cpu_online(cpu))
			break;
			break;
		udelay(100);
		udelay(100);
		barrier();
		barrier();
	}
	}


	if (cpu_isset(cpu, cpu_callin_map)) {
	if (cpu_online(cpu)) {
		cpu_set(cpu, cpu_online_map);
		/* release the lock and let coreb run */
		/* release the lock and let coreb run */
		spin_unlock(&boot_lock);
		spin_unlock(&boot_lock);
		return 0;
		return 0;