Commit 1d858f31 authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: hisi: fix building without CONFIG_HOTPLUG_CPU

The hisi SMP code always uses the hi3xxx_set_cpu() function
defined in the hotplug.c file, so we cannot build without
this when CONFIG_SMP is enabled. This patch slightly restructures
the code so we always build the parts of hotplug.c that we need
but just leave out the CPU disable logic if CONFIG_HOTPLUG_CPU
is turned off.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
parent 67e108c5
...@@ -3,5 +3,4 @@ ...@@ -3,5 +3,4 @@
# #
obj-y += hisilicon.o obj-y += hisilicon.o
obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_SMP) += platsmp.o hotplug.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
...@@ -178,6 +178,7 @@ static inline void cpu_enter_lowpower(void) ...@@ -178,6 +178,7 @@ static inline void cpu_enter_lowpower(void)
: "cc"); : "cc");
} }
#ifdef CONFIG_HOTPLUG_CPU
void hi3xxx_cpu_die(unsigned int cpu) void hi3xxx_cpu_die(unsigned int cpu)
{ {
cpu_enter_lowpower(); cpu_enter_lowpower();
...@@ -198,3 +199,4 @@ int hi3xxx_cpu_kill(unsigned int cpu) ...@@ -198,3 +199,4 @@ int hi3xxx_cpu_kill(unsigned int cpu)
hi3xxx_set_cpu(cpu, false); hi3xxx_set_cpu(cpu, false);
return 1; return 1;
} }
#endif
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