{
struct cpumask mask;
- cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
+ cpumask_and(&mask, cpu_cluster_mask(cpu), cpu_online_mask);
if (cpumask_weight(&mask) == 0) {
cluster_enable(cpu);
/* clear cpus of this cluster from cpuhp_last_cpu */
cpu_disable(cpu);
- cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
- if (cpumask_weight(&mask) == 0) {
+ cpumask_and(&mask, cpu_cluster_mask(cpu), cpu_online_mask);
+ if ((cpumask_weight(&mask) == 0) && cpuhp_last_fastcpu(cpu)) {
/* set cpu cpuhp_last_cpu */
cpumask_set_cpu(cpu, &cpuhp_last_cpu);
cluster_disable(cpu);
extern void disable_power_mode(int cpu, int type);
extern void enable_power_mode(int cpu, int type);
extern bool exynos_cpuhp_last_cpu(unsigned int cpu);
+extern bool cpuhp_last_fastcpu(unsigned int cpu);
#ifdef CONFIG_CPU_IDLE
void exynos_update_ip_idle_status(int index, int idle);