* [PATCH v2] arm/smp: Absorb boot_secondary()
@ 2014-02-24 13:08 Geert Uytterhoeven
2014-02-24 14:35 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-02-24 13:08 UTC (permalink / raw)
To: Russell King, Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Geert Uytterhoeven
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
After becoming a mandatory function, boot_secondary() is no longer used
outside arch/arm/kernel/smp.c. Hence remove its public prototype, and,
as suggested by Arnd, let it be absorbed by its single caller.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
This is v2 of "arm/smp: Make boot_secondary() static":
- Absorb boot_secondary() instead of making it static.
arch/arm/include/asm/smp.h | 6 ------
arch/arm/kernel/smp.c | 12 ++++--------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index 22a3b9b5d4a1..0d2c8c6f8d1d 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -49,12 +49,6 @@ extern void smp_init_cpus(void);
extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
/*
- * Boot a secondary CPU, and assign it the specified idle task.
- * This also gives us the initial stack to use for this CPU.
- */
-extern int boot_secondary(unsigned int cpu, struct task_struct *);
-
-/*
* Called from platform specific assembly code, this is the
* secondary CPU entry point.
*/
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index b7b4c86e338b..6cd72d502f69 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -92,6 +92,9 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
{
int ret;
+ if (!smp_ops.smp_boot_secondary)
+ return -ENOSYS;
+
/*
* We need to tell the secondary core where to find
* its stack and the page tables.
@@ -110,7 +113,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
/*
* Now bring the CPU into our world.
*/
- ret = boot_secondary(cpu, idle);
+ ret = smp_ops.smp_boot_secondary(cpu, idle);
if (ret == 0) {
/*
* CPU was successfully started, wait for it
@@ -139,13 +142,6 @@ void __init smp_init_cpus(void)
smp_ops.smp_init_cpus();
}
-int boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
- if (smp_ops.smp_boot_secondary)
- return smp_ops.smp_boot_secondary(cpu, idle);
- return -ENOSYS;
-}
-
int platform_can_cpu_hotplug(void)
{
#ifdef CONFIG_HOTPLUG_CPU
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] arm/smp: Absorb boot_secondary()
2014-02-24 13:08 [PATCH v2] arm/smp: Absorb boot_secondary() Geert Uytterhoeven
@ 2014-02-24 14:35 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2014-02-24 14:35 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Russell King, linux-arm-kernel, linux-kernel, Geert Uytterhoeven
On Monday 24 February 2014, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
>
> After becoming a mandatory function, boot_secondary() is no longer used
> outside arch/arm/kernel/smp.c. Hence remove its public prototype, and,
> as suggested by Arnd, let it be absorbed by its single caller.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-24 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24 13:08 [PATCH v2] arm/smp: Absorb boot_secondary() Geert Uytterhoeven
2014-02-24 14:35 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox