WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix 'nosmp' and ensure that CPU#0 is reported properly

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix 'nosmp' and ensure that CPU#0 is reported properly
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 Nov 2005 18:58:09 +0000
Delivery-date: Tue, 01 Nov 2005 18:55:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 305649f5ad568e9fbb51aa69659a724a6dde75f3
# Parent  3492adc0ad60ae3d7bf46dc1da62ed60d7b68ee1
Fix 'nosmp' and ensure that CPU#0 is reported properly
by /proc/cpuinfo. Also fix the sibling and core maps.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 3492adc0ad60 -r 305649f5ad56 
linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Tue Nov  1 15:44:25 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Tue Nov  1 16:49:19 2005
@@ -191,10 +191,17 @@
        int cpu, rc;
        struct task_struct *idle;
 
-       if (max_cpus == 0)
-               return;
-
-       xen_smp_intr_init(0);
+       cpu_data[0] = boot_cpu_data;
+
+       cpu_2_logical_apicid[0] = 0;
+       x86_cpu_to_apicid[0] = 0;
+
+       current_thread_info()->cpu = 0;
+       cpu_sibling_map[0] = cpumask_of_cpu(0);
+       cpu_core_map[0]    = cpumask_of_cpu(0);
+
+       if (max_cpus != 0)
+               xen_smp_intr_init(0);
 
        for (cpu = 1; cpu < max_cpus; cpu++) {
                rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL);
@@ -236,9 +243,9 @@
        }
 
        /* Currently, Xen gives no dynamic NUMA/HT info. */
-       for (cpu = 0; cpu < NR_CPUS; cpu++) {
-               cpus_clear(cpu_sibling_map[cpu]);
-               cpus_clear(cpu_core_map[cpu]);
+       for (cpu = 1; cpu < NR_CPUS; cpu++) {
+               cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
+               cpu_core_map[cpu]    = cpumask_of_cpu(cpu);
        }
 
 #ifdef CONFIG_X86_IO_APIC
@@ -256,17 +263,6 @@
        cpu_possible_map = cpumask_of_cpu(0);
        cpu_present_map  = cpumask_of_cpu(0);
        cpu_online_map   = cpumask_of_cpu(0);
-
-       cpu_data[0] = boot_cpu_data;
-       cpu_2_logical_apicid[0] = 0;
-       x86_cpu_to_apicid[0] = 0;
-
-       current_thread_info()->cpu = 0;
-       cpus_clear(cpu_sibling_map[0]);
-       cpu_set(0, cpu_sibling_map[0]);
-
-       cpus_clear(cpu_core_map[0]);
-       cpu_set(0, cpu_core_map[0]);
 }
 
 static void vcpu_hotplug(unsigned int cpu)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix 'nosmp' and ensure that CPU#0 is reported properly, Xen patchbot -unstable <=