aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-26 18:08:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-26 18:08:31 -0400
commit8128f55a0bc60cf3779135a1f837c4323e77c582 (patch)
treea6f23d18496049651617f5c5cbe21648fa521f4e /include/linux
parent50da56706b989b99edb20f9c03172df193240c78 (diff)
parentc26f91a3df1999ec1b3298372d73f90cbab81106 (diff)
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Remove excessive early_res debug output softlockup: Stop spurious softlockup messages due to overflow rcu: Fix local_irq_disable() CONFIG_PROVE_RCU=y false positives rcu: Fix tracepoints & lockdep false positive rcu: Make rcu_read_lock_bh_held() allow for disabled BH
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rcupdate.h23
-rw-r--r--include/linux/tracepoint.h2
2 files changed, 7 insertions, 18 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 3024050c82a1..872a98e13d6a 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -123,22 +123,11 @@ static inline int rcu_read_lock_held(void)
123 return lock_is_held(&rcu_lock_map); 123 return lock_is_held(&rcu_lock_map);
124} 124}
125 125
126/** 126/*
127 * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? 127 * rcu_read_lock_bh_held() is defined out of line to avoid #include-file
128 * 128 * hell.
129 * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in
130 * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING,
131 * this assumes we are in an RCU-bh read-side critical section unless it can
132 * prove otherwise.
133 *
134 * Check rcu_scheduler_active to prevent false positives during boot.
135 */ 129 */
136static inline int rcu_read_lock_bh_held(void) 130extern int rcu_read_lock_bh_held(void);
137{
138 if (!debug_lockdep_rcu_enabled())
139 return 1;
140 return lock_is_held(&rcu_bh_lock_map);
141}
142 131
143/** 132/**
144 * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? 133 * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section?
@@ -160,7 +149,7 @@ static inline int rcu_read_lock_sched_held(void)
160 return 1; 149 return 1;
161 if (debug_locks) 150 if (debug_locks)
162 lockdep_opinion = lock_is_held(&rcu_sched_lock_map); 151 lockdep_opinion = lock_is_held(&rcu_sched_lock_map);
163 return lockdep_opinion || preempt_count() != 0; 152 return lockdep_opinion || preempt_count() != 0 || irqs_disabled();
164} 153}
165#else /* #ifdef CONFIG_PREEMPT */ 154#else /* #ifdef CONFIG_PREEMPT */
166static inline int rcu_read_lock_sched_held(void) 155static inline int rcu_read_lock_sched_held(void)
@@ -191,7 +180,7 @@ static inline int rcu_read_lock_bh_held(void)
191#ifdef CONFIG_PREEMPT 180#ifdef CONFIG_PREEMPT
192static inline int rcu_read_lock_sched_held(void) 181static inline int rcu_read_lock_sched_held(void)
193{ 182{
194 return !rcu_scheduler_active || preempt_count() != 0; 183 return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled();
195} 184}
196#else /* #ifdef CONFIG_PREEMPT */ 185#else /* #ifdef CONFIG_PREEMPT */
197static inline int rcu_read_lock_sched_held(void) 186static inline int rcu_read_lock_sched_held(void)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index f59604ed0ec6..78b4bd3be496 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -49,7 +49,7 @@ struct tracepoint {
49 void **it_func; \ 49 void **it_func; \
50 \ 50 \
51 rcu_read_lock_sched_notrace(); \ 51 rcu_read_lock_sched_notrace(); \
52 it_func = rcu_dereference((tp)->funcs); \ 52 it_func = rcu_dereference_sched((tp)->funcs); \
53 if (it_func) { \ 53 if (it_func) { \
54 do { \ 54 do { \
55 ((void(*)(proto))(*it_func))(args); \ 55 ((void(*)(proto))(*it_func))(args); \