[PATCH 00/05] ARM: shmobile: Yet another SMP series

STALE4730d

8 messages, 2 authors, 2013-08-22 · open the first message on its own page

[PATCH 00/05] ARM: shmobile: Yet another SMP series

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:13:21

ARM: shmobile: Yet another SMP series

[PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable()
[PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0
[PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus()
[PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start()
[PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size

This series cleans up the existing SMP code and introduces various new SMP
functions for mach-shmobile. The new functions are partially used by existing
SMP support code, but are also consumed by upcoming SMP support patches.

Signed-off-by: Magnus Damm <redacted>
---

 Written against renesas.git renesas-devel-20130806v4 

 arch/arm/mach-shmobile/headsmp.S             |    3 +++
 arch/arm/mach-shmobile/include/mach/common.h |    4 +++-
 arch/arm/mach-shmobile/platsmp.c             |   22 +++++++---------------
 arch/arm/mach-shmobile/smp-sh73a0.c          |    9 +--------
 4 files changed, 14 insertions(+), 24 deletions(-)

[PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable()

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:13:30

From: Magnus Damm <redacted>

Introduce the shared CPU Hotplug function shmobile_smp_cpu_disable()
for mach-shmobile. It is useful for the case when all CPUs may be
hotplugged, including CPU 0.

Signed-off-by: Magnus Damm <redacted>
---

 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/platsmp.c             |    7 +++++++
 2 files changed, 8 insertions(+)
--- 0009/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h	2013-07-29 22:19:44.000000000 +0900
@@ -17,6 +17,7 @@ extern unsigned long shmobile_smp_arg[];
 extern unsigned long shmobile_smp_mpidr[];
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
 			      unsigned long arg);
+extern int shmobile_smp_cpu_disable(unsigned int cpu);
 extern void shmobile_boot_scu(void);
 extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);
 extern int shmobile_smp_scu_boot_secondary(unsigned int cpu,
--- 0009/arch/arm/mach-shmobile/platsmp.c
+++ work/arch/arm/mach-shmobile/platsmp.c	2013-07-29 22:19:29.000000000 +0900
@@ -40,3 +40,10 @@ void shmobile_smp_hook(unsigned int cpu,
 	shmobile_smp_arg[cpu] = arg;
 	flush_cache_all();
 }
+
+#ifdef CONFIG_HOTPLUG_CPU
+int shmobile_smp_cpu_disable(unsigned int cpu)
+{
+	return 0; /* Hotplug of any CPU is supported */
+}
+#endif

[PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:13:39

From: Magnus Damm <redacted>

Use shmobile_smp_cpu_disable() on sh73a0 since it
allows CPU Hotplug of any CPU.

Signed-off-by: Magnus Damm <redacted>
---

 arch/arm/mach-shmobile/smp-sh73a0.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
--- 0008/arch/arm/mach-shmobile/smp-sh73a0.c
+++ work/arch/arm/mach-shmobile/smp-sh73a0.c	2013-07-29 22:21:29.000000000 +0900
@@ -71,18 +71,11 @@ static void __init sh73a0_smp_prepare_cp
 	shmobile_smp_scu_prepare_cpus(max_cpus);
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
-static int sh73a0_cpu_disable(unsigned int cpu)
-{
-	return 0; /* CPU0 and CPU1 supported */
-}
-#endif /* CONFIG_HOTPLUG_CPU */
-
 struct smp_operations sh73a0_smp_ops __initdata = {
 	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
 	.smp_boot_secondary	= sh73a0_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
-	.cpu_disable		= sh73a0_cpu_disable,
+	.cpu_disable		= shmobile_smp_cpu_disable,
 	.cpu_die		= shmobile_smp_scu_cpu_die,
 	.cpu_kill		= shmobile_smp_scu_cpu_kill,
 #endif

[PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus()

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:13:49

From: Magnus Damm <redacted>

Remove shmobile_smp_init_cpus() since all SMP platforms in
mach-shmobile now rely on DT for CPU core description instead
of for instance determining number of cores from the SCU.

Signed-off-by: Magnus Damm <redacted>
---

 arch/arm/mach-shmobile/include/mach/common.h |    1 -
 arch/arm/mach-shmobile/platsmp.c             |   15 ---------------
 2 files changed, 16 deletions(-)
--- 0003/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h	2013-08-07 13:42:20.000000000 +0900
@@ -40,7 +40,6 @@ static inline int shmobile_cpuidle_init(
 #endif
 
 extern void __iomem *shmobile_scu_base;
-extern void shmobile_smp_init_cpus(unsigned int ncores);
 
 static inline void __init shmobile_init_late(void)
 {
--- 0003/arch/arm/mach-shmobile/platsmp.c
+++ work/arch/arm/mach-shmobile/platsmp.c	2013-08-07 14:29:34.000000000 +0900
@@ -11,25 +11,10 @@
  * published by the Free Software Foundation.
  */
 #include <linux/init.h>
-#include <linux/smp.h>
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 #include <mach/common.h>
 
-void __init shmobile_smp_init_cpus(unsigned int ncores)
-{
-	unsigned int i;
-
-	if (ncores > nr_cpu_ids) {
-		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
-			ncores, nr_cpu_ids);
-		ncores = nr_cpu_ids;
-	}
-
-	for (i = 0; i < ncores; i++)
-		set_cpu_possible(i, true);
-}
-
 extern unsigned long shmobile_smp_fn[];
 extern unsigned long shmobile_smp_arg[];
 extern unsigned long shmobile_smp_mpidr[];

[PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start()

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:13:58

From: Magnus Damm <redacted>

Expose shmobile_invalidate_start() in common.h for
mach-shmobile. This function will be used for boot of
secondary processors on future non-SCU SMP platforms.

Signed-off-by: Magnus Damm <redacted>
---

 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 1 file changed, 1 insertion(+)
--- 0005/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h	2013-08-07 13:43:24.000000000 +0900
@@ -14,6 +14,7 @@ extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
 			      unsigned long arg);
 extern int shmobile_smp_cpu_disable(unsigned int cpu);
+extern void shmobile_invalidate_start(void);
 extern void shmobile_boot_scu(void);
 extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);
 extern int shmobile_smp_scu_boot_secondary(unsigned int cpu,

[PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2013-08-07 22:14:07

From: Magnus Damm <redacted>

Introduce shmobile_boot_size that can be used by
future SMP code to determine the size of the boot
code that needs to be copied to internal SRAM.

Signed-off-by: Magnus Damm <redacted>
---

 arch/arm/mach-shmobile/headsmp.S             |    3 +++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 2 files changed, 4 insertions(+)
--- 0001/arch/arm/mach-shmobile/headsmp.S
+++ work/arch/arm/mach-shmobile/headsmp.S	2013-08-07 19:11:46.000000000 +0900
@@ -40,6 +40,9 @@ shmobile_boot_fn:
 	.globl	shmobile_boot_arg
 shmobile_boot_arg:
 2:	.space	4
+	.globl	shmobile_boot_size
+shmobile_boot_size:
+	.long	. - shmobile_boot_vector
 
 /*
  * Per-CPU SMP boot function/argument selection code based on MPIDR
--- 0008/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h	2013-08-07 19:11:46.000000000 +0900
@@ -9,6 +9,7 @@ extern void shmobile_setup_console(void)
 extern void shmobile_boot_vector(void);
 extern unsigned long shmobile_boot_fn;
 extern unsigned long shmobile_boot_arg;
+extern unsigned long shmobile_boot_size;
 extern void shmobile_smp_boot(void);
 extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,

[PATCH 00/05] ARM: shmobile: Yet another SMP series

From: horms@verge.net.au (Simon Horman)
Date: 2013-08-21 08:59:50

On Thu, Aug 08, 2013 at 07:13:21AM +0900, Magnus Damm wrote:
ARM: shmobile: Yet another SMP series

[PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable()
[PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0
[PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus()
[PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start()
[PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size

This series cleans up the existing SMP code and introduces various new SMP
functions for mach-shmobile. The new functions are partially used by existing
SMP support code, but are also consumed by upcoming SMP support patches.

Signed-off-by: Magnus Damm <redacted>
Thanks Magnus,

I plan to queue this up in the smp branch which will most likely occur
tomorrow.

[PATCH 00/05] ARM: shmobile: Yet another SMP series

From: horms@verge.net.au (Simon Horman)
Date: 2013-08-22 06:32:11

On Wed, Aug 21, 2013 at 05:59:49PM +0900, Simon Horman wrote:
On Thu, Aug 08, 2013 at 07:13:21AM +0900, Magnus Damm wrote:
quoted
ARM: shmobile: Yet another SMP series

[PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable()
[PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0
[PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus()
[PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start()
[PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size

This series cleans up the existing SMP code and introduces various new SMP
functions for mach-shmobile. The new functions are partially used by existing
SMP support code, but are also consumed by upcoming SMP support patches.

Signed-off-by: Magnus Damm <redacted>
Thanks Magnus,

I plan to queue this up in the smp branch which will most likely occur
tomorrow.
And indeed it did.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help