aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-20 14:18:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-20 14:18:35 -0400
commita3d5c3460a86f52ea435b3fb98be112bd18faabc (patch)
tree48a32968b569af0e0f0af1def3effa0770710fea /include
parent86c76676cfdbf283f6131d5a2783bed3f3d490ea (diff)
parent29bb9e5a75684106a37593ad75ec75ff8312731b (diff)
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar: "Two smaller fixes - plus a context tracking tracing fix that is a bit bigger" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tracing/context-tracking: Add preempt_schedule_context() for tracing sched: Fix clear NOHZ_BALANCE_KICK sched/x86: Construct all sibling maps if smt
Diffstat (limited to 'include')
-rw-r--r--include/linux/preempt.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 87a03c746f17..f5d4723cdb3d 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -33,9 +33,25 @@ do { \
33 preempt_schedule(); \ 33 preempt_schedule(); \
34} while (0) 34} while (0)
35 35
36#ifdef CONFIG_CONTEXT_TRACKING
37
38void preempt_schedule_context(void);
39
40#define preempt_check_resched_context() \
41do { \
42 if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
43 preempt_schedule_context(); \
44} while (0)
45#else
46
47#define preempt_check_resched_context() preempt_check_resched()
48
49#endif /* CONFIG_CONTEXT_TRACKING */
50
36#else /* !CONFIG_PREEMPT */ 51#else /* !CONFIG_PREEMPT */
37 52
38#define preempt_check_resched() do { } while (0) 53#define preempt_check_resched() do { } while (0)
54#define preempt_check_resched_context() do { } while (0)
39 55
40#endif /* CONFIG_PREEMPT */ 56#endif /* CONFIG_PREEMPT */
41 57
@@ -88,7 +104,7 @@ do { \
88do { \ 104do { \
89 preempt_enable_no_resched_notrace(); \ 105 preempt_enable_no_resched_notrace(); \
90 barrier(); \ 106 barrier(); \
91 preempt_check_resched(); \ 107 preempt_check_resched_context(); \
92} while (0) 108} while (0)
93 109
94#else /* !CONFIG_PREEMPT_COUNT */ 110#else /* !CONFIG_PREEMPT_COUNT */