All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-07-09 15:01 ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-07-09 15:01 UTC (permalink / raw)
  To: Russell King
  Cc: Arnd Bergmann, linux-arm-kernel, linux-kernel, Geert Uytterhoeven

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>
---
v3:
  - Add Acked-by

v2:
  - 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 2ec765c39ab4..18f5a554134f 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 7c4fada440f0..2cf681bccd6f 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.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-07-09 15:01 ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-07-09 15:01 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
v3:
  - Add Acked-by

v2:
  - 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 2ec765c39ab4..18f5a554134f 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 7c4fada440f0..2cf681bccd6f 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.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] arm/smp: Absorb boot_secondary()
  2014-07-09 15:01 ` Geert Uytterhoeven
@ 2014-08-20 15:51   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 15:51 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Russell King, Arnd Bergmann, linux-arm-kernel, linux-kernel

Ping?

On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> 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>
> ---
> v3:
>   - Add Acked-by
>
> v2:
>   - 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 2ec765c39ab4..18f5a554134f 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 7c4fada440f0..2cf681bccd6f 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.9.1

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-08-20 15:51   ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 15:51 UTC (permalink / raw)
  To: linux-arm-kernel

Ping?

On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> 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>
> ---
> v3:
>   - Add Acked-by
>
> v2:
>   - 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 2ec765c39ab4..18f5a554134f 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 7c4fada440f0..2cf681bccd6f 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.9.1

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] arm/smp: Absorb boot_secondary()
  2014-08-20 15:51   ` Geert Uytterhoeven
@ 2014-08-20 19:30     ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2014-08-20 19:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Russell King, linux-arm-kernel, linux-kernel

On Wednesday 20 August 2014, Geert Uytterhoeven wrote:
> 
> Ping?
> 
> On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > 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>

I think you should add the patch to Russell's patch tracking system
at http://www.arm.linux.org.uk/developer/patches to get it applied.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-08-20 19:30     ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2014-08-20 19:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 20 August 2014, Geert Uytterhoeven wrote:
> 
> Ping?
> 
> On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > 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>

I think you should add the patch to Russell's patch tracking system
at http://www.arm.linux.org.uk/developer/patches to get it applied.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] arm/smp: Absorb boot_secondary()
  2014-08-20 19:30     ` Arnd Bergmann
@ 2014-08-20 19:55       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 19:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Geert Uytterhoeven, Russell King, linux-arm-kernel, linux-kernel

Hi Arnd,

On Wed, Aug 20, 2014 at 9:30 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 20 August 2014, Geert Uytterhoeven wrote:
>>
>> Ping?
>>
>> On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
>> <geert+renesas@glider.be> wrote:
>> > 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>
>
> I think you should add the patch to Russell's patch tracking system
> at http://www.arm.linux.org.uk/developer/patches to get it applied.

<surprised>
Thanks for the info!
</surprised>

Has anyone already written a "git-send-email"-compatible script to
submit patches there?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-08-20 19:55       ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On Wed, Aug 20, 2014 at 9:30 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 20 August 2014, Geert Uytterhoeven wrote:
>>
>> Ping?
>>
>> On Wed, Jul 9, 2014 at 5:01 PM, Geert Uytterhoeven
>> <geert+renesas@glider.be> wrote:
>> > 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>
>
> I think you should add the patch to Russell's patch tracking system
> at http://www.arm.linux.org.uk/developer/patches to get it applied.

<surprised>
Thanks for the info!
</surprised>

Has anyone already written a "git-send-email"-compatible script to
submit patches there?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] arm/smp: Absorb boot_secondary()
  2014-08-20 19:55       ` Geert Uytterhoeven
@ 2014-08-22 13:33         ` Catalin Marinas
  -1 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2014-08-22 13:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Russell King, linux-arm-kernel,
	Geert Uytterhoeven, linux-kernel

On Wed, Aug 20, 2014 at 08:55:33PM +0100, Geert Uytterhoeven wrote:
> Has anyone already written a "git-send-email"-compatible script to
> submit patches there?

You can send patches as usual to patches@arm.linux.org.uk, just add
KernelVersion: v3.?? after the --- line in your patch (maybe this could
be automate as well but I didn't bother).

For series, because the arrival order is not guaranteed, I use the git
alias below to trick it into sleeping 60s between patches:

ksend-rmk-patch = !git send-email --annotate --no-thread --suppress-cc=all --to-cmd='sleep 60 && echo patches@arm.linux.org.uk "#"'

For stgit, I have a dedicated template:

From: %(sender)s
To: patches@arm.linux.org.uk
Subject: %(prefix)s%(shortdescr)s

%(longdescr)s
PATCH FOLLOWS
KernelVersion:%(version)s
%(diff)s

And there is always git pull request that Russell is happy with.

-- 
Catalin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] arm/smp: Absorb boot_secondary()
@ 2014-08-22 13:33         ` Catalin Marinas
  0 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2014-08-22 13:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 20, 2014 at 08:55:33PM +0100, Geert Uytterhoeven wrote:
> Has anyone already written a "git-send-email"-compatible script to
> submit patches there?

You can send patches as usual to patches at arm.linux.org.uk, just add
KernelVersion: v3.?? after the --- line in your patch (maybe this could
be automate as well but I didn't bother).

For series, because the arrival order is not guaranteed, I use the git
alias below to trick it into sleeping 60s between patches:

ksend-rmk-patch = !git send-email --annotate --no-thread --suppress-cc=all --to-cmd='sleep 60 && echo patches at arm.linux.org.uk "#"'

For stgit, I have a dedicated template:

From: %(sender)s
To: patches at arm.linux.org.uk
Subject: %(prefix)s%(shortdescr)s

%(longdescr)s
PATCH FOLLOWS
KernelVersion:%(version)s
%(diff)s

And there is always git pull request that Russell is happy with.

-- 
Catalin

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-08-22 13:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09 15:01 [PATCH v3] arm/smp: Absorb boot_secondary() Geert Uytterhoeven
2014-07-09 15:01 ` Geert Uytterhoeven
2014-08-20 15:51 ` Geert Uytterhoeven
2014-08-20 15:51   ` Geert Uytterhoeven
2014-08-20 19:30   ` Arnd Bergmann
2014-08-20 19:30     ` Arnd Bergmann
2014-08-20 19:55     ` Geert Uytterhoeven
2014-08-20 19:55       ` Geert Uytterhoeven
2014-08-22 13:33       ` Catalin Marinas
2014-08-22 13:33         ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.