Module: xenomai-2.6
Branch: master
Commit: cf7f5b66922541f51922ae343523a50f33af8af3
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=cf7f5b66922541f51922ae343523a50f33af8af3

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Nov 28 16:39:05 2012 +0100

arm: convert --enable-arm-atomic to generic --with-atomic-ops

---

 configure                    |   34 ----------------------------------
 configure.in                 |   24 ------------------------
 include/asm-arm/atomic.h     |    6 +++---
 include/asm-arm/atomic_asm.h |   10 +++++++---
 src/include/xeno_config.h.in |    6 ------
 5 files changed, 10 insertions(+), 70 deletions(-)

diff --git a/configure b/configure
index 6dd7fc7..60f94f0 100755
--- a/configure
+++ b/configure
@@ -814,7 +814,6 @@ enable_x86_sep
 enable_x86_tsc
 enable_arm_tsc
 enable_arm_quirks
-enable_arm_atomic
 enable_doc_install
 enable_dox_doc
 enable_dbx
@@ -1486,11 +1485,6 @@ Optional Features:
                           s3c24x, sa1100.
   --enable-arm-quirks     Enable quirks for specific systems. Currently
                           supported quirks are for sa1100 and xscale3.
-  --enable-arm-atomic     Select whether to rely on gcc or directly use inline
-                          assembly to provide atomic instructions, valid
-                          values are "gcc" and "asm", default is "gcc" and
-                          should be fine except if you are using a broken
-                          toolchain
   --disable-doc-install   Do not install documentation
   --enable-dox-doc        Build Doxygen documentation
   --enable-dbx            Build Docbook XML documentation.
@@ -12784,28 +12778,6 @@ if test "${enable_arm_quirks+set}" = set; then :
 fi
 
 
-  arm_atomic=gcc
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM atomic 
instructions type" >&5
-$as_echo_n "checking for ARM atomic instructions type... " >&6; }
-  # Check whether --enable-arm-atomic was given.
-if test "${enable_arm_atomic+set}" = set; then :
-  enableval=$enable_arm_atomic; case "$enableval" in
-       gcc)  arm_atomic=gcc;;
-       asm)  arm_atomic=asm;;
-       *)    unset arm_atomic;;
-       esac
-fi
-
-  unset CONFIG_XENO_ARM_GCC_ATOMIC
-  unset CONFIG_XENO_ARM_ASM_ATOMIC
-  case "$arm_atomic" in
-  gcc) CONFIG_XENO_ARM_GCC_ATOMIC=y;;
-  asm) CONFIG_XENO_ARM_ASM_ATOMIC=y;;
-  *)  as_fn_error $? "Invalid value for arm-atomic option, valid values are 
\"gcc\" and \"asm\"" "$LINENO" 5
-  esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${arm_atomic}" >&5
-$as_echo "${arm_atomic}" >&6; }
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM SA1100 
architecture" >&5
 $as_echo_n "checking for ARM SA1100 architecture... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: 
${CONFIG_XENO_ARM_SA1100:-no}" >&5
@@ -13489,12 +13461,6 @@ $as_echo "#define CONFIG_X86_TSC 1" >>confdefs.h
 test x$CONFIG_XENO_ARM_SA1100 = xy &&
 $as_echo "#define CONFIG_XENO_ARM_SA1100 1" >>confdefs.h
 
-test x$CONFIG_XENO_ARM_GCC_ATOMIC = xy &&
-$as_echo "#define CONFIG_XENO_ARM_GCC_ATOMIC 1" >>confdefs.h
-
-test x$CONFIG_XENO_ARM_ASM_ATOMIC = xy &&
-$as_echo "#define CONFIG_XENO_ARM_ASM_ATOMIC 1" >>confdefs.h
-
 test x$CONFIG_XENO_CPU_XSC3 = xy &&
 $as_echo "#define CONFIG_XENO_CPU_XSC3 1" >>confdefs.h
 
diff --git a/configure.in b/configure.in
index d52213e..7522b51 100644
--- a/configure.in
+++ b/configure.in
@@ -268,28 +268,6 @@ kuser, imx, ixp4xx, omap, orion, pxa, s3c24x, sa1100.]),
        *)AC_MSG_ERROR([Invalid SOC selected: "$enableval"]);;
        esac])
 
-  arm_atomic=gcc
-  AC_MSG_CHECKING(for ARM atomic instructions type)
-  AC_ARG_ENABLE(arm-atomic,
-       AS_HELP_STRING([--enable-arm-atomic], [Select whether to rely
-       on gcc or directly use inline assembly to provide atomic
-       instructions, valid values are "gcc" and "asm", default is
-       "gcc" and should be fine except if you are using a broken
-       toolchain]),
-       [case "$enableval" in
-       gcc)  arm_atomic=gcc;;
-       asm)  arm_atomic=asm;;
-       *)    unset arm_atomic;;
-       esac])
-  unset CONFIG_XENO_ARM_GCC_ATOMIC
-  unset CONFIG_XENO_ARM_ASM_ATOMIC
-  case "$arm_atomic" in
-  gcc) CONFIG_XENO_ARM_GCC_ATOMIC=y;;
-  asm) CONFIG_XENO_ARM_ASM_ATOMIC=y;;
-  *)  AC_MSG_ERROR([Invalid value for arm-atomic option, valid values are 
"gcc" and "asm"])
-  esac
-  AC_MSG_RESULT(${arm_atomic})
-
   AC_MSG_CHECKING(for ARM SA1100 architecture)
   AC_MSG_RESULT(${CONFIG_XENO_ARM_SA1100:-no})
 
