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

Commit 0a301110 authored by Russell King's avatar Russell King
Browse files

ARM: smp: remove wrapper functions



Remove some silly wrapper functions which aren't really required:
	platform_smp_prepare_cpus
	platform_secondary_init
	platform_cpu_die

This simplifies the code.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 638591cd
Loading
Loading
Loading
Loading
+8 −23
Original line number Original line Diff line number Diff line
@@ -125,18 +125,6 @@ void __init smp_init_cpus(void)
		smp_ops.smp_init_cpus();
		smp_ops.smp_init_cpus();
}
}


static void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
	if (smp_ops.smp_prepare_cpus)
		smp_ops.smp_prepare_cpus(max_cpus);
}

static void __cpuinit platform_secondary_init(unsigned int cpu)
{
	if (smp_ops.smp_secondary_init)
		smp_ops.smp_secondary_init(cpu);
}

int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
{
{
	if (smp_ops.smp_boot_secondary)
	if (smp_ops.smp_boot_secondary)
@@ -154,12 +142,6 @@ static int platform_cpu_kill(unsigned int cpu)
	return 1;
	return 1;
}
}


static void platform_cpu_die(unsigned int cpu)
{
	if (smp_ops.cpu_die)
		smp_ops.cpu_die(cpu);
}

static int platform_cpu_disable(unsigned int cpu)
static int platform_cpu_disable(unsigned int cpu)
{
{
	if (smp_ops.cpu_disable)
	if (smp_ops.cpu_disable)
@@ -257,7 +239,8 @@ void __ref cpu_die(void)
	 * actual CPU shutdown procedure is at least platform (if not
	 * actual CPU shutdown procedure is at least platform (if not
	 * CPU) specific.
	 * CPU) specific.
	 */
	 */
	platform_cpu_die(cpu);
	if (smp_ops.cpu_die)
		smp_ops.cpu_die(cpu);


	/*
	/*
	 * Do not return to the idle loop - jump back to the secondary
	 * Do not return to the idle loop - jump back to the secondary
@@ -324,7 +307,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
	/*
	/*
	 * Give the platform a chance to do its own initialisation.
	 * Give the platform a chance to do its own initialisation.
	 */
	 */
	platform_secondary_init(cpu);
	if (smp_ops.smp_secondary_init)
		smp_ops.smp_secondary_init(cpu);


	notify_cpu_starting(cpu);
	notify_cpu_starting(cpu);


@@ -399,8 +383,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
		/*
		/*
		 * Initialise the present map, which describes the set of CPUs
		 * Initialise the present map, which describes the set of CPUs
		 * actually populated at the present time. A platform should
		 * actually populated at the present time. A platform should
		 * re-initialize the map in platform_smp_prepare_cpus() if
		 * re-initialize the map in the platforms smp_prepare_cpus()
		 * present != possible (e.g. physical hotplug).
		 * if present != possible (e.g. physical hotplug).
		 */
		 */
		init_cpu_present(cpu_possible_mask);
		init_cpu_present(cpu_possible_mask);


@@ -408,7 +392,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
		 * Initialise the SCU if there are more than one CPU
		 * Initialise the SCU if there are more than one CPU
		 * and let them know where to start.
		 * and let them know where to start.
		 */
		 */
		platform_smp_prepare_cpus(max_cpus);
		if (smp_ops.smp_prepare_cpus)
			smp_ops.smp_prepare_cpus(max_cpus);
	}
	}
}
}