[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix 'nosmp' and ensure that CPU#0 is reported properly
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |