The following commit has been merged into the core/entry branch of tip: Commit-ID: 6775de4984ea83ce39f19a40c09f8813d7423831 Gitweb: https://git.kernel.org/tip/6775de4984ea83ce39f19a40c09f8813d7423831 Author: Frederic Weisbecker <frederic@xxxxxxxxxx> AuthorDate: Tue, 17 Nov 2020 16:16:36 +01:00 Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx> CommitterDate: Thu, 19 Nov 2020 11:25:42 +01:00 context_tracking: Only define schedule_user() on !HAVE_CONTEXT_TRACKING_OFFSTACK archs schedule_user() was traditionally used by the entry code's tail to preempt userspace after the call to user_enter(). Indeed the call to user_enter() used to be performed upon syscall exit slow path which was right before the last opportunity to schedule() while resuming to userspace. The context tracking state had to be saved on the task stack and set back to CONTEXT_KERNEL temporarily in order to safely switch to another task. Only a few archs use it now (namely sparc64 and powerpc64) and those implementing HAVE_CONTEXT_TRACKING_OFFSTACK definetly can't rely on it. Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Link: https://lkml.kernel.org/r/20201117151637.259084-5-frederic@xxxxxxxxxx --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c23d7cb..44426e5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4631,7 +4631,7 @@ void __sched schedule_idle(void) } while (need_resched()); } -#ifdef CONFIG_CONTEXT_TRACKING +#if defined(CONFIG_CONTEXT_TRACKING) && !defined(CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK) asmlinkage __visible void __sched schedule_user(void) { /*
![]() |