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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Jun 18 11:22:51 2013 +0200

cobalt/x86: unify 32/64 feature bits

Since all x86 kernels we support do provide vsyscall, there is no
point in making x86_sep an optional feature anymore. The kernel will
do the right thing depending on the CPU capabilities.

At this chance, we unify both former files into asm-x86/features.h.

---

 include/cobalt/asm-x86/Makefile.am   |    2 -
 include/cobalt/asm-x86/Makefile.in   |    2 -
 include/cobalt/asm-x86/features.h    |   50 +++++++++++++++++++++--
 include/cobalt/asm-x86/features_32.h |   71 ----------------------------------
 include/cobalt/asm-x86/features_64.h |   45 ---------------------
 5 files changed, 45 insertions(+), 125 deletions(-)

diff --git a/include/cobalt/asm-x86/Makefile.am 
b/include/cobalt/asm-x86/Makefile.am
index d55bf7f..1d1ede4 100644
--- a/include/cobalt/asm-x86/Makefile.am
+++ b/include/cobalt/asm-x86/Makefile.am
@@ -4,8 +4,6 @@ includesub_HEADERS =    \
        arith.h         \
        atomic.h        \
        calibration.h   \
-       features_32.h   \
-       features_64.h   \
        features.h      \
        fptest.h        \
        machine.h       \
diff --git a/include/cobalt/asm-x86/Makefile.in 
b/include/cobalt/asm-x86/Makefile.in
index 90a37a0..0c4da74 100644
--- a/include/cobalt/asm-x86/Makefile.in
+++ b/include/cobalt/asm-x86/Makefile.in
@@ -277,8 +277,6 @@ includesub_HEADERS = \
        arith.h         \
        atomic.h        \
        calibration.h   \
-       features_32.h   \
-       features_64.h   \
        features.h      \
        fptest.h        \
        machine.h       \
diff --git a/include/cobalt/asm-x86/features.h 
b/include/cobalt/asm-x86/features.h
index b031911..6af3a6e 100644
--- a/include/cobalt/asm-x86/features.h
+++ b/include/cobalt/asm-x86/features.h
@@ -1,5 +1,45 @@
-#ifdef __i386__
-#include "features_32.h"
-#else
-#include "features_64.h"
-#endif
+/*
+ * Copyright (C) 2005-2013 Philippe Gerum <r...@xenomai.org>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+
+#ifndef _COBALT_ASM_X86_FEATURES_H
+#define _COBALT_ASM_X86_FEATURES_H
+#define _COBALT_ASM_X86_FEATURES_H
+
+#include <asm-generic/xenomai/features.h>
+
+/* The ABI revision level we use on this arch. */
+#define XENOMAI_ABI_REV   4UL
+
+#define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
+
+#define XENOMAI_FEAT_MAN  __xn_feat_generic_man_mask
+
+static inline int check_abi_revision(unsigned long abirev)
+{
+       return abirev == XENOMAI_ABI_REV;
+}
+
+static inline const char *get_feature_label(unsigned int feature)
+{
+       return get_generic_feature_label(feature);
+}
+
+#define XNARCH_HAVE_LLMULSHFT    1
+#define XNARCH_HAVE_NODIV_LLIMD  1
+
+#endif /* !_COBALT_ASM_X86_FEATURES_H */
diff --git a/include/cobalt/asm-x86/features_32.h 
b/include/cobalt/asm-x86/features_32.h
deleted file mode 100644
index 19c18d1..0000000
--- a/include/cobalt/asm-x86/features_32.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _COBALT_ASM_X86_FEATURES_32_H
-#define _COBALT_ASM_X86_FEATURES_32_H
-#define _COBALT_ASM_X86_FEATURES_H
-
-#include <asm-generic/xenomai/features.h>
-
-#ifdef __KERNEL__
-/*
- * The kernel will deal dynamically with the actual SEP support
- * whether the CPU provides it or not; we just need to make sure that
- * VSYSCALL is supported by the current kernel here. The user-space
- * side extracts this information from the xeno_config.h header
- * included from asm-generic/xenomai/features.h.
- */
-#define CONFIG_XENO_X86_SEP  1
-#endif /* __KERNEL__ */
-
-#define __xn_feat_x86_sep 0x00000001
-
-/* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   4UL
-
-#ifdef CONFIG_XENO_X86_SEP
-#define __xn_feat_x86_sep_mask  __xn_feat_x86_sep
-#else
-#define __xn_feat_x86_sep_mask   0
-#endif
-
-#define XENOMAI_FEAT_DEP  (__xn_feat_generic_mask| \
-                          __xn_feat_x86_sep_mask)
-
-#define XENOMAI_FEAT_MAN  (__xn_feat_generic_man_mask| \
-                          __xn_feat_x86_sep)
-
-static inline int check_abi_revision(unsigned long abirev)
-{
-    return abirev == XENOMAI_ABI_REV;
-}
-
-static inline const char *get_feature_label (unsigned feature)
-{
-    switch (feature) {
-       case __xn_feat_x86_sep:
-           return "sep";
-       default:
-           return get_generic_feature_label(feature);
-    }
-}
-
-#define XNARCH_HAVE_LLMULSHFT    1
-#define XNARCH_HAVE_NODIV_LLIMD  1
-
-#endif /* !_COBALT_ASM_X86_FEATURES_32_H */
diff --git a/include/cobalt/asm-x86/features_64.h 
b/include/cobalt/asm-x86/features_64.h
deleted file mode 100644
index 2f2bcbf..0000000
--- a/include/cobalt/asm-x86/features_64.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2007 Philippe Gerum <r...@xenomai.org>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _COBALT_ASM_X86_FEATURES_64_H
-#define _COBALT_ASM_X86_FEATURES_64_H
-#define _COBALT_ASM_X86_FEATURES_H
-
-#include <asm-generic/xenomai/features.h>
-
-/* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   4UL
-
-#define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
-
-#define XENOMAI_FEAT_MAN  __xn_feat_generic_man_mask
-
-static inline int check_abi_revision(unsigned long abirev)
-{
-       return abirev == XENOMAI_ABI_REV;
-}
-
-static inline const char *get_feature_label (unsigned feature)
-{
-       return get_generic_feature_label(feature);
-}
-
-#define XNARCH_HAVE_LLMULSHFT    1
-#define XNARCH_HAVE_NODIV_LLIMD  1
-
-#endif /* !_COBALT_ASM_X86_FEATURES_64_H */


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

Reply via email to