linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 00/13] Per sub-architecture SMP operations
@ 2012-09-12 14:58 Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 01/13] ARM: SoC: add per-platform " Arnd Bergmann
                   ` (14 more replies)
  0 siblings, 15 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Colin Cross,
	David Brown, Kukjin Kim, Linus Walleij, Magnus Damm,
	Nicolas Pitre, Paul Mundt, Rob Herring, Shawn Guo, Shiraz Hashim,
	Viresh Kumar, spear-devel

As I promised at the ARM mini summit, I've updated Marc's series
for smp operations according to my complaints. Unfortunately,
I could not find version 7 of the patches when I started this,
so I based my work on version 6 and had to redo the same
changes.

The patches are also available on

git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git testing/smp_ops

	Arnd

Changelog:
>From v8:
- removed the string concatenating macros
- consolidated structures into a single smp_operations
- removed trivial instances of platform_cpu_kill and
  platform_cpu_disable, now handled by the default case
- split shmobile_cpu_kill into three separate functions,
  per soc

>From v7:
- Dropped soc_desc, and focussed only on smp_ops
- Fixed CONFIG_HOTPLUG_CPU typo (courtesy of Shawn Guo)
- Marked {realview,vexpress}_cpu_die() as __cpuinit
- Added support for spear13xx
- Added pen_release consolidation (based on Arnd Bergman's patch)

>From v6:
- Dropped the dummy_* stuff
- Support for a number of new platforms
- Added the soc_hotplug_ops() macro to hide some #ifdef-ery away
- More exynos[ 45] churn
- Fixed section mismatches

>From v5:
- Added support for highbank and imx6q
- Added support for new shmobile SMP platform
- Add dummy_cpu_kill, dummy_cpu_disable and cpu_lowpower

>From v4:
- Added an SMP registration interface and moved all SMP structures to
  smp.c. The end result is much cleaner.
- Cleaned up patch 2 (leftovers from a previous rework)
- NVIDIA/EXYNOS4 naming cleanup.

>From v3:
- Converted all SMP platforms
- Added some cleanup as a last patch

>From v2:
- Split the SMP ops between init and runtime operations in order to
  have separate lifetimes for the different structures. This is not
  perfect though, as it still allows an __init function to make it to
  a runtime structure (all smp_*_ops structures are __initdata in
  order to be able to discard them). Thanks to Nico for pointing this
  out.
- Use macros to hide the #ifdef-ery in the SoC descriptor init,
  courtesy of Arnd.

>From v1:
- Move the SMP ops out of the descriptor, which makes the structure
  init a bit cleaner (thanks to Arnd).
- Mark all structures __initdata and keep a copy of the used ones.
- Keep a global pointer for the SMP ops.

Arnd Bergmann (1):
  ARM: SoC: convert spear13xx to SoC descriptor

Marc Zyngier (12):
  ARM: SoC: add per-platform SMP operations
  ARM: SoC: convert VExpress/RealView to SoC descriptor
  ARM: SoC: convert OMAP4 to SoC descriptor
  ARM: SoC: convert Tegra to SoC descriptor
  ARM: SoC: convert Exynos4 to SoC descriptor
  ARM: SoC: convert MSM SMP to SoC descriptor
  ARM: SoC: convert ux500 to SoC descriptor
  ARM: SoC: convert shmobile SMP to SoC descriptor
  ARM: SoC: convert highbank to SoC descriptor
  ARM: SoC: convert imx6q to SoC descriptor
  ARM: smp: Make SoC descriptor mandatory for SMP platforms
  ARM: consolidate pen_release instead of having per platform
    definitions

 arch/arm/include/asm/mach/arch.h               |    7 ++
 arch/arm/include/asm/smp.h                     |   48 ++++++++----
 arch/arm/kernel/setup.c                        |    5 +-
 arch/arm/kernel/smp.c                          |   72 +++++++++++++++++-
 arch/arm/mach-exynos/common.h                  |    5 ++
 arch/arm/mach-exynos/hotplug.c                 |   18 +----
 arch/arm/mach-exynos/mach-armlex4210.c         |    1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c         |    1 +
 arch/arm/mach-exynos/mach-nuri.c               |    1 +
 arch/arm/mach-exynos/mach-origen.c             |    1 +
 arch/arm/mach-exynos/mach-smdk4x12.c           |    2 +
 arch/arm/mach-exynos/mach-smdkv310.c           |    2 +
 arch/arm/mach-exynos/mach-universal_c210.c     |    1 +
 arch/arm/mach-exynos/platsmp.c                 |   27 ++++---
 arch/arm/mach-highbank/core.h                  |    3 +
 arch/arm/mach-highbank/highbank.c              |    1 +
 arch/arm/mach-highbank/hotplug.c               |   16 +---
 arch/arm/mach-highbank/platsmp.c               |   18 ++++-
 arch/arm/mach-imx/hotplug.c                    |   16 +---
 arch/arm/mach-imx/mach-imx6q.c                 |    1 +
 arch/arm/mach-imx/platsmp.c                    |   18 ++++-
 arch/arm/mach-msm/board-msm8960.c              |    3 +
 arch/arm/mach-msm/board-msm8x60.c              |    7 ++
 arch/arm/mach-msm/core.h                       |    2 +
 arch/arm/mach-msm/hotplug.c                    |   18 +----
 arch/arm/mach-msm/platsmp.c                    |   24 +++---
 arch/arm/mach-omap2/board-4430sdp.c            |    1 +
 arch/arm/mach-omap2/board-generic.c            |    2 +
 arch/arm/mach-omap2/board-omap4panda.c         |    1 +
 arch/arm/mach-omap2/common.h                   |    5 ++
 arch/arm/mach-omap2/omap-hotplug.c             |   16 +---
 arch/arm/mach-omap2/omap-smp.c                 |   18 ++++-
 arch/arm/mach-realview/core.h                  |    3 +
 arch/arm/mach-realview/hotplug.c               |   18 +----
 arch/arm/mach-realview/platsmp.c               |   18 ++++-
 arch/arm/mach-realview/realview_pb11mp.c       |    1 +
 arch/arm/mach-realview/realview_pbx.c          |    1 +
 arch/arm/mach-shmobile/board-ag5evm.c          |    1 +
 arch/arm/mach-shmobile/board-kota2.c           |    1 +
 arch/arm/mach-shmobile/board-kzm9d.c           |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c           |    1 +
 arch/arm/mach-shmobile/board-marzen.c          |    1 +
 arch/arm/mach-shmobile/hotplug.c               |   31 +++-----
 arch/arm/mach-shmobile/include/mach/common.h   |   24 +++---
 arch/arm/mach-shmobile/include/mach/emev2.h    |    7 +-
 arch/arm/mach-shmobile/include/mach/r8a7779.h  |    2 +
 arch/arm/mach-shmobile/include/mach/sh73a0.h   |    2 +
 arch/arm/mach-shmobile/platsmp.c               |   96 +-----------------------
 arch/arm/mach-shmobile/setup-emev2.c           |    1 +
 arch/arm/mach-shmobile/smp-emev2.c             |   47 ++++++++++--
 arch/arm/mach-shmobile/smp-r8a7779.c           |   48 ++++++++++--
 arch/arm/mach-shmobile/smp-sh73a0.c            |   48 +++++++++++-
 arch/arm/mach-spear13xx/hotplug.c              |   22 +-----
 arch/arm/mach-spear13xx/include/mach/generic.h |    3 +
 arch/arm/mach-spear13xx/platsmp.c              |   25 +++---
 arch/arm/mach-spear13xx/spear1310.c            |    1 +
 arch/arm/mach-spear13xx/spear1340.c            |    1 +
 arch/arm/mach-tegra/board-dt-tegra20.c         |    2 +
 arch/arm/mach-tegra/board-dt-tegra30.c         |    2 +
 arch/arm/mach-tegra/board-harmony.c            |    2 +
 arch/arm/mach-tegra/board-paz00.c              |    2 +
 arch/arm/mach-tegra/board-trimslice.c          |    2 +
 arch/arm/mach-tegra/common.c                   |    1 +
 arch/arm/mach-tegra/common.h                   |    3 +
 arch/arm/mach-tegra/hotplug.c                  |   16 +---
 arch/arm/mach-tegra/platsmp.c                  |   20 ++++-
 arch/arm/mach-ux500/board-mop500.c             |    4 +
 arch/arm/mach-ux500/hotplug.c                  |   36 ++-------
 arch/arm/mach-ux500/include/mach/setup.h       |    3 +
 arch/arm/mach-ux500/platsmp.c                  |   24 +++---
 arch/arm/mach-vexpress/core.h                  |    4 +
 arch/arm/mach-vexpress/hotplug.c               |   18 +----
 arch/arm/mach-vexpress/platsmp.c               |   18 ++++-
 arch/arm/mach-vexpress/v2m.c                   |    4 +
 arch/arm/plat-mxc/include/mach/common.h        |    4 +
 arch/arm/plat-versatile/include/plat/platsmp.h |   14 ++++
 arch/arm/plat-versatile/platsmp.c              |   10 +--
 77 files changed, 545 insertions(+), 409 deletions(-)
 create mode 100644 arch/arm/mach-msm/core.h
 create mode 100644 arch/arm/mach-tegra/common.h
 create mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h

Cc: Colin Cross <ccross@android.com>
Cc: David Brown <davidb@codeaurora.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: spear-devel@list.st.com

-- 
1.7.10


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

* [PATCH v9 01/13] ARM: SoC: add per-platform SMP operations
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 02/13] ARM: SoC: convert VExpress/RealView to SoC descriptor Arnd Bergmann
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Nicolas Pitre

From: Marc Zyngier <marc.zyngier@arm.com>

This adds a 'struct smp_operations' to abstract the CPU initialization
and hot plugging functions on SMP systems, which otherwise conflict
in a multiplatform kernel. This also helps shmobile and potentially
others that have more than one method to do these.

To allow the kernel to continue building, the platform hooks are
defined as weak symbols which are overrided by the platform code.
Once all platforms are converted, the "weak" attribute will be
removed and the function made static.

Unlike the original version from Marc, this new version from Arnd
does not use a generalized abstraction for per-soc data structures
but only tries to solve the problem for the SMP operations. This
way, we can collapse the previous four data structures into a
single struct, which is less systematic but also easier to follow
as a causal reader.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/include/asm/mach/arch.h |    7 +++++
 arch/arm/include/asm/smp.h       |   33 ++++++++++++++++++++
 arch/arm/kernel/setup.c          |    5 ++-
 arch/arm/kernel/smp.c            |   62 +++++++++++++++++++++++++++++++++++++-
 4 files changed, 105 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 0b1c94b..917d4fc 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -14,6 +14,12 @@ struct tag;
 struct meminfo;
 struct sys_timer;
 struct pt_regs;
+struct smp_operations;
+#ifdef CONFIG_SMP
+#define smp_ops(ops) (&(ops))
+#else
+#define smp_ops(ops) (struct smp_operations *)NULL
+#endif
 
 struct machine_desc {
 	unsigned int		nr;		/* architecture number	*/
@@ -35,6 +41,7 @@ struct machine_desc {
 	unsigned char		reserve_lp1 :1;	/* never has lp1	*/
 	unsigned char		reserve_lp2 :1;	/* never has lp2	*/
 	char			restart_mode;	/* default restart mode	*/
+	struct smp_operations	*smp;		/* SMP operations	*/
 	void			(*fixup)(struct tag *, char **,
 					 struct meminfo *);
 	void			(*reserve)(void);/* reserve mem blocks	*/
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index ae29293..f79a9f5 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -93,4 +93,37 @@ extern void platform_cpu_enable(unsigned int cpu);
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
 
+struct smp_operations {
+#ifdef CONFIG_SMP
+	/*
+	 * Setup the set of possible CPUs (via set_cpu_possible)
+	 */
+	void (*smp_init_cpus)(void);
+	/*
+	 * Initialize cpu_possible map, and enable coherency
+	 */
+	void (*smp_prepare_cpus)(unsigned int max_cpus);
+
+	/*
+	 * Perform platform specific initialisation of the specified CPU.
+	 */
+	void (*smp_secondary_init)(unsigned int cpu);
+	/*
+	 * Boot a secondary CPU, and assign it the specified idle task.
+	 * This also gives us the initial stack to use for this CPU.
+	 */
+	int  (*smp_boot_secondary)(unsigned int cpu, struct task_struct *idle);
+#ifdef CONFIG_HOTPLUG_CPU
+	int  (*cpu_kill)(unsigned int cpu);
+	void (*cpu_die)(unsigned int cpu);
+	int  (*cpu_disable)(unsigned int cpu);
+#endif
+#endif
+};
+
+/*
+ * set platform specific SMP operations
+ */
+extern void smp_set_ops(struct smp_operations *);
+
 #endif /* ifndef __ASM_ARM_SMP_H */
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index a81dcec..0c84cd9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -144,6 +144,7 @@ static const char *cpu_name;
 static const char *machine_name;
 static char __initdata cmd_line[COMMAND_LINE_SIZE];
 struct machine_desc *machine_desc __initdata;
+static const struct smp_operations *smp_ops __initdata;
 
 static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
 static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
@@ -977,8 +978,10 @@ void __init setup_arch(char **cmdline_p)
 	unflatten_device_tree();
 
 #ifdef CONFIG_SMP
-	if (is_smp())
+	if (is_smp()) {
+		smp_set_ops(mdesc->smp);
 		smp_init_cpus();
+	}
 #endif
 	reserve_crashkernel();
 
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index ebd8ad2..d924188 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -19,7 +19,6 @@
 #include <linux/mm.h>
 #include <linux/err.h>
 #include <linux/cpu.h>
-#include <linux/smp.h>
 #include <linux/seq_file.h>
 #include <linux/irq.h>
 #include <linux/percpu.h>
@@ -27,6 +26,7 @@
 #include <linux/completion.h>
 
 #include <linux/atomic.h>
+#include <asm/smp.h>
 #include <asm/cacheflush.h>
 #include <asm/cpu.h>
 #include <asm/cputype.h>
@@ -42,6 +42,7 @@
 #include <asm/ptrace.h>
 #include <asm/localtimer.h>
 #include <asm/smp_plat.h>
+#include <asm/mach/arch.h>
 
 /*
  * as from 2.5, kernels no longer have an init_tasks structure
@@ -60,6 +61,14 @@ enum ipi_msg_type {
 
 static DECLARE_COMPLETION(cpu_running);
 
+static struct smp_operations smp_ops;
+
+void __init smp_set_ops(struct smp_operations *ops)
+{
+	if (ops)
+		smp_ops = *ops;
+};
+
 int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
 {
 	int ret;
@@ -100,9 +109,60 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
 	return ret;
 }
 
+/* platform specific SMP operations */
+void __attribute__((weak)) __init smp_init_cpus(void)
+{
+	if (smp_ops.smp_init_cpus)
+		smp_ops.smp_init_cpus();
+}
+
+void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus)
+{
+	if (smp_ops.smp_prepare_cpus)
+		smp_ops.smp_prepare_cpus(max_cpus);
+}
+
+void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu)
+{
+	if (smp_ops.smp_secondary_init)
+		smp_ops.smp_secondary_init(cpu);
+}
+
+int __attribute__((weak)) __cpuinit 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;
+}
+
 #ifdef CONFIG_HOTPLUG_CPU
 static void percpu_timer_stop(void);
 
+int __attribute__((weak)) platform_cpu_kill(unsigned int cpu)
+{
+	if (smp_ops.cpu_kill)
+		return smp_ops.cpu_kill(cpu);
+	return 1;
+}
+
+void __attribute__((weak)) platform_cpu_die(unsigned int cpu)
+{
+	if (smp_ops.cpu_die)
+		smp_ops.cpu_die(cpu);
+}
+
+int __attribute__((weak)) platform_cpu_disable(unsigned int cpu)
+{
+	if (smp_ops.cpu_disable)
+		return smp_ops.cpu_disable(cpu);
+
+	/*
+	 * By default, allow disabling all CPUs except the first one,
+	 * since this is special on a lot of platforms, e.g. because
+	 * of clock tick interrupts.
+	 */
+	return cpu == 0 ? -EPERM : 0;
+}
 /*
  * __cpu_disable runs on the processor to be shutdown.
  */
-- 
1.7.10


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

* [PATCH v9 02/13] ARM: SoC: convert VExpress/RealView to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 01/13] ARM: SoC: add per-platform " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 03/13] ARM: SoC: convert OMAP4 " Arnd Bergmann
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Nicolas Pitre, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert both Realview and VExpress to use the SoC descriptor to
provide their SMP and CPU hotplug operation.

Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-realview/core.h                  |    3 +++
 arch/arm/mach-realview/hotplug.c               |   16 +---------------
 arch/arm/mach-realview/platsmp.c               |   18 ++++++++++++++----
 arch/arm/mach-realview/realview_pb11mp.c       |    1 +
 arch/arm/mach-realview/realview_pbx.c          |    1 +
 arch/arm/mach-vexpress/core.h                  |    4 ++++
 arch/arm/mach-vexpress/hotplug.c               |   16 +---------------
 arch/arm/mach-vexpress/platsmp.c               |   18 ++++++++++++++----
 arch/arm/mach-vexpress/v2m.c                   |    4 ++++
 arch/arm/plat-versatile/include/plat/platsmp.h |   14 ++++++++++++++
 arch/arm/plat-versatile/platsmp.c              |    4 ++--
 11 files changed, 59 insertions(+), 40 deletions(-)
 create mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h

diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index f8f2c0a..78cd970 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -56,4 +56,7 @@ extern void realview_init_early(void);
 extern void realview_fixup(struct tag *tags, char **from,
 			   struct meminfo *meminfo);
 
+extern struct smp_operations realview_smp_ops;
+extern void realview_cpu_die(unsigned int cpu);
+
 #endif
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
index 57d9efb..81a2a58 100644
--- a/arch/arm/mach-realview/hotplug.c
+++ b/arch/arm/mach-realview/hotplug.c
@@ -89,17 +89,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void realview_cpu_die(unsigned int cpu)
 {
 	int spurious = 0;
 
@@ -118,12 +113,3 @@ void platform_cpu_die(unsigned int cpu)
 	if (spurious)
 		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 17c878d..300f706 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -22,9 +22,9 @@
 #include <mach/board-pb11mp.h>
 #include <mach/board-pbx.h>
 
-#include "core.h"
+#include <plat/platsmp.h>
 
-extern void versatile_secondary_startup(void);
+#include "core.h"
 
 static void __iomem *scu_base_addr(void)
 {
@@ -43,7 +43,7 @@ static void __iomem *scu_base_addr(void)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init realview_smp_init_cpus(void)
 {
 	void __iomem *scu_base = scu_base_addr();
 	unsigned int i, ncores;
@@ -63,7 +63,7 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
 {
 
 	scu_enable(scu_base_addr());
@@ -77,3 +77,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 	__raw_writel(virt_to_phys(versatile_secondary_startup),
 		     __io_address(REALVIEW_SYS_FLAGSSET));
 }
+
+struct smp_operations realview_smp_ops __initdata = {
+	.smp_init_cpus		= realview_smp_init_cpus,
+	.smp_prepare_cpus	= realview_smp_prepare_cpus,
+	.smp_secondary_init	= versatile_secondary_init,
+	.smp_boot_secondary	= versatile_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= realview_cpu_die,
+#endif
+};
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index a98c536..2eacda1 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -366,6 +366,7 @@ static void __init realview_pb11mp_init(void)
 MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(realview_smp_ops),
 	.fixup		= realview_fixup,
 	.map_io		= realview_pb11mp_map_io,
 	.init_early	= realview_init_early,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 3f2f605..2cd4f15 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -403,6 +403,7 @@ static void __init realview_pbx_init(void)
 MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(realview_smp_ops),
 	.fixup		= realview_pbx_fixup,
 	.map_io		= realview_pbx_map_io,
 	.init_early	= realview_init_early,
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index a3a4980..f134cd4 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -5,3 +5,7 @@
 #define V2T_PERIPH 0xf8200000
 
 void vexpress_dt_smp_map_io(void);
+
+extern struct smp_operations	vexpress_smp_ops;
+
+extern void vexpress_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index c504a72..e2a960f 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -84,17 +84,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void __cpuinit vexpress_cpu_die(unsigned int cpu)
 {
 	int spurious = 0;
 
@@ -113,12 +108,3 @@ void platform_cpu_die(unsigned int cpu)
 	if (spurious)
 		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 14ba112..7db27c8 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -20,9 +20,9 @@
 
 #include <mach/motherboard.h>
 
-#include "core.h"
+#include <plat/platsmp.h>
 
-extern void versatile_secondary_startup(void);
+#include "core.h"
 
 #if defined(CONFIG_OF)
 
@@ -167,7 +167,7 @@ void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init vexpress_smp_init_cpus(void)
 {
 	if (ct_desc)
 		ct_desc->init_cpu_map();
@@ -176,7 +176,7 @@ void __init smp_init_cpus(void)
 
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
 {
 	/*
 	 * Initialise the present map, which describes the set of CPUs
@@ -195,3 +195,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 	 */
 	v2m_flags_set(virt_to_phys(versatile_secondary_startup));
 }
+
+struct smp_operations __initdata vexpress_smp_ops = {
+	.smp_init_cpus		= vexpress_smp_init_cpus,
+	.smp_prepare_cpus	= vexpress_smp_prepare_cpus,
+	.smp_secondary_init	= versatile_secondary_init,
+	.smp_boot_secondary	= versatile_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= vexpress_cpu_die,
+#endif
+};
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 37608f2..722ef33 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -5,6 +5,7 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/mmci.h>
 #include <linux/io.h>
+#include <linux/smp.h>
 #include <linux/init.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
@@ -38,6 +39,7 @@
 #include <mach/motherboard.h>
 
 #include <plat/sched_clock.h>
+#include <plat/platsmp.h>
 
 #include "core.h"
 
@@ -530,6 +532,7 @@ static void __init v2m_init(void)
 
 MACHINE_START(VEXPRESS, "ARM-Versatile Express")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(vexpress_smp_ops),
 	.map_io		= v2m_map_io,
 	.init_early	= v2m_init_early,
 	.init_irq	= v2m_init_irq,
@@ -663,6 +666,7 @@ const static char *v2m_dt_match[] __initconst = {
 
 DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
 	.dt_compat	= v2m_dt_match,
+	.smp		= smp_ops(vexpress_smp_ops),
 	.map_io		= v2m_dt_map_io,
 	.init_early	= v2m_dt_init_early,
 	.init_irq	= v2m_dt_init_irq,
diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/plat-versatile/include/plat/platsmp.h
new file mode 100644
index 0000000..50fb830
--- /dev/null
+++ b/arch/arm/plat-versatile/include/plat/platsmp.h
@@ -0,0 +1,14 @@
+/*
+ *  linux/arch/arm/plat-versatile/include/plat/platsmp.h
+ *
+ *  Copyright (C) 2011 ARM Ltd.
+ *  All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+extern void versatile_secondary_startup(void);
+extern void versatile_secondary_init(unsigned int cpu);
+extern int  versatile_boot_secondary(unsigned int cpu, struct task_struct *idle);
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index d7c5c17..39e60ac 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -40,7 +40,7 @@ static void __cpuinit write_pen_release(int val)
 
 static DEFINE_SPINLOCK(boot_lock);
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+void __cpuinit versatile_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -62,7 +62,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	spin_unlock(&boot_lock);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+int __cpuinit versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 
-- 
1.7.10


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

* [PATCH v9 03/13] ARM: SoC: convert OMAP4 to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 01/13] ARM: SoC: add per-platform " Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 02/13] ARM: SoC: convert VExpress/RealView to SoC descriptor Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 04/13] ARM: SoC: convert Tegra " Arnd Bergmann
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert OMAP4 to use the SoC descriptor to provide its SMP
and CPU hotplug operations.

Tested on both Panda and IGEPv2 (MULTI_OMAP kernel)

Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/board-4430sdp.c    |    1 +
 arch/arm/mach-omap2/board-generic.c    |    2 ++
 arch/arm/mach-omap2/board-omap4panda.c |    1 +
 arch/arm/mach-omap2/common.h           |    5 +++++
 arch/arm/mach-omap2/omap-hotplug.c     |   16 +---------------
 arch/arm/mach-omap2/omap-smp.c         |   18 ++++++++++++++----
 6 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ad8a7d9..0e63d80 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -909,6 +909,7 @@ static void __init omap_4430sdp_init(void)
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
 	/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(omap4_smp_ops),
 	.reserve	= omap_reserve,
 	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 6f93a20..82dcf00 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -127,6 +127,7 @@ static const char *omap4_boards_compat[] __initdata = {
 
 DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
+	.smp		= smp_ops(omap4_smp_ops),
 	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
 	.init_irq	= omap_gic_of_init,
@@ -147,6 +148,7 @@ static const char *omap5_boards_compat[] __initdata = {
 
 DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
+	.smp		= smp_ops(omap4_smp_ops),
 	.map_io		= omap5_map_io,
 	.init_early	= omap5_init_early,
 	.init_irq	= omap_gic_of_init,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 70f6d1d..abbf239 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -518,6 +518,7 @@ static void __init omap4_panda_init(void)
 MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
 	/* Maintainer: David Anders - Texas Instruments Inc */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(omap4_smp_ops),
 	.reserve	= omap_reserve,
 	.map_io		= omap4_map_io,
 	.init_early	= omap4430_init_early,
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 1f65b18..2296106 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -278,6 +278,11 @@ extern void omap_secondary_startup(void);
 extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
 extern void omap_auxcoreboot_addr(u32 cpu_addr);
 extern u32 omap_read_auxcoreboot0(void);
+
+extern void omap4_cpu_die(unsigned int cpu);
+
+extern struct smp_operations omap4_smp_ops;
+
 extern void omap5_secondary_startup(void);
 #endif
 
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 414083b..2de71a3 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -26,16 +26,11 @@
 
 #include "powerdomain.h"
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  * Called with IRQs disabled
  */
-void __ref platform_cpu_die(unsigned int cpu)
+void __ref omap4_cpu_die(unsigned int cpu)
 {
 	unsigned int boot_cpu = 0;
 	void __iomem *base = omap_get_wakeupgen_base();
@@ -75,12 +70,3 @@ void __ref platform_cpu_die(unsigned int cpu)
 		pr_debug("CPU%u: spurious wakeup call\n", cpu);
 	}
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9a35adf..046fa0d 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -49,7 +49,7 @@ void __iomem *omap4_get_scu_base(void)
 	return scu_base;
 }
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit omap4_secondary_init(unsigned int cpu)
 {
 	/*
 	 * Configure ACTRL and enable NS SMP bit access on CPU1 on HS device.
@@ -77,7 +77,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	spin_unlock(&boot_lock);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	static struct clockdomain *cpu1_clkdm;
 	static bool booted;
@@ -165,7 +165,7 @@ static void __init wakeup_secondary(void)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init omap4_smp_init_cpus(void)
 {
 	unsigned int i = 0, ncores = 1, cpu_id;
 
@@ -196,7 +196,7 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
 {
 
 	/*
@@ -207,3 +207,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 		scu_enable(scu_base);
 	wakeup_secondary();
 }
+
+struct smp_operations omap4_smp_ops __initdata = {
+	.smp_init_cpus		= omap4_smp_init_cpus,
+	.smp_prepare_cpus	= omap4_smp_prepare_cpus,
+	.smp_secondary_init	= omap4_secondary_init,
+	.smp_boot_secondary	= omap4_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= omap4_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 04/13] ARM: SoC: convert Tegra to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (2 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 03/13] ARM: SoC: convert OMAP4 " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 05/13] ARM: SoC: convert Exynos4 " Arnd Bergmann
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Colin Cross, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert Tegra to use the SoC descriptor to provide its SMP
and CPU hotplug operations.

Tested on Harmony.

Cc: Colin Cross <ccross@android.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-tegra/board-dt-tegra20.c |    2 ++
 arch/arm/mach-tegra/board-dt-tegra30.c |    2 ++
 arch/arm/mach-tegra/board-harmony.c    |    2 ++
 arch/arm/mach-tegra/board-paz00.c      |    2 ++
 arch/arm/mach-tegra/board-trimslice.c  |    2 ++
 arch/arm/mach-tegra/common.c           |    1 +
 arch/arm/mach-tegra/common.h           |    3 +++
 arch/arm/mach-tegra/hotplug.c          |   16 +---------------
 arch/arm/mach-tegra/platsmp.c          |   20 ++++++++++++++++----
 9 files changed, 31 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/mach-tegra/common.h

diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index c099963..a30537c 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -45,6 +45,7 @@
 #include "board-harmony.h"
 #include "clock.h"
 #include "devices.h"
+#include "common.h"
 
 struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
@@ -166,6 +167,7 @@ static const char *tegra20_dt_board_compat[] = {
 
 DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)")
 	.map_io		= tegra_map_common_io,
+	.smp		= smp_ops(tegra_smp_ops),
 	.init_early	= tegra20_init_early,
 	.init_irq	= tegra_dt_init_irq,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c
index 53bf60f..e4a676d 100644
--- a/arch/arm/mach-tegra/board-dt-tegra30.c
+++ b/arch/arm/mach-tegra/board-dt-tegra30.c
@@ -37,6 +37,7 @@
 
 #include "board.h"
 #include "clock.h"
+#include "common.h"
 
 struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL),
@@ -83,6 +84,7 @@ static const char *tegra30_dt_board_compat[] = {
 };
 
 DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)")
+	.smp		= smp_ops(tegra_smp_ops),
 	.map_io		= tegra_map_common_io,
 	.init_early	= tegra30_init_early,
 	.init_irq	= tegra_dt_init_irq,
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index e65e837..c1a0c8d 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -45,6 +45,7 @@
 #include "clock.h"
 #include "devices.h"
 #include "gpio-names.h"
+#include "common.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
 	{
@@ -185,6 +186,7 @@ static void __init tegra_harmony_init(void)
 
 MACHINE_START(HARMONY, "harmony")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(tegra_smp_ops),
 	.fixup		= tegra_harmony_fixup,
 	.map_io         = tegra_map_common_io,
 	.init_early	= tegra20_init_early,
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 4b64af5..2b25cc7 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -47,6 +47,7 @@
 #include "clock.h"
 #include "devices.h"
 #include "gpio-names.h"
+#include "common.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
 	{
@@ -223,6 +224,7 @@ static void __init tegra_paz00_init(void)
 
 MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(tegra_smp_ops),
 	.fixup		= tegra_paz00_fixup,
 	.map_io         = tegra_map_common_io,
 	.init_early	= tegra20_init_early,
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index 776aa95..6a1e0b2 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -40,6 +40,7 @@
 #include "clock.h"
 #include "devices.h"
 #include "gpio-names.h"
+#include "common.h"
 
 #include "board-trimslice.h"
 
@@ -171,6 +172,7 @@ static void __init tegra_trimslice_init(void)
 
 MACHINE_START(TRIMSLICE, "trimslice")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(tegra_smp_ops),
 	.fixup		= tegra_trimslice_fixup,
 	.map_io         = tegra_map_common_io,
 	.init_early	= tegra20_init_early,
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 96fef6b..990f275 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -31,6 +31,7 @@
 
 #include "board.h"
 #include "clock.h"
+#include "common.h"
 #include "fuse.h"
 #include "pmc.h"
 #include "apbio.h"
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
new file mode 100644
index 0000000..301b35e
--- /dev/null
+++ b/arch/arm/mach-tegra/common.h
@@ -0,0 +1,3 @@
+extern struct smp_operations tegra_smp_ops;
+
+extern void tegra_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index d8dc9dd..73402db 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -87,17 +87,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void tegra_cpu_die(unsigned int cpu)
 {
 	int spurious = 0;
 
@@ -116,12 +111,3 @@ void platform_cpu_die(unsigned int cpu)
 	if (spurious)
 		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 1a208db..24bfb653 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -32,6 +32,8 @@
 #include "flowctrl.h"
 #include "reset.h"
 
+#include "common.h"
+
 extern void tegra_secondary_startup(void);
 
 static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);
@@ -50,7 +52,7 @@ static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);
 #define CPU_CLOCK(cpu)	(0x1<<(8+cpu))
 #define CPU_RESET(cpu)	(0x1111ul<<(cpu))
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit tegra_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -117,7 +119,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
 	return 0;
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit tegra_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	int status;
 
@@ -165,7 +167,7 @@ done:
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init tegra_smp_init_cpus(void)
 {
 	unsigned int i, ncores = scu_get_core_count(scu_base);
 
@@ -181,8 +183,18 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
 {
 	tegra_cpu_reset_handler_init();
 	scu_enable(scu_base);
 }
+
+struct smp_operations tegra_smp_ops __initdata = {
+	.smp_init_cpus		= tegra_smp_init_cpus,
+	.smp_prepare_cpus	= tegra_smp_prepare_cpus,
+	.smp_secondary_init	= tegra_secondary_init,
+	.smp_boot_secondary	= tegra_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= tegra_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 05/13] ARM: SoC: convert Exynos4 to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (3 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 04/13] ARM: SoC: convert Tegra " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-13  5:10   ` Kyungmin Park
  2012-09-14  4:33   ` Kukjin Kim
  2012-09-12 14:58 ` [PATCH v9 06/13] ARM: SoC: convert MSM SMP " Arnd Bergmann
                   ` (9 subsequent siblings)
  14 siblings, 2 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert Exynos4 to use the SoC descriptor to provide its SMP
and CPU hotplug operations.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-exynos/common.h              |    5 +++++
 arch/arm/mach-exynos/hotplug.c             |   18 +++---------------
 arch/arm/mach-exynos/mach-armlex4210.c     |    1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c     |    1 +
 arch/arm/mach-exynos/mach-nuri.c           |    1 +
 arch/arm/mach-exynos/mach-origen.c         |    1 +
 arch/arm/mach-exynos/mach-smdk4x12.c       |    2 ++
 arch/arm/mach-exynos/mach-smdkv310.c       |    2 ++
 arch/arm/mach-exynos/mach-universal_c210.c |    1 +
 arch/arm/mach-exynos/platsmp.c             |   20 ++++++++++++++++----
 10 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index aed2eeb..dac146d 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -14,6 +14,7 @@
 
 extern struct sys_timer exynos4_timer;
 
+struct map_desc;
 void exynos_init_io(struct map_desc *mach_desc, int size);
 void exynos4_init_irq(void);
 void exynos5_init_irq(void);
@@ -59,4 +60,8 @@ void exynos4212_register_clocks(void);
 #define exynos4212_register_clocks()
 #endif
 
+extern struct smp_operations exynos_smp_ops;
+
+extern void exynos_cpu_die(unsigned int cpu);
+
 #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 9c17a0a..d0a5a70 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -21,6 +21,8 @@
 
 #include <mach/regs-pmu.h>
 
+#include "common.h"
+
 extern volatile int pen_release;
 
 static inline void cpu_enter_lowpower(void)
@@ -95,17 +97,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void __cpuinit exynos_cpu_die(unsigned int cpu)
 {
 	int spurious = 0;
 
@@ -124,12 +121,3 @@ void platform_cpu_die(unsigned int cpu)
 	if (spurious)
 		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 5a3daa0..3f37a5e 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -199,6 +199,7 @@ static void __init armlex4210_machine_init(void)
 MACHINE_START(ARMLEX4210, "ARMLEX4210")
 	/* Maintainer: Alim Akhtar <alim.akhtar@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= armlex4210_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index ef770bc..8833060 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -79,6 +79,7 @@ static char const *exynos5250_dt_compat[] __initdata = {
 DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	.init_irq	= exynos5_init_irq,
+	.smp		= smp_ops(exynos_smp_ops),
 	.map_io		= exynos5250_dt_map_io,
 	.handle_irq	= gic_handle_irq,
 	.init_machine	= exynos5250_dt_machine_init,
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index ea785fc..ffaa355 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1383,6 +1383,7 @@ static void __init nuri_machine_init(void)
 MACHINE_START(NURI, "NURI")
 	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= nuri_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 4e574c2..abd0e60 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -806,6 +806,7 @@ static void __init origen_machine_init(void)
 MACHINE_START(ORIGEN, "ORIGEN")
 	/* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= origen_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index b26beb1..964693b 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -370,6 +370,7 @@ static void __init smdk4x12_machine_init(void)
 MACHINE_START(SMDK4212, "SMDK4212")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= smdk4x12_map_io,
 	.handle_irq	= gic_handle_irq,
@@ -383,6 +384,7 @@ MACHINE_START(SMDK4412, "SMDK4412")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	/* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= smdk4x12_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 73f2bce..69b858c 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -417,6 +417,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	/* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= smdkv310_map_io,
 	.handle_irq	= gic_handle_irq,
@@ -429,6 +430,7 @@ MACHINE_END
 MACHINE_START(SMDKC210, "SMDKC210")
 	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= smdkv310_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 4d1f40d..922ca0f 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -1155,6 +1155,7 @@ static void __init universal_machine_init(void)
 MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
 	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(exynos_smp_ops),
 	.init_irq	= exynos4_init_irq,
 	.map_io		= universal_map_io,
 	.handle_irq	= gic_handle_irq,
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 36c3984..3fad8ad 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -32,6 +32,8 @@
 
 #include <plat/cpu.h>
 
+#include "common.h"
+
 extern void exynos4_secondary_startup(void);
 
 #define CPU1_BOOT_REG		(samsung_rev() == EXYNOS4210_REV_1_1 ? \
@@ -64,7 +66,7 @@ static void __iomem *scu_base_addr(void)
 
 static DEFINE_SPINLOCK(boot_lock);
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit exynos_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -86,7 +88,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	spin_unlock(&boot_lock);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 
@@ -161,7 +163,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * which may be present or become present in the system.
  */
 
-void __init smp_init_cpus(void)
+static void __init exynos_smp_init_cpus(void)
 {
 	void __iomem *scu_base = scu_base_addr();
 	unsigned int i, ncores;
@@ -184,7 +186,7 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 {
 	if (!soc_is_exynos5250())
 		scu_enable(scu_base_addr());
@@ -198,3 +200,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 	__raw_writel(virt_to_phys(exynos4_secondary_startup),
 			CPU1_BOOT_REG);
 }
+
+struct smp_operations exynos_smp_ops __initdata = {
+	.smp_init_cpus		= exynos_smp_init_cpus,
+	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
+	.smp_secondary_init	= exynos_secondary_init,
+	.smp_boot_secondary	= exynos_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= exynos_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 06/13] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (4 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 05/13] ARM: SoC: convert Exynos4 " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 16:26   ` David Brown
  2012-09-12 23:01   ` [PATCH 1/2] " David Brown
  2012-09-12 14:58 ` [PATCH v9 07/13] ARM: SoC: convert ux500 " Arnd Bergmann
                   ` (8 subsequent siblings)
  14 siblings, 2 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, David Brown, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert MSM SMP platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-msm/board-msm8960.c |    3 +++
 arch/arm/mach-msm/board-msm8x60.c |    7 +++++++
 arch/arm/mach-msm/core.h          |    2 ++
 arch/arm/mach-msm/hotplug.c       |   18 +++---------------
 arch/arm/mach-msm/platsmp.c       |   19 +++++++++++++++----
 5 files changed, 30 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/mach-msm/core.h

diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 65f4a1d..a156968 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -30,6 +30,7 @@
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
 
+#include "core.h"
 #include "devices.h"
 
 static void __init msm8960_fixup(struct tag *tag, char **cmdline,
@@ -99,6 +100,7 @@ static void __init msm8960_init_late(void)
 }
 
 MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8960_fixup,
 	.reserve = msm8960_reserve,
 	.map_io = msm8960_map_io,
@@ -110,6 +112,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
 MACHINE_END
 
 MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8960_fixup,
 	.reserve = msm8960_reserve,
 	.map_io = msm8960_map_io,
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index e37a724..dc2abd3 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -29,6 +29,8 @@
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
 
+#include "core.h"
+
 static void __init msm8x60_fixup(struct tag *tag, char **cmdline,
 		struct meminfo *mi)
 {
@@ -110,6 +112,7 @@ static const char *msm8x60_fluid_match[] __initdata = {
 #endif /* CONFIG_OF */
 
 MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8x60_fixup,
 	.reserve = msm8x60_reserve,
 	.map_io = msm8x60_map_io,
@@ -121,6 +124,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
 MACHINE_END
 
 MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8x60_fixup,
 	.reserve = msm8x60_reserve,
 	.map_io = msm8x60_map_io,
@@ -132,6 +136,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
 MACHINE_END
 
 MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8x60_fixup,
 	.reserve = msm8x60_reserve,
 	.map_io = msm8x60_map_io,
@@ -143,6 +148,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
 MACHINE_END
 
 MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
+	.smp = smp_ops(msm_smp_ops),
 	.fixup = msm8x60_fixup,
 	.reserve = msm8x60_reserve,
 	.map_io = msm8x60_map_io,
@@ -156,6 +162,7 @@ MACHINE_END
 #ifdef CONFIG_OF
 /* TODO: General device tree support for all MSM. */
 DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
+	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm8x60_map_io,
 	.init_irq = msm8x60_init_irq,
 	.init_machine = msm8x60_dt_init,
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h
new file mode 100644
index 0000000..a9bab53
--- /dev/null
+++ b/arch/arm/mach-msm/core.h
@@ -0,0 +1,2 @@
+extern struct smp_operations msm_smp_ops;
+extern void msm_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index a446fc1..d0f79e8 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -13,6 +13,8 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
+#include "core.h"
+
 extern volatile int pen_release;
 
 static inline void cpu_enter_lowpower(void)
@@ -57,17 +59,12 @@ static inline void platform_do_lowpower(unsigned int cpu)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void msm_cpu_die(unsigned int cpu)
 {
 	/*
 	 * we're ready for shutdown now, so do it
@@ -81,12 +78,3 @@ void platform_cpu_die(unsigned int cpu)
 	 */
 	cpu_leave_lowpower();
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index e012dc8..ba3c4b0 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -25,6 +25,7 @@
 #include <mach/msm_iomap.h>
 
 #include "scm-boot.h"
+#include "core.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
 #define SCSS_CPU1CORE_RESET 0xD80
@@ -48,7 +49,7 @@ static inline int get_core_count(void)
 	return ((read_cpuid_id() >> 4) & 3) + 1;
 }
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit msm_secondary_init(unsigned int cpu)
 {
 	/* Configure edge-triggered PPIs */
 	writel(GIC_PPI_EDGE_MASK, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
@@ -93,7 +94,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu)
 				  "address\n");
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 	static int cold_boot_done;
@@ -153,7 +154,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * does not support the ARM SCU, so just set the possible cpu mask to
  * NR_CPUS.
  */
-void __init smp_init_cpus(void)
+static void __init msm_smp_init_cpus(void)
 {
 	unsigned int i, ncores = get_core_count();
 
@@ -169,6 +170,16 @@ void __init smp_init_cpus(void)
         set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
 {
 }
+
+struct smp_operations msm_smp_ops __initdata = {
+	.smp_init_cpus		= msm_smp_init_cpus,
+	.smp_prepare_cpus	= msm_smp_prepare_cpus,
+	.smp_secondary_init	= msm_secondary_init,
+	.smp_boot_secondary	= msm_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= msm_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 07/13] ARM: SoC: convert ux500 to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (5 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 06/13] ARM: SoC: convert MSM SMP " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
       [not found]   ` <CAE2-_9o5gEpEddGLvRRA=pe=vroTnBXmGmoBO1Ojos-hOJXQAQ@mail.gmail.com>
  2012-09-12 14:58 ` [PATCH v9 08/13] ARM: SoC: convert shmobile SMP " Arnd Bergmann
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Linus Walleij, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert ux500 platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.

Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ux500/board-mop500.c       |    4 ++++
 arch/arm/mach-ux500/hotplug.c            |   36 ++++++++----------------------
 arch/arm/mach-ux500/include/mach/setup.h |    3 +++
 arch/arm/mach-ux500/platsmp.c            |   18 +++++++++++----
 4 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a534d88..1c6f74b 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -694,6 +694,7 @@ static void __init hrefv60_init_machine(void)
 MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
 	/* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(ux500_smp_ops),
 	.map_io		= u8500_map_io,
 	.init_irq	= ux500_init_irq,
 	/* we re-use nomadik timer here */
@@ -705,6 +706,7 @@ MACHINE_END
 
 MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(ux500_smp_ops),
 	.map_io		= u8500_map_io,
 	.init_irq	= ux500_init_irq,
 	.timer		= &ux500_timer,
@@ -715,6 +717,7 @@ MACHINE_END
 
 MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
 	.atag_offset	= 0x100,
+	.smp		= smp_ops(ux500_smp_ops),
 	.map_io		= u8500_map_io,
 	.init_irq	= ux500_init_irq,
 	/* we re-use nomadik timer here */
@@ -844,6 +847,7 @@ static const char * u8500_dt_board_compat[] = {
 
 
 DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
+	.smp		= smp_ops(ux500_smp_ops),
 	.map_io		= u8500_map_io,
 	.init_irq	= ux500_init_irq,
 	/* we re-use nomadik timer here */
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index c76f0f4..17b9a15 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -15,13 +15,20 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
+#include <mach/setup.h>
+
 extern volatile int pen_release;
 
-static inline void platform_do_lowpower(unsigned int cpu)
+/*
+ * platform-specific code to shutdown a CPU
+ *
+ * Called with IRQs disabled
+ */
+void ux500_cpu_die(unsigned int cpu)
 {
 	flush_cache_all();
 
-	/* we put the platform to just WFI */
+	/* directly enter low power state, skipping secure registers */
 	for (;;) {
 		__asm__ __volatile__("dsb\n\t" "wfi\n\t"
 				: : : "memory");
@@ -33,28 +40,3 @@ static inline void platform_do_lowpower(unsigned int cpu)
 		}
 	}
 }
-
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
-/*
- * platform-specific code to shutdown a CPU
- *
- * Called with IRQs disabled
- */
-void platform_cpu_die(unsigned int cpu)
-{
-	/* directly enter low power state, skipping secure registers */
-	platform_do_lowpower(cpu);
-}
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index 7914e5e..6be4c4d 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -45,4 +45,7 @@ extern struct sys_timer ux500_timer;
 	.type		= MT_MEMORY,		\
 }
 
+extern struct smp_operations ux500_smp_ops;
+extern void ux500_cpu_die(unsigned int cpu);
+
 #endif /*  __ASM_ARCH_SETUP_H */
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index da1d5ad..b6f4e0e 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -58,7 +58,7 @@ static void __iomem *scu_base_addr(void)
 
 static DEFINE_SPINLOCK(boot_lock);
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit ux500_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -80,7 +80,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	spin_unlock(&boot_lock);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 
@@ -145,7 +145,7 @@ static void __init wakeup_secondary(void)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init ux500_smp_init_cpus(void)
 {
 	void __iomem *scu_base = scu_base_addr();
 	unsigned int i, ncores;
@@ -165,9 +165,19 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
 {
 
 	scu_enable(scu_base_addr());
 	wakeup_secondary();
 }
+
+struct smp_operations ux500_smp_ops __initdata = {
+	.smp_init_cpus		= ux500_smp_init_cpus,
+	.smp_prepare_cpus	= ux500_smp_prepare_cpus,
+	.smp_secondary_init	= ux500_secondary_init,
+	.smp_boot_secondary	= ux500_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= ux500_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 08/13] ARM: SoC: convert shmobile SMP to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (6 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 07/13] ARM: SoC: convert ux500 " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 09/13] ARM: SoC: convert highbank " Arnd Bergmann
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, linux-kernel, Paul Mundt, Magnus Damm, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert shmobile SMP platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.

Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-shmobile/board-ag5evm.c         |    1 +
 arch/arm/mach-shmobile/board-kota2.c          |    1 +
 arch/arm/mach-shmobile/board-kzm9d.c          |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c          |    1 +
 arch/arm/mach-shmobile/board-marzen.c         |    1 +
 arch/arm/mach-shmobile/hotplug.c              |   31 +++-----
 arch/arm/mach-shmobile/include/mach/common.h  |   24 +++----
 arch/arm/mach-shmobile/include/mach/emev2.h   |    7 +-
 arch/arm/mach-shmobile/include/mach/r8a7779.h |    2 +
 arch/arm/mach-shmobile/include/mach/sh73a0.h  |    2 +
 arch/arm/mach-shmobile/platsmp.c              |   96 +------------------------
 arch/arm/mach-shmobile/setup-emev2.c          |    1 +
 arch/arm/mach-shmobile/smp-emev2.c            |   47 ++++++++++--
 arch/arm/mach-shmobile/smp-r8a7779.c          |   48 +++++++++++--
 arch/arm/mach-shmobile/smp-sh73a0.c           |   48 +++++++++++--
 15 files changed, 165 insertions(+), 146 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index d82c010..81969e3 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -650,6 +650,7 @@ static void __init ag5evm_init(void)
 }
 
 MACHINE_START(AG5EVM, "ag5evm")
+	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index 21dbe54..bf88f9a 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -545,6 +545,7 @@ static void __init kota2_init(void)
 }
 
 MACHINE_START(KOTA2, "kota2")
+	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index 2c986ea..b52bc0d 100644
--- a/arch/arm/mach-shmobile/board-kzm9d.c
+++ b/arch/arm/mach-shmobile/board-kzm9d.c
@@ -84,6 +84,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(KZM9D_DT, "kzm9d")
+	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
 	.init_early	= emev2_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 53b7ea9..170554e 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -769,6 +769,7 @@ static const char *kzm9g_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(KZM9G_DT, "kzm9g")
+	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 3a528cf..245b4ba 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -102,6 +102,7 @@ static void __init marzen_init(void)
 }
 
 MACHINE_START(MARZEN, "marzen")
+	.smp		= smp_ops(r8a7779_smp_ops),
 	.map_io		= r8a7779_map_io,
 	.init_early	= r8a7779_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index 828d22f..b09a0bd 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -14,30 +14,16 @@
 #include <linux/smp.h>
 #include <linux/cpumask.h>
 #include <linux/delay.h>
+#include <linux/of.h>
 #include <mach/common.h>
+#include <mach/r8a7779.h>
+#include <mach/emev2.h>
 #include <asm/cacheflush.h>
+#include <asm/mach-types.h>
 
 static cpumask_t dead_cpus;
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	int k;
-
-	/* this function is running on another CPU than the offline target,
-	 * here we need wait for shutdown code in platform_cpu_die() to
-	 * finish before asking SoC-specific code to power off the CPU core.
-	 */
-	for (k = 0; k < 1000; k++) {
-		if (cpumask_test_cpu(cpu, &dead_cpus))
-			return shmobile_platform_cpu_kill(cpu);
-
-		mdelay(1);
-	}
-
-	return 0;
-}
-
-void platform_cpu_die(unsigned int cpu)
+void shmobile_cpu_die(unsigned int cpu)
 {
 	/* hardware shutdown code running on the CPU that is being offlined */
 	flush_cache_all();
@@ -60,7 +46,7 @@ void platform_cpu_die(unsigned int cpu)
 	}
 }
 
-int platform_cpu_disable(unsigned int cpu)
+int shmobile_cpu_disable(unsigned int cpu)
 {
 	cpumask_clear_cpu(cpu, &dead_cpus);
 	/*
@@ -69,3 +55,8 @@ int platform_cpu_disable(unsigned int cpu)
 	 */
 	return cpu == 0 ? -EPERM : 0;
 }
+
+int shmobile_cpu_is_dead(unsigned int cpu)
+{
+	return cpumask_test_cpu(cpu, &dead_cpus);
+}
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 45e61da..f80f9c5 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -4,11 +4,10 @@
 extern void shmobile_earlytimer_init(void);
 extern struct sys_timer shmobile_timer;
 extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
-				 unsigned int mult, unsigned int div);
+			 unsigned int mult, unsigned int div);
 struct twd_local_timer;
 extern void shmobile_setup_console(void);
 extern void shmobile_secondary_vector(void);
-extern int shmobile_platform_cpu_kill(unsigned int cpu);
 struct clk;
 extern int shmobile_clk_init(void);
 extern void shmobile_handle_irq_intc(struct pt_regs *);
@@ -58,11 +57,6 @@ extern struct clk sh73a0_extal2_clk;
 extern struct clk sh73a0_extcki_clk;
 extern struct clk sh73a0_extalr_clk;
 
-extern unsigned int sh73a0_get_core_count(void);
-extern void sh73a0_secondary_init(unsigned int cpu);
-extern int sh73a0_boot_secondary(unsigned int cpu);
-extern void sh73a0_smp_prepare_cpus(void);
-
 extern void r8a7740_init_irq(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
@@ -79,11 +73,6 @@ extern void r8a7779_pinmux_init(void);
 extern void r8a7779_pm_init(void);
 extern void r8a7740_meram_workaround(void);
 
-extern unsigned int r8a7779_get_core_count(void);
-extern int r8a7779_platform_cpu_kill(unsigned int cpu);
-extern void r8a7779_secondary_init(unsigned int cpu);
-extern int r8a7779_boot_secondary(unsigned int cpu);
-extern void r8a7779_smp_prepare_cpus(void);
 extern void r8a7779_register_twd(void);
 
 extern void shmobile_init_late(void);
@@ -100,4 +89,15 @@ int shmobile_cpuidle_init(void);
 static inline int shmobile_cpuidle_init(void) { return 0; }
 #endif
 
+extern void shmobile_cpu_die(unsigned int cpu);
+extern int shmobile_cpu_disable(unsigned int cpu);
+
+#ifdef CONFIG_HOTPLUG_CPU
+extern int shmobile_cpu_is_dead(unsigned int cpu);
+#else
+static inline int shmobile_cpu_is_dead(unsigned int cpu) { return 1; }
+#endif
+
+extern void shmobile_smp_init_cpus(unsigned int ncores);
+
 #endif /* __ARCH_MACH_COMMON_H */
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h
index e6b0c1b..ac37517 100644
--- a/arch/arm/mach-shmobile/include/mach/emev2.h
+++ b/arch/arm/mach-shmobile/include/mach/emev2.h
@@ -7,13 +7,10 @@ extern void emev2_add_early_devices(void);
 extern void emev2_add_standard_devices(void);
 extern void emev2_clock_init(void);
 extern void emev2_set_boot_vector(unsigned long value);
-extern unsigned int emev2_get_core_count(void);
-extern int emev2_platform_cpu_kill(unsigned int cpu);
-extern void emev2_secondary_init(unsigned int cpu);
-extern int emev2_boot_secondary(unsigned int cpu);
-extern void emev2_smp_prepare_cpus(void);
 
 #define EMEV2_GPIO_BASE 200
 #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n))
 
+extern struct smp_operations emev2_smp_ops;
+
 #endif /* __ASM_EMEV2_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index b07ad31..f504c5e 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -360,4 +360,6 @@ extern void r8a7779_add_device_to_domain(struct r8a7779_pm_domain *r8a7779_pd,
 #define r8a7779_add_device_to_domain(pd, pdev) do { } while (0)
 #endif /* CONFIG_PM */
 
+extern struct smp_operations r8a7779_smp_ops;
+
 #endif /* __ASM_R8A7779_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h
index fe950f2..606d31d 100644
--- a/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h
@@ -557,4 +557,6 @@ enum {
 #define SH73A0_PINT0_IRQ(irq) ((irq) + 700)
 #define SH73A0_PINT1_IRQ(irq) ((irq) + 732)
 
+extern struct smp_operations sh73a0_smp_ops;
+
 #endif /* __ASM_SH73A0_H__ */
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index fde0d23..ed8d235 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -11,100 +11,11 @@
  * published by the Free Software Foundation.
  */
 #include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/device.h>
 #include <linux/smp.h>
-#include <linux/io.h>
-#include <linux/of.h>
 #include <asm/hardware/gic.h>
-#include <asm/mach-types.h>
-#include <mach/common.h>
-#include <mach/emev2.h>
 
-#ifdef CONFIG_ARCH_SH73A0
-#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
-			of_machine_is_compatible("renesas,sh73a0"))
-#else
-#define is_sh73a0() (0)
-#endif
-
-#define is_r8a7779() machine_is_marzen()
-
-#ifdef CONFIG_ARCH_EMEV2
-#define is_emev2() of_machine_is_compatible("renesas,emev2")
-#else
-#define is_emev2() (0)
-#endif
-
-static unsigned int __init shmobile_smp_get_core_count(void)
-{
-	if (is_sh73a0())
-		return sh73a0_get_core_count();
-
-	if (is_r8a7779())
-		return r8a7779_get_core_count();
-
-	if (is_emev2())
-		return emev2_get_core_count();
-
-	return 1;
-}
-
-static void __init shmobile_smp_prepare_cpus(void)
-{
-	if (is_sh73a0())
-		sh73a0_smp_prepare_cpus();
-
-	if (is_r8a7779())
-		r8a7779_smp_prepare_cpus();
-
-	if (is_emev2())
-		emev2_smp_prepare_cpus();
-}
-
-int shmobile_platform_cpu_kill(unsigned int cpu)
-{
-	if (is_r8a7779())
-		return r8a7779_platform_cpu_kill(cpu);
-
-	if (is_emev2())
-		return emev2_platform_cpu_kill(cpu);
-
-	return 1;
-}
-
-void __cpuinit platform_secondary_init(unsigned int cpu)
+void __init shmobile_smp_init_cpus(unsigned int ncores)
 {
-	trace_hardirqs_off();
-
-	if (is_sh73a0())
-		sh73a0_secondary_init(cpu);
-
-	if (is_r8a7779())
-		r8a7779_secondary_init(cpu);
-
-	if (is_emev2())
-		emev2_secondary_init(cpu);
-}
-
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
-	if (is_sh73a0())
-		return sh73a0_boot_secondary(cpu);
-
-	if (is_r8a7779())
-		return r8a7779_boot_secondary(cpu);
-
-	if (is_emev2())
-		return emev2_boot_secondary(cpu);
-
-	return -ENOSYS;
-}
-
-void __init smp_init_cpus(void)
-{
-	unsigned int ncores = shmobile_smp_get_core_count();
 	unsigned int i;
 
 	if (ncores > nr_cpu_ids) {
@@ -118,8 +29,3 @@ void __init smp_init_cpus(void)
 
 	set_smp_cross_call(gic_raise_softirq);
 }
-
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
-{
-	shmobile_smp_prepare_cpus();
-}
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index dae9aa6..5b46651 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -440,6 +440,7 @@ void __init emev2_init_irq_dt(void)
 }
 
 DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
+	.smp		= smp_ops(emev2_smp_ops),
 	.init_early	= emev2_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= emev2_init_irq_dt,
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index 6a35c4a..f978c5d 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -50,7 +50,7 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
 
 }
 
-unsigned int __init emev2_get_core_count(void)
+static unsigned int __init emev2_get_core_count(void)
 {
 	if (!scu_base) {
 		scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
@@ -62,17 +62,35 @@ unsigned int __init emev2_get_core_count(void)
 	return scu_base ? scu_get_core_count(scu_base) : 1;
 }
 
-int emev2_platform_cpu_kill(unsigned int cpu)
+static int emev2_platform_cpu_kill(unsigned int cpu)
 {
 	return 0; /* not supported yet */
 }
 
-void __cpuinit emev2_secondary_init(unsigned int cpu)
+static int __maybe_unused emev2_cpu_kill(unsigned int cpu)
+{
+	int k;
+
+	/* this function is running on another CPU than the offline target,
+	 * here we need wait for shutdown code in platform_cpu_die() to
+	 * finish before asking SoC-specific code to power off the CPU core.
+	 */
+	for (k = 0; k < 1000; k++) {
+		if (shmobile_cpu_is_dead(cpu))
+			return emev2_platform_cpu_kill(cpu);
+		mdelay(1);
+	}
+
+	return 0;
+}
+
+
+static void __cpuinit emev2_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
 }
 
-int __cpuinit emev2_boot_secondary(unsigned int cpu)
+static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	cpu = cpu_logical_map(cpu);
 
@@ -86,7 +104,7 @@ int __cpuinit emev2_boot_secondary(unsigned int cpu)
 	return 0;
 }
 
-void __init emev2_smp_prepare_cpus(void)
+static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
 {
 	int cpu = cpu_logical_map(0);
 
@@ -95,3 +113,22 @@ void __init emev2_smp_prepare_cpus(void)
 	/* enable cache coherency on CPU0 */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 }
+
+static void __init emev2_smp_init_cpus(void)
+{
+	unsigned int ncores = emev2_get_core_count();
+
+	shmobile_smp_init_cpus(ncores);
+}
+
+struct smp_operations emev2_smp_ops __initdata = {
+	.smp_init_cpus		= emev2_smp_init_cpus,
+	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
+	.smp_secondary_init	= emev2_secondary_init,
+	.smp_boot_secondary	= emev2_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_kill		= emev2_cpu_kill,
+	.cpu_die		= shmobile_cpu_die,
+	.cpu_disable		= shmobile_cpu_disable,
+#endif
+};
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 6d1d023..2ce6af9 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -87,14 +87,14 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
 	__raw_writel(tmp, scu_base + 8);
 }
 
-unsigned int __init r8a7779_get_core_count(void)
+static unsigned int __init r8a7779_get_core_count(void)
 {
 	void __iomem *scu_base = scu_base_addr();
 
 	return scu_get_core_count(scu_base);
 }
 
-int r8a7779_platform_cpu_kill(unsigned int cpu)
+static int r8a7779_platform_cpu_kill(unsigned int cpu)
 {
 	struct r8a7779_pm_ch *ch = NULL;
 	int ret = -EIO;
@@ -113,12 +113,31 @@ int r8a7779_platform_cpu_kill(unsigned int cpu)
 	return ret ? ret : 1;
 }
 
-void __cpuinit r8a7779_secondary_init(unsigned int cpu)
+static int __maybe_unused r8a7779_cpu_kill(unsigned int cpu)
+{
+	int k;
+
+	/* this function is running on another CPU than the offline target,
+	 * here we need wait for shutdown code in platform_cpu_die() to
+	 * finish before asking SoC-specific code to power off the CPU core.
+	 */
+	for (k = 0; k < 1000; k++) {
+		if (shmobile_cpu_is_dead(cpu))
+			return r8a7779_platform_cpu_kill(cpu);
+
+		mdelay(1);
+	}
+
+	return 0;
+}
+
+
+static void __cpuinit r8a7779_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
 }
 
-int __cpuinit r8a7779_boot_secondary(unsigned int cpu)
+static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	struct r8a7779_pm_ch *ch = NULL;
 	int ret = -EIO;
@@ -137,7 +156,7 @@ int __cpuinit r8a7779_boot_secondary(unsigned int cpu)
 	return ret;
 }
 
-void __init r8a7779_smp_prepare_cpus(void)
+static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
 {
 	int cpu = cpu_logical_map(0);
 
@@ -156,3 +175,22 @@ void __init r8a7779_smp_prepare_cpus(void)
 	r8a7779_platform_cpu_kill(2);
 	r8a7779_platform_cpu_kill(3);
 }
+
+static void __init r8a7779_smp_init_cpus(void)
+{
+	unsigned int ncores = r8a7779_get_core_count();
+
+	shmobile_smp_init_cpus(ncores);
+}
+
+struct smp_operations r8a7779_smp_ops  __initdata = {
+	.smp_init_cpus		= r8a7779_smp_init_cpus,
+	.smp_prepare_cpus	= r8a7779_smp_prepare_cpus,
+	.smp_secondary_init	= r8a7779_secondary_init,
+	.smp_boot_secondary	= r8a7779_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_kill		= r8a7779_cpu_kill,
+	.cpu_die		= shmobile_cpu_die,
+	.cpu_disable		= shmobile_cpu_disable,
+#endif
+};
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index e36c41c..624f00f 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -22,8 +22,10 @@
 #include <linux/smp.h>
 #include <linux/spinlock.h>
 #include <linux/io.h>
+#include <linux/delay.h>
 #include <mach/common.h>
 #include <asm/smp_plat.h>
+#include <mach/sh73a0.h>
 #include <asm/smp_scu.h>
 #include <asm/smp_twd.h>
 #include <asm/hardware/gic.h>
@@ -64,19 +66,19 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
 	__raw_writel(tmp, scu_base + 8);
 }
 
-unsigned int __init sh73a0_get_core_count(void)
+static unsigned int __init sh73a0_get_core_count(void)
 {
 	void __iomem *scu_base = scu_base_addr();
 
 	return scu_get_core_count(scu_base);
 }
 
-void __cpuinit sh73a0_secondary_init(unsigned int cpu)
+static void __cpuinit sh73a0_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
 }
 
-int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
+static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	cpu = cpu_logical_map(cpu);
 
@@ -91,7 +93,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
 	return 0;
 }
 
-void __init sh73a0_smp_prepare_cpus(void)
+static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 {
 	int cpu = cpu_logical_map(0);
 
@@ -104,3 +106,41 @@ void __init sh73a0_smp_prepare_cpus(void)
 	/* enable cache coherency on CPU0 */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 }
+
+static void __init sh73a0_smp_init_cpus(void)
+{
+	unsigned int ncores = sh73a0_get_core_count();
+
+	shmobile_smp_init_cpus(ncores);
+}
+
+static int __maybe_unused sh73a0_cpu_kill(unsigned int cpu)
+{
+	int k;
+
+	/* this function is running on another CPU than the offline target,
+	 * here we need wait for shutdown code in platform_cpu_die() to
+	 * finish before asking SoC-specific code to power off the CPU core.
+	 */
+	for (k = 0; k < 1000; k++) {
+		if (shmobile_cpu_is_dead(cpu))
+			return 1;
+
+		mdelay(1);
+	}
+
+	return 0;
+}
+
+
+struct smp_operations sh73a0_smp_ops __initdata = {
+	.smp_init_cpus		= sh73a0_smp_init_cpus,
+	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
+	.smp_secondary_init	= sh73a0_secondary_init,
+	.smp_boot_secondary	= sh73a0_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_kill		= sh73a0_cpu_kill,
+	.cpu_die		= shmobile_cpu_die,
+	.cpu_disable		= shmobile_cpu_disable,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 09/13] ARM: SoC: convert highbank to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (7 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 08/13] ARM: SoC: convert shmobile SMP " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 15:23   ` Rob Herring
  2012-09-12 14:58 ` [PATCH v9 10/13] ARM: SoC: convert imx6q " Arnd Bergmann
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Rob Herring, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert the highbank platform to use the SoC descriptor to provide
its SMP and CPU hotplug operations.

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-highbank/core.h     |    3 +++
 arch/arm/mach-highbank/highbank.c |    1 +
 arch/arm/mach-highbank/hotplug.c  |   16 +---------------
 arch/arm/mach-highbank/platsmp.c  |   18 ++++++++++++++----
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index 141ed51..598ee78 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -9,3 +9,6 @@ static inline void highbank_lluart_map_io(void) {}
 #endif
 
 extern void highbank_smc1(int fn, int arg);
+extern void highbank_cpu_die(unsigned int cpu);
+
+extern struct smp_operations highbank_smp_ops;
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index d75b0a7..709bd72 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -162,6 +162,7 @@ static const char *highbank_match[] __initconst = {
 };
 
 DT_MACHINE_START(HIGHBANK, "Highbank")
+	.smp		= smp_ops(highbank_smp_ops),
 	.map_io		= highbank_map_io,
 	.init_irq	= highbank_init_irq,
 	.timer		= &highbank_timer,
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
index 977cebb..1277da3 100644
--- a/arch/arm/mach-highbank/hotplug.c
+++ b/arch/arm/mach-highbank/hotplug.c
@@ -24,16 +24,11 @@
 
 extern void secondary_startup(void);
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  */
-void platform_cpu_die(unsigned int cpu)
+void highbank_cpu_die(unsigned int cpu)
 {
 	flush_cache_all();
 
@@ -45,12 +40,3 @@ void platform_cpu_die(unsigned int cpu)
 	/* We should never return from idle */
 	panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * CPU0 should not be shut down via hotplug.  cpu_idle can WFI
-	 * or a proper shutdown or hibernate should be used.
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
index d01364c..fa9560e 100644
--- a/arch/arm/mach-highbank/platsmp.c
+++ b/arch/arm/mach-highbank/platsmp.c
@@ -25,12 +25,12 @@
 
 extern void secondary_startup(void);
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit highbank_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	gic_raise_softirq(cpumask_of(cpu), 0);
 	return 0;
@@ -40,7 +40,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init highbank_smp_init_cpus(void)
 {
 	unsigned int i, ncores;
 
@@ -61,7 +61,7 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
 {
 	int i;
 
@@ -76,3 +76,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 	for (i = 1; i < max_cpus; i++)
 		highbank_set_cpu_jump(i, secondary_startup);
 }
+
+struct smp_operations highbank_smp_ops __initdata = {
+	.smp_init_cpus		= highbank_smp_init_cpus,
+	.smp_prepare_cpus	= highbank_smp_prepare_cpus,
+	.smp_secondary_init	= highbank_secondary_init,
+	.smp_boot_secondary	= highbank_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= highbank_cpu_die,
+#endif
+};
-- 
1.7.10


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

* [PATCH v9 10/13] ARM: SoC: convert imx6q to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (8 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 09/13] ARM: SoC: convert highbank " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-13  1:17   ` Shawn Guo
  2012-09-12 14:58 ` [PATCH v9 11/13] ARM: SoC: convert spear13xx " Arnd Bergmann
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Shawn Guo, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Convert the imx6q platform to use the SoC descriptor to provide
its SMP and CPU hotplug operations.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-imx/hotplug.c             |   16 +---------------
 arch/arm/mach-imx/mach-imx6q.c          |    1 +
 arch/arm/mach-imx/platsmp.c             |   18 ++++++++++++++----
 arch/arm/plat-mxc/include/mach/common.h |    4 ++++
 4 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
index f8f7437..b07b778 100644
--- a/arch/arm/mach-imx/hotplug.c
+++ b/arch/arm/mach-imx/hotplug.c
@@ -15,11 +15,6 @@
 #include <asm/cp15.h>
 #include <mach/common.h>
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 static inline void cpu_enter_lowpower(void)
 {
 	unsigned int v;
@@ -47,7 +42,7 @@ static inline void cpu_enter_lowpower(void)
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void imx_cpu_die(unsigned int cpu)
 {
 	cpu_enter_lowpower();
 	imx_enable_cpu(cpu, false);
@@ -56,12 +51,3 @@ void platform_cpu_die(unsigned int cpu)
 	while (1)
 		;
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 045b3f6..ef0b52f 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -226,6 +226,7 @@ static const char *imx6q_dt_compat[] __initdata = {
 };
 
 DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
+	.smp		= smp_ops(imx6q_soc_desc),
 	.map_io		= imx6q_map_io,
 	.init_irq	= imx6q_init_irq,
 	.handle_irq	= imx6q_handle_irq,
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index ab98c6f..2ac43e1 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -41,7 +41,7 @@ void __init imx_scu_map_io(void)
 	scu_base = IMX_IO_ADDRESS(base);
 }
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit imx_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	gic_secondary_init(0);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	imx_set_cpu_jump(cpu, v7_secondary_startup);
 	imx_enable_cpu(cpu, true);
@@ -62,7 +62,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init imx_smp_init_cpus(void)
 {
 	int i, ncores;
 
@@ -79,7 +79,17 @@ void imx_smp_prepare(void)
 	scu_enable(scu_base);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
 {
 	imx_smp_prepare();
 }
+
+struct smp_operations  imx_smp_ops __initdata = {
+	.smp_init_cpus		= imx_smp_init_cpus,
+	.smp_prepare_cpus	= imx_smp_prepare_cpus,
+	.smp_secondary_init	= imx_secondary_init,
+	.smp_boot_secondary	= imx_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= imx_cpu_die,
+#endif
+};
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 7128e97..e8b5150 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -145,6 +145,8 @@ extern void imx53_smd_common_init(void);
 extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
 extern void imx6q_clock_map_io(void);
 
+extern void imx_cpu_die(unsigned int cpu);
+
 #ifdef CONFIG_PM
 extern void imx6q_pm_init(void);
 extern void imx51_pm_init(void);
@@ -161,4 +163,6 @@ extern int mx51_neon_fixup(void);
 static inline int mx51_neon_fixup(void) { return 0; }
 #endif
 
+extern struct smp_operations imx_smp_ops;
+
 #endif
-- 
1.7.10


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

* [PATCH v9 11/13] ARM: SoC: convert spear13xx to SoC descriptor
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (9 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 10/13] ARM: SoC: convert imx6q " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-13 11:18   ` viresh kumar
  2012-09-12 14:58 ` [PATCH v9 12/13] ARM: smp: Make SoC descriptor mandatory for SMP platforms Arnd Bergmann
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Viresh Kumar,
	Shiraz Hashim, spear-devel

Convert the spear13xx platform to use the SoC descriptor to provide
its SMP and CPU hotplug operations.

Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: spear-devel@list.st.com
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-spear13xx/hotplug.c              |   20 +++-----------------
 arch/arm/mach-spear13xx/include/mach/generic.h |    3 +++
 arch/arm/mach-spear13xx/platsmp.c              |   20 +++++++++++++++-----
 arch/arm/mach-spear13xx/spear1310.c            |    1 +
 arch/arm/mach-spear13xx/spear1340.c            |    1 +
 5 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c
index 5c6867b..22e99b0 100644
--- a/arch/arm/mach-spear13xx/hotplug.c
+++ b/arch/arm/mach-spear13xx/hotplug.c
@@ -56,7 +56,7 @@ static inline void cpu_leave_lowpower(void)
 	: "cc");
 }
 
-static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
+static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious)
 {
 	for (;;) {
 		wfi();
@@ -79,17 +79,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void __cpuinit platform_cpu_die(unsigned int cpu)
+void __cpuinit spear13xx_cpu_die(unsigned int cpu)
 {
 	int spurious = 0;
 
@@ -97,7 +92,7 @@ void __cpuinit platform_cpu_die(unsigned int cpu)
 	 * we're ready for shutdown now, so do it
 	 */
 	cpu_enter_lowpower();
-	platform_do_lowpower(cpu, &spurious);
+	spear13xx_do_lowpower(cpu, &spurious);
 
 	/*
 	 * bring this CPU back into the world of cache
@@ -108,12 +103,3 @@ void __cpuinit platform_cpu_die(unsigned int cpu)
 	if (spurious)
 		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
index dac57fd0c..c33f4d9 100644
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ b/arch/arm/mach-spear13xx/include/mach/generic.h
@@ -33,6 +33,9 @@ void __init spear13xx_l2x0_init(void);
 bool dw_dma_filter(struct dma_chan *chan, void *slave);
 void spear_restart(char, const char *);
 void spear13xx_secondary_startup(void);
+void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+
+extern struct smp_operations spear13xx_smp_ops;
 
 #ifdef CONFIG_MACH_SPEAR1310
 void __init spear1310_clk_init(void);
diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c
index f5d07f2..806343c 100644
--- a/arch/arm/mach-spear13xx/platsmp.c
+++ b/arch/arm/mach-spear13xx/platsmp.c
@@ -19,6 +19,7 @@
 #include <asm/hardware/gic.h>
 #include <asm/smp_scu.h>
 #include <mach/spear.h>
+#include <mach/generic.h>
 
 /*
  * control for which core is the next to come out of the secondary
@@ -28,9 +29,8 @@ volatile int __cpuinitdata pen_release = -1;
 static DEFINE_SPINLOCK(boot_lock);
 
 static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
-extern void spear13xx_secondary_startup(void);
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit spear13xx_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -53,7 +53,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 	spin_unlock(&boot_lock);
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 
@@ -97,7 +97,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * Initialise the CPU possible map early - this describes the CPUs
  * which may be present or become present in the system.
  */
-void __init smp_init_cpus(void)
+static void __init spear13xx_smp_init_cpus(void)
 {
 	unsigned int i, ncores = scu_get_core_count(scu_base);
 
@@ -113,7 +113,7 @@ void __init smp_init_cpus(void)
 	set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
 {
 
 	scu_enable(scu_base);
@@ -125,3 +125,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 	 */
 	__raw_writel(virt_to_phys(spear13xx_secondary_startup), SYS_LOCATION);
 }
+
+struct smp_operations spear13xx_smp_ops __initdata = {
+       .smp_init_cpus		= spear13xx_smp_init_cpus,
+       .smp_prepare_cpus	= spear13xx_smp_prepare_cpus,
+       .smp_secondary_init	= spear13xx_secondary_init,
+       .smp_boot_secondary	= spear13xx_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+       .cpu_die			= spear13xx_cpu_die,
+#endif
+};
diff --git a/arch/arm/mach-spear13xx/spear1310.c b/arch/arm/mach-spear13xx/spear1310.c
index 732d29b..9fbbfc5 100644
--- a/arch/arm/mach-spear13xx/spear1310.c
+++ b/arch/arm/mach-spear13xx/spear1310.c
@@ -78,6 +78,7 @@ static void __init spear1310_map_io(void)
 }
 
 DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
+	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear1310_map_io,
 	.init_irq	=	spear13xx_dt_init_irq,
 	.handle_irq	=	gic_handle_irq,
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c
index 81e4ed7..081014f 100644
--- a/arch/arm/mach-spear13xx/spear1340.c
+++ b/arch/arm/mach-spear13xx/spear1340.c
@@ -182,6 +182,7 @@ static const char * const spear1340_dt_board_compat[] = {
 };
 
 DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree")
+	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear13xx_map_io,
 	.init_irq	=	spear13xx_dt_init_irq,
 	.handle_irq	=	gic_handle_irq,
-- 
1.7.10


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

* [PATCH v9 12/13] ARM: smp: Make SoC descriptor mandatory for SMP platforms
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (10 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 11/13] ARM: SoC: convert spear13xx " Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 14:58 ` [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions Arnd Bergmann
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Now that all SMP platforms have been converted to the SOC descriptor
and its SMP operations, remove the "weak" attribute from the hooks
in smp.c, and make the functions static wherever possible.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/include/asm/smp.h |   14 --------------
 arch/arm/kernel/smp.c      |   18 +++++++++---------
 2 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index f79a9f5..3a8cfee 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -60,15 +60,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *);
  */
 asmlinkage void secondary_start_kernel(void);
 
