sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback
authorCatalin Marinas <catalin.marinas@arm.com>
Sun, 27 Nov 2011 21:43:10 +0000 (21:43 +0000)
committerIngo Molnar <mingo@elte.hu>
Tue, 13 Mar 2012 09:17:45 +0000 (10:17 +0100)
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 <catalin.marinas@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/20120313110840.7b444deb6b1bb902c15f3cdf@canb.auug.org.au
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched/core.c
kernel/sched/sched.h

index b342f57879e693f54c12a5b15d1e4e7c5bdde7e1..423f40f32a598e7bf8916d05f0f979c08f2df97a 100644 (file)
@@ -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)
index 98c0c2623db86019e464cb63caf49a7a253ee733..d72483d07c9fda6529948cf846fb0296ee368e52 100644 (file)
@@ -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)