]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: hisi: fix building without CONFIG_HOTPLUG_CPU
authorArnd Bergmann <arnd@arndb.de>
Sat, 15 Mar 2014 10:47:14 +0000 (11:47 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 21 Mar 2014 17:22:09 +0000 (18:22 +0100)
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: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
arch/arm/mach-hisi/Makefile
arch/arm/mach-hisi/hotplug.c

index 6870058d0a48c2b09f03b7199b6989ff472229d2..2ae1b59267c23373af3c5dacd0876eec3c7d8f99 100644 (file)
@@ -3,5 +3,4 @@
 #
 
 obj-y  += hisilicon.o
-obj-$(CONFIG_SMP)              += platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU)      += hotplug.o
+obj-$(CONFIG_SMP)              += platsmp.o hotplug.o
index b909854eee7f7dff96479d520123a99cbc389c5a..abd441b0c60425a9b196a10bbcb181d4ebbaa09e 100644 (file)
@@ -178,6 +178,7 @@ static inline void cpu_enter_lowpower(void)
          : "cc");
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 void hi3xxx_cpu_die(unsigned int cpu)
 {
        cpu_enter_lowpower();
@@ -198,3 +199,4 @@ int hi3xxx_cpu_kill(unsigned int cpu)
        hi3xxx_set_cpu(cpu, false);
        return 1;
 }
+#endif