diff options
| author | David Vrabel <david.vrabel@citrix.com> | 2014-04-07 13:52:12 +0100 |
|---|---|---|
| committer | David Vrabel <david.vrabel@citrix.com> | 2014-04-07 13:52:12 +0100 |
| commit | 2c5cb2770392fb9c5d8518688c8bc61986d70dc6 (patch) | |
| tree | b19210e709de6ee0d22b67ef605a569500cf1a18 /include/linux/bitops.h | |
| parent | cd979883b9ede90643e019f33cb317933eb867b4 (diff) | |
| parent | 683b6c6f82a60fabf47012581c2cfbf1b037ab95 (diff) | |
Merge commit '683b6c6f82a60fabf47012581c2cfbf1b037ab95' into stable/for-linus-3.15
This merge of the irq-core-for-linus branch broke the ARM build when
Xen is enabled.
Conflicts:
drivers/xen/events/events_base.c
Diffstat (limited to 'include/linux/bitops.h')
| -rw-r--r-- | include/linux/bitops.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index abc9ca778456..be5fd38bd5a0 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -196,6 +196,21 @@ static inline unsigned long __ffs64(u64 word) #ifdef __KERNEL__ +#ifndef set_mask_bits +#define set_mask_bits(ptr, _mask, _bits) \ +({ \ + const typeof(*ptr) mask = (_mask), bits = (_bits); \ + typeof(*ptr) old, new; \ + \ + do { \ + old = ACCESS_ONCE(*ptr); \ + new = (old & ~mask) | bits; \ + } while (cmpxchg(ptr, old, new) != old); \ + \ + new; \ +}) +#endif + #ifndef find_last_bit /** * find_last_bit - find the last set bit in a memory region |
