diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-09-08 08:15:22 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:15:00 -0400 |
commit | 2d8b21d95f44989e09fd9b36ca9f061ad5bc567e (patch) | |
tree | a869e842cea511480f5cd8ecdedb109aa8c16072 /arch/arm/mach-spear13xx/hotplug.c | |
parent | e4f2d97920f2256e5af035281e8ac35030493bf8 (diff) |
ARM: SoC: convert spear13xx to SMP operations
Convert the spear13xx platform to use struct smp_operations to provide
its SMP and CPU hotplug operations.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: spear-devel@list.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-spear13xx/hotplug.c')
-rw-r--r-- | arch/arm/mach-spear13xx/hotplug.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c index 5c6867b46d09..485fd4367bb1 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) | |||
56 | : "cc"); | 56 | : "cc"); |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | 59 | static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious) |
60 | { | 60 | { |
61 | for (;;) { | 61 | for (;;) { |
62 | wfi(); | 62 | wfi(); |
@@ -79,17 +79,12 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | int platform_cpu_kill(unsigned int cpu) | ||
83 | { | ||
84 | return 1; | ||
85 | } | ||
86 | |||
87 | /* | 82 | /* |
88 | * platform-specific code to shutdown a CPU | 83 | * platform-specific code to shutdown a CPU |
89 | * | 84 | * |
90 | * Called with IRQs disabled | 85 | * Called with IRQs disabled |
91 | */ | 86 | */ |
92 | void __cpuinit platform_cpu_die(unsigned int cpu) | 87 | void __ref spear13xx_cpu_die(unsigned int cpu) |
93 | { | 88 | { |
94 | int spurious = 0; | 89 | int spurious = 0; |
95 | 90 | ||
@@ -97,7 +92,7 @@ void __cpuinit platform_cpu_die(unsigned int cpu) | |||
97 | * we're ready for shutdown now, so do it | 92 | * we're ready for shutdown now, so do it |
98 | */ | 93 | */ |
99 | cpu_enter_lowpower(); | 94 | cpu_enter_lowpower(); |
100 | platform_do_lowpower(cpu, &spurious); | 95 | spear13xx_do_lowpower(cpu, &spurious); |
101 | 96 | ||
102 | /* | 97 | /* |
103 | * bring this CPU back into the world of cache | 98 | * bring this CPU back into the world of cache |
@@ -108,12 +103,3 @@ void __cpuinit platform_cpu_die(unsigned int cpu) | |||
108 | if (spurious) | 103 | if (spurious) |
109 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); | 104 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); |
110 | } | 105 | } |
111 | |||
112 | int platform_cpu_disable(unsigned int cpu) | ||
113 | { | ||
114 | /* | ||
115 | * we don't allow CPU 0 to be shutdown (it is still too special | ||
116 | * e.g. clock tick interrupts) | ||
117 | */ | ||
118 | return cpu == 0 ? -EPERM : 0; | ||
119 | } | ||