[COMMON] soc: cpupm: Add possible cpu checks.
authorSoohyun Kim <soohyuni.kim@samsung.com>
Fri, 7 Sep 2018 00:07:36 +0000 (09:07 +0900)
committerhskang <hs1218.kang@samsung.com>
Wed, 10 Oct 2018 12:59:52 +0000 (21:59 +0900)
Change-Id: Ia319e7d99d5242f315a329e83da9a8be62b469dc
Signed-off-by: Soohyun Kim <soohyuni.kim@samsung.com>
drivers/soc/samsung/exynos-cpupm.c

index 5666aa1bdd442b2468aee8f58d851e73a433f8aa..f45c14ca5c144510d7a1b1ec494d5cab2b987ee8 100644 (file)
@@ -851,11 +851,15 @@ static int __init cpu_power_mode_init(void)
                if (of_property_read_bool(dn, "system-idle"))
                        mode->system_idle = true;
 
-               if (!of_property_read_string(dn, "siblings", &buf))
+               if (!of_property_read_string(dn, "siblings", &buf)) {
                        cpulist_parse(buf, &mode->siblings);
+                       cpumask_and(&mode->siblings, &mode->siblings, cpu_possible_mask);
+               }
 
-               if (!of_property_read_string(dn, "entry-allowed", &buf))
+               if (!of_property_read_string(dn, "entry-allowed", &buf)) {
                        cpulist_parse(buf, &mode->entry_allowed);
+                       cpumask_and(&mode->entry_allowed, &mode->entry_allowed, cpu_possible_mask);
+               }
 
                atomic_set(&mode->disable, 0);