diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
commit | 3cfef9524677a4ecb392d6fbffe6ebce6302f1d4 (patch) | |
tree | 88647d9dc50d634dee9cfeb7f354d620977a2f33 /include | |
parent | 982653009b883ef1529089e3e6f1ae2fee41cbe2 (diff) | |
parent | 68cc3990a545dc0da221b4844dd8b9c06623a6c5 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
lockdep: Comment all warnings
lib: atomic64: Change the type of local lock to raw_spinlock_t
locking, lib/atomic64: Annotate atomic64_lock::lock as raw
locking, x86, iommu: Annotate qi->q_lock as raw
locking, x86, iommu: Annotate irq_2_ir_lock as raw
locking, x86, iommu: Annotate iommu->register_lock as raw
locking, dma, ipu: Annotate bank_lock as raw
locking, ARM: Annotate low level hw locks as raw
locking, drivers/dca: Annotate dca_lock as raw
locking, powerpc: Annotate uic->lock as raw
locking, x86: mce: Annotate cmci_discover_lock as raw
locking, ACPI: Annotate c3_lock as raw
locking, oprofile: Annotate oprofilefs lock as raw
locking, video: Annotate vga console lock as raw
locking, latencytop: Annotate latency_lock as raw
locking, timer_stats: Annotate table_lock as raw
locking, rwsem: Annotate inner lock as raw
locking, semaphores: Annotate inner lock as raw
locking, sched: Annotate thread_group_cputimer as raw
...
Fix up conflicts in kernel/posix-cpu-timers.c manually: making
cputimer->cputime a raw lock conflicted with the ABBA fix in commit
bcd5cff7216f ("cputimer: Cure lock inversion").
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/init_task.h | 2 | ||||
-rw-r--r-- | include/linux/intel-iommu.h | 4 | ||||
-rw-r--r-- | include/linux/kprobes.h | 2 | ||||
-rw-r--r-- | include/linux/oprofile.h | 2 | ||||
-rw-r--r-- | include/linux/percpu_counter.h | 2 | ||||
-rw-r--r-- | include/linux/proportions.h | 6 | ||||
-rw-r--r-- | include/linux/ratelimit.h | 6 | ||||
-rw-r--r-- | include/linux/rwsem-spinlock.h | 2 | ||||
-rw-r--r-- | include/linux/rwsem.h | 10 | ||||
-rw-r--r-- | include/linux/sched.h | 4 | ||||
-rw-r--r-- | include/linux/semaphore.h | 4 |
11 files changed, 23 insertions, 21 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d14e058aaeed..08ffab01e76c 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -42,7 +42,7 @@ extern struct fs_struct init_fs; | |||
42 | .cputimer = { \ | 42 | .cputimer = { \ |
43 | .cputime = INIT_CPUTIME, \ | 43 | .cputime = INIT_CPUTIME, \ |
44 | .running = 0, \ | 44 | .running = 0, \ |
45 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ | 45 | .lock = __RAW_SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ |
46 | }, \ | 46 | }, \ |
47 | .cred_guard_mutex = \ | 47 | .cred_guard_mutex = \ |
48 | __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ | 48 | __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 235b8879af45..e6ca56de9936 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
@@ -271,7 +271,7 @@ struct qi_desc { | |||
271 | }; | 271 | }; |
272 | 272 | ||
273 | struct q_inval { | 273 | struct q_inval { |
274 | spinlock_t q_lock; | 274 | raw_spinlock_t q_lock; |
275 | struct qi_desc *desc; /* invalidation queue */ | 275 | struct qi_desc *desc; /* invalidation queue */ |
276 | int *desc_status; /* desc status */ | 276 | int *desc_status; /* desc status */ |
277 | int free_head; /* first free entry */ | 277 | int free_head; /* first free entry */ |
@@ -311,7 +311,7 @@ struct intel_iommu { | |||
311 | u64 cap; | 311 | u64 cap; |
312 | u64 ecap; | 312 | u64 ecap; |
313 | u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */ | 313 | u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */ |
314 | spinlock_t register_lock; /* protect register handling */ | 314 | raw_spinlock_t register_lock; /* protect register handling */ |
315 | int seq_id; /* sequence id of the iommu */ | 315 | int seq_id; /* sequence id of the iommu */ |
316 | int agaw; /* agaw of this iommu */ | 316 | int agaw; /* agaw of this iommu */ |
317 | int msagaw; /* max sagaw of this iommu */ | 317 | int msagaw; /* max sagaw of this iommu */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index dd7c12e875bc..dce6e4dbeda7 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -181,7 +181,7 @@ struct kretprobe { | |||
181 | int nmissed; | 181 | int nmissed; |
182 | size_t data_size; | 182 | size_t data_size; |
183 | struct hlist_head free_instances; | 183 | struct hlist_head free_instances; |
184 | spinlock_t lock; | 184 | raw_spinlock_t lock; |
185 | }; | 185 | }; |
186 | 186 | ||
187 | struct kretprobe_instance { | 187 | struct kretprobe_instance { |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 49c8727eeb57..a4c562453f6b 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -166,7 +166,7 @@ ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co | |||
166 | int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count); | 166 | int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count); |
167 | 167 | ||
168 | /** lock for read/write safety */ | 168 | /** lock for read/write safety */ |
169 | extern spinlock_t oprofilefs_lock; | 169 | extern raw_spinlock_t oprofilefs_lock; |
170 | 170 | ||
171 | /** | 171 | /** |
172 | * Add the contents of a circular buffer to the event buffer. | 172 | * Add the contents of a circular buffer to the event buffer. |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 5edc9014263a..b9df9ed1adc0 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifdef CONFIG_SMP | 16 | #ifdef CONFIG_SMP |
17 | 17 | ||
18 | struct percpu_counter { | 18 | struct percpu_counter { |
19 | spinlock_t lock; | 19 | raw_spinlock_t lock; |
20 | s64 count; | 20 | s64 count; |
21 | #ifdef CONFIG_HOTPLUG_CPU | 21 | #ifdef CONFIG_HOTPLUG_CPU |
22 | struct list_head list; /* All percpu_counters are on a list */ | 22 | struct list_head list; /* All percpu_counters are on a list */ |
diff --git a/include/linux/proportions.h b/include/linux/proportions.h index cf793bbbd05e..ef35bb73f69b 100644 --- a/include/linux/proportions.h +++ b/include/linux/proportions.h | |||
@@ -58,7 +58,7 @@ struct prop_local_percpu { | |||
58 | */ | 58 | */ |
59 | int shift; | 59 | int shift; |
60 | unsigned long period; | 60 | unsigned long period; |
61 | spinlock_t lock; /* protect the snapshot state */ | 61 | raw_spinlock_t lock; /* protect the snapshot state */ |
62 | }; | 62 | }; |
63 | 63 | ||
64 | int prop_local_init_percpu(struct prop_local_percpu *pl); | 64 | int prop_local_init_percpu(struct prop_local_percpu *pl); |
@@ -106,11 +106,11 @@ struct prop_local_single { | |||
106 | */ | 106 | */ |
107 | unsigned long period; | 107 | unsigned long period; |
108 | int shift; | 108 | int shift; |
109 | spinlock_t lock; /* protect the snapshot state */ | 109 | raw_spinlock_t lock; /* protect the snapshot state */ |
110 | }; | 110 | }; |
111 | 111 | ||
112 | #define INIT_PROP_LOCAL_SINGLE(name) \ | 112 | #define INIT_PROP_LOCAL_SINGLE(name) \ |
113 | { .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | 113 | { .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ |
114 | } | 114 | } |
115 | 115 | ||
116 | int prop_local_init_single(struct prop_local_single *pl); | 116 | int prop_local_init_single(struct prop_local_single *pl); |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 2f007157fab9..e11ccb4cf48d 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define DEFAULT_RATELIMIT_BURST 10 | 8 | #define DEFAULT_RATELIMIT_BURST 10 |
9 | 9 | ||
10 | struct ratelimit_state { | 10 | struct ratelimit_state { |
11 | spinlock_t lock; /* protect the state */ | 11 | raw_spinlock_t lock; /* protect the state */ |
12 | 12 | ||
13 | int interval; | 13 | int interval; |
14 | int burst; | 14 | int burst; |
@@ -20,7 +20,7 @@ struct ratelimit_state { | |||
20 | #define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init) \ | 20 | #define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init) \ |
21 | \ | 21 | \ |
22 | struct ratelimit_state name = { \ | 22 | struct ratelimit_state name = { \ |
23 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ |
24 | .interval = interval_init, \ | 24 | .interval = interval_init, \ |
25 | .burst = burst_init, \ | 25 | .burst = burst_init, \ |
26 | } | 26 | } |
@@ -28,7 +28,7 @@ struct ratelimit_state { | |||
28 | static inline void ratelimit_state_init(struct ratelimit_state *rs, | 28 | static inline void ratelimit_state_init(struct ratelimit_state *rs, |
29 | int interval, int burst) | 29 | int interval, int burst) |
30 | { | 30 | { |
31 | spin_lock_init(&rs->lock); | 31 | raw_spin_lock_init(&rs->lock); |
32 | rs->interval = interval; | 32 | rs->interval = interval; |
33 | rs->burst = burst; | 33 | rs->burst = burst; |
34 | rs->printed = 0; | 34 | rs->printed = 0; |
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index 34701241b673..d5b13bc07a0b 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | struct rw_semaphore { | 23 | struct rw_semaphore { |
24 | __s32 activity; | 24 | __s32 activity; |
25 | spinlock_t wait_lock; | 25 | raw_spinlock_t wait_lock; |
26 | struct list_head wait_list; | 26 | struct list_head wait_list; |
27 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 27 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
28 | struct lockdep_map dep_map; | 28 | struct lockdep_map dep_map; |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 6a6741440cb7..63d406554391 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -25,7 +25,7 @@ struct rw_semaphore; | |||
25 | /* All arch specific implementations share the same struct */ | 25 | /* All arch specific implementations share the same struct */ |
26 | struct rw_semaphore { | 26 | struct rw_semaphore { |
27 | long count; | 27 | long count; |
28 | spinlock_t wait_lock; | 28 | raw_spinlock_t wait_lock; |
29 | struct list_head wait_list; | 29 | struct list_head wait_list; |
30 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 30 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
31 | struct lockdep_map dep_map; | 31 | struct lockdep_map dep_map; |
@@ -56,9 +56,11 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem) | |||
56 | # define __RWSEM_DEP_MAP_INIT(lockname) | 56 | # define __RWSEM_DEP_MAP_INIT(lockname) |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #define __RWSEM_INITIALIZER(name) \ | 59 | #define __RWSEM_INITIALIZER(name) \ |
60 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED(name.wait_lock), \ | 60 | { RWSEM_UNLOCKED_VALUE, \ |
61 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } | 61 | __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \ |
62 | LIST_HEAD_INIT((name).wait_list) \ | ||
63 | __RWSEM_DEP_MAP_INIT(name) } | ||
62 | 64 | ||
63 | #define DECLARE_RWSEM(name) \ | 65 | #define DECLARE_RWSEM(name) \ |
64 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 66 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 600eb0a6f89a..1be699dd32a5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -510,7 +510,7 @@ struct task_cputime { | |||
510 | struct thread_group_cputimer { | 510 | struct thread_group_cputimer { |
511 | struct task_cputime cputime; | 511 | struct task_cputime cputime; |
512 | int running; | 512 | int running; |
513 | spinlock_t lock; | 513 | raw_spinlock_t lock; |
514 | }; | 514 | }; |
515 | 515 | ||
516 | #include <linux/rwsem.h> | 516 | #include <linux/rwsem.h> |
@@ -2566,7 +2566,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | |||
2566 | 2566 | ||
2567 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2567 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2568 | { | 2568 | { |
2569 | spin_lock_init(&sig->cputimer.lock); | 2569 | raw_spin_lock_init(&sig->cputimer.lock); |
2570 | } | 2570 | } |
2571 | 2571 | ||
2572 | /* | 2572 | /* |
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 39fa04966aa8..dc368b8ce215 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h | |||
@@ -14,14 +14,14 @@ | |||
14 | 14 | ||
15 | /* Please don't access any members of this structure directly */ | 15 | /* Please don't access any members of this structure directly */ |
16 | struct semaphore { | 16 | struct semaphore { |
17 | spinlock_t lock; | 17 | raw_spinlock_t lock; |
18 | unsigned int count; | 18 | unsigned int count; |
19 | struct list_head wait_list; | 19 | struct list_head wait_list; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #define __SEMAPHORE_INITIALIZER(name, n) \ | 22 | #define __SEMAPHORE_INITIALIZER(name, n) \ |
23 | { \ | 23 | { \ |
24 | .lock = __SPIN_LOCK_UNLOCKED((name).lock), \ | 24 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ |
25 | .count = n, \ | 25 | .count = n, \ |
26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ | 26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ |
27 | } | 27 | } |