aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64/bitops.h')
-rw-r--r--include/asm-ia64/bitops.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h
index a977affaebec..a1b9719f5fbb 100644
--- a/include/asm-ia64/bitops.h
+++ b/include/asm-ia64/bitops.h
@@ -124,10 +124,21 @@ clear_bit_unlock (int nr, volatile void *addr)
124/** 124/**
125 * __clear_bit_unlock - Non-atomically clear a bit with release 125 * __clear_bit_unlock - Non-atomically clear a bit with release
126 * 126 *
127 * This is like clear_bit_unlock, but the implementation may use a non-atomic 127 * This is like clear_bit_unlock, but the implementation uses a store
128 * store (this one uses an atomic, however). 128 * with release semantics. See also __raw_spin_unlock().
129 */ 129 */
130#define __clear_bit_unlock clear_bit_unlock 130static __inline__ void
131__clear_bit_unlock(int nr, volatile void *addr)
132{
133 __u32 mask, new;
134 volatile __u32 *m;
135
136 m = (volatile __u32 *)addr + (nr >> 5);
137 mask = ~(1 << (nr & 31));
138 new = *m & mask;
139 barrier();
140 ia64_st4_rel_nta(m, new);
141}
131 142
132/** 143/**
133 * __clear_bit - Clears a bit in memory (non-atomic version) 144 * __clear_bit - Clears a bit in memory (non-atomic version)