* [PATCH 00/05] ARM: shmobile: Yet another SMP series
@ 2013-08-07 22:13 Magnus Damm
2013-08-07 22:13 ` [PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable() Magnus Damm
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:13 UTC (permalink / raw)
To: linux-arm-kernel
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 <damm@opensource.se>
---
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(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable()
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
@ 2013-08-07 22:13 ` Magnus Damm
2013-08-07 22:13 ` [PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0 Magnus Damm
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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 <damm@opensource.se>
---
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
2013-08-07 22:13 ` [PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable() Magnus Damm
@ 2013-08-07 22:13 ` Magnus Damm
2013-08-07 22:13 ` [PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus() Magnus Damm
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Use shmobile_smp_cpu_disable() on sh73a0 since it
allows CPU Hotplug of any CPU.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus()
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
2013-08-07 22:13 ` [PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable() Magnus Damm
2013-08-07 22:13 ` [PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0 Magnus Damm
@ 2013-08-07 22:13 ` Magnus Damm
2013-08-07 22:13 ` [PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start() Magnus Damm
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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 <damm@opensource.se>
---
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[];
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start()
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
` (2 preceding siblings ...)
2013-08-07 22:13 ` [PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus() Magnus Damm
@ 2013-08-07 22:13 ` Magnus Damm
2013-08-07 22:14 ` [PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size Magnus Damm
2013-08-21 8:59 ` [PATCH 00/05] ARM: shmobile: Yet another SMP series Simon Horman
5 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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 <damm@opensource.se>
---
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,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
` (3 preceding siblings ...)
2013-08-07 22:13 ` [PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start() Magnus Damm
@ 2013-08-07 22:14 ` Magnus Damm
2013-08-21 8:59 ` [PATCH 00/05] ARM: shmobile: Yet another SMP series Simon Horman
5 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-08-07 22:14 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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 <damm@opensource.se>
---
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,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 00/05] ARM: shmobile: Yet another SMP series
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
` (4 preceding siblings ...)
2013-08-07 22:14 ` [PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size Magnus Damm
@ 2013-08-21 8:59 ` Simon Horman
2013-08-22 6:32 ` Simon Horman
5 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2013-08-21 8:59 UTC (permalink / raw)
To: linux-arm-kernel
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 <damm@opensource.se>
Thanks Magnus,
I plan to queue this up in the smp branch which will most likely occur
tomorrow.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 00/05] ARM: shmobile: Yet another SMP series
2013-08-21 8:59 ` [PATCH 00/05] ARM: shmobile: Yet another SMP series Simon Horman
@ 2013-08-22 6:32 ` Simon Horman
0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-08-22 6:32 UTC (permalink / raw)
To: linux-arm-kernel
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:
> > 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 <damm@opensource.se>
>
> Thanks Magnus,
>
> I plan to queue this up in the smp branch which will most likely occur
> tomorrow.
And indeed it did.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-22 6:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07 22:13 [PATCH 00/05] ARM: shmobile: Yet another SMP series Magnus Damm
2013-08-07 22:13 ` [PATCH 01/05] ARM: shmobile: Introduce shmobile_smp_cpu_disable() Magnus Damm
2013-08-07 22:13 ` [PATCH 02/05] ARM: shmobile: Use shmobile_smp_cpu_disable() on sh73a0 Magnus Damm
2013-08-07 22:13 ` [PATCH 03/05] ARM: shmobile: Remove unused shmobile_smp_init_cpus() Magnus Damm
2013-08-07 22:13 ` [PATCH 04/05] ARM: shmobile: Expose shmobile_invalidate_start() Magnus Damm
2013-08-07 22:14 ` [PATCH 05/05] ARM: shmobile: Introduce shmobile_boot_size Magnus Damm
2013-08-21 8:59 ` [PATCH 00/05] ARM: shmobile: Yet another SMP series Simon Horman
2013-08-22 6:32 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).