From: Youngtae Lee Date: Wed, 2 May 2018 05:15:02 +0000 (+0900) Subject: samsung: cpuhp: Add panic condition when requesting hotplug cpu0 out X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6c87db1ac12c04ae6d6cdc67cc61c79c894da7b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git samsung: cpuhp: Add panic condition when requesting hotplug cpu0 out Change-Id: I24152b1f32b82c6d413f8a0158f508f08b696679 Signed-off-by: Youngtae Lee --- diff --git a/drivers/soc/samsung/exynos-cpuhp.c b/drivers/soc/samsung/exynos-cpuhp.c index 312c81f6b651..3233f623b94a 100644 --- a/drivers/soc/samsung/exynos-cpuhp.c +++ b/drivers/soc/samsung/exynos-cpuhp.c @@ -236,14 +236,17 @@ static struct cpumask cpuhp_get_online_cpus(void) { struct cpumask mask; struct cpuhp_user *user; + char buf[10]; cpumask_setall(&mask); list_for_each_entry(user, &cpuhp.users, list) cpumask_and(&mask, &mask, &user->online_cpus); - if (cpumask_empty(&mask)) - BUG_ON(1); + if (cpumask_empty(&mask) || !cpumask_test_cpu(0, &mask)) { + scnprintf(buf, sizeof(buf), "%*pbl", cpumask_pr_args(&mask)); + panic("CPUHP: Online mask(%s) is wrong \n", buf); + } return mask; } @@ -427,7 +430,7 @@ static ssize_t store_##name##_online_cpu(struct kobject *kobj, \ size_t count) \ { \ cpumask_parse(buf, &cpuhp.sysfs_user.online_cpus); \ - cpuhp_do(cpuhp.sysfs_user.type); \ + cpuhp_do(true); \ \ return count; \ } \