diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-24 08:08:08 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-24 09:22:17 -0400 |
commit | c4dbe54ed7296ac3249c415d512dd6d649f66f4b (patch) | |
tree | 7dcbce1bceccb31963869b347afbb86dfd11e709 | |
parent | d762f4383100c2a87b1a3f2d678cd3b5425655b4 (diff) |
seqlock: Get rid of SEQLOCK_UNLOCKED
All static seqlock should be initialized with the lockdep friendly
__SEQLOCK_UNLOCKED() macro.
Remove legacy SEQLOCK_UNLOCKED() macro.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/%3C1306238888.3026.31.camel%40edumazet-laptop%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/ia64/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 2 | ||||
-rw-r--r-- | include/linux/seqlock.h | 3 | ||||
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 2 |
4 files changed, 3 insertions, 6 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 04440cc09b40..85118dfe9bb5 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -36,7 +36,7 @@ | |||
36 | static cycle_t itc_get_cycles(struct clocksource *cs); | 36 | static cycle_t itc_get_cycles(struct clocksource *cs); |
37 | 37 | ||
38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { | 38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { |
39 | .lock = SEQLOCK_UNLOCKED, | 39 | .lock = __SEQLOCK_UNLOCKED(fsyscall_gtod_data.lock), |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct itc_jitter_data_t itc_jitter_data; | 42 | struct itc_jitter_data_t itc_jitter_data; |
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index dcbb28c4b694..59be48d0d75c 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -59,7 +59,7 @@ int __vgetcpu_mode __section_vgetcpu_mode; | |||
59 | 59 | ||
60 | struct vsyscall_gtod_data __vsyscall_gtod_data __section_vsyscall_gtod_data = | 60 | struct vsyscall_gtod_data __vsyscall_gtod_data __section_vsyscall_gtod_data = |
61 | { | 61 | { |
62 | .lock = SEQLOCK_UNLOCKED, | 62 | .lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock), |
63 | .sysctl_enabled = 1, | 63 | .sysctl_enabled = 1, |
64 | }; | 64 | }; |
65 | 65 | ||
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 06d69648fc86..e9811892844f 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -41,9 +41,6 @@ typedef struct { | |||
41 | #define __SEQLOCK_UNLOCKED(lockname) \ | 41 | #define __SEQLOCK_UNLOCKED(lockname) \ |
42 | { 0, __SPIN_LOCK_UNLOCKED(lockname) } | 42 | { 0, __SPIN_LOCK_UNLOCKED(lockname) } |
43 | 43 | ||
44 | #define SEQLOCK_UNLOCKED \ | ||
45 | __SEQLOCK_UNLOCKED(old_style_seqlock_init) | ||
46 | |||
47 | #define seqlock_init(x) \ | 44 | #define seqlock_init(x) \ |
48 | do { \ | 45 | do { \ |
49 | (x)->sequence = 0; \ | 46 | (x)->sequence = 0; \ |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 61fac4cabc78..c14d88ad348d 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -33,7 +33,7 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg); | |||
33 | * This struct holds the first and last local port number. | 33 | * This struct holds the first and last local port number. |
34 | */ | 34 | */ |
35 | struct local_ports sysctl_local_ports __read_mostly = { | 35 | struct local_ports sysctl_local_ports __read_mostly = { |
36 | .lock = SEQLOCK_UNLOCKED, | 36 | .lock = __SEQLOCK_UNLOCKED(sysctl_local_ports.lock), |
37 | .range = { 32768, 61000 }, | 37 | .range = { 32768, 61000 }, |
38 | }; | 38 | }; |
39 | 39 | ||