Author: hselasky
Date: Wed Dec  5 15:53:34 2018
New Revision: 341591
URL: https://svnweb.freebsd.org/changeset/base/341591

Log:
  Fix some build of LinuxKPI on some platforms after r341518.
  
  MFC after:            1 week
  Sponsored by:         Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/asm/atomic-long.h

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h   Wed Dec  5 
15:42:31 2018        (r341590)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h   Wed Dec  5 
15:53:34 2018        (r341591)
@@ -78,7 +78,15 @@ atomic_long_dec(atomic_long_t *v)
 static inline long
 atomic_long_xchg(atomic_long_t *v, long val)
 {
+#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__)
        return atomic_swap_long(&v->counter, val);
+#else
+       long ret = atomic_long_read(v);
+
+       while (!atomic_fcmpset_long(&v->counter, &ret, val))
+               ;
+       return (ret);
+#endif
 }
 
 static inline long
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to