soc: cpupm: Fix build error.
authorSoohyun Kim <soohyuni.kim@samsung.com>
Fri, 9 Mar 2018 03:39:01 +0000 (12:39 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:30:36 +0000 (17:30 +0900)
Build error occured when CONFIG_CPU_IDLE is disabled.
So, distinguish the build area use by config.

Change-Id: Id0c30d53813b29b4899665ceca3ac9fbd662eda2
Signed-off-by: Soohyun Kim <soohyuni.kim@samsung.com>
drivers/soc/samsung/exynos-cpupm.c

index eae11126dbf0081055ed51f6f89e9168a62e6747..55f6721f3f927df9a24afe98001059f7cfafa96b 100644 (file)
@@ -20,6 +20,7 @@
 #include <soc/samsung/cal-if.h>
 #include <soc/samsung/exynos-pmu.h>
 
+#ifdef CONFIG_CPU_IDLE
 /******************************************************************************
  *                                  IDLE_IP                                   *
  ******************************************************************************/
@@ -256,6 +257,7 @@ static void __init idle_ip_init(void)
 
        idle_ip_max_index -= count;
 }
+#endif
 
 /******************************************************************************
  *                                CAL interfaces                              *
@@ -288,6 +290,37 @@ static void cluster_disable(unsigned int cluster_id)
        cal_cluster_disable(cluster_id);
 }
 
+/******************************************************************************
+ *                               CPU HOTPLUG                                  *
+ ******************************************************************************/
+static int cpuhp_cpupm_online(unsigned int cpu)
+{
+       struct cpumask mask;
+
+       cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
+       if (cpumask_weight(&mask) == 0)
+               cluster_enable(cpu);
+
+       cpu_enable(cpu);
+
+       return 0;
+}
+
+static int cpuhp_cpupm_offline(unsigned int cpu)
+{
+       struct cpumask mask;
+
+       cpu_disable(cpu);
+
+       cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
+       if (cpumask_weight(&mask) == 0)
+               cluster_disable(cpu);
+
+       return 0;
+}
+
+#ifdef CONFIG_CPU_IDLE
+
 /******************************************************************************
  *                            CPU idle management                             *
  ******************************************************************************/
@@ -641,35 +674,6 @@ void exynos_cpu_pm_exit(int cpu, int cancel)
        spin_unlock(&cpupm_lock);
 }
 
-/******************************************************************************
- *                               CPU HOTPLUG                                  *
- ******************************************************************************/
-static int cpuhp_cpupm_online(unsigned int cpu)
-{
-       struct cpumask mask;
-
-       cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
-       if (cpumask_weight(&mask) == 0)
-               cluster_enable(cpu);
-
-       cpu_enable(cpu);
-
-       return 0;
-}
-
-static int cpuhp_cpupm_offline(unsigned int cpu)
-{
-       struct cpumask mask;
-
-       cpu_disable(cpu);
-
-       cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
-       if (cpumask_weight(&mask) == 0)
-               cluster_disable(cpu);
-
-       return 0;
-}
-
 /******************************************************************************
  *                                Initialization                              *
  ******************************************************************************/
@@ -748,6 +752,7 @@ static int __init exynos_cpupm_init(void)
        return 0;
 }
 arch_initcall(exynos_cpupm_init);
+#endif
 
 static int __init exynos_cpupm_early_init(void)
 {