aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-08 15:16:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-08 15:16:35 -0400
commitf579bbcd9bb8b688df03191b92c56ab8af4d6322 (patch)
treed450f986022aab73f86f794a03c7f21ad0ece8ec /include/linux
parente80fb7e52fd305b916a671755ca31ecf8f92e94e (diff)
parentda085681014fb43d67d9bf6d14bc068e9254bd49 (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: futex: fix requeue_pi key imbalance futex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions rcu: Place root rcu_node structure in separate lockdep class rcu: Make hot-unplugged CPU relinquish its own RCU callbacks rcu: Move rcu_barrier() to rcutree futex: Move exit_pi_state() call to release_mm() futex: Nullify robust lists after cleanup futex: Fix locking imbalance panic: Fix panic message visibility by calling bust_spinlocks(0) before dying rcu: Replace the rcu_barrier enum with pointer to call_rcu*() function rcu: Clean up code based on review feedback from Josh Triplett, part 4 rcu: Clean up code based on review feedback from Josh Triplett, part 3 rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y rcu: Clean up code to address Ingo's checkpatch feedback rcu: Clean up code based on review feedback from Josh Triplett, part 2 rcu: Clean up code based on review feedback from Josh Triplett
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/futex.h4
-rw-r--r--include/linux/rcupdate.h18
-rw-r--r--include/linux/rcutree.h13
3 files changed, 19 insertions, 16 deletions
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 8ec17997d94..1e5a26d7923 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -33,8 +33,8 @@
33#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) 33#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
34#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) 34#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
35#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) 35#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
36#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG) 36#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
37#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) 37#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
38#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ 38#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \
39 FUTEX_PRIVATE_FLAG) 39 FUTEX_PRIVATE_FLAG)
40#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ 40#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 6fe0363724e..3ebd0b7bcb0 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -77,7 +77,7 @@ extern int rcu_scheduler_active;
77#error "Unknown RCU implementation specified to kernel configuration" 77#error "Unknown RCU implementation specified to kernel configuration"
78#endif 78#endif
79 79
80#define RCU_HEAD_INIT { .next = NULL, .func = NULL } 80#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
81#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT 81#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
82#define INIT_RCU_HEAD(ptr) do { \ 82#define INIT_RCU_HEAD(ptr) do { \
83 (ptr)->next = NULL; (ptr)->func = NULL; \ 83 (ptr)->next = NULL; (ptr)->func = NULL; \
@@ -129,12 +129,6 @@ static inline void rcu_read_lock(void)
129 rcu_read_acquire(); 129 rcu_read_acquire();
130} 130}
131 131
132/**
133 * rcu_read_unlock - marks the end of an RCU read-side critical section.
134 *
135 * See rcu_read_lock() for more information.
136 */
137
138/* 132/*
139 * So where is rcu_write_lock()? It does not exist, as there is no 133 * So where is rcu_write_lock()? It does not exist, as there is no
140 * way for writers to lock out RCU readers. This is a feature, not 134 * way for writers to lock out RCU readers. This is a feature, not
@@ -144,6 +138,12 @@ static inline void rcu_read_lock(void)
144 * used as well. RCU does not care how the writers keep out of each 138 * used as well. RCU does not care how the writers keep out of each
145 * others' way, as long as they do so. 139 * others' way, as long as they do so.
146 */ 140 */
141
142/**
143 * rcu_read_unlock - marks the end of an RCU read-side critical section.
144 *
145 * See rcu_read_lock() for more information.
146 */
147static inline void rcu_read_unlock(void) 147static inline void rcu_read_unlock(void)
148{ 148{
149 rcu_read_release(); 149 rcu_read_release();
@@ -196,6 +196,8 @@ static inline void rcu_read_lock_sched(void)
196 __acquire(RCU_SCHED); 196 __acquire(RCU_SCHED);
197 rcu_read_acquire(); 197 rcu_read_acquire();
198} 198}
199
200/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
199static inline notrace void rcu_read_lock_sched_notrace(void) 201static inline notrace void rcu_read_lock_sched_notrace(void)
200{ 202{
201 preempt_disable_notrace(); 203 preempt_disable_notrace();
@@ -213,6 +215,8 @@ static inline void rcu_read_unlock_sched(void)
213 __release(RCU_SCHED); 215 __release(RCU_SCHED);
214 preempt_enable(); 216 preempt_enable();
215} 217}
218
219/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
216static inline notrace void rcu_read_unlock_sched_notrace(void) 220static inline notrace void rcu_read_unlock_sched_notrace(void)
217{ 221{
218 __release(RCU_SCHED); 222 __release(RCU_SCHED);
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 37682770e9d..46e9ab3ee6e 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -30,10 +30,14 @@
30#ifndef __LINUX_RCUTREE_H 30#ifndef __LINUX_RCUTREE_H
31#define __LINUX_RCUTREE_H 31#define __LINUX_RCUTREE_H
32 32
33struct notifier_block;
34
33extern void rcu_sched_qs(int cpu); 35extern void rcu_sched_qs(int cpu);
34extern void rcu_bh_qs(int cpu); 36extern void rcu_bh_qs(int cpu);
35 37extern int rcu_cpu_notify(struct notifier_block *self,
38 unsigned long action, void *hcpu);
36extern int rcu_needs_cpu(int cpu); 39extern int rcu_needs_cpu(int cpu);
40extern int rcu_expedited_torture_stats(char *page);
37 41
38#ifdef CONFIG_TREE_PREEMPT_RCU 42#ifdef CONFIG_TREE_PREEMPT_RCU
39 43
@@ -85,16 +89,11 @@ static inline void synchronize_rcu_bh_expedited(void)
85 89
86extern void __rcu_init(void); 90extern void __rcu_init(void);
87extern void rcu_check_callbacks(int cpu, int user); 91extern void rcu_check_callbacks(int cpu, int user);
88extern void rcu_restart_cpu(int cpu);
89 92
90extern long rcu_batches_completed(void); 93extern long rcu_batches_completed(void);
91extern long rcu_batches_completed_bh(void); 94extern long rcu_batches_completed_bh(void);
92extern long rcu_batches_completed_sched(void); 95extern long rcu_batches_completed_sched(void);
93 96
94static inline void rcu_init_sched(void)
95{
96}
97
98#ifdef CONFIG_NO_HZ 97#ifdef CONFIG_NO_HZ
99void rcu_enter_nohz(void); 98void rcu_enter_nohz(void);
100void rcu_exit_nohz(void); 99void rcu_exit_nohz(void);
@@ -107,7 +106,7 @@ static inline void rcu_exit_nohz(void)
107} 106}
108#endif /* CONFIG_NO_HZ */ 107#endif /* CONFIG_NO_HZ */
109 108
110/* A context switch is a grace period for rcutree. */ 109/* A context switch is a grace period for RCU-sched and RCU-bh. */
111static inline int rcu_blocking_is_gp(void) 110static inline int rcu_blocking_is_gp(void)
112{ 111{
113 return num_online_cpus() == 1; 112 return num_online_cpus() == 1;