Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea pmap_print_mmuregs(): move initializati...



details:   https://anonhg.NetBSD.org/src/rev/26391e93e29b
branches:  trunk
changeset: 554410:26391e93e29b
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Oct 27 23:35:41 2003 +0000

description:
pmap_print_mmuregs(): move initialization of addr before its first use;
reported by David Young.

diffstat:

 sys/arch/powerpc/oea/pmap.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 668013cc05e6 -r 26391e93e29b sys/arch/powerpc/oea/pmap.c
--- a/sys/arch/powerpc/oea/pmap.c       Mon Oct 27 23:11:23 2003 +0000
+++ b/sys/arch/powerpc/oea/pmap.c       Mon Oct 27 23:35:41 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.15 2003/10/27 23:08:12 dyoung Exp $ */
+/*     $NetBSD: pmap.c,v 1.16 2003/10/27 23:35:41 kleink Exp $ */
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.15 2003/10/27 23:08:12 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.16 2003/10/27 23:35:41 kleink Exp $");
 
 #include "opt_altivec.h"
 #include "opt_pmap.h"
@@ -2340,6 +2340,8 @@
        cpuvers = MFPVR() >> 16;
 
        __asm __volatile ("mfsdr1 %0" : "=r"(sdr1));
+
+       addr = 0;
        for (i=0; i<16; i++) {
                soft_sr[i] = MFSRIN(addr);
                addr += (1 << ADDR_SR_SHFT);
@@ -2370,7 +2372,6 @@
 
        printf("SDR1:\t%#lx\n", sdr1);
        printf("SR[]:\t");
-       addr = 0;
        for (i=0; i<4; i++)
                printf("0x%08lx,   ", soft_sr[i]);
        printf("\n\t");



Home | Main Index | Thread Index | Old Index