Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Get rid of some debug code that rea...



details:   https://anonhg.NetBSD.org/src/rev/6b577756778a
branches:  trunk
changeset: 513084:6b577756778a
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon Jul 23 17:19:56 2001 +0000

description:
Get rid of some debug code that really isn't all that useful any more.

diffstat:

 sys/arch/sparc64/sparc64/locore.s |  69 +--------------------------------------
 sys/arch/sparc64/sparc64/trap.c   |  36 +-------------------
 2 files changed, 2 insertions(+), 103 deletions(-)

diffs (203 lines):

diff -r 7f96aaccce5f -r 6b577756778a sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Mon Jul 23 17:13:44 2001 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Mon Jul 23 17:19:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.127 2001/07/19 23:37:17 eeh Exp $ */
+/*     $NetBSD: locore.s,v 1.128 2001/07/23 17:19:56 eeh Exp $ */
 
 /*
  * Copyright (c) 1996-2001 Eduardo Horvath
@@ -64,7 +64,6 @@
 #define        TRAPSTATS               /* Count traps */
 #undef TRAPS_USE_IG            /* Use Interrupt Globals for all traps */
 #define        HWREF                   /* Track ref/mod bits in trap handlers */
-#undef MMUDEBUG                /* Check use of regs during MMU faults */
 #define        VECTORED_INTERRUPTS     /* Use interrupt vectors */
 #undef PMAP_FPSTATE            /* Allow nesting of VIS pmap copy/zero */
 #define        NEW_FPSTATE
