Module Name:    src
Committed By:   msaitoh
Date:           Mon Dec  8 15:22:47 UTC 2014

Modified Files:
        src/sys/arch/x86/x86: cpu.c identcpu.c
        src/sys/arch/xen/x86: cpu.c

Log Message:
 Modify around cpu_identify() to not to break the dmesg of cpus with AB_VERBOSE
or AB_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/xen/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.111 src/sys/arch/x86/x86/cpu.c:1.112
--- src/sys/arch/x86/x86/cpu.c:1.111	Mon May 12 11:56:02 2014
+++ src/sys/arch/x86/x86/cpu.c	Mon Dec  8 15:22:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.111 2014/05/12 11:56:02 joerg Exp $	*/
+/*	$NetBSD: cpu.c,v 1.112 2014/12/08 15:22:47 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111 2014/05/12 11:56:02 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.112 2014/12/08 15:22:47 msaitoh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -357,6 +357,7 @@ cpu_attach(device_t parent, device_t sel
 	ci->ci_acpiid = caa->cpu_id;
 	ci->ci_cpuid = caa->cpu_number;
 	ci->ci_func = caa->cpu_func;
+	aprint_normal("\n");
 
 	/* Must be before mi_cpu_attach(). */
 	cpu_vm_init(ci);
@@ -366,7 +367,6 @@ cpu_attach(device_t parent, device_t sel
 
 		error = mi_cpu_attach(ci);
 		if (error != 0) {
-			aprint_normal("\n");
 			aprint_error_dev(self,
 			    "mi_cpu_attach failed with %d\n", error);
 			return;
@@ -446,7 +446,6 @@ cpu_attach(device_t parent, device_t sel
 #endif
 
 	default:
-		aprint_normal("\n");
 		panic("unknown processor type??\n");
 	}
 

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.47 src/sys/arch/x86/x86/identcpu.c:1.48
--- src/sys/arch/x86/x86/identcpu.c:1.47	Tue Oct 28 17:44:47 2014
+++ src/sys/arch/x86/x86/identcpu.c	Mon Dec  8 15:22:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.47 2014/10/28 17:44:47 riz Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.48 2014/12/08 15:22:47 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.47 2014/10/28 17:44:47 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.48 2014/12/08 15:22:47 msaitoh Exp $");
 
 #include "opt_xen.h"
 
@@ -910,9 +910,9 @@ cpu_identify(struct cpu_info *ci)
 	cpu_setmodel("%s %d86-class",
 	    cpu_vendor_names[cpu_vendor], cpu_class + 3);
 	if (cpu_brand_string[0] != '\0') {
-		aprint_normal(": %s", cpu_brand_string);
+		aprint_normal_dev(ci->ci_dev, "%s", cpu_brand_string);
 	} else {
-		aprint_normal(": %s", cpu_getmodel());
+		aprint_normal_dev(ci->ci_dev, "%s", cpu_getmodel());
 		if (ci->ci_data.cpu_cc_freq != 0)
 			aprint_normal(", %dMHz",
 			    (int)(ci->ci_data.cpu_cc_freq / 1000000));

Index: src/sys/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.100 src/sys/arch/xen/x86/cpu.c:1.101
--- src/sys/arch/xen/x86/cpu.c:1.100	Thu Nov 27 16:29:44 2014
+++ src/sys/arch/xen/x86/cpu.c	Mon Dec  8 15:22:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.100 2014/11/27 16:29:44 bouyer Exp $	*/
+/*	$NetBSD: cpu.c,v 1.101 2014/12/08 15:22:47 msaitoh Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.100 2014/11/27 16:29:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.101 2014/12/08 15:22:47 msaitoh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -403,6 +403,7 @@ cpu_attach_common(device_t parent, devic
 
 	KASSERT(ci->ci_func == 0);
 	ci->ci_func = caa->cpu_func;
+	aprint_normal("\n");
 
 	/* Must be called before mi_cpu_attach(). */
 	cpu_vm_init(ci);
@@ -414,7 +415,6 @@ cpu_attach_common(device_t parent, devic
 
 		KASSERT(ci->ci_data.cpu_idlelwp != NULL);
 		if (error != 0) {
-			aprint_normal("\n");
 			aprint_error_dev(self,
 			    "mi_cpu_attach failed with %d\n", error);
 			return;
@@ -501,12 +501,11 @@ cpu_attach_common(device_t parent, devic
 			tmp->ci_next = ci;
 		}
 #else
-		aprint_error(": not started\n");
+		aprint_error_dev(ci->ci_dev, "not started\n");
 #endif
 		break;
 
 	default:
-		aprint_normal("\n");
 		panic("unknown processor type??\n");
 	}
 

Reply via email to