summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/sched/build_policy.c1
-rw-r--r--kernel/sched/ext.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/build_policy.c b/kernel/sched/build_policy.c
index 9223c49ddcf3..fae1f5c921eb 100644
--- a/kernel/sched/build_policy.c
+++ b/kernel/sched/build_policy.c
@@ -16,6 +16,7 @@
#include <linux/sched/clock.h>
#include <linux/sched/cputime.h>
#include <linux/sched/hotplug.h>
+#include <linux/sched/isolation.h>
#include <linux/sched/posix-timers.h>
#include <linux/sched/rt.h>
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 3eb7169e3973..406b05a4d866 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4399,6 +4399,12 @@ static int scx_ops_enable(struct sched_ext_ops *ops, struct bpf_link *link)
unsigned long timeout;
int i, cpu, ret;
+ if (!cpumask_equal(housekeeping_cpumask(HK_TYPE_DOMAIN),
+ cpu_possible_mask)) {
+ pr_err("sched_ext: Not compatible with \"isolcpus=\" domain isolation");
+ return -EINVAL;
+ }
+
mutex_lock(&scx_ops_enable_mutex);
if (!scx_ops_helper) {