Module: xenomai-3
Branch: wip/dovetail
Commit: 7e1d540509e5f57aef64004e63de3107afaf5c43
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7e1d540509e5f57aef64004e63de3107afaf5c43

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jul 11 15:42:01 2016 +0200

cobalt/powerpc: remove dependency on obsolete CONFIG_MATH_EMU

---

 kernel/cobalt/arch/powerpc/Kconfig                 |    4 ----
 .../arch/powerpc/include/asm/xenomai/fptest.h      |   20 +++++++++++---------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/kernel/cobalt/arch/powerpc/Kconfig 
b/kernel/cobalt/arch/powerpc/Kconfig
index 2069288..6ce3440 100644
--- a/kernel/cobalt/arch/powerpc/Kconfig
+++ b/kernel/cobalt/arch/powerpc/Kconfig
@@ -1,10 +1,6 @@
 source "kernel/xenomai/Kconfig"
 source "drivers/xenomai/Kconfig"
 
-config XENO_ARCH_MATH_EMU
-        bool
-       default y if MATH_EMU || MATH_EMULATION
-
 config XENO_ARCH_FPU
        def_bool PPC_FPU
 
diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/fptest.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/fptest.h
index d99fa64..e907389 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/fptest.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/fptest.h
@@ -20,21 +20,23 @@
 #define _COBALT_POWERPC_ASM_FPTEST_H
 
 #include <linux/errno.h>
+#include <linux/printk.h>
 #include <asm/xenomai/uapi/fptest.h>
 
 static inline int fp_kernel_supported(void)
 {
+/*
+ * CAUTION: some architectures have a hardware FP unit, but a
+ * restricted set of supported FP instructions. Those may enable
+ * CONFIG_MATH_EMULATION and MATH_EMULATION_HW_UNIMPLEMENTED at the
+ * same time to provide an emulation of the missing instruction set.
+ */
 #ifdef CONFIG_PPC_FPU
        return 1;
-#else  /* !CONFIG_PPC_FPU */
-#ifdef CONFIG_XENO_ARCH_MATH_EMU
-       static int once = 0;
-       if (!once) {
-               once = 1;
-               printk("Warning: math emulation code defined in kernel\n"
-                      "         no kernel-based FPU support for this 
platform\n");
-       }
-#endif /* !CONFIG_XENO_ARCH_MATH_EMU */
+#else
+#ifdef CONFIG_MATH_EMULATION
+       printk_once(XENO_WARN "kernel-based FPU support is disabled\n");
+#endif /* !CONFIG_MATH_EMULATION */
        return 0;
 #endif /* !CONFIG_PPC_FPU */
 }


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

Reply via email to