Removes env_push/pop of FPU state
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 17 Apr 2013 23:13:36 +0000 (16:13 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 18 Apr 2013 21:25:14 +0000 (14:25 -0700)
RISC and SPARC: please check out your fp_state functions (like save,
restore, init).

kern/arch/i686/trap.c
kern/arch/riscv/env.c
kern/arch/sparc/cpuinfo.c
kern/arch/sparc/env.c
kern/include/env.h

index 978c942..b5ec185 100644 (file)
@@ -328,19 +328,6 @@ static void trap_dispatch(struct hw_trapframe *hw_tf)
        return;
 }
 
-void
-env_push_ancillary_state(env_t* e)
-{
-       // TODO: (HSS) handle silly state (don't really want this per-process)
-       // Here's where you'll save FP/MMX/XMM regs
-}
-
-void
-env_pop_ancillary_state(env_t* e)
-{
-       // Here's where you'll restore FP/MMX/XMM regs
-}
-
 /* Helper.  For now, this copies out the TF to pcpui.  Eventually, we should
  * consider doing this in trapentry.S
  *
index 366b6fc..41228bd 100644 (file)
@@ -5,13 +5,6 @@
 #include <pmap.h>
 
 void
-env_push_ancillary_state(env_t* e)
-{
-       if(e->scp_ctx.hw_tf.sr & SR_EF)
-               save_fp_state(&e->env_ancillary_state);
-}
-
-void
 save_fp_state(ancillary_state_t* silly)
 {
        /* TODO: save FP state! */
@@ -58,13 +51,6 @@ save_fp_state(ancillary_state_t* silly)
 }
 
 void
-env_pop_ancillary_state(env_t* e)
-{ 
-       if(e->scp_ctx.hw_tf.sr & SR_EF)
-               restore_fp_state(&e->env_ancillary_state);
-}
-
-void
 restore_fp_state(ancillary_state_t* silly)
 {
        return; // don't restore FP state for now
index 850e684..cf2960e 100644 (file)
@@ -23,7 +23,6 @@ static_asserts_can_go_here()
        static_assert(SIZEOF_KERNEL_MESSAGE_T == sizeof(kernel_message_t));
        static_assert(SIZEOF_KERNEL_MESSAGE_T % 8 == 0);
        static_assert(offsetof(env_t,scp_ctx) % 8 == 0);
-       static_assert(offsetof(env_t,env_ancillary_state) % 8 == 0);
 }
 
 void
index 2bc8c49..adcd098 100644 (file)
 #include <pmap.h>
 
 void
-( env_push_ancillary_state)(env_t* e)
-{
-       if(e->scp_ctx.hw_tf.psr & PSR_EF)
-               save_fp_state(&e->env_ancillary_state);
-}
-
-void
 save_fp_state(ancillary_state_t* silly)
 {
        #define push_two_fp_regs(pdest,n) \
@@ -52,13 +45,6 @@ save_fp_state(ancillary_state_t* silly)
 }
 
 void
-( env_pop_ancillary_state)(env_t* e)
-{ 
-       if(e->scp_ctx.hw_tf.psr & PSR_EF)
-               restore_fp_state(&e->env_ancillary_state);
-}
-
-void
 restore_fp_state(ancillary_state_t* silly)
 {
        #define pop_two_fp_regs(pdest,n) \
index 642c1f5..30dae93 100644 (file)
@@ -30,7 +30,6 @@ struct proc {
        TAILQ_ENTRY(proc) sibling_link;
        spinlock_t proc_lock;
        struct user_context scp_ctx;    /* context for an SCP.  TODO: move to vc0 */
-       ancillary_state_t env_ancillary_state;  // State saved when descheduled
        pid_t pid;
        /* Tempting to add a struct proc *parent, but we'd need to protect the use
         * of that reference from concurrent parent-death (letting init inherit
@@ -99,8 +98,6 @@ typedef struct proc env_t;
 extern atomic_t num_envs;              // Number of envs
 
 int            env_setup_vm(env_t *e);
-void   env_push_ancillary_state(env_t* e);
-void   env_pop_ancillary_state(env_t* e);
 void   env_user_mem_free(env_t* e, void* start, size_t len);
 void   env_pagetable_free(env_t* e);