[Xenomai-git] Philippe Gerum : cobalt/x86: fpu: drop obsolete xnarch_save_fpu()
Module: xenomai-3 Branch: wip/drivers Commit: 3d7cab71c44c341ff465ca7ea2a1562ceae1e125 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3d7cab71c44c341ff465ca7ea2a1562ceae1e125 Author: Philippe GerumDate: Thu Sep 8 16:29:38 2016 +0200 cobalt/x86: fpu: drop obsolete xnarch_save_fpu() --- kernel/cobalt/arch/x86/include/asm/xenomai/thread.h |2 -- kernel/cobalt/arch/x86/thread.c | 17 - 2 files changed, 19 deletions(-) diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h index 3862e33..bd39f5a 100644 --- a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +++ b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h @@ -59,8 +59,6 @@ static inline int xnarch_shadow_p(struct xnarchtcb *tcb, struct task_struct *tas ((d)->exception == 1 || (d)->exception == 3)) #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d)) -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, diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c index d367d13..0383f00 100644 --- a/kernel/cobalt/arch/x86/thread.c +++ b/kernel/cobalt/arch/x86/thread.c @@ -289,8 +289,6 @@ int xnarch_handle_fpu_fault(struct xnthread *from, /* * The faulting task is a shadow using the FPU for the first * time, initialize the FPU context and tell linux about it. -* The fpu usage bit is necessary for xnarch_save_fpu() to -* save the FPU state at next switch. */ __asm__ __volatile__("clts; fninit"); @@ -346,21 +344,6 @@ void xnarch_leave_root(struct xnthread *root) kernel_fpu_enable(); } -void xnarch_save_fpu(struct xnthread *thread) -{ - struct xnarchtcb *tcb = xnthread_archtcb(thread); - struct task_struct *p = tcb->core.host_task; - - if (__thread_has_fpu(p) == 0) - /* Saved by last __switch_to */ - return; - - clts(); - - __do_save_i387(x86_fpustate_ptr(>thread)); - __thread_clear_has_fpu(p); -} - void xnarch_switch_fpu(struct xnthread *from, struct xnthread *to) { x86_fpustate *const from_fpup = from ? from->tcb.fpup : NULL; ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/x86: fpu: drop obsolete xnarch_save_fpu()
Module: xenomai-3 Branch: next Commit: f6e5114e7b788f52152ac7d09fa54be11e345440 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f6e5114e7b788f52152ac7d09fa54be11e345440 Author: Philippe GerumDate: Thu Sep 8 16:29:38 2016 +0200 cobalt/x86: fpu: drop obsolete xnarch_save_fpu() --- kernel/cobalt/arch/x86/include/asm/xenomai/thread.h |2 -- kernel/cobalt/arch/x86/thread.c | 17 - 2 files changed, 19 deletions(-) diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h index 3862e33..bd39f5a 100644 --- a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +++ b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h @@ -59,8 +59,6 @@ static inline int xnarch_shadow_p(struct xnarchtcb *tcb, struct task_struct *tas ((d)->exception == 1 || (d)->exception == 3)) #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d)) -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, diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c index d367d13..0383f00 100644 --- a/kernel/cobalt/arch/x86/thread.c +++ b/kernel/cobalt/arch/x86/thread.c @@ -289,8 +289,6 @@ int xnarch_handle_fpu_fault(struct xnthread *from, /* * The faulting task is a shadow using the FPU for the first * time, initialize the FPU context and tell linux about it. -* The fpu usage bit is necessary for xnarch_save_fpu() to -* save the FPU state at next switch. */ __asm__ __volatile__("clts; fninit"); @@ -346,21 +344,6 @@ void xnarch_leave_root(struct xnthread *root) kernel_fpu_enable(); } -void xnarch_save_fpu(struct xnthread *thread) -{ - struct xnarchtcb *tcb = xnthread_archtcb(thread); - struct task_struct *p = tcb->core.host_task; - - if (__thread_has_fpu(p) == 0) - /* Saved by last __switch_to */ - return; - - clts(); - - __do_save_i387(x86_fpustate_ptr(>thread)); - __thread_clear_has_fpu(p); -} - void xnarch_switch_fpu(struct xnthread *from, struct xnthread *to) { x86_fpustate *const from_fpup = from ? from->tcb.fpup : NULL; ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/x86: fpu: drop obsolete xnarch_save_fpu()
Module: xenomai-3 Branch: stable-3.0.x Commit: 3d7cab71c44c341ff465ca7ea2a1562ceae1e125 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3d7cab71c44c341ff465ca7ea2a1562ceae1e125 Author: Philippe GerumDate: Thu Sep 8 16:29:38 2016 +0200 cobalt/x86: fpu: drop obsolete xnarch_save_fpu() --- kernel/cobalt/arch/x86/include/asm/xenomai/thread.h |2 -- kernel/cobalt/arch/x86/thread.c | 17 - 2 files changed, 19 deletions(-) diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h index 3862e33..bd39f5a 100644 --- a/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +++ b/kernel/cobalt/arch/x86/include/asm/xenomai/thread.h @@ -59,8 +59,6 @@ static inline int xnarch_shadow_p(struct xnarchtcb *tcb, struct task_struct *tas ((d)->exception == 1 || (d)->exception == 3)) #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d)) -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, diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c index d367d13..0383f00 100644 --- a/kernel/cobalt/arch/x86/thread.c +++ b/kernel/cobalt/arch/x86/thread.c @@ -289,8 +289,6 @@ int xnarch_handle_fpu_fault(struct xnthread *from, /* * The faulting task is a shadow using the FPU for the first * time, initialize the FPU context and tell linux about it. -* The fpu usage bit is necessary for xnarch_save_fpu() to -* save the FPU state at next switch. */ __asm__ __volatile__("clts; fninit"); @@ -346,21 +344,6 @@ void xnarch_leave_root(struct xnthread *root) kernel_fpu_enable(); } -void xnarch_save_fpu(struct xnthread *thread) -{ - struct xnarchtcb *tcb = xnthread_archtcb(thread); - struct task_struct *p = tcb->core.host_task; - - if (__thread_has_fpu(p) == 0) - /* Saved by last __switch_to */ - return; - - clts(); - - __do_save_i387(x86_fpustate_ptr(>thread)); - __thread_clear_has_fpu(p); -} - void xnarch_switch_fpu(struct xnthread *from, struct xnthread *to) { x86_fpustate *const from_fpup = from ? from->tcb.fpup : NULL; ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git