-/*
- * Perform platform specific initialisation of the specified CPU.
- */
-extern void platform_secondary_init(unsigned int cpu);
-
-/*
- * Initialize cpu_possible map, and enable coherency
- */
-extern void platform_smp_prepare_cpus(unsigned int);
 
 /*
  * Initial data for bringing up a secondary CPU.
@@ -81,15 +72,10 @@ struct secondary_data {
 extern struct secondary_data secondary_data;
 
 extern int __cpu_disable(void);
-extern int platform_cpu_disable(unsigned int cpu);
 
 extern void __cpu_die(unsigned int cpu);
 extern void cpu_die(void);
 
-extern void platform_cpu_die(unsigned int cpu);
-extern int platform_cpu_kill(unsigned int cpu);
-extern void platform_cpu_enable(unsigned int cpu);
-
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
 
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index d924188..ac3ce02 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -110,25 +110,25 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
 }
 
 /* platform specific SMP operations */
-void __attribute__((weak)) __init smp_init_cpus(void)
+void __init smp_init_cpus(void)
 {
 	if (smp_ops.smp_init_cpus)
 		smp_ops.smp_init_cpus();
 }
 
-void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 {
 	if (smp_ops.smp_prepare_cpus)
 		smp_ops.smp_prepare_cpus(max_cpus);
 }
 
