Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/sparc64/sparc64 pull up 1.30 (approved by thor...



details:   https://anonhg.NetBSD.org/src/rev/ac734db6271f
branches:  netbsd-1-5
changeset: 488937:ac734db6271f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Aug 07 01:04:43 2000 +0000

description:
pull up 1.30 (approved by thorpej):
>Cleanup trapstate handling and garbage collect old stuff.

diffstat:

 sys/arch/sparc64/sparc64/vm_machdep.c |  25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)

diffs (53 lines):

diff -r 293df016efc3 -r ac734db6271f sys/arch/sparc64/sparc64/vm_machdep.c
--- a/sys/arch/sparc64/sparc64/vm_machdep.c     Mon Aug 07 01:03:41 2000 +0000
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c     Mon Aug 07 01:04:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.27 2000/05/28 05:49:04 thorpej Exp $ */
+/*     $NetBSD: vm_machdep.c,v 1.27.2.1 2000/08/07 01:04:43 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -234,10 +234,11 @@
        void (*func) __P((void *));
        void *arg;
 {
-       register struct pcb *opcb = &p1->p_addr->u_pcb;
-       register struct pcb *npcb = &p2->p_addr->u_pcb;
-       register struct trapframe *tf2;
-       register struct rwindow *rp;
+       struct pcb *opcb = &p1->p_addr->u_pcb;
+       struct pcb *npcb = &p2->p_addr->u_pcb;
+       struct trapframe *tf2;
+       struct rwindow *rp;
+       extern struct proc proc0;
 
        /*
         * Save all user registers to p1's stack or, in the case of
@@ -255,15 +256,6 @@
 #endif
        if (p1 == curproc) {
                write_user_windows();
-#if 0
-               /* Make sure our D$ is not polluted w/bad data */
-               blast_vcache();
-               /* 
-                * We should not need to copy this out cause we should be
-                * able to directly reload our windows from the pcb.
-                */
-               rwindow_save(p1);
-#endif
 
                /*
                 * We're in the kernel, so we don't really care about
@@ -333,6 +325,11 @@
 
        npcb->pcb_pc = (long)proc_trampoline - 8;
        npcb->pcb_sp = (long)rp - STACK_OFFSET;
+       /* Need to create a %tstate if we're forking from proc0 */
+       if (p1 == &proc0)
+               tf2->tf_tstate = (ASI_PRIMARY_NO_FAULT<<TSTATE_ASI_SHIFT) |
+                       ((PSTATE_USER)<<TSTATE_PSTATE_SHIFT);
+
 
 #ifdef NOTDEF_DEBUG
        printf("cpu_fork: Copying over trapframe: otf=%p ntf=%p sp=%p opcb=%p npcb=%p\n", 



Home | Main Index | Thread Index | Old Index