diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-05-18 14:08:53 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-05-18 14:08:53 +1000 |
| commit | 1fafef9dfe127bdd4600eeaca302f0c1cb4ee5d0 (patch) | |
| tree | f829e8a26fc768666eb5f827bf5817892ea7e46c /include/linux/wait_bit.h | |
| parent | 315852b422972e6ebb1dfddaadada09e46a2681a (diff) | |
| parent | 76ef6b28ea4f81c3d511866a9b31392caa833126 (diff) | |
Merge drm-fixes-for-v4.17-rc6-urgent into drm-next
Need to backmerge some nouveau fixes to reduce
the nouveau -next conflicts a lot.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/wait_bit.h')
| -rw-r--r-- | include/linux/wait_bit.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h index 9318b2166439..2b0072fa5e92 100644 --- a/include/linux/wait_bit.h +++ b/include/linux/wait_bit.h @@ -305,4 +305,21 @@ do { \ __ret; \ }) +/** + * clear_and_wake_up_bit - clear a bit and wake up anyone waiting on that bit + * + * @bit: the bit of the word being waited on + * @word: the word being waited on, a kernel virtual address + * + * You can use this helper if bitflags are manipulated atomically rather than + * non-atomically under a lock. + */ +static inline void clear_and_wake_up_bit(int bit, void *word) +{ + clear_bit_unlock(bit, word); + /* See wake_up_bit() for which memory barrier you need to use. */ + smp_mb__after_atomic(); + wake_up_bit(word, bit); +} + #endif /* _LINUX_WAIT_BIT_H */ |
