Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2018 13:41:33 +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: r341789 - head/sys/compat/linuxkpi/common/include/asm
Message-ID:  <201812101341.wBADfXVC031544@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Dec 10 13:41:33 2018
New Revision: 341789
URL: https://svnweb.freebsd.org/changeset/base/341789

Log:
  Remove no longer needed ifdefs in the LinuxKPI, after r341787.
  
  Differential Revision:	https://reviews.freebsd.org/D18450
  Reviewed by:		kib@
  MFC after:		3 days
  Sponsored by:		Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h	Mon Dec 10 13:41:28 2018	(r341788)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h	Mon Dec 10 13:41:33 2018	(r341789)
@@ -78,15 +78,7 @@ 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

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/atomic.h	Mon Dec 10 13:41:28 2018	(r341788)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic.h	Mon Dec 10 13:41:33 2018	(r341789)
@@ -128,15 +128,7 @@ atomic_clear_mask(unsigned int mask, atomic_t *v)
 static inline int
 atomic_xchg(atomic_t *v, int i)
 {
-#if !defined(__mips__)
 	return (atomic_swap_int(&v->counter, i));
-#else
-	int ret = atomic_read(v);
-
-	while (!atomic_fcmpset_int(&v->counter, &ret, i))
-		;
-	return (ret);
-#endif
 }
 
 static inline int



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