Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 avoid misalignment in 32 bit kernels and "m...



details:   https://anonhg.NetBSD.org/src/rev/e06fab033fe0
branches:  trunk
changeset: 453886:e06fab033fe0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Aug 30 07:53:47 2019 +0000

description:
avoid misalignment in 32 bit kernels and "mach cpu".

diffstat:

 sys/arch/x86/x86/cpu.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 994910cbdd4b -r e06fab033fe0 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Fri Aug 30 05:59:17 2019 +0000
+++ b/sys/arch/x86/x86/cpu.c    Fri Aug 30 07:53:47 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.171 2019/05/29 16:54:41 maxv Exp $   */
+/*     $NetBSD: cpu.c,v 1.172 2019/08/30 07:53:47 mrg Exp $    */
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.171 2019/05/29 16:54:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.172 2019/08/30 07:53:47 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -979,8 +979,14 @@
 {
        struct cpu_info *ci;
        CPU_INFO_ITERATOR cii;
+       const char sixtyfour64space[] = 
+#ifdef _LP64
+                          "        "
+#endif
+                          "";
 
-       db_printf("addr         dev     id      flags   ipis    curlwp          fpcurlwp\n");
+       db_printf("addr         %sdev   id      flags   ipis    curlwp          "
+                 "fpcurlwp\n", sixtyfour64space);
        for (CPU_INFO_FOREACH(cii, ci)) {
                db_printf("%p   %s      %ld     %x      %x      %10p    %10p\n",
                    ci,



Home | Main Index | Thread Index | Old Index