Module Name:    src
Committed By:   skrll
Date:           Sat Jan 16 07:17:39 UTC 2010

Modified Files:
        src/sys/arch/hppa/hppa: trap.c

Log Message:
Count traps in uvmexp. Reduces diff to OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/hppa/hppa/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.65 src/sys/arch/hppa/hppa/trap.c:1.66
--- src/sys/arch/hppa/hppa/trap.c:1.65	Wed Jan  6 07:42:58 2010
+++ src/sys/arch/hppa/hppa/trap.c	Sat Jan 16 07:17:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.65 2010/01/06 07:42:58 skrll Exp $	*/
+/*	$NetBSD: trap.c,v 1.66 2010/01/16 07:17:39 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.65 2010/01/06 07:42:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.66 2010/01/16 07:17:39 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -558,10 +558,6 @@
 	frame_sanity_check(0xdead01, type, frame, l);
 #endif /* DEBUG */
 
-	/* If this is a trap, not an interrupt, reenable interrupts. */
-	if (type_raw != T_INTERRUPT)
-		mtctl(frame->tf_eiem, CR_EIEM);
-
 	if (frame->tf_flags & TFF_LAST)
 		l->l_md.md_regs = frame;
 
@@ -585,6 +581,12 @@
 #endif
 	pcb = lwp_getpcb(l);
 
+	/* If this is a trap, not an interrupt, reenable interrupts. */
+	if (type_raw != T_INTERRUPT) {
+		uvmexp.traps++;
+		mtctl(frame->tf_eiem, CR_EIEM);
+	}
+
 	switch (type) {
 	case T_NONEXIST:
 	case T_NONEXIST|T_USER:

Reply via email to