This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[PATCH] x86: Re: [Xen-devel] cs 19927 crashes during boot with debug=y

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [PATCH] x86: Re: [Xen-devel] cs 19927 crashes during boot with debug=y
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Wed, 15 Jul 2009 08:54:20 +0100
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Delivery-date: Wed, 15 Jul 2009 00:54:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <de76405a0907141205v7a1d32d4w718f8a3552983a1e@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <de76405a0907141205v7a1d32d4w718f8a3552983a1e@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Fix an oversight of c/s 19927 - per-CPU data accesses must not be
iterated over using NR_CPUS bound loops.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2009-07-10.orig/xen/arch/x86/smpboot.c      2009-07-10 13:57:41.000000000 
+++ 2009-07-10/xen/arch/x86/smpboot.c   2009-07-15 09:36:05.000000000 +0200
@@ -1163,7 +1163,7 @@ static void __init smp_boot_cpus(unsigne
         * construct cpu_sibling_map, so that we can tell sibling CPUs
         * efficiently.
-       for (cpu = 0; cpu < NR_CPUS; cpu++) {
+       for_each_cpu(cpu) {
                cpus_clear(per_cpu(cpu_sibling_map, cpu));
                cpus_clear(per_cpu(cpu_core_map, cpu));

Xen-devel mailing list