ARM: consolidate pen_release instead of having per platform definitions
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 12 Jun 2012 10:16:27 +0000 (11:16 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Sep 2012 09:15:01 +0000 (11:15 +0200)
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>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 files changed:
arch/arm/include/asm/smp.h
arch/arm/kernel/smp.c
arch/arm/mach-exynos/hotplug.c
arch/arm/mach-exynos/platsmp.c
arch/arm/mach-msm/hotplug.c
arch/arm/mach-msm/platsmp.c
arch/arm/mach-realview/hotplug.c
arch/arm/mach-spear13xx/hotplug.c
arch/arm/mach-spear13xx/platsmp.c
arch/arm/mach-ux500/hotplug.c
arch/arm/mach-ux500/platsmp.c
arch/arm/mach-vexpress/hotplug.c
arch/arm/plat-versatile/platsmp.c

index 3a8cfee..2e3be16 100644 (file)
@@ -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);
 
index ac3ce02..aa4ffe6 100644 (file)
  */
 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,
index edccc36..f4d7dd2 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "common.h"
 
-extern volatile int pen_release;
-
 static inline void cpu_enter_lowpower(void)
 {
        unsigned int v;
index 3fad8ad..8d57e42 100644 (file)
@@ -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.
index fedaa25..002ac1e 100644 (file)
@@ -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
index ba3c4b0..57af32e 100644 (file)
 #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);
 
index fef4f44..53818e5 100644 (file)
@@ -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;
index 485fd43..a7d2dd1 100644 (file)
@@ -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;
index 806343c..2eaa3fa 100644 (file)
 #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);
index b8e4d9e..2f6af25 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <mach/setup.h>
 
-extern volatile int pen_release;
-
 /*
  * platform-specific code to shutdown a CPU
  *
index b6f4e0e..d60873e 100644 (file)
 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.
index 734423a..a141b98 100644 (file)
@@ -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;
index 39e60ac..04ca493 100644 (file)
 #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.