Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/hppa Minor tweaks.



details:   https://anonhg.NetBSD.org/src/rev/c1c172fd9377
branches:  trunk
changeset: 751994:c1c172fd9377
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 10 20:49:58 2010 +0000

description:
Minor tweaks.

diffstat:

 sys/arch/hppa/hppa/trap.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (58 lines):

diff -r 303e89ffd29c -r c1c172fd9377 sys/arch/hppa/hppa/trap.c
--- a/sys/arch/hppa/hppa/trap.c Wed Feb 10 20:45:35 2010 +0000
+++ b/sys/arch/hppa/hppa/trap.c Wed Feb 10 20:49:58 2010 +0000
@@ -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. */



Home | Main Index | Thread Index | Old Index