summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index d04530bf251f..e0d4a0069808 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2,6 +2,19 @@
/*
* Scheduler internal types and methods:
*/
+#ifdef CONFIG_SCHED_MUQSS
+#include "MuQSS.h"
+
+/* Begin compatibility wrappers for MuQSS/CFS differences */
+#define rq_rt_nr_running(rq) ((rq)->rt_nr_running)
+#define rq_h_nr_running(rq) ((rq)->nr_running)
+
+#else /* CONFIG_SCHED_MUQSS */
+
+#define rq_rt_nr_running(rq) ((rq)->rt.rt_nr_running)
+#define rq_h_nr_running(rq) ((rq)->cfs.h_nr_running)
+
+
#include <linux/sched.h>
#include <linux/sched/autogroup.h>
@@ -2307,3 +2320,30 @@ unsigned long scale_irq_capacity(unsigned long util, unsigned long irq, unsigned
#ifdef CONFIG_SMP
extern struct static_key_false sched_energy_present;
#endif
+
+/* MuQSS compatibility functions */
+static inline bool softirq_pending(int cpu)
+{
+ return false;
+}
+
+#ifdef CONFIG_64BIT
+static inline u64 read_sum_exec_runtime(struct task_struct *t)
+{
+ return t->se.sum_exec_runtime;
+}
+#else
+static inline u64 read_sum_exec_runtime(struct task_struct *t)
+{
+ u64 ns;
+ struct rq_flags rf;
+ struct rq *rq;
+
+ rq = task_rq_lock(t, &rf);
+ ns = t->se.sum_exec_runtime;
+ task_rq_unlock(rq, t, &rf);
+
+ return ns;
+}
+#endif
+#endif /* CONFIG_SCHED_MUQSS */