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] Rationalise initialisation of cpu_possible_map.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Rationalise initialisation of cpu_possible_map.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Feb 2006 17:10:06 +0000
Delivery-date: Wed, 08 Feb 2006 17:21:58 +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 bc2ac5e87f99d3842f180321c4865b389d016c95
# Parent  dcc2beb8a1d23d6eb34fe19170d3c52b956a8ac0
Rationalise initialisation of cpu_possible_map.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r dcc2beb8a1d2 -r bc2ac5e87f99 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Tue Feb  7 23:30:50 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Wed Feb  8 10:10:52 2006
@@ -85,6 +85,9 @@
 {
        int i, rc;
 
+       if (!cpus_empty(cpu_possible_map))
+               return;
+
        for (i = 0; i < NR_CPUS; i++) {
                rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
                if (rc == -ENOENT)
@@ -208,7 +211,7 @@
 
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-       int cpu, rc;
+       int cpu;
        struct task_struct *idle;
 
        cpu_data[0] = boot_cpu_data;
@@ -223,11 +226,9 @@
        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);
-               if (rc == -ENOENT)
-                       break;
-               BUG_ON(rc != 0);
+       for_each_cpu_mask (cpu, cpu_possible_map) {
+               if (cpu == 0)
+                       continue;
 
                cpu_data[cpu] = boot_cpu_data;
                cpu_2_logical_apicid[cpu] = cpu;
@@ -257,7 +258,6 @@
                        (void *)cpu_gdt_descr[cpu].address,
                        XENFEAT_writable_descriptor_tables);
 
-               cpu_set(cpu, cpu_possible_map);
 #ifdef CONFIG_HOTPLUG_CPU
                if (xen_start_info->flags & SIF_INITDOMAIN)
                        cpu_set(cpu, cpu_present_map);
@@ -286,7 +286,7 @@
 
 void __devinit smp_prepare_boot_cpu(void)
 {
-       cpu_possible_map = cpumask_of_cpu(0);
+       prefill_possible_map();
        cpu_present_map  = cpumask_of_cpu(0);
        cpu_online_map   = cpumask_of_cpu(0);
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Rationalise initialisation of cpu_possible_map., Xen patchbot -unstable <=