ia64/xen-unstable

changeset 8782:df98f37a88b0

Fix x86_64 SMP support.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Feb 07 13:57:40 2006 +0000 (2006-02-07)
parents 2710f2fe624a
children 5caf1de3f268
files linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Tue Feb 07 12:59:27 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Tue Feb 07 13:57:40 2006 +0000
     1.3 @@ -911,6 +911,9 @@ void __init setup_arch(char **cmdline_p)
     1.4  	init_apic_mappings();
     1.5  #endif
     1.6  #endif
     1.7 +#if defined(CONFIG_XEN) && defined(CONFIG_SMP) && !defined(CONFIG_HOTPLUG_CPU)
     1.8 +	prefill_possible_map();
     1.9 +#endif
    1.10  
    1.11  #if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
    1.12  	/*
     2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c	Tue Feb 07 12:59:27 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c	Tue Feb 07 13:57:40 2006 +0000
     2.3 @@ -272,8 +272,10 @@ void __cpuinit cpu_init (void)
     2.4  	 * Initialize the per-CPU GDT with the boot GDT,
     2.5  	 * and set up the GDT descriptor:
     2.6  	 */
     2.7 +#ifndef CONFIG_XEN 
     2.8  	if (cpu)
     2.9   		memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
    2.10 +#endif
    2.11  
    2.12  	cpu_gdt_descr[cpu].size = GDT_SIZE;
    2.13  #ifndef CONFIG_XEN 
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Tue Feb 07 12:59:27 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Tue Feb 07 13:57:40 2006 +0000
     3.3 @@ -81,6 +81,18 @@ EXPORT_SYMBOL(x86_cpu_to_apicid);
     3.4  unsigned int maxcpus = NR_CPUS;
     3.5  #endif
     3.6  
     3.7 +void __init prefill_possible_map(void)
     3.8 +{
     3.9 +	int i, rc;
    3.10 +
    3.11 +	for (i = 0; i < NR_CPUS; i++) {
    3.12 +		rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
    3.13 +		if (rc == -ENOENT)
    3.14 +			break;
    3.15 +		cpu_set(i, cpu_possible_map);
    3.16 +	}
    3.17 +}
    3.18 +
    3.19  void __init smp_alloc_memory(void)
    3.20  {
    3.21  }