Skip to content

Commit 084bb5b

Browse files
geertuRussell King
authored andcommitted
ARM: 8131/1: arm/smp: Absorb boot_secondary()
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@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 31e1a60 commit 084bb5b

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

‎arch/arm/include/asm/smp.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ extern void smp_init_cpus(void);
4848
*/
4949
extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
5050

51-
/*
52-
* Boot a secondary CPU, and assign it the specified idle task.
53-
* This also gives us the initial stack to use for this CPU.
54-
*/
55-
extern int boot_secondary(unsigned int cpu, struct task_struct *);
56-
5751
/*
5852
* Called from platform specific assembly code, this is the
5953
* secondary CPU entry point.

‎arch/arm/kernel/smp.c‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
9595
{
9696
int ret;
9797

98+
if (!smp_ops.smp_boot_secondary)
99+
return -ENOSYS;
100+
98101
/*
99102
* We need to tell the secondary core where to find
100103
* its stack and the page tables.
@@ -113,7 +116,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
113116
/*
114117
* Now bring the CPU into our world.
115118
*/
116-
ret = boot_secondary(cpu, idle);
119+
ret = smp_ops.smp_boot_secondary(cpu, idle);
117120
if (ret == 0) {
118121
/*
119122
* CPU was successfully started, wait for it
@@ -142,13 +145,6 @@ void __init smp_init_cpus(void)
142145
smp_ops.smp_init_cpus();
143146
}
144147

145-
int boot_secondary(unsigned int cpu, struct task_struct *idle)
146-
{
147-
if (smp_ops.smp_boot_secondary)
148-
return smp_ops.smp_boot_secondary(cpu, idle);
149-
return -ENOSYS;
150-
}
151-
152148
int platform_can_cpu_hotplug(void)
153149
{
154150
#ifdef CONFIG_HOTPLUG_CPU

0 commit comments

Comments
 (0)