Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/vax/vax pullup 1.44->1.46 (ragge): fix critica...
details: https://anonhg.NetBSD.org/src/rev/a8c94ec1efb9
branches: netbsd-1-4
changeset: 469201:a8c94ec1efb9
user: perry <perry%NetBSD.org@localhost>
date: Mon Jul 12 19:21:44 1999 +0000
description:
pullup 1.44->1.46 (ragge): fix critical paging/swapping problems
diffstat:
sys/arch/vax/vax/trap.c | 38 ++++++++++++--------------------------
1 files changed, 12 insertions(+), 26 deletions(-)
diffs (86 lines):
diff -r 65accd6740f5 -r a8c94ec1efb9 sys/arch/vax/vax/trap.c
--- a/sys/arch/vax/vax/trap.c Sun Jul 11 10:24:09 1999 +0000
+++ b/sys/arch/vax/vax/trap.c Mon Jul 12 19:21:44 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.44 1999/03/24 05:51:17 mrg Exp $ */
+/* $NetBSD: trap.c,v 1.44.2.1 1999/07/12 19:21:44 perry Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -108,11 +108,9 @@
u_int sig = 0, type = frame->trap, trapsig = 1;
u_int rv, addr, umode;
struct proc *p = curproc;
- struct pmap *pm;
u_quad_t oticks = 0;
vm_map_t map;
vm_prot_t ftype;
- extern vm_map_t pte_map;
uvmexp.traps++;
if ((umode = USERMODE(frame))) {
@@ -171,30 +169,17 @@
#endif
#ifdef DIAGNOSTIC
if (p == 0)
- panic("trap: access fault without process");
+ panic("trap: access fault: addr %lx code %lx",
+ frame->pc, frame->code);
#endif
+
/*
- * First check for ptefetch. Can only happen to pages
- * in user space.
+ * Page tables are allocated in pmap_enter(). We get
+ * info from below if it is a page table fault, but
+ * UVM may want to map in pages without faults, so
+ * because we must check for PTE pages anyway we don't
+ * bother doing it here.
*/
- if (frame->trap & T_PTEFETCH) {
- pm = p->p_vmspace->vm_map.pmap;
- if (frame->code < 0x40000000) {
- addr = trunc_page((unsigned)&pm->pm_p0br[
- frame->code >> VAX_PGSHIFT]);
-#ifdef DEBUG
- } else if (frame->code < 0) {
- panic("ptefetch in kernel");
-#endif
- } else {
- addr = trunc_page((unsigned)&pm->pm_p1br[
- (frame->code & 0x3fffffff) >> VAX_PGSHIFT]);
- }
- rv = uvm_fault(pte_map, addr, 0,
- VM_PROT_WRITE|VM_PROT_READ);
- if (rv != KERN_SUCCESS)
- goto ufault;
- }
addr = trunc_page(frame->code);
if ((umode == 0) && (frame->code < 0))
map = kernel_map;
@@ -213,7 +198,7 @@
panic("Segv in kernel mode: pc %x addr %x",
(u_int)frame->pc, (u_int)frame->code);
}
-ufault: if (rv == KERN_RESOURCE_SHORTAGE) {
+ if (rv == KERN_RESOURCE_SHORTAGE) {
printf("UVM: pid %d (%s), uid %d killed: "
"out of swap\n",
p->p_pid, p->p_comm,
@@ -228,7 +213,7 @@
break;
case T_PTELEN:
- if (p->p_addr)
+ if (p && p->p_addr)
FAULTCHK;
panic("ptelen fault in system space: addr %lx pc %lx",
frame->code, frame->pc);
@@ -265,6 +250,7 @@
#ifdef DDB
case T_BPTFLT: /* Kernel breakpoint */
case T_KDBTRAP:
+ case T_KDBTRAP|T_USER:
case T_TRCTRAP:
kdb_trap(frame);
return;
Home |
Main Index |
Thread Index |
Old Index