Commit 4c9e0f76 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Russell King

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: 905cdf9d ("ARM: hisi/hip04: remove the MCPM overhead")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarNicolas Pitre <nico@xxxxxxxxxx>
Acked-by: default avatarWei Xu <xuwei5@hisilicon.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7895f731
...@@ -152,6 +152,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle) ...@@ -152,6 +152,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle)
return 0; return 0;
} }
#ifdef CONFIG_HOTPLUG_CPU
static void hip04_cpu_die(unsigned int l_cpu) static void hip04_cpu_die(unsigned int l_cpu)
{ {
unsigned int mpidr, cpu, cluster; unsigned int mpidr, cpu, cluster;
...@@ -236,11 +237,14 @@ static int hip04_cpu_kill(unsigned int l_cpu) ...@@ -236,11 +237,14 @@ static int hip04_cpu_kill(unsigned int l_cpu)
spin_unlock_irq(&boot_lock); spin_unlock_irq(&boot_lock);
return 0; return 0;
} }
#endif
static struct smp_operations __initdata hip04_smp_ops = { static struct smp_operations __initdata hip04_smp_ops = {
.smp_boot_secondary = hip04_boot_secondary, .smp_boot_secondary = hip04_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = hip04_cpu_die, .cpu_die = hip04_cpu_die,
.cpu_kill = hip04_cpu_kill, .cpu_kill = hip04_cpu_kill,
#endif
}; };
static bool __init hip04_cpu_table_init(void) static bool __init hip04_cpu_table_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment