Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Fix more printf format strings for mfspr() (hi mrg).



details:   https://anonhg.NetBSD.org/src/rev/47b8b37a21a1
branches:  trunk
changeset: 829362:47b8b37a21a1
user:      flxd <flxd%NetBSD.org@localhost>
date:      Sat Jan 27 10:07:41 2018 +0000

description:
Fix more printf format strings for mfspr() (hi mrg).

diffstat:

 sys/arch/evbppc/mpc85xx/machdep.c |   6 +++---
 sys/arch/powerpc/booke/trap.c     |  11 ++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r c42dcc86ee02 -r 47b8b37a21a1 sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Sat Jan 27 09:33:25 2018 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Sat Jan 27 10:07:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.42 2016/12/22 14:47:57 cherry Exp $      */
+/*     $NetBSD: machdep.c,v 1.43 2018/01/27 10:07:41 flxd Exp $        */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1245,8 +1245,8 @@
        /*
         *
         */
-       printf(" hid0=%#lx/%#lx", hid0, mfspr(SPR_HID0));
-       printf(" hid1=%#lx", mfspr(SPR_HID1));
+       printf(" hid0=%#lx/%#jx", hid0, (uintmax_t)mfspr(SPR_HID0));
+       printf(" hid1=%#jx", (uintmax_t)mfspr(SPR_HID1));
        printf(" pordevsr=%#x", cpu_read_4(GLOBAL_BASE + PORDEVSR));
        printf(" devdisr=%#x", cpu_read_4(GLOBAL_BASE + DEVDISR));
 
diff -r c42dcc86ee02 -r 47b8b37a21a1 sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c     Sat Jan 27 09:33:25 2018 +0000
+++ b/sys/arch/powerpc/booke/trap.c     Sat Jan 27 10:07:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.26 2014/07/31 12:11:37 joerg Exp $  */
+/*     $NetBSD: trap.c,v 1.27 2018/01/27 10:07:41 flxd Exp $   */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.26 2014/07/31 12:11:37 joerg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.27 2018/01/27 10:07:41 flxd Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -734,9 +734,10 @@
 
        if ((VM_MAX_ADDRESS & 0x80000000) == 0
            && usertrap && (tf->tf_fixreg[1] & 0x80000000)) {
-               printf("%s(entry): pid %d.%d (%s): %s invalid sp %#lx (sprg1=%#lx)\n",
-                   __func__, p->p_pid, l->l_lid, p->p_comm,
-                   trap_names[trap_code], tf->tf_fixreg[1], mfspr(SPR_SPRG1));
+               printf("%s(entry): pid %d.%d (%s): %s invalid sp %#lx "
+                   "(sprg1=%#jx)\n", __func__, p->p_pid, l->l_lid, p->p_comm,
+                   trap_names[trap_code], tf->tf_fixreg[1],
+                   (uintmax_t)mfspr(SPR_SPRG1));
                dump_trapframe(tf, NULL);
                Debugger();
        }



Home | Main Index | Thread Index | Old Index