Module Name: src Committed By: skrll Date: Wed Feb 10 20:49:58 UTC 2010
Modified Files: src/sys/arch/hppa/hppa: trap.c Log Message: Minor tweaks. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 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.72 src/sys/arch/hppa/hppa/trap.c:1.73 --- src/sys/arch/hppa/hppa/trap.c:1.72 Wed Feb 10 17:00:45 2010 +++ src/sys/arch/hppa/hppa/trap.c Wed Feb 10 20:49:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.72 2010/02/10 17:00:45 skrll Exp $ */ +/* $NetBSD: trap.c,v 1.73 2010/02/10 20:49:58 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.72 2010/02/10 17:00:45 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.73 2010/02/10 20:49:58 skrll Exp $"); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -501,10 +501,11 @@ ksiginfo_t ksi; u_int opcode, onfault; int ret; - const char *tts; + const char *tts = "reserved"; int trapnum; #ifdef DIAGNOSTIC extern int emergency_stack_start, emergency_stack_end; + int oldcpl = cpl; #endif @@ -527,8 +528,6 @@ if ((type & T_USER) != 0) LWP_CACHE_CREDS(l, p); - tts = (trapnum > trap_types) ? "reserved" : trap_type[trapnum]; - #ifdef DIAGNOSTIC /* * If we are on the emergency stack, then we either got @@ -569,6 +568,9 @@ if (frame->tf_flags & TFF_LAST) l->l_md.md_regs = frame; + if (trapnum <= trap_types) + tts = trap_type[trapnum]; + #ifdef TRAPDEBUG if (trapnum != T_INTERRUPT && trapnum != T_IBREAK) printf("trap: %d, %s for %x:%x at %x:%x, fp=%p, rp=%x\n", @@ -587,6 +589,7 @@ } } #endif + pcb = lwp_getpcb(l); /* If this is a trap, not an interrupt, reenable interrupts. */