From: Soohyun Kim Date: Fri, 9 Mar 2018 03:39:01 +0000 (+0900) Subject: soc: cpupm: Fix build error. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c799464475bdd550e3c891882692c50506ccb49d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git soc: cpupm: Fix build error. 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 --- diff --git a/drivers/soc/samsung/exynos-cpupm.c b/drivers/soc/samsung/exynos-cpupm.c index eae11126dbf0..55f6721f3f92 100644 --- a/drivers/soc/samsung/exynos-cpupm.c +++ b/drivers/soc/samsung/exynos-cpupm.c @@ -20,6 +20,7 @@ #include #include +#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) {