Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2020 12:41:40 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r364110 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202008111241.07BCfeC9064365@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Aug 11 12:41:40 2020
New Revision: 364110
URL: https://svnweb.freebsd.org/changeset/base/364110

Log:
  Use atomic_clear_rel_long() to implement clear_bit_unlock() in the LinuxKPI
  after r363842.
  
  Suggested by:	alc@
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/bitops.h

Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Aug 11 12:17:46 2020	(r364109)
+++ head/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Aug 11 12:41:40 2020	(r364110)
@@ -272,15 +272,11 @@ find_next_zero_bit(const unsigned long *addr, unsigned
 #define	clear_bit(i, a)							\
     atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i))
 
+#define	clear_bit_unlock(i, a)						\
+    atomic_clear_rel_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i))
+
 #define	test_bit(i, a)							\
     !!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i))
-
-static inline void
-clear_bit_unlock(long bit, volatile unsigned long *var)
-{
-	clear_bit(bit, var);
-	wmb();
-}
 
 static inline int
 test_and_clear_bit(long bit, volatile unsigned long *var)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008111241.07BCfeC9064365>