Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347514
b: refs/heads/master
c: fcc1688
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Boyd authored and Linus Torvalds committed Dec 20, 2012
1 parent dd618e2 commit a48517f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 787314c35fbb97e02823a1b8eb8cfa58f366cd49
refs/heads/master: fcc16882ac4532aaa644bff444f0c5d6228ba71e
17 changes: 5 additions & 12 deletions trunk/lib/atomic64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);

0 comments on commit a48517f

Please sign in to comment.