summaryrefslogtreecommitdiff
path: root/include/linux/mmu_context.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-08-20 12:33:05 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-08-20 12:33:05 +0200
commitc94d89fafa49ba70fedbb01cb52dfbbdd7dc0986 (patch)
treeca4af4efcc3ac38dcb26ccf99acf62f7d30ebcc3 /include/linux/mmu_context.h
parent7c60610d476766e128cc4284bb6349732cbd6606 (diff)
parent234b8ab6476c5edd5262e2ff563de9498d60044a (diff)
Merge branch 'sched/core'
Diffstat (limited to 'include/linux/mmu_context.h')
-rw-r--r--include/linux/mmu_context.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mmu_context.h b/include/linux/mmu_context.h
index 03dee12d2b61..b9b970f7ab45 100644
--- a/include/linux/mmu_context.h
+++ b/include/linux/mmu_context.h
@@ -14,4 +14,18 @@
static inline void leave_mm(int cpu) { }
#endif
+/*
+ * CPUs that are capable of running user task @p. Must contain at least one
+ * active CPU. It is assumed that the kernel can run on all CPUs, so calling
+ * this for a kernel thread is pointless.
+ *
+ * By default, we assume a sane, homogeneous system.
+ */
+#ifndef task_cpu_possible_mask
+# define task_cpu_possible_mask(p) cpu_possible_mask
+# define task_cpu_possible(cpu, p) true
+#else
+# define task_cpu_possible(cpu, p) cpumask_test_cpu((cpu), task_cpu_possible_mask(p))
+#endif
+
#endif