diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-25 11:50:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-13 05:11:54 -0400 |
commit | 07354eb1a74d1e1ece29f8bafe0b46e8c77a95ef (patch) | |
tree | 4e2370ce5a6eb5eccc20d89dcfca44cc0dafbfa6 /include/linux/ratelimit.h | |
parent | 5389f6fad27019f2ba78f1b332f719ec05f12a42 (diff) |
locking, printk: Annotate logbuf_lock as raw
The logbuf_lock lock can be taken in atomic context and therefore
cannot be preempted on -rt - annotate it.
In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[ merged and fixed it ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ratelimit.h')
-rw-r--r-- | include/linux/ratelimit.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; |