@@ -890,17 +889,6 @@
        ldxa    [%g0] ASI_IMMU_8KPTR, %g2       !                               Load IMMU 8K TSB pointer
        ldxa    [%g0] ASI_IMMU, %g1     ! Hard coded for unified 8K TSB         Load IMMU tag target register
        ldda    [%g2] ASI_NUCLEUS_QUAD_LDD, %g4 !                               Load TSB tag and data into %g4 and %g5
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(missmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(missmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(missmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef NO_TSB
        ba,a    %icc, instr_miss;
         nop
@@ -920,17 +908,6 @@
        ldxa    [%g0] ASI_DMMU_8KPTR, %g2!                                      Load DMMU 8K TSB pointer
        ldxa    [%g0] ASI_DMMU, %g1     ! Hard coded for unified 8K TSB         Load DMMU tag target register
        ldda    [%g2] ASI_NUCLEUS_QUAD_LDD, %g4 !                               Load TSB tag and data into %g4 and %g5
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(missmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(missmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(missmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef NO_TSB
        ba,a    %icc, data_miss;
         nop
@@ -959,17 +936,6 @@
        inc     %g2
        stw     %g2, [%g1+%lo(_C_LABEL(udprot))]
 #endif
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(protmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(protmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(protmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef HWREF
        ba,a,pt %xcc, dmmu_write_fault
 #else
@@ -1165,17 +1131,6 @@
        ldxa    [%g0] ASI_IMMU_8KPTR, %g2       !                               Load IMMU 8K TSB pointer
        ldxa    [%g0] ASI_IMMU, %g1     ! Hard coded for unified 8K TSB         Load IMMU tag target register
        ldda    [%g2] ASI_NUCLEUS_QUAD_LDD, %g4 !                               Load TSB tag and data into %g4 and %g5
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(missmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(missmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(missmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef NO_TSB
        ba,a    %icc, instr_miss;
         nop
@@ -1195,17 +1150,6 @@
        ldxa    [%g0] ASI_DMMU_8KPTR, %g2!                                      Load DMMU 8K TSB pointer
        ldxa    [%g0] ASI_DMMU, %g1     ! Hard coded for unified 8K TSB         Load DMMU tag target register
        ldda    [%g2] ASI_NUCLEUS_QUAD_LDD, %g4 !                               Load TSB tag and data into %g4 and %g5
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(missmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(missmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(missmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef NO_TSB
        ba,a    %icc, data_miss;
         nop
@@ -1234,17 +1178,6 @@
        inc     %g2
        stw     %g2, [%g1+%lo(_C_LABEL(kdprot))]
 #endif
-#ifdef MMUDEBUG
-       rdpr    %tstate, %g7                            ! DEBUG record if we're on MMU globals
-       srlx    %g7, TSTATE_PSTATE_SHIFT, %g7           ! DEBUG
-       btst    PSTATE_MG, %g7                          ! DEBUG
-       bz      0f                                      ! DEBUG
-        sethi  %hi(_C_LABEL(protmmu)), %g7             ! DEBUG
-       lduw    [%g7+%lo(_C_LABEL(protmmu))], %g6       ! DEBUG
-       inc     %g6                                     ! DEBUG
-       stw     %g6, [%g7+%lo(_C_LABEL(protmmu))]       ! DEBUG
-0:                                                     ! DEBUG
-#endif
 #ifdef HWREF
        ba,a,pt %xcc, dmmu_write_fault
 #else
diff -r 7f96aaccce5f -r 6b577756778a sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c   Mon Jul 23 17:13:44 2001 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c   Mon Jul 23 17:19:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.70 2001/07/19 23:33:09 eeh Exp $ */
+/*     $NetBSD: trap.c,v 1.71 2001/07/23 17:19:57 eeh Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -110,8 +110,6 @@
 /* trapstats */
 int trapstats = 0;
 int protfix = 0;
-int protmmu = 0;
-int missmmu = 0;
 int udmiss = 0;        /* Number of normal/nucleus data/text miss/protection faults */
 int udhit = 0; 
 int udprot = 0;
@@ -1014,14 +1012,6 @@
                       (long)tf->tf_pc, (long)tf->tf_npc);
                Debugger();
        }
-       if (protmmu || missmmu) {
-               extern int trap_trace_dis;
-               trap_trace_dis = 1;
-               printf("%ld: data_access_fault(%x, %lx, %lx, %p) %s=%d\n",
-                      (long)(curproc?curproc->p_pid:-1), type, addr, pc, tf, 
-                      (protmmu)?"protmmu":"missmmu", (protmmu)?protmmu:missmmu);
-               Debugger();
-       }
        write_user_windows();
        if ((cpcb->pcb_nsaved > 8) ||
            (trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) ||
@@ -1244,14 +1234,6 @@
                       (long)tf->tf_pc, (long)tf->tf_npc);
                Debugger();
        }
-       if (protmmu || missmmu) {
-               extern int trap_trace_dis;
-               trap_trace_dis = 1;
-               printf("%d: data_access_error(%x, %lx, %lx, %p) %s=%d\n",
-                      curproc?curproc->p_pid:-1, type, sfva, afva, tf, 
-                      (protmmu)?"protmmu":"missmmu", (protmmu)?protmmu:missmmu);
-               Debugger();
-       }
        write_user_windows();
        if ((trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) || 
            trapdebug&(TDB_ADDFLT|TDB_FOLLOW)) {
@@ -1494,14 +1476,6 @@
                printf("text_access_fault: tpc %p == tnpc %p\n", (void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
                Debugger();
        }
-       if (protmmu || missmmu) {
-               extern int trap_trace_dis;
-               trap_trace_dis = 1;
-               printf("%d: text_access_fault(%x, %lx, %p) %s=%d\n",
-                      curproc?curproc->p_pid:-1, type, pc, tf, 
-                      (protmmu)?"protmmu":"missmmu", (protmmu)?protmmu:missmmu);
-               Debugger();
-       }
        write_user_windows();
        if (((trapdebug&TDB_NSAVED) && cpcb->pcb_nsaved) || 
            (trapdebug&(TDB_TXTFLT|TDB_FOLLOW)))
@@ -1634,14 +1608,6 @@
                    (void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
                Debugger();
        }
-       if (protmmu || missmmu) {
-               extern int trap_trace_dis;
-               trap_trace_dis = 1;
-               printf("%ld: text_access_error(%lx, %lx, %lx, %p) %s=%d\n",
-                      (long)(curproc?curproc->p_pid:-1), (long)type, (long)sfsr, (long)afsr, tf, 
-                      (protmmu)?"protmmu":"missmmu", (protmmu)?protmmu:missmmu);
-               Debugger();
-       }
        write_user_windows();
        if ((trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) || trapdebug&(TDB_TXTFLT|TDB_FOLLOW)) {
                bitmask_snprintf(sfsr, SFSR_BITS, buf, sizeof buf);



Home | Main Index | Thread Index | Old Index