diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-05-23 04:31:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-05-27 19:22:49 -0400 |
commit | 4c9e0f76a55a38757390d43c40b2c7c3564a855a (patch) | |
tree | f55f938c647b400d5e8a19445aa9ee7b59b1fe2d /arch/arm/mach-hisi | |
parent | 7895f73169ade9a74940ae6b0b4ee82faf286861 (diff) |
ARM: 8370/1: hisi: fix hip04 build without HOTPLUG_CPU
The hip04 smp implementation provides the hotplug operations (cpu_die
and cpu_kill) unconditionally at the moment, which leads to a build
error when HOTPLUG_CPU is disabled:
mach-hisi/platmcpm.c:242:13: note: (near initialization for 'hip04_smp_ops')
mach-hisi/platmcpm.c:242:2: error: unknown field 'cpu_die' specified in initializer
mach-hisi/platmcpm.c:243:2: error: unknown field 'cpu_kill' specified in initializer
This uses an #ifdef to remove the code from the build when that
option is not set.
Fixes: 905cdf9dda5d ("ARM: hisi/hip04: remove the MCPM overhead")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@xxxxxxxxxx>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-hisi')
-rw-r--r-- | arch/arm/mach-hisi/platmcpm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c index 880cbfa9c343..b5f8f5ffda79 100644 --- a/arch/arm/mach-hisi/platmcpm.c +++ b/arch/arm/mach-hisi/platmcpm.c | |||
@@ -152,6 +152,7 @@ out: | |||
152 | return 0; | 152 | return 0; |
153 | } | 153 | } |
154 | 154 | ||
155 | #ifdef CONFIG_HOTPLUG_CPU | ||
155 | static void hip04_cpu_die(unsigned int l_cpu) | 156 | static void hip04_cpu_die(unsigned int l_cpu) |
156 | { | 157 | { |
157 | unsigned int mpidr, cpu, cluster; | 158 | unsigned int mpidr, cpu, cluster; |
@@ -236,11 +237,14 @@ err: | |||
236 | spin_unlock_irq(&boot_lock); | 237 | spin_unlock_irq(&boot_lock); |
237 | return 0; | 238 | return 0; |
238 | } | 239 | } |
240 | #endif | ||
239 | 241 | ||
240 | static struct smp_operations __initdata hip04_smp_ops = { | 242 | static struct smp_operations __initdata hip04_smp_ops = { |
241 | .smp_boot_secondary = hip04_boot_secondary, | 243 | .smp_boot_secondary = hip04_boot_secondary, |
244 | #ifdef CONFIG_HOTPLUG_CPU | ||
242 | .cpu_die = hip04_cpu_die, | 245 | .cpu_die = hip04_cpu_die, |
243 | .cpu_kill = hip04_cpu_kill, | 246 | .cpu_kill = hip04_cpu_kill, |
247 | #endif | ||
244 | }; | 248 | }; |
245 | 249 | ||
246 | static bool __init hip04_cpu_table_init(void) | 250 | static bool __init hip04_cpu_table_init(void) |