@@ -453,8 +431,6 @@ test x$atomic_ops = xbuiltins && 
AC_DEFINE(CONFIG_XENO_ATOMIC_BUILTINS,1,[config
 test x$CONFIG_X86_TSC = xy && AC_DEFINE(CONFIG_X86_TSC,1,[config])
 
 test x$CONFIG_XENO_ARM_SA1100 = xy && 
AC_DEFINE(CONFIG_XENO_ARM_SA1100,1,[config])
-test x$CONFIG_XENO_ARM_GCC_ATOMIC = xy && 
AC_DEFINE(CONFIG_XENO_ARM_GCC_ATOMIC,1,[config])
-test x$CONFIG_XENO_ARM_ASM_ATOMIC = xy && 
AC_DEFINE(CONFIG_XENO_ARM_ASM_ATOMIC,1,[config])
 test x$CONFIG_XENO_CPU_XSC3 = xy && AC_DEFINE(CONFIG_XENO_CPU_XSC3,1,[config])
 test $CONFIG_XENO_ARM_TSC_TYPE && 
AC_DEFINE_UNQUOTED(CONFIG_XENO_ARM_TSC_TYPE,$CONFIG_XENO_ARM_TSC_TYPE,[config])
 AM_CONDITIONAL(CONFIG_XENO_SHARED,[test "$enable_shared" = 'yes'])
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index c869bcf..cab422f 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -36,7 +36,7 @@ xnarch_atomic_set(xnarch_atomic_t *ptr, unsigned long val)
        ptr->counter = val;
 }
 
-#ifdef CONFIG_XENO_ARM_GCC_ATOMIC
+#ifdef CONFIG_XENO_ATOMIC_BUILTINS
 #define xnarch_memory_barrier()        __sync_synchronize()
 #define xnarch_read_memory_barrier() xnarch_memory_barrier()
 #define xnarch_write_memory_barrier() xnarch_memory_barrier()
@@ -45,8 +45,8 @@ xnarch_atomic_set(xnarch_atomic_t *ptr, unsigned long val)
         __sync_val_compare_and_swap(&(v)->counter,      \
                                     (unsigned long)(o), \
                                     (unsigned long)(n))
-#else /* CONFIG_XENO_ARM_ASM_ATOMIC || __KERNEL__ */
+#else /* CONFIG_XENO_ATOMIC_BUILTINS */
 #include <asm/xenomai/atomic_asm.h>
-#endif /* CONFIG_XENO_ARM_ASM_ATOMIC || __KERNEL__ */
+#endif /* CONFIG_XENO_ATOMIC_BUILTINS */
 
 #endif /* !_XENO_ASM_ARM_ATOMIC_H */
diff --git a/include/asm-arm/atomic_asm.h b/include/asm-arm/atomic_asm.h
index 1dce753..47f17c9 100644
--- a/include/asm-arm/atomic_asm.h
+++ b/include/asm-arm/atomic_asm.h
@@ -20,8 +20,12 @@
  * 02111-1307, USA.
  */
 
-#ifndef _XENO_ASM_ARM_ASM_ATOMIC_H
-#define _XENO_ASM_ARM_ASM_ATOMIC_H
+#ifndef _XENO_ASM_ARM_ATOMIC_ASM_H
+#define _XENO_ASM_ARM_ATOMIC_ASM_H
+
+#ifndef _XENO_ASM_ARM_ATOMIC_H
+#error "please don't include asm/atomic_asm.h directly"
+#endif
 
 extern void __xnarch_xchg_called_with_bad_pointer(void);
 
@@ -475,4 +479,4 @@ xnarch_atomic_clear_mask(xnarch_atomic_t *v, long mask)
 #endif /* __KERNEL__ */
 #endif /* ARM arch <= 5 */
 
-#endif /* !_XENO_ASM_ARM_ASM_ATOMIC_H */
+#endif /* !_XENO_ASM_ARM_ATOMIC_ASM_H */
diff --git a/src/include/xeno_config.h.in b/src/include/xeno_config.h.in
index df1b0e0..215cecc 100644
--- a/src/include/xeno_config.h.in
+++ b/src/include/xeno_config.h.in
@@ -10,12 +10,6 @@
 #undef CONFIG_X86_TSC
 
 /* config */
-#undef CONFIG_XENO_ARM_ASM_ATOMIC
-
-/* config */
-#undef CONFIG_XENO_ARM_GCC_ATOMIC
-
-/* config */
 #undef CONFIG_XENO_ARM_SA1100
 
 /* config */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to