diff options
| author | Marc Zyngier <marc.zyngier@arm.com> | 2012-06-12 06:16:27 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:15:01 -0400 |
| commit | 28e8e29c616f947348cc66bea684d0035c76021a (patch) | |
| tree | e60188267452962f522f5c94ca77546257c8466a | |
| parent | ac6c7998712d55bd15aa2dd5ae85f5988c0cb526 (diff) | |
ARM: consolidate pen_release instead of having per platform definitions
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>
| -rw-r--r-- | arch/arm/include/asm/smp.h | 1 | ||||
| -rw-r--r-- | arch/arm/kernel/smp.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/platsmp.c | 7 | ||||
| -rw-r--r-- | arch/arm/mach-msm/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-msm/platsmp.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-realview/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-spear13xx/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-spear13xx/platsmp.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-vexpress/hotplug.c | 2 | ||||
| -rw-r--r-- | 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 3a8cfee26c91..2e3be16c6766 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
| @@ -70,6 +70,7 @@ struct secondary_data { | |||
| 70 | void *stack; | 70 | void *stack; |
| 71 | }; | 71 | }; |
| 72 | extern struct secondary_data secondary_data; | 72 | extern struct secondary_data secondary_data; |
| 73 | extern volatile int pen_release; | ||
| 73 | 74 | ||
| 74 | extern int __cpu_disable(void); | 75 | extern int __cpu_disable(void); |
| 75 | 76 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index ac3ce029afb8..aa4ffe6e5ecf 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
| @@ -51,6 +51,12 @@ | |||
| 51 | */ | 51 | */ |
| 52 | struct secondary_data secondary_data; | 52 | struct secondary_data secondary_data; |
| 53 | 53 | ||
| 54 | /* | ||
| 55 | * control for which core is the next to come out of the secondary | ||
| 56 | * boot "holding pen" | ||
| 57 | */ | ||
| 58 | volatile int __cpuinitdata pen_release = -1; | ||
| 59 | |||
| 54 | enum ipi_msg_type { | 60 | enum ipi_msg_type { |
| 55 | IPI_TIMER = 2, | 61 | IPI_TIMER = 2, |
| 56 | IPI_RESCHEDULE, | 62 | IPI_RESCHEDULE, |
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index edccc36dd692..f4d7dd20cdac 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | 23 | ||
| 24 | #include "common.h" | 24 | #include "common.h" |
| 25 | 25 | ||
| 26 | extern volatile int pen_release; | ||
| 27 | |||
| 28 | static inline void cpu_enter_lowpower(void) | 26 | static inline void cpu_enter_lowpower(void) |
| 29 | { | 27 | { |
| 30 | unsigned int v; | 28 | unsigned int v; |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 3fad8ad3f92c..8d57e4223bdb 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); | |||
| 40 | S5P_INFORM5 : S5P_VA_SYSRAM) | 40 | S5P_INFORM5 : S5P_VA_SYSRAM) |
| 41 | 41 | ||
| 42 | /* | 42 | /* |
| 43 | * control for which core is the next to come out of the secondary | ||
| 44 | * boot "holding pen" | ||
| 45 | */ | ||
| 46 | |||
| 47 | volatile int __cpuinitdata pen_release = -1; | ||
| 48 | |||
| 49 | /* | ||
| 50 | * Write pen_release in a way that is guaranteed to be visible to all | 43 | * Write pen_release in a way that is guaranteed to be visible to all |
| 51 | * observers, irrespective of whether they're taking part in coherency | 44 | * observers, irrespective of whether they're taking part in coherency |
| 52 | * or not. This is necessary for the hotplug code to work reliably. | 45 | * 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 fedaa25b2935..002ac1e47235 100644 --- a/arch/arm/mach-msm/hotplug.c +++ b/arch/arm/mach-msm/hotplug.c | |||
| @@ -15,8 +15,6 @@ | |||
| 15 | 15 | ||
| 16 | #include "core.h" | 16 | #include "core.h" |
| 17 | 17 | ||
| 18 | extern volatile int pen_release; | ||
| 19 | |||
| 20 | static inline void cpu_enter_lowpower(void) | 18 | static inline void cpu_enter_lowpower(void) |
| 21 | { | 19 | { |
| 22 | /* Just flush the cache. Changing the coherency is not yet | 20 | /* 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 ba3c4b0d523d..57af32ef75ed 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
| @@ -35,11 +35,6 @@ | |||
| 35 | #define GIC_PPI_EDGE_MASK 0xFFFFD7FF | 35 | #define GIC_PPI_EDGE_MASK 0xFFFFD7FF |
| 36 | 36 | ||
| 37 | extern void msm_secondary_startup(void); | 37 | extern void msm_secondary_startup(void); |
| 38 | /* | ||
| 39 | * control for which core is the next to come out of the secondary | ||
| 40 | * boot "holding pen". | ||
| 41 | */ | ||
| 42 | volatile int pen_release = -1; | ||
| 43 | 38 | ||
| 44 | static DEFINE_SPINLOCK(boot_lock); | 39 | static DEFINE_SPINLOCK(boot_lock); |
| 45 | 40 | ||
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index fef4f4495225..53818e5cd3ad 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
| @@ -16,8 +16,6 @@ | |||
| 16 | #include <asm/cp15.h> | 16 | #include <asm/cp15.h> |
| 17 | #include <asm/smp_plat.h> | 17 | #include <asm/smp_plat.h> |
| 18 | 18 | ||
| 19 | extern volatile int pen_release; | ||
| 20 | |||
| 21 | static inline void cpu_enter_lowpower(void) | 19 | static inline void cpu_enter_lowpower(void) |
| 22 | { | 20 | { |
| 23 | unsigned int v; | 21 | unsigned int v; |
diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c index 485fd4367bb1..a7d2dd11a4f2 100644 --- a/arch/arm/mach-spear13xx/hotplug.c +++ b/arch/arm/mach-spear13xx/hotplug.c | |||
| @@ -17,8 +17,6 @@ | |||
| 17 | #include <asm/cp15.h> | 17 | #include <asm/cp15.h> |
| 18 | #include <asm/smp_plat.h> | 18 | #include <asm/smp_plat.h> |
| 19 | 19 | ||
| 20 | extern volatile int pen_release; | ||
| 21 | |||
| 22 | static inline void cpu_enter_lowpower(void) | 20 | static inline void cpu_enter_lowpower(void) |
| 23 | { | 21 | { |
| 24 | unsigned int v; | 22 | unsigned int v; |
diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c index 806343c7b5d8..2eaa3fa7b432 100644 --- a/arch/arm/mach-spear13xx/platsmp.c +++ b/arch/arm/mach-spear13xx/platsmp.c | |||
| @@ -21,11 +21,6 @@ | |||
| 21 | #include <mach/spear.h> | 21 | #include <mach/spear.h> |
| 22 | #include <mach/generic.h> | 22 | #include <mach/generic.h> |
| 23 | 23 | ||
| 24 | /* | ||
| 25 | * control for which core is the next to come out of the secondary | ||
| 26 | * boot "holding pen" | ||
| 27 | */ | ||
| 28 | volatile int __cpuinitdata pen_release = -1; | ||
| 29 | static DEFINE_SPINLOCK(boot_lock); | 24 | static DEFINE_SPINLOCK(boot_lock); |
| 30 | 25 | ||
| 31 | static void __iomem *scu_base = IOMEM(VA_SCU_BASE); | 26 | 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 b8e4d9ed62d8..2f6af259015d 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
| @@ -17,8 +17,6 @@ | |||
| 17 | 17 | ||
| 18 | #include <mach/setup.h> | 18 | #include <mach/setup.h> |
| 19 | 19 | ||
| 20 | extern volatile int pen_release; | ||
| 21 | |||
| 22 | /* | 20 | /* |
| 23 | * platform-specific code to shutdown a CPU | 21 | * platform-specific code to shutdown a CPU |
| 24 | * | 22 | * |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index b6f4e0e787ec..d60873ee38bf 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
| @@ -28,12 +28,6 @@ | |||
| 28 | extern void u8500_secondary_startup(void); | 28 | extern void u8500_secondary_startup(void); |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * control for which core is the next to come out of the secondary | ||
| 32 | * boot "holding pen" | ||
| 33 | */ | ||
| 34 | volatile int pen_release = -1; | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Write pen_release in a way that is guaranteed to be visible to all | 31 | * Write pen_release in a way that is guaranteed to be visible to all |
| 38 | * observers, irrespective of whether they're taking part in coherency | 32 | * observers, irrespective of whether they're taking part in coherency |
| 39 | * or not. This is necessary for the hotplug code to work reliably. | 33 | * 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 734423a39e7c..a141b98d84fe 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c | |||
| @@ -16,8 +16,6 @@ | |||
| 16 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
| 17 | #include <asm/cp15.h> | 17 | #include <asm/cp15.h> |
| 18 | 18 | ||
| 19 | extern volatile int pen_release; | ||
| 20 | |||
| 21 | static inline void cpu_enter_lowpower(void) | 19 | static inline void cpu_enter_lowpower(void) |
| 22 | { | 20 | { |
| 23 | unsigned int v; | 21 | unsigned int v; |
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c index 39e60ac4fe65..04ca4937d8ca 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c | |||
| @@ -20,12 +20,6 @@ | |||
| 20 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * control for which core is the next to come out of the secondary | ||
| 24 | * boot "holding pen" | ||
| 25 | */ | ||
| 26 | volatile int __cpuinitdata pen_release = -1; | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Write pen_release in a way that is guaranteed to be visible to all | 23 | * Write pen_release in a way that is guaranteed to be visible to all |
| 30 | * observers, irrespective of whether they're taking part in coherency | 24 | * observers, irrespective of whether they're taking part in coherency |
| 31 | * or not. This is necessary for the hotplug code to work reliably. | 25 | * or not. This is necessary for the hotplug code to work reliably. |
