Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SMP branch resync. Mostly RAS support.

  • Loading branch information...
commit f0eeb25e1b26b630d0c5b9a4f4c148339ca4396e 1 parent fa1dc5b
sommerfeld authored
View
9 sys/arch/i386/MP-UPDATING
@@ -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 @@ Last Synchronized: Sun Sep 23 21:12:12 EDT 2001
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.
-
-
-
-
View
2  sys/arch/i386/conf/GENERIC_PS2TINY
@@ -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,
View
2  sys/arch/i386/conf/GENERIC_TINY
@@ -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.
View
3  sys/arch/i386/i386/genassym.cf
@@ -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_STAT offsetof(struct proc, p_stat)
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)
View
22 sys/arch/i386/i386/locore.s
@@ -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 @@ switch_restored:
/* 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)
View
4 sys/arch/i386/i386/machdep.c
@@ -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"
View
17 sys/arch/i386/i386/trap.c
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.134.2.23 2002/08/19 01:32:44 sommerfeld E
#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 @@ trap(frame)
#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
View
2  sys/arch/i386/include/types.h
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.