sched: fix include for task_cpu_possible
PATCH 1/1 sched: fix include for task_cpu_possible
From: Matthias Maennich <[email protected]>
Commit 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()") moved the call for task_cpu_possible from kernel/sched/core.c, but did not add an include of linux/mmu_context.h where this symbol is defined. Fix that by adding the missing include.
--- kernel/sched/sched.h | 1 + 1 file changed, 1 insertion(+)
kernel/sched/sched.h +1 -0
@@ -44,6 +44,7 @@#include <linux/lockdep.h> #include <linux/minmax.h> #include <linux/mm.h> +#include <linux/mmu_context.h> #include <linux/module.h> #include <linux/mutex_api.h> #include <linux/plist.h>
Signature · 1 line
2.46.1.824.gd892dcdcdd-goog
Hello,
Quoted 18 lines · Matthias Männich
From: Matthias Maennich <[email protected]>
Commit
2c390dda9e03("sched_ext: Maketask_can_run_on_remote_rq()use commontask_allowed_on_cpu()") moved the call fortask_cpu_possiblefromkernel/sched/core.c, but did not add an include oflinux/mmu_context.hwhere this symbol is defined. Fix that by adding the missing include.Fixes 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()")Signed-off-by Matthias Maennich <[email protected]>--- kernel/sched/sched.h | 1 + 1 file changed, 1 insertion(+)kernel/sched/sched.h +0
-0
kernel/sched/sched.h line 47
Quoted 4 lines
kernel/sched/sched.h +1
-0@@ -44,6 +44,7 @@#include <linux/lockdep.h> #include <linux/minmax.h> #include <linux/mm.h> +#include <linux/mmu_context.h>
Should the patch also remove mmu_context.h from kernel/sched/core.c?
Thanks.
Signature · 1 line
tejun
Quoted 16 lines · Tejun Heo
Hello,
Quoted 13 lines · Matthias Männich
From: Matthias Maennich <[email protected]>
Commit
2c390dda9e03("sched_ext: Maketask_can_run_on_remote_rq()use commontask_allowed_on_cpu()") moved the call fortask_cpu_possiblefromkernel/sched/core.c, but did not add an include oflinux/mmu_context.hwhere this symbol is defined. Fix that by adding the missing include.Fixes 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()")Signed-off-by Matthias Maennich <[email protected]>--- kernel/sched/sched.h | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
kernel/sched/sched.h line 47
Quoted 9 lines
kernel/sched/sched.h +1
-0@@ -44,6 +44,7 @@#include <linux/lockdep.h> #include <linux/minmax.h> #include <linux/mm.h> +#include <linux/mmu_context.h> Should the patch also remove
mmu_context.hfromkernel/sched/core.c?
kernel/sched/core.c has a call to switch_mm_irqs_off, which is defined in linux/mmu_context.h as well. So, no, the original include needs to remain.
Cheers,
Matthias
Quoted 5 lines
Thanks.
Signature · 1 line
tejun
Quoted 5 lines · Matthias Männich
Quoted 1 line
Should the patch also remove
mmu_context.hfromkernel/sched/core.c?
kernel/sched/core.chas a call toswitch_mm_irqs_off, which is defined inlinux/mmu_context.has well. So, no, the original include needs to remain.
Hmm... I'm a bit confused. kernel/sched/core.c always includes kernel/sched/sched.h which collects all the shared includes. Why does it need to be repeated in core.c?
Thanks.
Signature · 1 line
tejun