Module Name:    src
Committed By:   jmcneill
Date:           Sat Dec 13 16:11:01 UTC 2014

Modified Files:
        src/sys/arch/arm/arm32: arm32_boot.c

Log Message:
serialize printing of secondary cpu info


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm32/arm32_boot.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/arm/arm32/arm32_boot.c
diff -u src/sys/arch/arm/arm32/arm32_boot.c:1.10 src/sys/arch/arm/arm32/arm32_boot.c:1.11
--- src/sys/arch/arm/arm32/arm32_boot.c:1.10	Tue Nov  4 22:37:09 2014
+++ src/sys/arch/arm/arm32/arm32_boot.c	Sat Dec 13 16:11:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_boot.c,v 1.10 2014/11/04 22:37:09 matt Exp $	*/
+/*	$NetBSD: arm32_boot.c,v 1.11 2014/12/13 16:11:01 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -123,7 +123,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.10 2014/11/04 22:37:09 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.11 2014/12/13 16:11:01 jmcneill Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -151,6 +151,10 @@ __KERNEL_RCSID(1, "$NetBSD: arm32_boot.c
 #include <sys/kgdb.h>
 #endif
 
+#ifdef MULTIPROCESSOR
+static kmutex_t cpu_hatch_lock;
+#endif
+
 vaddr_t
 initarm_common(vaddr_t kvm_base, vsize_t kvm_size,
 	const struct boot_physmem *bp, size_t nbp)
@@ -300,6 +304,10 @@ initarm_common(vaddr_t kvm_base, vsize_t
 		Debugger();
 #endif
 
+#ifdef MULTIPROCESSOR
+	mutex_init(&cpu_hatch_lock, MUTEX_DEFAULT, IPL_HIGH);
+#endif
+
 #ifdef VERBOSE_INIT_ARM
 	printf("done.\n");
 #endif
@@ -383,6 +391,8 @@ cpu_hatch(struct cpu_info *ci, cpuid_t c
 	}
 #endif
 
+	mutex_enter(&cpu_hatch_lock);
+
 	aprint_naive("%s", device_xname(ci->ci_dev));
 	aprint_normal("%s", device_xname(ci->ci_dev));
 	identify_arm_cpu(ci->ci_dev, ci);
@@ -391,6 +401,8 @@ cpu_hatch(struct cpu_info *ci, cpuid_t c
 #endif
 	vfp_attach(ci);
 
+	mutex_exit(&cpu_hatch_lock);
+
 #ifdef VERBOSE_INIT_ARM
 	printf(" interrupts");
 #endif

Reply via email to