Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha If we get an unknown fault code, either...



details:   https://anonhg.NetBSD.org/src/rev/f42b80db9351
branches:  trunk
changeset: 554527:f42b80db9351
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Oct 29 05:16:26 2003 +0000

description:
If we get an unknown fault code, either panic (if DIAGNOSTIC), or fault it with
a 0 access_type (if not).  Remove bogus initializer.

diffstat:

 sys/arch/alpha/alpha/trap.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r cf393dbcc56c -r f42b80db9351 sys/arch/alpha/alpha/trap.c
--- a/sys/arch/alpha/alpha/trap.c       Wed Oct 29 05:11:26 2003 +0000
+++ b/sys/arch/alpha/alpha/trap.c       Wed Oct 29 05:16:26 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.87 2003/10/27 07:07:35 chs Exp $ */
+/* $NetBSD: trap.c,v 1.88 2003/10/29 05:16:26 mycroft Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.87 2003/10/27 07:07:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.88 2003/10/29 05:16:26 mycroft Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -237,7 +237,7 @@
        struct lwp *l;
        struct proc *p;
        ksiginfo_t ksi;
-       vm_prot_t ftype = VM_PROT_NONE;
+       vm_prot_t ftype;
        u_int64_t ucode;
        int i, user;
 #if defined(DDB)
@@ -426,6 +426,13 @@
                        case 1:                 /* store instruction */
                                ftype = VM_PROT_WRITE;
                                break;
+                       default:
+#ifdef DIAGNOSTIC
+                               panic("trap: bad fault type");
+#else
+                               ftype = VM_PROT_NONE;
+                               break;
+#endif
                        }
        
                        if (user) {



Home | Main Index | Thread Index | Old Index