schedtune: fix crash when there is cpu boot fail in hmp [1/1]
authorJianxin Pan <jianxin.pan@amlogic.com>
Tue, 23 Apr 2019 11:37:41 +0000 (19:37 +0800)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:06:47 +0000 (14:06 +0800)
PD#SWPL-7656

Problem:
crash when there is cpu boot fail in hmp

Solution:
fix crash when there is cpu boot fail in hmp

Verify:
W400

Change-Id: I0153975593adb0bfcbc3c3bd6543f0fb2e6bf2e0
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
kernel/sched/tune.c

index fbdd00a..7399e70 100644 (file)
@@ -951,6 +951,9 @@ schedtune_add_cluster_nrg(
                         * Assume we have EM data only at the CPU and
                         * the upper CLUSTER level
                         */
+#ifdef CONFIG_AMLOGIC_MODIFY
+                       if (sd2->parent)
+#endif
                        BUG_ON(!cpumask_equal(
                                sched_group_cpus(sg),
                                sched_group_cpus(sd2->parent->groups)