-void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit platform_secondary_init(unsigned int cpu)
 {
 	if (smp_ops.smp_secondary_init)
 		smp_ops.smp_secondary_init(cpu);
 }
 
-int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	if (smp_ops.smp_boot_secondary)
 		return smp_ops.smp_boot_secondary(cpu, idle);
@@ -138,20 +138,20 @@ int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task
 #ifdef CONFIG_HOTPLUG_CPU
 static void percpu_timer_stop(void);
 
-int __attribute__((weak)) platform_cpu_kill(unsigned int cpu)
+static int platform_cpu_kill(unsigned int cpu)
 {
 	if (smp_ops.cpu_kill)
 		return smp_ops.cpu_kill(cpu);
 	return 1;
 }
 
-void __attribute__((weak)) platform_cpu_die(unsigned int cpu)
+static void platform_cpu_die(unsigned int cpu)
 {
 	if (smp_ops.cpu_die)
 		smp_ops.cpu_die(cpu);
 }
 
-int __attribute__((weak)) platform_cpu_disable(unsigned int cpu)
+static int platform_cpu_disable(unsigned int cpu)
 {
 	if (smp_ops.cpu_disable)
 		return smp_ops.cpu_disable(cpu);
@@ -166,7 +166,7 @@ int __attribute__((weak)) platform_cpu_disable(unsigned int cpu)
 /*
  * __cpu_disable runs on the processor to be shutdown.
  */
-int __cpu_disable(void)
+int __cpuinit __cpu_disable(void)
 {
 	unsigned int cpu = smp_processor_id();
 	int ret;
@@ -209,7 +209,7 @@ static DECLARE_COMPLETION(cpu_died);
  * called on the thread which is asking for a CPU to be shutdown -
  * waits until shutdown has completed, or it is timed out.
  */
-void __cpu_die(unsigned int cpu)
+void __cpuinit __cpu_die(unsigned int cpu)
 {
 	if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
 		pr_err("CPU%u: cpu didn't die\n", cpu);
-- 
1.7.10


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

* [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (11 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 12/13] ARM: smp: Make SoC descriptor mandatory for SMP platforms Arnd Bergmann
@ 2012-09-12 14:58 ` Arnd Bergmann
  2012-09-12 19:54   ` Nicolas Pitre
  2012-09-12 20:42 ` [PATCH v9 00/13] Per sub-architecture SMP operations Nicolas Pitre
  2012-09-13 11:11 ` Marc Zyngier
  14 siblings, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-12 14:58 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann

From: Marc Zyngier <marc.zyngier@arm.com>

Almost each SMP platform defines pen_release to manage booting secondary
CPUs. This of course clashes with the single zImage effort.

Add the pen_release definition to the ARM SMP code, and remove all others.
This should only be used by platforms which lack any kind of CPU power
management...

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/include/asm/smp.h        |    1 +
 arch/arm/kernel/smp.c             |    6 ++++++
 arch/arm/mach-exynos/hotplug.c    |    2 --
 arch/arm/mach-exynos/platsmp.c    |    7 -------
 arch/arm/mach-msm/hotplug.c       |    2 --
 arch/arm/mach-msm/platsmp.c       |    5 -----
 arch/arm/mach-realview/hotplug.c  |    2 --
 arch/arm/mach-spear13xx/hotplug.c |    2 --
 arch/arm/mach-spear13xx/platsmp.c |    5 -----
 arch/arm/mach-ux500/hotplug.c     |    2 --
 arch/arm/mach-ux500/platsmp.c     |    6 ------
 arch/arm/mach-vexpress/hotplug.c  |    2 --
 arch/arm/plat-versatile/platsmp.c |    6 ------
 13 files changed, 7 insertions(+), 41 deletions(-)

diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index 3a8cfee..2e3be16 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -70,6 +70,7 @@ struct secondary_data {
 	void *stack;
 };
 extern struct secondary_data secondary_data;
+extern volatile int pen_release;
 
 extern int __cpu_disable(void);
 
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index ac3ce02..aa4ffe6 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -51,6 +51,12 @@
  */
 struct secondary_data secondary_data;
 
+/*
+ * control for which core is the next to come out of the secondary
+ * boot "holding pen"
+ */
+volatile int __cpuinitdata pen_release = -1;
+
 enum ipi_msg_type {
 	IPI_TIMER = 2,
 	IPI_RESCHEDULE,
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index d0a5a70..f1461ce 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -23,8 +23,6 @@
 
 #include "common.h"
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
 	unsigned int v;
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 3fad8ad..8d57e42 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -40,13 +40,6 @@ extern void exynos4_secondary_startup(void);
 				S5P_INFORM5 : S5P_VA_SYSRAM)
 
 /*
- * control for which core is the next to come out of the secondary
- * boot "holding pen"
- */
-
-volatile int __cpuinitdata pen_release = -1;
-
-/*
  * Write pen_release in a way that is guaranteed to be visible to all
  * observers, irrespective of whether they're taking part in coherency
  * or not.  This is necessary for the hotplug code to work reliably.
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index d0f79e8..927a8d2 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -15,8 +15,6 @@
 
 #include "core.h"
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
 	/* Just flush the cache. Changing the coherency is not yet
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index ba3c4b0..57af32e 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -35,11 +35,6 @@
 #define GIC_PPI_EDGE_MASK 0xFFFFD7FF
 
 extern void msm_secondary_startup(void);
-/*
- * control for which core is the next to come out of the secondary
- * boot "holding pen".
- */
-volatile int pen_release = -1;
 
 static DEFINE_SPINLOCK(boot_lock);
 
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
index 81a2a58..a5a02c2 100644
--- a/arch/arm/mach-realview/hotplug.c
+++ b/arch/arm/mach-realview/hotplug.c
@@ -16,8 +16,6 @@
 #include <asm/cp15.h>
 #include <asm/smp_plat.h>
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
 	unsigned int v;
diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c
index 22e99b0..9b17e1e 100644
--- a/arch/arm/mach-spear13xx/hotplug.c
+++ b/arch/arm/mach-spear13xx/hotplug.c
@@ -17,8 +17,6 @@
 #include <asm/cp15.h>
 #include <asm/smp_plat.h>
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
 	unsigned int v;
diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c
index 806343c..2eaa3fa 100644
--- a/arch/arm/mach-spear13xx/platsmp.c
+++ b/arch/arm/mach-spear13xx/platsmp.c
@@ -21,11 +21,6 @@
 #include <mach/spear.h>
 #include <mach/generic.h>
 
-/*
- * control for which core is the next to come out of the secondary
- * boot "holding pen"
- */
-volatile int __cpuinitdata pen_release = -1;
 static DEFINE_SPINLOCK(boot_lock);
 
 static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index 17b9a15..4f6b2e1 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -17,8 +17,6 @@
 
 #include <mach/setup.h>
 
-extern volatile int pen_release;
-
 /*
  * platform-specific code to shutdown a CPU
  *
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index b6f4e0e..d60873e 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -28,12 +28,6 @@
 extern void u8500_secondary_startup(void);
 
 /*
- * control for which core is the next to come out of the secondary
- * boot "holding pen"
- */
-volatile int pen_release = -1;
-
-/*
  * Write pen_release in a way that is guaranteed to be visible to all
  * observers, irrespective of whether they're taking part in coherency
  * or not.  This is necessary for the hotplug code to work reliably.
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index e2a960f..b36a749 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -16,8 +16,6 @@
 #include <asm/smp_plat.h>
 #include <asm/cp15.h>
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
 	unsigned int v;
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 39e60ac..04ca493 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -20,12 +20,6 @@
 #include <asm/hardware/gic.h>
 
 /*
- * control for which core is the next to come out of the secondary
- * boot "holding pen"
- */
-volatile int __cpuinitdata pen_release = -1;
-
-/*
  * Write pen_release in a way that is guaranteed to be visible to all
  * observers, irrespective of whether they're taking part in coherency
  * or not.  This is necessary for the hotplug code to work reliably.
-- 
1.7.10


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

* Re: [PATCH v9 09/13] ARM: SoC: convert highbank to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 09/13] ARM: SoC: convert highbank " Arnd Bergmann
@ 2012-09-12 15:23   ` Rob Herring
  0 siblings, 0 replies; 31+ messages in thread
From: Rob Herring @ 2012-09-12 15:23 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-kernel, linux-arm-kernel

On 09/12/2012 09:58 AM, Arnd Bergmann wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert the highbank platform to use the SoC descriptor to provide
> its SMP and CPU hotplug operations.
> 
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Thanks for picking this up.

Acked-by: Rob Herring <rob.herring@calxeda.com>

Rob

>  arch/arm/mach-highbank/core.h     |    3 +++
>  arch/arm/mach-highbank/highbank.c |    1 +
>  arch/arm/mach-highbank/hotplug.c  |   16 +---------------
>  arch/arm/mach-highbank/platsmp.c  |   18 ++++++++++++++----
>  4 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
> index 141ed51..598ee78 100644
> --- a/arch/arm/mach-highbank/core.h
> +++ b/arch/arm/mach-highbank/core.h
> @@ -9,3 +9,6 @@ static inline void highbank_lluart_map_io(void) {}
>  #endif
>  
>  extern void highbank_smc1(int fn, int arg);
> +extern void highbank_cpu_die(unsigned int cpu);
> +
> +extern struct smp_operations highbank_smp_ops;
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index d75b0a7..709bd72 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -162,6 +162,7 @@ static const char *highbank_match[] __initconst = {
>  };
>  
>  DT_MACHINE_START(HIGHBANK, "Highbank")
> +	.smp		= smp_ops(highbank_smp_ops),
>  	.map_io		= highbank_map_io,
>  	.init_irq	= highbank_init_irq,
>  	.timer		= &highbank_timer,
> diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
> index 977cebb..1277da3 100644
> --- a/arch/arm/mach-highbank/hotplug.c
> +++ b/arch/arm/mach-highbank/hotplug.c
> @@ -24,16 +24,11 @@
>  
>  extern void secondary_startup(void);
>  
> -int platform_cpu_kill(unsigned int cpu)
> -{
> -	return 1;
> -}
> -
>  /*
>   * platform-specific code to shutdown a CPU
>   *
>   */
> -void platform_cpu_die(unsigned int cpu)
> +void highbank_cpu_die(unsigned int cpu)
>  {
>  	flush_cache_all();
>  
> @@ -45,12 +40,3 @@ void platform_cpu_die(unsigned int cpu)
>  	/* We should never return from idle */
>  	panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
>  }
> -
> -int platform_cpu_disable(unsigned int cpu)
> -{
> -	/*
> -	 * CPU0 should not be shut down via hotplug.  cpu_idle can WFI
> -	 * or a proper shutdown or hibernate should be used.
> -	 */
> -	return cpu == 0 ? -EPERM : 0;
> -}
> diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
> index d01364c..fa9560e 100644
> --- a/arch/arm/mach-highbank/platsmp.c
> +++ b/arch/arm/mach-highbank/platsmp.c
> @@ -25,12 +25,12 @@
>  
>  extern void secondary_startup(void);
>  
> -void __cpuinit platform_secondary_init(unsigned int cpu)
> +static void __cpuinit highbank_secondary_init(unsigned int cpu)
>  {
>  	gic_secondary_init(0);
>  }
>  
> -int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
> +static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  {
>  	gic_raise_softirq(cpumask_of(cpu), 0);
>  	return 0;
> @@ -40,7 +40,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>   * Initialise the CPU possible map early - this describes the CPUs
>   * which may be present or become present in the system.
>   */
> -void __init smp_init_cpus(void)
> +static void __init highbank_smp_init_cpus(void)
>  {
>  	unsigned int i, ncores;
>  
> @@ -61,7 +61,7 @@ void __init smp_init_cpus(void)
>  	set_smp_cross_call(gic_raise_softirq);
>  }
>  
> -void __init platform_smp_prepare_cpus(unsigned int max_cpus)
> +static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
>  {
>  	int i;
>  
> @@ -76,3 +76,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
>  	for (i = 1; i < max_cpus; i++)
>  		highbank_set_cpu_jump(i, secondary_startup);
>  }
> +
> +struct smp_operations highbank_smp_ops __initdata = {
> +	.smp_init_cpus		= highbank_smp_init_cpus,
> +	.smp_prepare_cpus	= highbank_smp_prepare_cpus,
> +	.smp_secondary_init	= highbank_secondary_init,
> +	.smp_boot_secondary	= highbank_boot_secondary,
> +#ifdef CONFIG_HOTPLUG_CPU
> +	.cpu_die		= highbank_cpu_die,
> +#endif
> +};
> 


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

* Re: [PATCH v9 06/13] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 06/13] ARM: SoC: convert MSM SMP " Arnd Bergmann
@ 2012-09-12 16:26   ` David Brown
  2012-09-12 20:32     ` Stephen Boyd
  2012-09-12 23:01   ` [PATCH 1/2] " David Brown
  1 sibling, 1 reply; 31+ messages in thread
From: David Brown @ 2012-09-12 16:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel

On Wed, Sep 12, 2012 at 04:58:19PM +0200, Arnd Bergmann wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert MSM SMP platforms to use the SoC descriptor to provide
> their SMP and CPU hotplug operations.
> 
> Cc: David Brown <davidb@codeaurora.org>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-msm/board-msm8960.c |    3 +++
>  arch/arm/mach-msm/board-msm8x60.c |    7 +++++++

Stephen Boyd recently sent out a patch series that remove the non-DT
support for these two targets, which naturally generates a bunch of
conflicts.

I'm about to send out a pull request including these changes, and
after that, I'll rework this patch for the new board files, and give
it a try.

David Brown

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* Re: Fwd: [PATCH v9 07/13] ARM: SoC: convert ux500 to SoC descriptor
       [not found]   ` <CAE2-_9o5gEpEddGLvRRA=pe=vroTnBXmGmoBO1Ojos-hOJXQAQ@mail.gmail.com>
@ 2012-09-12 16:30     ` Srinidhi Kasagar
  0 siblings, 0 replies; 31+ messages in thread
From: Srinidhi Kasagar @ 2012-09-12 16:30 UTC (permalink / raw)
  To: marc.zyngier; +Cc: arnd, linux-kernel, linux-arm-kernel, linus.walleij

[...]

> 
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert ux500 platforms to use the SoC descriptor to provide
> their SMP and CPU hotplug operations.
> 
> Cc: Linus Walleij <linus.walleij@stericsson.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ux500/board-mop500.c       |    4 ++++
>  arch/arm/mach-ux500/hotplug.c            |   36 ++++++++----------------------
>  arch/arm/mach-ux500/include/mach/setup.h |    3 +++
>  arch/arm/mach-ux500/platsmp.c            |   18 +++++++++++----
>  4 files changed, 30 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
> index a534d88..1c6f74b 100644
> --- a/arch/arm/mach-ux500/board-mop500.c
> +++ b/arch/arm/mach-ux500/board-mop500.c
> @@ -694,6 +694,7 @@ static void __init hrefv60_init_machine(void)
>  MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
>         /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
>         .atag_offset    = 0x100,
> +       .smp            = smp_ops(ux500_smp_ops),
>         .map_io         = u8500_map_io,
>         .init_irq       = ux500_init_irq,
>         /* we re-use nomadik timer here */
> @@ -705,6 +706,7 @@ MACHINE_END

This looks like mips way doing smp operations.

I have not tested the patch series, will do later.

Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>

/srinidhi

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

* Re: [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions
  2012-09-12 14:58 ` [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions Arnd Bergmann
@ 2012-09-12 19:54   ` Nicolas Pitre
  0 siblings, 0 replies; 31+ messages in thread
From: Nicolas Pitre @ 2012-09-12 19:54 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel

On Wed, 12 Sep 2012, Arnd Bergmann wrote:

> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Almost each SMP platform defines pen_release to manage booting secondary
> CPUs. This of course clashes with the single zImage effort.
> 
> Add the pen_release definition to the ARM SMP code, and remove all others.
> This should only be used by platforms which lack any kind of CPU power
> management...
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/include/asm/smp.h        |    1 +
>  arch/arm/kernel/smp.c             |    6 ++++++
>  arch/arm/mach-exynos/hotplug.c    |    2 --
>  arch/arm/mach-exynos/platsmp.c    |    7 -------
>  arch/arm/mach-msm/hotplug.c       |    2 --
>  arch/arm/mach-msm/platsmp.c       |    5 -----
>  arch/arm/mach-realview/hotplug.c  |    2 --
>  arch/arm/mach-spear13xx/hotplug.c |    2 --
>  arch/arm/mach-spear13xx/platsmp.c |    5 -----
>  arch/arm/mach-ux500/hotplug.c     |    2 --
>  arch/arm/mach-ux500/platsmp.c     |    6 ------
>  arch/arm/mach-vexpress/hotplug.c  |    2 --
>  arch/arm/plat-versatile/platsmp.c |    6 ------
>  13 files changed, 7 insertions(+), 41 deletions(-)
> 
> diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
> index 3a8cfee..2e3be16 100644
> --- a/arch/arm/include/asm/smp.h
> +++ b/arch/arm/include/asm/smp.h
> @@ -70,6 +70,7 @@ struct secondary_data {
>  	void *stack;
>  };
>  extern struct secondary_data secondary_data;
> +extern volatile int pen_release;
>  
>  extern int __cpu_disable(void);
>  
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index ac3ce02..aa4ffe6 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -51,6 +51,12 @@
>   */
>  struct secondary_data secondary_data;
>  
> +/*
> + * control for which core is the next to come out of the secondary
> + * boot "holding pen"
> + */
> +volatile int __cpuinitdata pen_release = -1;
> +
>  enum ipi_msg_type {
>  	IPI_TIMER = 2,
>  	IPI_RESCHEDULE,
> diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
> index d0a5a70..f1461ce 100644
> --- a/arch/arm/mach-exynos/hotplug.c
> +++ b/arch/arm/mach-exynos/hotplug.c
> @@ -23,8 +23,6 @@
>  
>  #include "common.h"
>  
> -extern volatile int pen_release;
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	unsigned int v;
> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
> index 3fad8ad..8d57e42 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -40,13 +40,6 @@ extern void exynos4_secondary_startup(void);
>  				S5P_INFORM5 : S5P_VA_SYSRAM)
>  
>  /*
> - * control for which core is the next to come out of the secondary
> - * boot "holding pen"
> - */
> -
> -volatile int __cpuinitdata pen_release = -1;
> -
> -/*
>   * Write pen_release in a way that is guaranteed to be visible to all
>   * observers, irrespective of whether they're taking part in coherency
>   * or not.  This is necessary for the hotplug code to work reliably.
> diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
> index d0f79e8..927a8d2 100644
> --- a/arch/arm/mach-msm/hotplug.c
> +++ b/arch/arm/mach-msm/hotplug.c
> @@ -15,8 +15,6 @@
>  
>  #include "core.h"
>  
> -extern volatile int pen_release;
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	/* Just flush the cache. Changing the coherency is not yet
> diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
> index ba3c4b0..57af32e 100644
> --- a/arch/arm/mach-msm/platsmp.c
> +++ b/arch/arm/mach-msm/platsmp.c
> @@ -35,11 +35,6 @@
>  #define GIC_PPI_EDGE_MASK 0xFFFFD7FF
>  
>  extern void msm_secondary_startup(void);
> -/*
> - * control for which core is the next to come out of the secondary
> - * boot "holding pen".
> - */
> -volatile int pen_release = -1;
>  
>  static DEFINE_SPINLOCK(boot_lock);
>  
> diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
> index 81a2a58..a5a02c2 100644
> --- a/arch/arm/mach-realview/hotplug.c
> +++ b/arch/arm/mach-realview/hotplug.c
> @@ -16,8 +16,6 @@
>  #include <asm/cp15.h>
>  #include <asm/smp_plat.h>
>  
> -extern volatile int pen_release;
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	unsigned int v;
> diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c
> index 22e99b0..9b17e1e 100644
> --- a/arch/arm/mach-spear13xx/hotplug.c
> +++ b/arch/arm/mach-spear13xx/hotplug.c
> @@ -17,8 +17,6 @@
>  #include <asm/cp15.h>
>  #include <asm/smp_plat.h>
>  
> -extern volatile int pen_release;
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	unsigned int v;
> diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c
> index 806343c..2eaa3fa 100644
> --- a/arch/arm/mach-spear13xx/platsmp.c
> +++ b/arch/arm/mach-spear13xx/platsmp.c
> @@ -21,11 +21,6 @@
>  #include <mach/spear.h>
>  #include <mach/generic.h>
>  
> -/*
> - * control for which core is the next to come out of the secondary
> - * boot "holding pen"
> - */
> -volatile int __cpuinitdata pen_release = -1;
>  static DEFINE_SPINLOCK(boot_lock);
>  
>  static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
> diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
> index 17b9a15..4f6b2e1 100644
> --- a/arch/arm/mach-ux500/hotplug.c
> +++ b/arch/arm/mach-ux500/hotplug.c
> @@ -17,8 +17,6 @@
>  
>  #include <mach/setup.h>
>  
> -extern volatile int pen_release;
> -
>  /*
>   * platform-specific code to shutdown a CPU
>   *
> diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
> index b6f4e0e..d60873e 100644
> --- a/arch/arm/mach-ux500/platsmp.c
> +++ b/arch/arm/mach-ux500/platsmp.c
> @@ -28,12 +28,6 @@
>  extern void u8500_secondary_startup(void);
>  
>  /*
> - * control for which core is the next to come out of the secondary
> - * boot "holding pen"
> - */
> -volatile int pen_release = -1;
> -
> -/*
>   * Write pen_release in a way that is guaranteed to be visible to all
>   * observers, irrespective of whether they're taking part in coherency
>   * or not.  This is necessary for the hotplug code to work reliably.
> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> index e2a960f..b36a749 100644
> --- a/arch/arm/mach-vexpress/hotplug.c
> +++ b/arch/arm/mach-vexpress/hotplug.c
> @@ -16,8 +16,6 @@
>  #include <asm/smp_plat.h>
>  #include <asm/cp15.h>
>  
> -extern volatile int pen_release;
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	unsigned int v;
> diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
> index 39e60ac..04ca493 100644
> --- a/arch/arm/plat-versatile/platsmp.c
> +++ b/arch/arm/plat-versatile/platsmp.c
> @@ -20,12 +20,6 @@
>  #include <asm/hardware/gic.h>
>  
>  /*
> - * control for which core is the next to come out of the secondary
> - * boot "holding pen"
> - */
> -volatile int __cpuinitdata pen_release = -1;
> -
> -/*
>   * Write pen_release in a way that is guaranteed to be visible to all
>   * observers, irrespective of whether they're taking part in coherency
>   * or not.  This is necessary for the hotplug code to work reliably.
> -- 
> 1.7.10
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

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

* Re: [PATCH v9 06/13] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-12 16:26   ` David Brown
@ 2012-09-12 20:32     ` Stephen Boyd
  0 siblings, 0 replies; 31+ messages in thread
From: Stephen Boyd @ 2012-09-12 20:32 UTC (permalink / raw)
  To: David Brown; +Cc: Arnd Bergmann, Marc Zyngier, linux-kernel, linux-arm-kernel

On 09/12/12 09:26, David Brown wrote:
> On Wed, Sep 12, 2012 at 04:58:19PM +0200, Arnd Bergmann wrote:
>> From: Marc Zyngier <marc.zyngier@arm.com>
>>
>> Convert MSM SMP platforms to use the SoC descriptor to provide
>> their SMP and CPU hotplug operations.
>>
>> Cc: David Brown <davidb@codeaurora.org>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  arch/arm/mach-msm/board-msm8960.c |    3 +++
>>  arch/arm/mach-msm/board-msm8x60.c |    7 +++++++
> Stephen Boyd recently sent out a patch series that remove the non-DT
> support for these two targets, which naturally generates a bunch of
> conflicts.
>
> I'm about to send out a pull request including these changes, and
> after that, I'll rework this patch for the new board files, and give
> it a try.

It would also be nice if you used the common.h file instead of adding a
core.h. common.h is a new file in the patch series you mention.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


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

* Re: [PATCH v9 00/13] Per sub-architecture SMP operations
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (12 preceding siblings ...)
  2012-09-12 14:58 ` [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions Arnd Bergmann
@ 2012-09-12 20:42 ` Nicolas Pitre
  2012-09-13 11:11 ` Marc Zyngier
  14 siblings, 0 replies; 31+ messages in thread
From: Nicolas Pitre @ 2012-09-12 20:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, Colin Cross,
	David Brown, Kukjin Kim, Linus Walleij, Magnus Damm, Paul Mundt,
	Rob Herring, Shawn Guo, Shiraz Hashim, Viresh Kumar, spear-devel

On Wed, 12 Sep 2012, Arnd Bergmann wrote:

> As I promised at the ARM mini summit, I've updated Marc's series
> for smp operations according to my complaints. Unfortunately,
> I could not find version 7 of the patches when I started this,
> so I based my work on version 6 and had to redo the same
> changes.
> 
> The patches are also available on
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git testing/smp_ops

There are still minor details nagging me, although I did mention them in 
my previous review of this series.  You might have disagreed if I 
remember correctly.  They aren't fundamental, and my insisting on them 
would only be bikeshedding at this point. Therefore you can add my ACK.

Acked-by: Nicolas Pitre <nico@linaro.org>


Nicolas

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

* [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 06/13] ARM: SoC: convert MSM SMP " Arnd Bergmann
  2012-09-12 16:26   ` David Brown
@ 2012-09-12 23:01   ` David Brown
  2012-09-12 23:01     ` [PATCH 2/2] ARM: msm: Move core.h contents into common.h David Brown
  2012-09-13  8:47     ` [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor Arnd Bergmann
  1 sibling, 2 replies; 31+ messages in thread
From: David Brown @ 2012-09-12 23:01 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, linux-kernel, David Brown, Arnd Bergmann,
	linux-arm-msm

From: Marc Zyngier <marc.zyngier@arm.com>

Convert MSM SMP platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This is an adaptation of this change on top of the msm-for-3.7 tree I
recently sent out a pull request for.  The only real change is to
resolve the conflicts with the simplified board files.

 arch/arm/mach-msm/board-dt-8660.c |  2 ++
 arch/arm/mach-msm/board-dt-8960.c |  2 ++
 arch/arm/mach-msm/core.h          |  2 ++
 arch/arm/mach-msm/hotplug.c       | 18 +++---------------
 arch/arm/mach-msm/platsmp.c       | 19 +++++++++++++++----
 5 files changed, 24 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/mach-msm/core.h

diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index f77f57f..e5643f6 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -20,6 +20,7 @@
 
 #include <mach/board.h>
 #include "common.h"
+#include "core.h"
 
 static const struct of_device_id msm_dt_gic_match[] __initconst = {
 	{ .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
@@ -53,6 +54,7 @@ static const char *msm8x60_fluid_match[] __initdata = {
 };
 
 DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
+	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8x60_io,
 	.init_irq = msm8x60_init_irq,
 	.handle_irq = gic_handle_irq,
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 8df99b8..139d61b 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -18,6 +18,7 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
+#include "core.h"
 
 static const struct of_device_id msm_dt_gic_match[] __initconst = {
 	{ .compatible = "qcom,msm-qgic2", .data = gic_of_init },
@@ -40,6 +41,7 @@ static const char * const msm8960_dt_match[] __initconst = {
 };
 
 DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
+	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8960_io,
 	.init_irq = msm_dt_init_irq,
 	.timer = &msm_dt_timer,
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h
new file mode 100644
index 0000000..a9bab53
--- /dev/null
+++ b/arch/arm/mach-msm/core.h
@@ -0,0 +1,2 @@
+extern struct smp_operations msm_smp_ops;
+extern void msm_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index a446fc1..d0f79e8 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -13,6 +13,8 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
+#include "core.h"
+
 extern volatile int pen_release;
 
 static inline void cpu_enter_lowpower(void)
@@ -57,17 +59,12 @@ static inline void platform_do_lowpower(unsigned int cpu)
 	}
 }
 
-int platform_cpu_kill(unsigned int cpu)
-{
-	return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void msm_cpu_die(unsigned int cpu)
 {
 	/*
 	 * we're ready for shutdown now, so do it
@@ -81,12 +78,3 @@ void platform_cpu_die(unsigned int cpu)
 	 */
 	cpu_leave_lowpower();
 }
-
-int platform_cpu_disable(unsigned int cpu)
-{
-	/*
-	 * we don't allow CPU 0 to be shutdown (it is still too special
-	 * e.g. clock tick interrupts)
-	 */
-	return cpu == 0 ? -EPERM : 0;
-}
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index b119f99..313bd7d 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -23,6 +23,7 @@
 #include <asm/smp_plat.h>
 
 #include "scm-boot.h"
+#include "core.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
 #define SCSS_CPU1CORE_RESET 0xD80
@@ -43,7 +44,7 @@ static inline int get_core_count(void)
 	return ((read_cpuid_id() >> 4) & 3) + 1;
 }
 
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit msm_secondary_init(unsigned int cpu)
 {
 	/*
 	 * if any interrupts are already enabled for the primary
@@ -85,7 +86,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu)
 				  "address\n");
 }
 
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	unsigned long timeout;
 	static int cold_boot_done;
@@ -145,7 +146,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  * does not support the ARM SCU, so just set the possible cpu mask to
  * NR_CPUS.
  */
-void __init smp_init_cpus(void)
+static void __init msm_smp_init_cpus(void)
 {
 	unsigned int i, ncores = get_core_count();
 
@@ -161,6 +162,16 @@ void __init smp_init_cpus(void)
         set_smp_cross_call(gic_raise_softirq);
 }
 
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
 {
 }
+
+struct smp_operations msm_smp_ops __initdata = {
+	.smp_init_cpus		= msm_smp_init_cpus,
+	.smp_prepare_cpus	= msm_smp_prepare_cpus,
+	.smp_secondary_init	= msm_secondary_init,
+	.smp_boot_secondary	= msm_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+	.cpu_die		= msm_cpu_die,
+#endif
+};
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


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

* [PATCH 2/2] ARM: msm: Move core.h contents into common.h
  2012-09-12 23:01   ` [PATCH 1/2] " David Brown
@ 2012-09-12 23:01     ` David Brown
  2012-09-13  8:47     ` [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor Arnd Bergmann
  1 sibling, 0 replies; 31+ messages in thread
From: David Brown @ 2012-09-12 23:01 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: David Brown, linux-arm-kernel, linux-kernel, Arnd Bergmann,
	linux-arm-msm

No real need to have a separate core.h from the common.h file.  Fold
these two prototypes into the common header file.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
This is Stephen Boyd's suggestion to not have a separate core.h.  It
is probably best to just fold this into the previous patch.

 arch/arm/mach-msm/board-dt-8660.c | 1 -
 arch/arm/mach-msm/board-dt-8960.c | 1 -
 arch/arm/mach-msm/common.h        | 2 ++
 arch/arm/mach-msm/core.h          | 2 --
 arch/arm/mach-msm/hotplug.c       | 2 +-
 arch/arm/mach-msm/platsmp.c       | 2 +-
 6 files changed, 4 insertions(+), 6 deletions(-)
 delete mode 100644 arch/arm/mach-msm/core.h

diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index e5643f6..b5b4de2 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -20,7 +20,6 @@
 
 #include <mach/board.h>
 #include "common.h"
-#include "core.h"
 
 static const struct of_device_id msm_dt_gic_match[] __initconst = {
 	{ .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 139d61b..4490edb 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -18,7 +18,6 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
-#include "core.h"
 
 static const struct of_device_id msm_dt_gic_match[] __initconst = {
 	{ .compatible = "qcom,msm-qgic2", .data = gic_of_init },
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index d68e5d7..633a7159 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -26,5 +26,7 @@ extern void msm_map_qsd8x50_io(void);
 extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
 					  unsigned int mtype, void *caller);
 
+extern struct smp_operations msm_smp_ops;
+extern void msm_cpu_die(unsigned int cpu);
 
 #endif
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h
deleted file mode 100644
index a9bab53..0000000
--- a/arch/arm/mach-msm/core.h
+++ /dev/null
@@ -1,2 +0,0 @@
-extern struct smp_operations msm_smp_ops;
-extern void msm_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index d0f79e8..3f87911 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -13,7 +13,7 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 
-#include "core.h"
+#include "common.h"
 
 extern volatile int pen_release;
 
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 313bd7d..948f970 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -23,7 +23,7 @@
 #include <asm/smp_plat.h>
 
 #include "scm-boot.h"
-#include "core.h"
+#include "common.h"
 
 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
 #define SCSS_CPU1CORE_RESET 0xD80
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


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

* Re: [PATCH v9 10/13] ARM: SoC: convert imx6q to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 10/13] ARM: SoC: convert imx6q " Arnd Bergmann
@ 2012-09-13  1:17   ` Shawn Guo
  2012-09-13  8:44     ` Arnd Bergmann
  0 siblings, 1 reply; 31+ messages in thread
From: Shawn Guo @ 2012-09-13  1:17 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel

On Wed, Sep 12, 2012 at 04:58:23PM +0200, Arnd Bergmann wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert the imx6q platform to use the SoC descriptor to provide
> its SMP and CPU hotplug operations.
> 
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-imx/hotplug.c             |   16 +---------------
>  arch/arm/mach-imx/mach-imx6q.c          |    1 +
>  arch/arm/mach-imx/platsmp.c             |   18 ++++++++++++++----
>  arch/arm/plat-mxc/include/mach/common.h |    4 ++++
>  4 files changed, 20 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
> index f8f7437..b07b778 100644
> --- a/arch/arm/mach-imx/hotplug.c
> +++ b/arch/arm/mach-imx/hotplug.c
> @@ -15,11 +15,6 @@
>  #include <asm/cp15.h>
>  #include <mach/common.h>
>  
> -int platform_cpu_kill(unsigned int cpu)
> -{
> -	return 1;
> -}
> -
>  static inline void cpu_enter_lowpower(void)
>  {
>  	unsigned int v;
> @@ -47,7 +42,7 @@ static inline void cpu_enter_lowpower(void)
>   *
>   * Called with IRQs disabled
>   */
> -void platform_cpu_die(unsigned int cpu)
> +void imx_cpu_die(unsigned int cpu)
>  {
>  	cpu_enter_lowpower();
>  	imx_enable_cpu(cpu, false);
> @@ -56,12 +51,3 @@ void platform_cpu_die(unsigned int cpu)
>  	while (1)
>  		;
>  }
> -
> -int platform_cpu_disable(unsigned int cpu)
> -{
> -	/*
> -	 * we don't allow CPU 0 to be shutdown (it is still too special
> -	 * e.g. clock tick interrupts)
> -	 */
> -	return cpu == 0 ? -EPERM : 0;
> -}
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 045b3f6..ef0b52f 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -226,6 +226,7 @@ static const char *imx6q_dt_compat[] __initdata = {
>  };
>  
>  DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
> +	.smp		= smp_ops(imx6q_soc_desc),

s/imx6q_soc_desc/imx_smp_ops

Otherwise,

Acked-by: Shawn Guo <shawn.guo@linaro.org>

Regards,
Shawn

>  	.map_io		= imx6q_map_io,
>  	.init_irq	= imx6q_init_irq,
>  	.handle_irq	= imx6q_handle_irq,
> diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
> index ab98c6f..2ac43e1 100644
> --- a/arch/arm/mach-imx/platsmp.c
> +++ b/arch/arm/mach-imx/platsmp.c
> @@ -41,7 +41,7 @@ void __init imx_scu_map_io(void)
>  	scu_base = IMX_IO_ADDRESS(base);
>  }
>  
> -void __cpuinit platform_secondary_init(unsigned int cpu)
> +static void __cpuinit imx_secondary_init(unsigned int cpu)
>  {
>  	/*
>  	 * if any interrupts are already enabled for the primary
> @@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
>  	gic_secondary_init(0);
>  }
>  
> -int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
> +static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  {
>  	imx_set_cpu_jump(cpu, v7_secondary_startup);
>  	imx_enable_cpu(cpu, true);
> @@ -62,7 +62,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>   * Initialise the CPU possible map early - this describes the CPUs
>   * which may be present or become present in the system.
>   */
> -void __init smp_init_cpus(void)
> +static void __init imx_smp_init_cpus(void)
>  {
>  	int i, ncores;
>  
> @@ -79,7 +79,17 @@ void imx_smp_prepare(void)
>  	scu_enable(scu_base);
>  }
>  
> -void __init platform_smp_prepare_cpus(unsigned int max_cpus)
> +static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
>  {
>  	imx_smp_prepare();
>  }
> +
> +struct smp_operations  imx_smp_ops __initdata = {
> +	.smp_init_cpus		= imx_smp_init_cpus,
> +	.smp_prepare_cpus	= imx_smp_prepare_cpus,
> +	.smp_secondary_init	= imx_secondary_init,
> +	.smp_boot_secondary	= imx_boot_secondary,
> +#ifdef CONFIG_HOTPLUG_CPU
> +	.cpu_die		= imx_cpu_die,
> +#endif
> +};
> diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
> index 7128e97..e8b5150 100644
> --- a/arch/arm/plat-mxc/include/mach/common.h
> +++ b/arch/arm/plat-mxc/include/mach/common.h
> @@ -145,6 +145,8 @@ extern void imx53_smd_common_init(void);
>  extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
>  extern void imx6q_clock_map_io(void);
>  
> +extern void imx_cpu_die(unsigned int cpu);
> +
>  #ifdef CONFIG_PM
>  extern void imx6q_pm_init(void);
>  extern void imx51_pm_init(void);
> @@ -161,4 +163,6 @@ extern int mx51_neon_fixup(void);
>  static inline int mx51_neon_fixup(void) { return 0; }
>  #endif
>  
> +extern struct smp_operations imx_smp_ops;
> +
>  #endif
> -- 
> 1.7.10
> 

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

* Re: [PATCH v9 05/13] ARM: SoC: convert Exynos4 to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 05/13] ARM: SoC: convert Exynos4 " Arnd Bergmann
@ 2012-09-13  5:10   ` Kyungmin Park
  2012-09-14  4:33   ` Kukjin Kim
  1 sibling, 0 replies; 31+ messages in thread
From: Kyungmin Park @ 2012-09-13  5:10 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, Kukjin Kim

On 9/12/12, Arnd Bergmann <arnd@arndb.de> wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
>
> Convert Exynos4 to use the SoC descriptor to provide its SMP
> and CPU hotplug operations.
>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-exynos/common.h              |    5 +++++
>  arch/arm/mach-exynos/hotplug.c             |   18 +++---------------
>  arch/arm/mach-exynos/mach-armlex4210.c     |    1 +
>  arch/arm/mach-exynos/mach-exynos5-dt.c     |    1 +
>  arch/arm/mach-exynos/mach-nuri.c           |    1 +
>  arch/arm/mach-exynos/mach-origen.c         |    1 +
>  arch/arm/mach-exynos/mach-smdk4x12.c       |    2 ++
>  arch/arm/mach-exynos/mach-smdkv310.c       |    2 ++
>  arch/arm/mach-exynos/mach-universal_c210.c |    1 +
>  arch/arm/mach-exynos/platsmp.c             |   20 ++++++++++++++++----
>  10 files changed, 33 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index aed2eeb..dac146d 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -14,6 +14,7 @@
>
>  extern struct sys_timer exynos4_timer;
>
> +struct map_desc;
>  void exynos_init_io(struct map_desc *mach_desc, int size);
>  void exynos4_init_irq(void);
>  void exynos5_init_irq(void);
> @@ -59,4 +60,8 @@ void exynos4212_register_clocks(void);
>  #define exynos4212_register_clocks()
>  #endif
>
> +extern struct smp_operations exynos_smp_ops;
> +
> +extern void exynos_cpu_die(unsigned int cpu);
> +
>  #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
> diff --git a/arch/arm/mach-exynos/hotplug.c
> b/arch/arm/mach-exynos/hotplug.c
> index 9c17a0a..d0a5a70 100644
> --- a/arch/arm/mach-exynos/hotplug.c
> +++ b/arch/arm/mach-exynos/hotplug.c
> @@ -21,6 +21,8 @@
>
>  #include <mach/regs-pmu.h>
>
> +#include "common.h"
> +
>  extern volatile int pen_release;
>
>  static inline void cpu_enter_lowpower(void)
> @@ -95,17 +97,12 @@ static inline void platform_do_lowpower(unsigned int
> cpu, int *spurious)
>  	}
>  }
>
> -int platform_cpu_kill(unsigned int cpu)
> -{
> -	return 1;
> -}
> -
>  /*
>   * platform-specific code to shutdown a CPU
>   *
>   * Called with IRQs disabled
>   */
> -void platform_cpu_die(unsigned int cpu)
> +void __cpuinit exynos_cpu_die(unsigned int cpu)
>  {
>  	int spurious = 0;
>
> @@ -124,12 +121,3 @@ void platform_cpu_die(unsigned int cpu)
>  	if (spurious)
>  		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
>  }
> -
> -int platform_cpu_disable(unsigned int cpu)
> -{
> -	/*
> -	 * we don't allow CPU 0 to be shutdown (it is still too special
> -	 * e.g. clock tick interrupts)
> -	 */
> -	return cpu == 0 ? -EPERM : 0;
> -}
> diff --git a/arch/arm/mach-exynos/mach-armlex4210.c
> b/arch/arm/mach-exynos/mach-armlex4210.c
> index 5a3daa0..3f37a5e 100644
> --- a/arch/arm/mach-exynos/mach-armlex4210.c
> +++ b/arch/arm/mach-exynos/mach-armlex4210.c
> @@ -199,6 +199,7 @@ static void __init armlex4210_machine_init(void)
>  MACHINE_START(ARMLEX4210, "ARMLEX4210")
>  	/* Maintainer: Alim Akhtar <alim.akhtar@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= armlex4210_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c
> b/arch/arm/mach-exynos/mach-exynos5-dt.c
> index ef770bc..8833060 100644
> --- a/arch/arm/mach-exynos/mach-exynos5-dt.c
> +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
> @@ -79,6 +79,7 @@ static char const *exynos5250_dt_compat[] __initdata = {
>  DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
>  	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
>  	.init_irq	= exynos5_init_irq,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.map_io		= exynos5250_dt_map_io,
>  	.handle_irq	= gic_handle_irq,
>  	.init_machine	= exynos5250_dt_machine_init,
> diff --git a/arch/arm/mach-exynos/mach-nuri.c
> b/arch/arm/mach-exynos/mach-nuri.c
> index ea785fc..ffaa355 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -1383,6 +1383,7 @@ static void __init nuri_machine_init(void)
>  MACHINE_START(NURI, "NURI")
>  	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= nuri_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/mach-origen.c
> b/arch/arm/mach-exynos/mach-origen.c
> index 4e574c2..abd0e60 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -806,6 +806,7 @@ static void __init origen_machine_init(void)
>  MACHINE_START(ORIGEN, "ORIGEN")
>  	/* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= origen_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c
> b/arch/arm/mach-exynos/mach-smdk4x12.c
> index b26beb1..964693b 100644
> --- a/arch/arm/mach-exynos/mach-smdk4x12.c
> +++ b/arch/arm/mach-exynos/mach-smdk4x12.c
> @@ -370,6 +370,7 @@ static void __init smdk4x12_machine_init(void)
>  MACHINE_START(SMDK4212, "SMDK4212")
>  	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= smdk4x12_map_io,
>  	.handle_irq	= gic_handle_irq,
> @@ -383,6 +384,7 @@ MACHINE_START(SMDK4412, "SMDK4412")
>  	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
>  	/* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= smdk4x12_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/mach-smdkv310.c
> b/arch/arm/mach-exynos/mach-smdkv310.c
> index 73f2bce..69b858c 100644
> --- a/arch/arm/mach-exynos/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos/mach-smdkv310.c
> @@ -417,6 +417,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
>  	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
>  	/* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= smdkv310_map_io,
>  	.handle_irq	= gic_handle_irq,
> @@ -429,6 +430,7 @@ MACHINE_END
>  MACHINE_START(SMDKC210, "SMDKC210")
>  	/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= smdkv310_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c
> b/arch/arm/mach-exynos/mach-universal_c210.c
> index 4d1f40d..922ca0f 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -1155,6 +1155,7 @@ static void __init universal_machine_init(void)
>  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
>  	/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
>  	.atag_offset	= 0x100,
> +	.smp		= smp_ops(exynos_smp_ops),
>  	.init_irq	= exynos4_init_irq,
>  	.map_io		= universal_map_io,
>  	.handle_irq	= gic_handle_irq,
> diff --git a/arch/arm/mach-exynos/platsmp.c
> b/arch/arm/mach-exynos/platsmp.c
> index 36c3984..3fad8ad 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -32,6 +32,8 @@
>
>  #include <plat/cpu.h>
>
> +#include "common.h"
> +
>  extern void exynos4_secondary_startup(void);
>
>  #define CPU1_BOOT_REG		(samsung_rev() == EXYNOS4210_REV_1_1 ? \
> @@ -64,7 +66,7 @@ static void __iomem *scu_base_addr(void)
>
>  static DEFINE_SPINLOCK(boot_lock);
>
> -void __cpuinit platform_secondary_init(unsigned int cpu)
> +static void __cpuinit exynos_secondary_init(unsigned int cpu)
>  {
>  	/*
>  	 * if any interrupts are already enabled for the primary
> @@ -86,7 +88,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
>  	spin_unlock(&boot_lock);
>  }
>
> -int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
> +static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct
> task_struct *idle)
>  {
>  	unsigned long timeout;
>
> @@ -161,7 +163,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct
> task_struct *idle)
>   * which may be present or become present in the system.
>   */
>
> -void __init smp_init_cpus(void)
> +static void __init exynos_smp_init_cpus(void)
>  {
>  	void __iomem *scu_base = scu_base_addr();
>  	unsigned int i, ncores;
> @@ -184,7 +186,7 @@ void __init smp_init_cpus(void)
>  	set_smp_cross_call(gic_raise_softirq);
>  }
>
> -void __init platform_smp_prepare_cpus(unsigned int max_cpus)
> +static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
>  {
>  	if (!soc_is_exynos5250())
>  		scu_enable(scu_base_addr());
> @@ -198,3 +200,13 @@ void __init platform_smp_prepare_cpus(unsigned int
> max_cpus)
>  	__raw_writel(virt_to_phys(exynos4_secondary_startup),
>  			CPU1_BOOT_REG);
>  }
> +
> +struct smp_operations exynos_smp_ops __initdata = {
> +	.smp_init_cpus		= exynos_smp_init_cpus,
> +	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
> +	.smp_secondary_init	= exynos_secondary_init,
> +	.smp_boot_secondary	= exynos_boot_secondary,
> +#ifdef CONFIG_HOTPLUG_CPU
> +	.cpu_die		= exynos_cpu_die,
> +#endif
> +};
> --
> 1.7.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: [PATCH v9 10/13] ARM: SoC: convert imx6q to SoC descriptor
  2012-09-13  1:17   ` Shawn Guo
@ 2012-09-13  8:44     ` Arnd Bergmann
  0 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-13  8:44 UTC (permalink / raw)
  To: Shawn Guo; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel

On Thursday 13 September 2012, Shawn Guo wrote:
> >  
> >  DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
> > +     .smp            = smp_ops(imx6q_soc_desc),
> 
> s/imx6q_soc_desc/imx_smp_ops

Yes, just noticed this myself when testing the series together with other patches.

> Otherwise,
> 
> Acked-by: Shawn Guo <shawn.guo@linaro.org>

Thanks,

	Arnd


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

* Re: [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-12 23:01   ` [PATCH 1/2] " David Brown
  2012-09-12 23:01     ` [PATCH 2/2] ARM: msm: Move core.h contents into common.h David Brown
@ 2012-09-13  8:47     ` Arnd Bergmann
  2012-09-13 16:15       ` David Brown
  1 sibling, 1 reply; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-13  8:47 UTC (permalink / raw)
  To: David Brown; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, linux-arm-msm

On Wednesday 12 September 2012, David Brown wrote:
> 
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert MSM SMP platforms to use the SoC descriptor to provide
> their SMP and CPU hotplug operations.
> 
> Cc: David Brown <davidb@codeaurora.org>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> This is an adaptation of this change on top of the msm-for-3.7 tree I
> recently sent out a pull request for.  The only real change is to
> resolve the conflicts with the simplified board files.

Not sure what I'm supposed to do with this patch, it doesn't apply
unless I rebase all of the SMP patches on top of your msm-for-3.7 branch,
which would be rather odd.

I'll make sure the branches merge fine and then apply your patch 2/2
on top of the merge, ok?

	Arnd


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

* Re: [PATCH v9 00/13] Per sub-architecture SMP operations
  2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
                   ` (13 preceding siblings ...)
  2012-09-12 20:42 ` [PATCH v9 00/13] Per sub-architecture SMP operations Nicolas Pitre
@ 2012-09-13 11:11 ` Marc Zyngier
  14 siblings, 0 replies; 31+ messages in thread
From: Marc Zyngier @ 2012-09-13 11:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, Colin Cross, David Brown,
	Kukjin Kim, Linus Walleij, Magnus Damm, Nicolas Pitre,
	Paul Mundt, Rob Herring, Shawn Guo, Shiraz Hashim, Viresh Kumar,
	spear-devel

On 12/09/12 15:58, Arnd Bergmann wrote:
> As I promised at the ARM mini summit, I've updated Marc's series
> for smp operations according to my complaints. Unfortunately,
> I could not find version 7 of the patches when I started this,
> so I based my work on version 6 and had to redo the same
> changes.

I'm quite happy with that series. I don't have much to add (my SoB is
already all over the place), so if all platform maintainers are willing
to give their acks, let's merge the damned thing! :-)

	M.
-- 
Jazz is not dead. It just smells funny...


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

* Re: [PATCH v9 11/13] ARM: SoC: convert spear13xx to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 11/13] ARM: SoC: convert spear13xx " Arnd Bergmann
@ 2012-09-13 11:18   ` viresh kumar
  0 siblings, 0 replies; 31+ messages in thread
From: viresh kumar @ 2012-09-13 11:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, Shiraz Hashim, spear-devel

On Wed, Sep 12, 2012 at 8:28 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Convert the spear13xx platform to use the SoC descriptor to provide
> its SMP and CPU hotplug operations.
>
> Cc: Viresh Kumar <viresh.linux@gmail.com>
> Cc: Shiraz Hashim <shiraz.hashim@st.com>
> Cc: spear-devel@list.st.com
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* Re: [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-13  8:47     ` [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor Arnd Bergmann
@ 2012-09-13 16:15       ` David Brown
  2012-09-14  7:57         ` Arnd Bergmann
  0 siblings, 1 reply; 31+ messages in thread
From: David Brown @ 2012-09-13 16:15 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, linux-arm-msm

On Thu, Sep 13, 2012 at 08:47:19AM +0000, Arnd Bergmann wrote:
> On Wednesday 12 September 2012, David Brown wrote:
> > 
> > From: Marc Zyngier <marc.zyngier@arm.com>
> > 
> > Convert MSM SMP platforms to use the SoC descriptor to provide
> > their SMP and CPU hotplug operations.
> > 
> > Cc: David Brown <davidb@codeaurora.org>
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > This is an adaptation of this change on top of the msm-for-3.7 tree I
> > recently sent out a pull request for.  The only real change is to
> > resolve the conflicts with the simplified board files.
> 
> Not sure what I'm supposed to do with this patch, it doesn't apply
> unless I rebase all of the SMP patches on top of your msm-for-3.7 branch,
> which would be rather odd.
> 
> I'll make sure the branches merge fine and then apply your patch 2/2
> on top of the merge, ok?

Yeah, it shouldn't hurt anything to just wait until both get merged
in.  The patch was mostly a heads up that your series was going to
conflict with msm changes coming in.

Olof wanted me to try and split the msm-for-3.7 into a few branches,
so I'm going to work on that this morning.  I'm not quite sure how
well it will work, since, for example, most of the cleanups are
preparing the tree for the devicetree changes.

David

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* RE: [PATCH v9 05/13] ARM: SoC: convert Exynos4 to SoC descriptor
  2012-09-12 14:58 ` [PATCH v9 05/13] ARM: SoC: convert Exynos4 " Arnd Bergmann
  2012-09-13  5:10   ` Kyungmin Park
@ 2012-09-14  4:33   ` Kukjin Kim
  1 sibling, 0 replies; 31+ messages in thread
From: Kukjin Kim @ 2012-09-14  4:33 UTC (permalink / raw)
  To: 'Arnd Bergmann', 'Marc Zyngier'
  Cc: linux-arm-kernel, linux-kernel

Arnd Bergmann wrote:
> 
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> Convert Exynos4 to use the SoC descriptor to provide its SMP
> and CPU hotplug operations.
> 
> Cc: Kukjin Kim <kgene.kim@samsung.com>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-exynos/common.h              |    5 +++++
>  arch/arm/mach-exynos/hotplug.c             |   18 +++---------------
>  arch/arm/mach-exynos/mach-armlex4210.c     |    1 +
>  arch/arm/mach-exynos/mach-exynos5-dt.c     |    1 +
>  arch/arm/mach-exynos/mach-nuri.c           |    1 +
>  arch/arm/mach-exynos/mach-origen.c         |    1 +
>  arch/arm/mach-exynos/mach-smdk4x12.c       |    2 ++
>  arch/arm/mach-exynos/mach-smdkv310.c       |    2 ++
>  arch/arm/mach-exynos/mach-universal_c210.c |    1 +
>  arch/arm/mach-exynos/platsmp.c             |   20 ++++++++++++++++----
>  10 files changed, 33 insertions(+), 19 deletions(-)


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

* Re: [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor
  2012-09-13 16:15       ` David Brown
@ 2012-09-14  7:57         ` Arnd Bergmann
  0 siblings, 0 replies; 31+ messages in thread
From: Arnd Bergmann @ 2012-09-14  7:57 UTC (permalink / raw)
  To: David Brown; +Cc: Marc Zyngier, linux-arm-kernel, linux-kernel, linux-arm-msm

On Thursday 13 September 2012, David Brown wrote:
> Olof wanted me to try and split the msm-for-3.7 into a few branches,
> so I'm going to work on that this morning.  I'm not quite sure how
> well it will work, since, for example, most of the cleanups are
> preparing the tree for the devicetree changes.

That is the common scenario. What you should do there is to have
one cleanup branch that collects all the cleanups from the other
branches, and then base each of the other branches on top of that.

	Arnd

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

end of thread, other threads:[~2012-09-14  7:57 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 14:58 [PATCH v9 00/13] Per sub-architecture SMP operations Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 01/13] ARM: SoC: add per-platform " Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 02/13] ARM: SoC: convert VExpress/RealView to SoC descriptor Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 03/13] ARM: SoC: convert OMAP4 " Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 04/13] ARM: SoC: convert Tegra " Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 05/13] ARM: SoC: convert Exynos4 " Arnd Bergmann
2012-09-13  5:10   ` Kyungmin Park
2012-09-14  4:33   ` Kukjin Kim
2012-09-12 14:58 ` [PATCH v9 06/13] ARM: SoC: convert MSM SMP " Arnd Bergmann
2012-09-12 16:26   ` David Brown
2012-09-12 20:32     ` Stephen Boyd
2012-09-12 23:01   ` [PATCH 1/2] " David Brown
2012-09-12 23:01     ` [PATCH 2/2] ARM: msm: Move core.h contents into common.h David Brown
2012-09-13  8:47     ` [PATCH 1/2] ARM: SoC: convert MSM SMP to SoC descriptor Arnd Bergmann
2012-09-13 16:15       ` David Brown
2012-09-14  7:57         ` Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 07/13] ARM: SoC: convert ux500 " Arnd Bergmann
     [not found]   ` <CAE2-_9o5gEpEddGLvRRA=pe=vroTnBXmGmoBO1Ojos-hOJXQAQ@mail.gmail.com>
2012-09-12 16:30     ` Fwd: " Srinidhi Kasagar
2012-09-12 14:58 ` [PATCH v9 08/13] ARM: SoC: convert shmobile SMP " Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 09/13] ARM: SoC: convert highbank " Arnd Bergmann
2012-09-12 15:23   ` Rob Herring
2012-09-12 14:58 ` [PATCH v9 10/13] ARM: SoC: convert imx6q " Arnd Bergmann
2012-09-13  1:17   ` Shawn Guo
2012-09-13  8:44     ` Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 11/13] ARM: SoC: convert spear13xx " Arnd Bergmann
2012-09-13 11:18   ` viresh kumar
2012-09-12 14:58 ` [PATCH v9 12/13] ARM: smp: Make SoC descriptor mandatory for SMP platforms Arnd Bergmann
2012-09-12 14:58 ` [PATCH v9 13/13] ARM: consolidate pen_release instead of having per platform definitions Arnd Bergmann
2012-09-12 19:54   ` Nicolas Pitre
2012-09-12 20:42 ` [PATCH v9 00/13] Per sub-architecture SMP operations Nicolas Pitre
2012-09-13 11:11 ` Marc Zyngier

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).