Source-Changes-HG archive

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

[src/sommerfeld_i386mp_1]: src/sys/arch/i386 SMP branch resync. Mostly RAS s...



details:   https://anonhg.NetBSD.org/src/rev/afdd1e744f9f
branches:  sommerfeld_i386mp_1
changeset: 482577:afdd1e744f9f
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Sat Aug 31 20:31:33 2002 +0000

description:
SMP branch resync.  Mostly RAS support.

diffstat:

 sys/arch/i386/MP-UPDATING          |   9 +++++----
 sys/arch/i386/conf/GENERIC_PS2TINY |   2 +-
 sys/arch/i386/conf/GENERIC_TINY    |   2 +-
 sys/arch/i386/i386/genassym.cf     |   3 ++-
 sys/arch/i386/i386/locore.s        |  22 +++++++++++++++++++++-
 sys/arch/i386/i386/machdep.c       |   4 ++--
 sys/arch/i386/i386/trap.c          |  17 ++++++++++++-----
 sys/arch/i386/include/types.h      |   2 +-
 8 files changed, 45 insertions(+), 16 deletions(-)

diffs (163 lines):

diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/MP-UPDATING
--- a/sys/arch/i386/MP-UPDATING Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/MP-UPDATING Sat Aug 31 20:31:33 2002 +0000
@@ -1,3 +1,8 @@
+Last Synchronized: Sat Aug 31 12:58:28 EDT 2002
+
+merged with -current as of today.
+merged in restartable atomic sequence support.
+
 Last Synchronized: Sun Aug 18 19:21:52 EDT 2002
 
 merged with -current as of today.
@@ -54,7 +59,3 @@
 Now using new toolchain.  Most (but not all) of the new assembler
 warnings are now fixed.  Has all the ubcperf, new-dirpref, poolified
 softdeps, and assorted other goodness.
-
-
-
-
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/conf/GENERIC_PS2TINY
--- a/sys/arch/i386/conf/GENERIC_PS2TINY        Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/conf/GENERIC_PS2TINY        Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC_PS2TINY,v 1.12.2.4 2002/08/19 01:22:18 sommerfeld Exp $
+#      $NetBSD: GENERIC_PS2TINY,v 1.12.2.5 2002/08/31 20:31:33 sommerfeld Exp $
 #
 #      GENERIC-style kernel config for IBM PS/2 with MCA bus. It only contains
 #      IBM PS/2 related stuff and has been generally trimmed down somewhat,
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/conf/GENERIC_TINY
--- a/sys/arch/i386/conf/GENERIC_TINY   Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/conf/GENERIC_TINY   Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC_TINY,v 1.22.2.13 2002/08/19 01:22:18 sommerfeld Exp $
+#      $NetBSD: GENERIC_TINY,v 1.22.2.14 2002/08/31 20:31:33 sommerfeld Exp $
 #
 #      GENERIC_TINY -- suitable default for 4M machines
 #                      No EISA, PCI, or SCSI.
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/i386/genassym.cf
--- a/sys/arch/i386/i386/genassym.cf    Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/i386/genassym.cf    Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.17.10.17 2002/06/25 15:44:50 sommerfeld Exp $
+#      $NetBSD: genassym.cf,v 1.17.10.18 2002/08/31 20:31:34 sommerfeld Exp $
 
 #
 # Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -154,6 +154,7 @@
 define P_WCHAN                 offsetof(struct proc, p_wchan)
 define P_FLAG                  offsetof(struct proc, p_flag)
 define P_CPU                   offsetof(struct proc, p_cpu)
+define P_NRAS                  offsetof(struct proc, p_nras)
 define P_MD_TSS_SEL            offsetof(struct proc, p_md.md_tss_sel)
 define P_MD_REGS               offsetof(struct proc, p_md.md_regs)
 define P_MD_SYSCALL            offsetof(struct proc, p_md.md_syscall)
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/i386/locore.s       Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.215.2.34 2002/08/19 01:22:28 sommerfeld Exp $     */
+/*     $NetBSD: locore.s,v 1.215.2.35 2002/08/31 20:31:34 sommerfeld Exp $     */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -2119,6 +2119,26 @@
        /* Interrupts are okay again. */
        sti
 
+/*
+ *  Check for restartable atomic sequences (RAS)
+ *  XXX %edi reloads are not necessary here as %edi is callee-saved!
+ */
+       movl    CPUVAR(CURPROC),%edi
+       cmpl    $0,P_NRAS(%edi)
+       je      1f
+       movl    P_MD_REGS(%edi),%edx
+       movl    TF_EIP(%edx),%eax
+       pushl   %eax
+       pushl   %edi
+       call    _C_LABEL(ras_lookup)
+       addl    $8,%esp
+       cmpl    $-1,%eax
+       je      1f
+       movl    CPUVAR(CURPROC),%edi
+       movl    P_MD_REGS(%edi),%edx
+       movl    %eax,TF_EIP(%edx)
+1:
+
 switch_return:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)      
        call    _C_LABEL(sched_unlock_idle)
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/i386/machdep.c      Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.376.2.40 2002/08/19 01:22:29 sommerfeld Exp $    */
+/*     $NetBSD: machdep.c,v 1.376.2.41 2002/08/31 20:31:34 sommerfeld Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.376.2.40 2002/08/19 01:22:29 sommerfeld Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.376.2.41 2002/08/31 20:31:34 sommerfeld Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/i386/trap.c
--- a/sys/arch/i386/i386/trap.c Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/i386/trap.c Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.134.2.23 2002/08/19 01:32:44 sommerfeld Exp $       */
+/*     $NetBSD: trap.c,v 1.134.2.24 2002/08/31 20:31:35 sommerfeld Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.134.2.23 2002/08/19 01:32:44 sommerfeld Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.134.2.24 2002/08/31 20:31:35 sommerfeld Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -95,6 +95,7 @@
 #include <sys/user.h>
 #include <sys/acct.h>
 #include <sys/kernel.h>
+#include <sys/ras.h>
 #include <sys/signal.h>
 #include <sys/syscall.h>
 
@@ -573,9 +574,15 @@
 #ifdef MATH_EMULATE
        trace:
 #endif
-               KERNEL_PROC_LOCK(p);
-               (*p->p_emul->e_trapsignal)(p, SIGTRAP, type & ~T_USER);
-               KERNEL_PROC_UNLOCK(p);
+               /*
+                * Don't go single-stepping into a RAS.
+                */
+               if ((p->p_nras == 0) ||
+                   (ras_lookup(p, (caddr_t)frame.tf_eip) == (caddr_t)-1)) {
+                       KERNEL_PROC_LOCK(p);
+                       (*p->p_emul->e_trapsignal)(p, SIGTRAP, type & ~T_USER);
+                       KERNEL_PROC_UNLOCK(p);
+               }
                break;
 
 #if    NISA > 0 || NMCA > 0
diff -r b7cd9d1d2039 -r afdd1e744f9f sys/arch/i386/include/types.h
--- a/sys/arch/i386/include/types.h     Tue Aug 27 08:53:17 2002 +0000
+++ b/sys/arch/i386/include/types.h     Sat Aug 31 20:31:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.24.4.6 2002/08/19 01:22:37 sommerfeld Exp $        */
+/*     $NetBSD: types.h,v 1.24.4.7 2002/08/31 20:31:36 sommerfeld Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.



Home | Main Index | Thread Index | Old Index