public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Russell King <linux@arm.linux.org.uk>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm/smp: Make boot_secondary() static
Date: Fri, 3 Jan 2014 18:04:33 +0100	[thread overview]
Message-ID: <201401031804.34124.arnd@arndb.de> (raw)
In-Reply-To: <1388763959-27491-1-git-send-email-geert@linux-m68k.org>

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

  reply	other threads:[~2014-01-03 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 15:45 [PATCH] arm/smp: Make boot_secondary() static Geert Uytterhoeven
2014-01-03 17:04 ` Arnd Bergmann [this message]
2014-01-03 18:24   ` Geert Uytterhoeven
2014-01-03 18:41     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201401031804.34124.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=geert+renesas@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox