From: Youngtae Lee Date: Mon, 23 Apr 2018 03:59:32 +0000 (+0900) Subject: samsung: cpuhp: Support cpus_up/down for fast hotplug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=984db491efbcd286117c8317c3875c9a9a3c88da;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git samsung: cpuhp: Support cpus_up/down for fast hotplug Change-Id: I02aa69a55c80e3e1ff43a2eb790b01adee6a78c7 Signed-off-by: Youngtae Lee --- diff --git a/drivers/soc/samsung/exynos-cpuhp.c b/drivers/soc/samsung/exynos-cpuhp.c index 9b61738e6470..312c81f6b651 100644 --- a/drivers/soc/samsung/exynos-cpuhp.c +++ b/drivers/soc/samsung/exynos-cpuhp.c @@ -160,7 +160,7 @@ int exynos_cpuhp_register(char *name, struct cpumask mask, int type) mutex_unlock(&cpuhp.lock); /* applying new user's request */ - return cpuhp_do(type); + return cpuhp_do(true); } /* @@ -177,7 +177,7 @@ int exynos_cpuhp_request(char *name, struct cpumask mask, int type) if (type == FAST_HP) return cpuhp_do(true); - return cpuhp_do(false); + return cpuhp_do(true); } /**********************************************************************************/ @@ -269,7 +269,7 @@ static int cpuhp_cpu_up(struct cpumask enable_cpus, int fast_hp) goto exit; if (fast_hp && !cpumask_empty(&fast_cpus)) - ret = cpus_up(&fast_cpus); + ret = cpus_up(fast_cpus); return ret; exit: @@ -293,7 +293,7 @@ static int cpuhp_cpu_down(struct cpumask disable_cpus, int fast_hp) cpumask_and(&fast_cpus, &disable_cpus, &fast_cpus); cpumask_andnot(&disable_cpus, &disable_cpus, &fast_cpus); if (fast_hp && !cpumask_empty(&fast_cpus)) - ret = cpus_down(&fast_cpus); + ret = cpus_down(fast_cpus); if (ret) goto exit; @@ -339,7 +339,7 @@ static int cpuhp_do(int fast_hp) online_cpus = cpuhp_get_online_cpus(); /* print cpu control information */ - if (cpuhp.debug) +// if (cpuhp.debug) cpuhp_print_debug_info(online_cpus, fast_hp); /* if there is no mask change, skip */ @@ -374,7 +374,7 @@ static int cpuhp_control(bool enable) if (enable) { cpuhp_enable(true); - cpuhp_do(false); + cpuhp_do(true); } else { mutex_lock(&cpuhp.lock); @@ -566,7 +566,7 @@ static int exynos_cpuhp_pm_notifier(struct notifier_block *notifier, case PM_POST_SUSPEND: cpuhp_suspend(false); - cpuhp_do(false); + cpuhp_do(true); break; } diff --git a/include/soc/samsung/exynos-cpuhp.h b/include/soc/samsung/exynos-cpuhp.h index 929d5a3c2d4f..d7cf28fc21ef 100644 --- a/include/soc/samsung/exynos-cpuhp.h +++ b/include/soc/samsung/exynos-cpuhp.h @@ -18,12 +18,10 @@ extern int exynos_cpuhp_unregister(char *name, struct cpumask mask, int type); extern int exynos_cpuhp_register(char *name, struct cpumask mask, int type); extern int exynos_cpuhp_request(char *name, struct cpumask mask, int type); -#ifdef EXYNOS_FAST_HP -int cpus_up(struct cpumask *mask); -int cpus_down(struct cpumask *mask); -#else -extern inline int cpus_up(struct cpumask *mask) { return 0; }; -extern inline int cpus_down(struct cpumask *mask) {return 0; }; -#endif +extern int cpus_down(struct cpumask cpus); +extern int cpus_up(struct cpumask cpus); +/* +extern inline int cpus_down(struct cpumask cpus) { return 0; }; +*/ #endif /* __EXYNOS_CPU_HP_H */