ia64/xen-unstable

changeset 9105:5ef601da9c2c

linux: clean up setup_arch_post.h
- machine_specific_memory_setup() was unused on x86-64
- machine_specific_modify_cpu_capabilities() must not be __init (for CPU hotplug)
- machine_specific_modify_cpu_capabilities() should be called in similar ways on 32- and 64-bits

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Mar 02 15:33:47 2006 +0000 (2006-03-02)
parents cfbf7332d616
children f6445afee702
files linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Thu Mar 02 16:06:51 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Thu Mar 02 15:33:47 2006 +0000
     1.3 @@ -82,6 +82,8 @@
     1.4  extern unsigned long start_pfn;
     1.5  extern struct edid_info edid_info;
     1.6  
     1.7 +extern void machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c);
     1.8 +
     1.9  shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
    1.10  EXPORT_SYMBOL(HYPERVISOR_shared_info);
    1.11  
    1.12 @@ -1405,6 +1407,8 @@ void __cpuinit identify_cpu(struct cpuin
    1.13  	select_idle_routine(c);
    1.14  	detect_ht(c); 
    1.15  
    1.16 +	machine_specific_modify_cpu_capabilities(c);
    1.17 +
    1.18  	/*
    1.19  	 * On SMP, boot_cpu_data holds the common feature set between
    1.20  	 * all CPUs; so make sure that we indicate which features are
     2.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Mar 02 16:06:51 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Mar 02 15:33:47 2006 +0000
     2.3 @@ -16,7 +16,7 @@ static char * __init machine_specific_me
     2.4  	return "Xen";
     2.5  }
     2.6  
     2.7 -void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
     2.8 +void __devinit machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
     2.9  {
    2.10  	clear_bit(X86_FEATURE_VME, c->x86_capability);
    2.11  	clear_bit(X86_FEATURE_DE, c->x86_capability);
     3.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h	Thu Mar 02 16:06:51 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h	Thu Mar 02 15:33:47 2006 +0000
     3.3 @@ -1,28 +1,12 @@
     3.4  /**
     3.5 - * machine_specific_memory_setup - Hook for machine specific memory setup.
     3.6 + * machine_specific_* - Hooks for machine specific setup.
     3.7   *
     3.8   * Description:
     3.9   *	This is included late in kernel/setup.c so that it can make
    3.10   *	use of all of the static functions.
    3.11   **/
    3.12  
    3.13 -static char * __init machine_specific_memory_setup(void)
    3.14 -{
    3.15 -	char *who;
    3.16 -	unsigned long start_pfn, max_pfn;
    3.17 -
    3.18 -	who = "Xen";
    3.19 -
    3.20 -	start_pfn = 0;
    3.21 -	max_pfn = xen_start_info->nr_pages;
    3.22 -
    3.23 -	e820.nr_map = 0;
    3.24 -	add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
    3.25 -
    3.26 -	return who;
    3.27 -}
    3.28 -
    3.29 -void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
    3.30 +void __cpuinit machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
    3.31  {
    3.32  	clear_bit(X86_FEATURE_VME, c->x86_capability);
    3.33  	clear_bit(X86_FEATURE_DE, c->x86_capability);