Skip to content

Commit 01f23e1

Browse files
ctmarinasIngo Molnar
authored andcommitted
sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback
This callback is called by the scheduler after rq->lock has been released and interrupts enabled. It will be used in subsequent patches on the ARM architecture. Signed-off-by: Catalin Marinas <[email protected]> Reviewed-by: Will Deacon <[email protected]> Reviewed-by: Frank Rowand <[email protected]> Tested-by: Will Deacon <[email protected]> Tested-by: Marc Zyngier <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent fde7d90 commit 01f23e1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
19321932
local_irq_enable();
19331933
#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
19341934
finish_lock_switch(rq, prev);
1935+
finish_arch_post_lock_switch();
19351936

19361937
fire_sched_in_preempt_notifiers(current);
19371938
if (mm)

kernel/sched/sched.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@ static inline int task_running(struct rq *rq, struct task_struct *p)
692692
#ifndef finish_arch_switch
693693
# define finish_arch_switch(prev) do { } while (0)
694694
#endif
695+
#ifndef finish_arch_post_lock_switch
696+
# define finish_arch_post_lock_switch() do { } while (0)
697+
#endif
695698

696699
#ifndef __ARCH_WANT_UNLOCKED_CTXSW
697700
static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next)

0 commit comments

Comments
 (0)