[Feature][ZXW-241]merge P56U01 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/ap/os/linux/linux-3.4.x/kernel/sched/rt.c b/ap/os/linux/linux-3.4.x/kernel/sched/rt.c
old mode 100644
new mode 100755
index 89a985a..f07101d
--- a/ap/os/linux/linux-3.4.x/kernel/sched/rt.c
+++ b/ap/os/linux/linux-3.4.x/kernel/sched/rt.c
@@ -1371,6 +1371,8 @@
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
+ if (SCHED_WARN_ON(list_empty(queue)))
+ return NULL;
next = list_entry(queue->next, struct sched_rt_entity, run_list);
return next;
@@ -1392,7 +1394,8 @@
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
- BUG_ON(!rt_se);
+ if (unlikely(!rt_se))
+ return NULL;
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
diff --git a/ap/os/linux/linux-3.4.x/kernel/sched/sched.h b/ap/os/linux/linux-3.4.x/kernel/sched/sched.h
old mode 100644
new mode 100755
index ed2bab5..7260678
--- a/ap/os/linux/linux-3.4.x/kernel/sched/sched.h
+++ b/ap/os/linux/linux-3.4.x/kernel/sched/sched.h
@@ -6,6 +6,12 @@
#include "cpupri.h"
+#ifdef CONFIG_SCHED_DEBUG
+# define SCHED_WARN_ON(x) WARN_ONCE(x, #x)
+#else
+# define SCHED_WARN_ON(x) ({ (void)(x), 0; })
+#endif
+
extern __read_mostly int scheduler_running;
/*