diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-26 18:08:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-26 18:08:31 -0400 |
commit | 8128f55a0bc60cf3779135a1f837c4323e77c582 (patch) | |
tree | a6f23d18496049651617f5c5cbe21648fa521f4e /kernel | |
parent | 50da56706b989b99edb20f9c03172df193240c78 (diff) | |
parent | c26f91a3df1999ec1b3298372d73f90cbab81106 (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 'kernel')
-rw-r--r-- | kernel/rcupdate.c | 23 | ||||
-rw-r--r-- | kernel/softlockup.c | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index f1125c1a6321..63fe25433980 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/kernel_stat.h> | 47 | #include <linux/kernel_stat.h> |
48 | #include <linux/hardirq.h> | ||
48 | 49 | ||
49 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 50 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
50 | static struct lock_class_key rcu_lock_key; | 51 | static struct lock_class_key rcu_lock_key; |
@@ -66,6 +67,28 @@ EXPORT_SYMBOL_GPL(rcu_sched_lock_map); | |||
66 | int rcu_scheduler_active __read_mostly; | 67 | int rcu_scheduler_active __read_mostly; |
67 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); | 68 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); |
68 | 69 | ||
70 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
71 | |||
72 | /** | ||
73 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | ||
74 | * | ||
75 | * Check for bottom half being disabled, which covers both the | ||
76 | * CONFIG_PROVE_RCU and not cases. Note that if someone uses | ||
77 | * rcu_read_lock_bh(), but then later enables BH, lockdep (if enabled) | ||
78 | * will show the situation. | ||
79 | * | ||
80 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. | ||
81 | */ | ||
82 | int rcu_read_lock_bh_held(void) | ||
83 | { | ||
84 | if (!debug_lockdep_rcu_enabled()) | ||
85 | return 1; | ||
86 | return in_softirq(); | ||
87 | } | ||
88 | EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); | ||
89 | |||
90 | #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
91 | |||
69 | /* | 92 | /* |
70 | * This function is invoked towards the end of the scheduler's initialization | 93 | * This function is invoked towards the end of the scheduler's initialization |
71 | * process. Before this is called, the idle task might contain | 94 | * process. Before this is called, the idle task might contain |
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 0d4c7898ab80..4b493f67dcb5 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -155,11 +155,11 @@ void softlockup_tick(void) | |||
155 | * Wake up the high-prio watchdog task twice per | 155 | * Wake up the high-prio watchdog task twice per |
156 | * threshold timespan. | 156 | * threshold timespan. |
157 | */ | 157 | */ |
158 | if (now > touch_ts + softlockup_thresh/2) | 158 | if (time_after(now - softlockup_thresh/2, touch_ts)) |
159 | wake_up_process(per_cpu(softlockup_watchdog, this_cpu)); | 159 | wake_up_process(per_cpu(softlockup_watchdog, this_cpu)); |
160 | 160 | ||
161 | /* Warn about unreasonable delays: */ | 161 | /* Warn about unreasonable delays: */ |
162 | if (now <= (touch_ts + softlockup_thresh)) | 162 | if (time_before_eq(now - softlockup_thresh, touch_ts)) |
163 | return; | 163 | return; |
164 | 164 | ||
165 | per_cpu(softlockup_print_ts, this_cpu) = touch_ts; | 165 | per_cpu(softlockup_print_ts, this_cpu) = touch_ts; |