lkml.org 
[lkml]   [2014]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] arm/smp: Make boot_secondary() static
Date
On Friday 03 January 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 make it static.
> The code is reshuffled a bit to avoid a forward declaration.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

How about taking it one step further by removing the function entirely?
Like this:

@@ -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.
@@ -111,7 +114,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

I guess we could do the same for some of the other operations as well
if everyone likes the approach.

Arnd


\
 
 \ /
  Last update: 2014-01-03 18:41    [W:2.649 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site