Source-Changes-HG archive

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

[src/trunk]: src/sys/arch enable usermode RAS for sun[23] also.



details:   https://anonhg.NetBSD.org/src/rev/479f65dc2fb1
branches:  trunk
changeset: 756134:479f65dc2fb1
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jul 07 01:23:08 2010 +0000

description:
enable usermode RAS for sun[23] also.

diffstat:

 sys/arch/m68k/m68k/switch_subr.s |  11 ++++++-----
 sys/arch/sun3/sun3/genassym.cf   |   6 +++++-
 sys/arch/sun3/sun3x/genassym.cf  |   6 +++++-
 3 files changed, 16 insertions(+), 7 deletions(-)

diffs (100 lines):

diff -r 8e85332482c9 -r 479f65dc2fb1 sys/arch/m68k/m68k/switch_subr.s
--- a/sys/arch/m68k/m68k/switch_subr.s  Wed Jul 07 01:22:35 2010 +0000
+++ b/sys/arch/m68k/m68k/switch_subr.s  Wed Jul 07 01:23:08 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: switch_subr.s,v 1.24 2010/06/06 04:50:07 mrg Exp $     */
+/*     $NetBSD: switch_subr.s,v 1.25 2010/07/07 01:23:08 chs Exp $     */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation.
@@ -191,6 +191,7 @@
        tstl    %a2                     | vm == VM_MAP_NULL?
        jeq     Lcpu_switch_badsw       | panic
 #endif
+       pea     %a0@                    | save newlwp
 #if !defined(_SUN3X_) || defined(PMAP_DEBUG)
        movl    %a2@(VM_PMAP),%sp@-     | push vm->vm_map.pmap
        jbsr    _C_LABEL(_pmap_switch)  | _pmap_switch(pmap)
@@ -220,6 +221,9 @@
         */
        pea     %a0@                    | push newlwp
        jbsr    _C_LABEL(pmap_activate) | pmap_activate(newlwp)
+       /* Note that newlwp will be popped off the stack later. */
+#endif
+
        /*
         *  Check for restartable atomic sequences (RAS)
         */
@@ -237,11 +241,10 @@
        jeq     1f
        movl    _C_LABEL(curlwp),%a1
        movl    %a1@(L_MD_REGS),%a1
-       movel   %a0,%a1@(TF_PC)
+       movl    %a0,%a1@(TF_PC)
 1:
        movl    %sp@+,%d0               | restore newlwp
        movl    _C_LABEL(curpcb),%a1    | restore pcb
-#endif
 
        movl    %sp@(4),%d1             | restore oldlwp for a return value
        lea     _ASM_LABEL(tmpstk),%sp  | now goto a tmp stack for NMI
@@ -410,5 +413,3 @@
        moveml  %sp@+,#0x7FFF           | restore most user regs
        addql   #8,%sp                  | toss SP and stack adjust
        jra     _ASM_LABEL(rei)         | and return
-
-
diff -r 8e85332482c9 -r 479f65dc2fb1 sys/arch/sun3/sun3/genassym.cf
--- a/sys/arch/sun3/sun3/genassym.cf    Wed Jul 07 01:22:35 2010 +0000
+++ b/sys/arch/sun3/sun3/genassym.cf    Wed Jul 07 01:23:08 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.12 2009/12/10 05:10:04 rmind Exp $
+#      $NetBSD: genassym.cf,v 1.13 2010/07/07 01:23:08 chs Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -162,6 +162,7 @@
 define L_MD_REGS               offsetof(struct lwp, l_md.md_regs)
 define L_MD_FLAGS              offsetof(struct lwp, l_md.md_flags)
 define P_FLAG                  offsetof(struct proc, p_flag)
+define P_RASLIST               offsetof(struct proc, p_raslist)
 define P_VMSPACE               offsetof(struct proc, p_vmspace)
 
 # lwp fields and values
@@ -187,6 +188,9 @@
 define PCB_FPCTX               offsetof(struct pcb, pcb_fpregs)
 define SIZEOF_PCB              sizeof(struct pcb)
 
+# frame offsets
+define         TF_PC                   offsetof(struct frame, f_pc)
+
 # exception frame offset/sizes
 define FR_SP                   offsetof(struct trapframe, tf_regs[15])
 define FR_ADJ                  offsetof(struct trapframe, tf_stackadj)
diff -r 8e85332482c9 -r 479f65dc2fb1 sys/arch/sun3/sun3x/genassym.cf
--- a/sys/arch/sun3/sun3x/genassym.cf   Wed Jul 07 01:22:35 2010 +0000
+++ b/sys/arch/sun3/sun3x/genassym.cf   Wed Jul 07 01:23:08 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.11 2009/12/10 05:10:04 rmind Exp $
+#      $NetBSD: genassym.cf,v 1.12 2010/07/07 01:23:08 chs Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -153,6 +153,7 @@
 define L_MD_REGS               offsetof(struct lwp, l_md.md_regs)
 define L_MD_FLAGS              offsetof(struct lwp, l_md.md_flags)
 define P_FLAG                  offsetof(struct proc, p_flag)
+define P_RASLIST               offsetof(struct proc, p_raslist)
 define P_VMSPACE               offsetof(struct proc, p_vmspace)
 
 # lwp fields and values
@@ -177,6 +178,9 @@
 define PCB_FPCTX               offsetof(struct pcb, pcb_fpregs)
 define SIZEOF_PCB              sizeof(struct pcb)
 
+# frame offsets
+define         TF_PC                   offsetof(struct frame, f_pc)
+
 # exception frame offset/sizes
 define FR_SP                   offsetof(struct trapframe, tf_regs[15])
 define FR_ADJ                  offsetof(struct trapframe, tf_stackadj)



Home | Main Index | Thread Index | Old Index