diff options
author | Steven Rostedt <srostedt@redhat.com> | 2013-01-16 17:35:25 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-01-16 17:35:25 -0500 |
commit | 1d4395cae20fa9164afee6f3b71afb799a014e47 (patch) | |
tree | 48866c55a7f6a2786da6ed0e18c5a4744e3de2c4 /lib | |
parent | c094034cc852ce529317bddff5bda479aed11385 (diff) | |
parent | 0ba1cd8da86b7c4717852e786bacc7154b62d95c (diff) |
Merge tag 'v3.4.25' into v3.4-rt
This is the 3.4.25 stable release
Diffstat (limited to 'lib')
-rw-r--r-- | lib/atomic64.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/atomic64.c b/lib/atomic64.c index 978537809d84..08a4f068e61e 100644 --- a/lib/atomic64.c +++ b/lib/atomic64.c @@ -31,7 +31,11 @@ static union { raw_spinlock_t lock; char pad[L1_CACHE_BYTES]; -} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp; +} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp = { + [0 ... (NR_LOCKS - 1)] = { + .lock = __RAW_SPIN_LOCK_UNLOCKED(atomic64_lock.lock), + }, +}; static inline raw_spinlock_t *lock_addr(const atomic64_t *v) { @@ -173,14 +177,3 @@ int atomic64_add_unless(atomic64_t *v, long long a, long long u) return ret; } EXPORT_SYMBOL(atomic64_add_unless); - -static int init_atomic64_lock(void) -{ - int i; - - for (i = 0; i < NR_LOCKS; ++i) - raw_spin_lock_init(&atomic64_lock[i].lock); - return 0; -} - -pure_initcall(init_atomic64_lock); |