Skip to contentSkip to conversation

sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback

tip:sched/arch tip-bot for Catalin Marinas 1 participant 1 message Mar 13, 2012 Scheduler

lore
Share & tools
lore
#0 lore raw
Commit-ID:  01f23e1630d944f7085cd8fd5793e31ea91c03d8
Gitweb:     http://git.kernel.org/tip/01f23e1630d944f7085cd8fd5793e31ea91c03d8
Author:     Catalin Marinas <[email protected]>
AuthorDate: Sun, 27 Nov 2011 21:43:10 +0000
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 13 Mar 2012 10:17:45 +0100

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.

---
 kernel/sched/core.c  |    1 +
 kernel/sched/sched.h |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
kernel/sched/core.c +1 -0
index b342f57..423f40f 100644
@@ -1932,6 +1932,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
 	local_irq_enable();
 #endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
 	finish_lock_switch(rq, prev);
+	finish_arch_post_lock_switch();
 
 	fire_sched_in_preempt_notifiers(current);
 	if (mm)
kernel/sched/sched.h +3 -0
index 98c0c26..d72483d 100644
@@ -692,6 +692,9 @@ static inline int task_running(struct rq *rq, struct task_struct *p)
 #ifndef finish_arch_switch
 # define finish_arch_switch(prev)	do { } while (0)
 #endif
+#ifndef finish_arch_post_lock_switch
+# define finish_arch_post_lock_switch()	do { } while (0)
+#endif
 
 #ifndef __ARCH_WANT_UNLOCKED_CTXSW
 static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next)