[HACK] soc: samsung: Fixed cluster id when hotplug in/out.
authorJang JeongHoon <jnghn.jang@samsung.com>
Wed, 23 May 2018 08:19:16 +0000 (17:19 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:11 +0000 (20:22 +0300)
Change-Id: Id54965dfe864946f89a5b27f82d88dc03fa9edd7
Signed-off-by: Jang JeongHoon <jnghn.jang@samsung.com>
drivers/soc/samsung/exynos-cpupm.c

index f1f7c98112f60542daf9ea0b9e198a01ca46391a..9f95823674f8a368023a602010ca3f2998fb3411 100644 (file)
@@ -74,7 +74,9 @@ static int check_idle_ip(int reg_index)
                 *--------------------------- (XOR)
                 *            0 0 0 0 0 1 0 0
                 */
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
                cpuidle_profile_idle_ip(reg_index, ((val & ~mask) ^ ~mask));
+#endif
        }
 
        return ret;
@@ -299,7 +301,7 @@ static int cpuhp_cpupm_online(unsigned int cpu)
 
        cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
        if (cpumask_weight(&mask) == 0)
-               cluster_enable(cpu);
+               cluster_enable(1);
 
        cpu_enable(cpu);
 
@@ -314,7 +316,7 @@ static int cpuhp_cpupm_offline(unsigned int cpu)
 
        cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
        if (cpumask_weight(&mask) == 0)
-               cluster_disable(cpu);
+               cluster_disable(1);
 
        return 0;
 }
@@ -606,14 +608,18 @@ static int try_to_enter_power_mode(int cpu, struct power_mode *mode)
        dbg_snapshot_cpuidle(mode->name, 0, 0, DSS_FLAG_IN);
        set_state_powerdown(mode);
 
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
        cpuidle_profile_group_idle_enter(mode->id);
+#endif
 
        return 1;
 }
 
 static void exit_mode(int cpu, struct power_mode *mode, int cancel)
 {
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
        cpuidle_profile_group_idle_exit(mode->id, cancel);
+#endif
 
        /*
         * Configure settings to exit power mode. This is executed by the
@@ -850,8 +856,9 @@ static int __init cpu_power_mode_init(void)
                /* Connect power mode to the cpus in the power domain */
                for_each_cpu(cpu, &mode->siblings)
                        add_mode(per_cpu(cpupm, cpu).modes, mode);
-
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
                cpuidle_profile_group_idle_register(mode->id, mode->name);
+#endif
        }
 
        if (attr_count)