diff mbox

[PATCHv4,1/2] linux-generic: remove octeon specific code from odp_atomic_fetch_inc_u32

Message ID 1419865132-27981-2-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit e20db47937ecc87bd4bd4964af4a35a9f0ab42cc
Headers show

Commit Message

Maxim Uvarov Dec. 29, 2014, 2:58 p.m. UTC
Gcc already provides valid code for odp_atomic_fetch_inc_u32, no need
for inline assembly.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/include/api/odp_atomic.h | 8 --------
 1 file changed, 8 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_atomic.h b/platform/linux-generic/include/api/odp_atomic.h
index 4a5b0b2..e45a751 100644
--- a/platform/linux-generic/include/api/odp_atomic.h
+++ b/platform/linux-generic/include/api/odp_atomic.h
@@ -156,15 +156,7 @@  static inline void odp_atomic_sub_u32(odp_atomic_u32_t *atom,
 
 static inline uint32_t odp_atomic_fetch_inc_u32(odp_atomic_u32_t *atom)
 {
-#if defined __OCTEON__
-	uint32_t ret;
-	__asm__ __volatile__ ("syncws");
-	__asm__ __volatile__ ("lai %0,(%2)" : "=r" (ret), "+m" (atom) :
-			      "r" (atom));
-	return ret;
-#else
 	return __atomic_fetch_add(&atom->v, 1, __ATOMIC_RELAXED);
-#endif
 }
 
 /**