Module Name:    src
Committed By:   martin
Date:           Sat Dec 13 19:32:43 UTC 2014

Modified Files:
        src/sys/arch/arm/arm32 [netbsd-7]: arm32_boot.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #319):
        sys/arch/arm/arm32/arm32_boot.c: revision 1.11
serialize printing of secondary cpu info


To generate a diff of this commit:
cvs rdiff -u -r1.7.4.1 -r1.7.4.2 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.7.4.1 src/sys/arch/arm/arm32/arm32_boot.c:1.7.4.2
--- src/sys/arch/arm/arm32/arm32_boot.c:1.7.4.1	Sun Nov  9 16:05:25 2014
+++ src/sys/arch/arm/arm32/arm32_boot.c	Sat Dec 13 19:32:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_boot.c,v 1.7.4.1 2014/11/09 16:05:25 martin Exp $	*/
+/*	$NetBSD: arm32_boot.c,v 1.7.4.2 2014/12/13 19:32:43 martin 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.7.4.1 2014/11/09 16:05:25 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.7.4.2 2014/12/13 19:32:43 martin 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