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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Sep 25 19:52:34 2014 +0200

cobalt/x86: drop support for FPU-less configurations

Cobalt does not support 486-based relics.

---

 .../cobalt/arch/x86/include/asm/xenomai/thread.h   |   27 +++-----------------
 kernel/cobalt/arch/x86/thread.c                    |    4 ---
 2 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h
index 748434e..544507c 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h
@@ -54,39 +54,20 @@ static inline int xnarch_shadow_p(struct xnarchtcb *tcb, 
struct task_struct *tas
 #define xnarch_fault_trap(d)   ((d)->exception)
 #define xnarch_fault_code(d)   ((d)->regs->orig_ax)
 #define xnarch_fault_pc(d)     ((d)->regs->ip)
-/* fault is caused by use FPU while FPU disabled. */
 #define xnarch_fault_fpu_p(d)  ((d)->exception == 7)
-/* The following predicates are only usable over a regular Linux stack
-   context. */
 #define xnarch_fault_pf_p(d)   ((d)->exception == 14)
 #define xnarch_fault_bp_p(d)   ((current->ptrace & PT_PTRACED) &&      \
                                 ((d)->exception == 1 || (d)->exception == 3))
 #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d))
 
-#ifdef CONFIG_XENO_ARCH_FPU
-
 void xnarch_save_fpu(struct xnthread *thread);
+
 void xnarch_switch_fpu(struct xnthread *from, struct xnthread *to);
+
 int xnarch_handle_fpu_fault(struct xnthread *from, 
                        struct xnthread *to, struct ipipe_trap_data *d);
 
-#else /* !CONFIG_XENO_ARCH_FPU */
-
-static inline void xnarch_save_fpu(struct xnthread *thread) { }
-static inline void
-xnarch_switch_fpu(struct xnthread *from, struct xnthread *thread) 
-{ 
-       return 0;
-}
-
-static inline int
-xnarch_handle_fpu_fault(struct xnthread *from, 
-                       struct xnthread *to, struct ipipe_trap_data *d)
-{
-       return 0;
-}
-
-#endif /* !CONFIG_XENO_ARCH_FPU */
+void xnarch_leave_root(struct xnthread *root);
 
 void xnarch_init_root_tcb(struct xnthread *thread);
 
@@ -96,8 +77,6 @@ void xnarch_switch_to(struct xnthread *out, struct xnthread 
*in);
 
 static inline void xnarch_enter_root(struct xnthread *root) { }
 
-void xnarch_leave_root(struct xnthread *root);
-
 int xnarch_escalate(void);
 
 #endif /* !_COBALT_X86_ASM_THREAD_H */
diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c
index 07d677c..9956d44 100644
--- a/kernel/cobalt/arch/x86/thread.c
+++ b/kernel/cobalt/arch/x86/thread.c
@@ -203,8 +203,6 @@ void xnarch_switch_to(struct xnthread *out, struct xnthread 
*in)
        stts();
 }
 
-#ifdef CONFIG_XENO_ARCH_FPU
-
 #ifdef CONFIG_X86_64
 #define XSAVE_PREFIX   "0x48,"
 #define XSAVE_SUFFIX   "q"
@@ -393,8 +391,6 @@ void xnarch_switch_fpu(struct xnthread *from, struct 
xnthread *to)
                clear_stopped_child_used_math(p);
 }
 
-#endif /* CONFIG_XENO_ARCH_FPU */
-
 void xnarch_init_root_tcb(struct xnthread *thread)
 {
        struct xnarchtcb *tcb = xnthread_archtcb(thread);


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

Reply via email to