diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 index 56748db27a..7ceadfcd8a 100644 --- a/config/opal_config_asm.m4 +++ b/config/opal_config_asm.m4 @@ -890,20 +890,6 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ esac OPAL_VAR_SCOPE_POP - AC_MSG_CHECKING([whether to enable smp locks]) - AC_ARG_ENABLE([smp-locks], - [AC_HELP_STRING([--enable-smp-locks], - [enable smp locks in atomic ops. Do not disable if code will ever run in SMP or multi-threaded environment. (default: enabled)])]) - if test "$enable_smp_locks" != "no"; then - AC_MSG_RESULT([yes]) - want_smp_locks=1 - else - AC_MSG_RESULT([no]) - want_smp_locks=0 - fi - AC_DEFINE_UNQUOTED([OPAL_WANT_SMP_LOCKS], [$want_smp_locks], - [whether we want to have smp locks in atomic ops or not]) - AC_ARG_ENABLE([builtin-atomics], [AC_HELP_STRING([--enable-builtin-atomics], [Enable use of __sync builtin atomics (default: disabled)])]) diff --git a/opal/asm/asm.c b/opal/asm/asm.c index 41546266ad..ded09c26d2 100644 --- a/opal/asm/asm.c +++ b/opal/asm/asm.c @@ -23,8 +23,6 @@ #if OPAL_ASSEMBLY_ARCH == OPAL_SPARC -#if OPAL_WANT_SMP_LOCKS - #define LOCKS_TABLE_SIZE 8 /* make sure to get into reasonably useful bits (so shift at least 5) */ #define FIND_LOCK(addr) (&(locks_table[(((unsigned long) addr) >> 8) & \ @@ -42,15 +40,6 @@ static opal_atomic_lock_t locks_table[LOCKS_TABLE_SIZE] = { { { OPAL_ATOMIC_UNLOCKED } } }; -# else /* OPAL_WANT_SMP_LOCKS */ - -#define LOCKS_TABLE_SIZE 1 -#define FIND_LOCK(addr) (&(locks_table[0])) - -static opal_atomic_lock_t locks_table[1] = { OPAL_ATOMIC_UNLOCKED }; - -#endif /* OPAL_WANT_SMP_LOCKS */ - int32_t opal_atomic_add_32(volatile int32_t *addr, int delta) diff --git a/opal/include/opal/sys/alpha/atomic.h b/opal/include/opal/sys/alpha/atomic.h index ce95d5bbce..df1d788c1d 100644 --- a/opal/include/opal/sys/alpha/atomic.h +++ b/opal/include/opal/sys/alpha/atomic.h @@ -23,21 +23,10 @@ * On alpha, everything is load-locked, store-conditional... */ -#if OPAL_WANT_SMP_LOCKS - #define MB() __asm__ __volatile__ ("mb"); #define RMB() __asm__ __volatile__ ("mb"); #define WMB() __asm__ __volatile__ ("wmb"); -#else - -#define MB() -#define RMB() -#define WMB() - -#endif - - /********************************************************************** * * Define constants for PowerPC 32 diff --git a/opal/include/opal/sys/alpha/update.sh b/opal/include/opal/sys/alpha/update.sh index 2fd7f229d1..366d534549 100644 --- a/opal/include/opal/sys/alpha/update.sh +++ b/opal/include/opal/sys/alpha/update.sh @@ -29,7 +29,6 @@ cat > $CFILE< $CFILE<= 7) #define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 @@ -62,16 +60,6 @@ #endif -#else - -#define MB() -#define RMB() -#define WMB() - -#endif /* OPAL_WANT_SMP_LOCKS */ - - - /********************************************************************** * * Memory Barriers diff --git a/opal/include/opal/sys/arm/update.sh b/opal/include/opal/sys/arm/update.sh index 8b3361058a..cf42acc814 100644 --- a/opal/include/opal/sys/arm/update.sh +++ b/opal/include/opal/sys/arm/update.sh @@ -29,7 +29,6 @@ cat > $CFILE< $CFILE< $CFILE< $CFILE< -#if OPAL_WANT_SMP_LOCKS #define MB() OSMemoryBarrier -#else -#define MB() -#endif /********************************************************************** @@ -79,11 +75,7 @@ static inline void opal_atomic_wmb(void) static inline int opal_atomic_cmpset_32( volatile int32_t *addr, int32_t oldval, int32_t newval) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicCompareAndSwap32Barrier(oldval, newval, addr); -#else - return OSAtomicCompareAndSwap32(oldval, newval, addr); -#endif + return OSAtomicCompareAndSwap32 (oldval, newval, addr); } #define opal_atomic_cmpset_acq_32 opal_atomic_cmpset_32 @@ -93,11 +85,7 @@ static inline int opal_atomic_cmpset_32( volatile int32_t *addr, static inline int opal_atomic_cmpset_64( volatile int64_t *addr, int64_t oldval, int64_t newval) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicCompareAndSwap64Barrier(oldval, newval, addr); -#else - return OSAtomicCompareAndSwap64(oldval, newval, addr); -#endif + return OSAtomicCompareAndSwap64 (oldval, newval, addr); } #define opal_atomic_cmpset_acq_64 opal_atomic_cmpset_64 @@ -112,11 +100,7 @@ static inline int opal_atomic_cmpset_64( volatile int64_t *addr, */ static inline int32_t opal_atomic_add_32(volatile int32_t* v, int i) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicAdd32Barrier (i, v); -#else return OSAtomicAdd32 (i, v); -#endif } /** @@ -128,11 +112,7 @@ static inline int32_t opal_atomic_add_32(volatile int32_t* v, int i) */ static inline int64_t opal_atomic_add_64(volatile int64_t* v, int64_t i) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicAdd64Barrier (i, v); -#else return OSAtomicAdd64 (i, v); -#endif } /** @@ -144,11 +124,7 @@ static inline int64_t opal_atomic_add_64(volatile int64_t* v, int64_t i) */ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int i) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicAdd32Barrier (-i, v); -#else return OSAtomicAdd32 (-i, v); -#endif } /** @@ -160,11 +136,7 @@ static inline int32_t opal_atomic_sub_32(volatile int32_t* v, int i) */ static inline int64_t opal_atomic_sub_64(volatile int64_t* v, int64_t i) { -#if OPAL_WANT_SMP_LOCKS - return OSAtomicAdd64Barrier (-i, v); -#else return OSAtomicAdd64 (-i, v); -#endif } static inline void opal_atomic_init(opal_atomic_lock_t* lock, int32_t value) diff --git a/opal/include/opal/sys/powerpc/atomic.h b/opal/include/opal/sys/powerpc/atomic.h index 72412a1200..80b8b07626 100644 --- a/opal/include/opal/sys/powerpc/atomic.h +++ b/opal/include/opal/sys/powerpc/atomic.h @@ -24,24 +24,12 @@ * On powerpc ... */ -#if OPAL_WANT_SMP_LOCKS - #define MB() __asm__ __volatile__ ("sync" : : : "memory") #define RMB() __asm__ __volatile__ ("lwsync" : : : "memory") #define WMB() __asm__ __volatile__ ("eieio" : : : "memory") #define SMP_SYNC "sync \n\t" #define SMP_ISYNC "\n\tisync" -#else - -#define MB() -#define RMB() -#define WMB() -#define SMP_SYNC "" -#define SMP_ISYNC - -#endif - /********************************************************************** * diff --git a/opal/include/opal/sys/powerpc/update.sh b/opal/include/opal/sys/powerpc/update.sh index e21e9561c6..8c2ae0c869 100644 --- a/opal/include/opal/sys/powerpc/update.sh +++ b/opal/include/opal/sys/powerpc/update.sh @@ -29,7 +29,6 @@ cat > $CFILE< $CFILE<