Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/d990f59aa478
branches:  netbsd-6
changeset: 774311:d990f59aa478
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Jul 05 17:52:54 2012 +0000

description:
Pull up following revision(s) (requested by chs in ticket #400):
        sys/arch/x86/x86/cpu.c: revision 1.100
in cpu_boot_secondary_processors(), wait until all the other CPUs
have registered themselves in kcpuset_running before returning.
recent changes to the TLB invalidation xcall code assume that
any CPU which will receive a broadcast IPI is registered in
kcpuset_running, so ensure that is true by waiting here.

diffstat:

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

diffs (47 lines):

diff -r eea6e7994fb9 -r d990f59aa478 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Thu Jul 05 17:48:41 2012 +0000
+++ b/sys/arch/x86/x86/cpu.c    Thu Jul 05 17:52:54 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.96.8.2 2012/05/09 03:22:53 riz Exp $ */
+/*     $NetBSD: cpu.c,v 1.96.8.3 2012/07/05 17:52:54 riz Exp $ */
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.96.8.2 2012/05/09 03:22:53 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.96.8.3 2012/07/05 17:52:54 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -589,12 +589,15 @@
 cpu_boot_secondary_processors(void)
 {
        struct cpu_info *ci;
+       kcpuset_t *cpus;
        u_long i;
 
        /* Now that we know the number of CPUs, patch the text segment. */
        x86_patch(false);
 
-       for (i=0; i < maxcpus; i++) {
+       kcpuset_create(&cpus, true);
+       kcpuset_set(cpus, cpu_index(curcpu()));
+       for (i = 0; i < maxcpus; i++) {
                ci = cpu_lookup(i);
                if (ci == NULL)
                        continue;
@@ -605,7 +608,11 @@
                if (ci->ci_flags & (CPUF_BSP|CPUF_SP|CPUF_PRIMARY))
                        continue;
                cpu_boot_secondary(ci);
+               kcpuset_set(cpus, cpu_index(ci));
        }
+       while (!kcpuset_match(cpus, kcpuset_running))
+               ;
+       kcpuset_destroy(cpus);
 
        x86_mp_online = true;
 



Home | Main Index | Thread Index | Old Index