aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/preempt.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2013-08-14 08:51:00 -0400
committerIngo Molnar <mingo@kernel.org>2013-09-25 08:23:07 -0400
commit1a338ac32ca630f67df25b4a16436cccc314e997 (patch)
tree3291247c33c17376160821d19d1460c2da1da1a6 /include/asm-generic/preempt.h
parentc2daa3bed53a81171cf8c1a36db798e82b91afe8 (diff)
sched, x86: Optimize the preempt_schedule() call
Remove the bloat of the C calling convention out of the preempt_enable() sites by creating an ASM wrapper which allows us to do an asm("call ___preempt_schedule") instead. calling.h bits by Andi Kleen Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-tk7xdi1cvvxewixzke8t8le1@git.kernel.org [ Fixed build error. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/asm-generic/preempt.h')
-rw-r--r--include/asm-generic/preempt.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/preempt.h b/include/asm-generic/preempt.h
index 82d958fc3823..5dc14ed3791c 100644
--- a/include/asm-generic/preempt.h
+++ b/include/asm-generic/preempt.h
@@ -100,4 +100,14 @@ static __always_inline bool should_resched(void)
100 return unlikely(!*preempt_count_ptr()); 100 return unlikely(!*preempt_count_ptr());
101} 101}
102 102
103#ifdef CONFIG_PREEMPT
104extern asmlinkage void preempt_schedule(void);
105#define __preempt_schedule() preempt_schedule()
106
107#ifdef CONFIG_CONTEXT_TRACKING
108extern asmlinkage void preempt_schedule_context(void);
109#define __preempt_schedule_context() preempt_schedule_context()
110#endif
111#endif /* CONFIG_PREEMPT */
112
103#endif /* __ASM_PREEMPT_H */ 113#endif /* __ASM_PREEMPT_H */