ia64/xen-unstable

changeset 17551:f13ff27fa0d1

x86: Make apicid 32 bits in preparation for x2APIC support.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 01 11:30:42 2008 +0100 (2008-05-01)
parents becd9b77f951
children 9fd00ff95068
files xen/arch/x86/mpparse.c xen/arch/x86/numa.c xen/arch/x86/setup.c xen/arch/x86/smpboot.c xen/include/asm-x86/mach-generic/mach_apic.h xen/include/asm-x86/processor.h xen/include/asm-x86/smp.h
line diff
     1.1 --- a/xen/arch/x86/mpparse.c	Thu May 01 10:50:09 2008 +0100
     1.2 +++ b/xen/arch/x86/mpparse.c	Thu May 01 11:30:42 2008 +0100
     1.3 @@ -73,7 +73,7 @@ static unsigned int __devinitdata num_pr
     1.4  /* Bitmask of physically existing CPUs */
     1.5  physid_mask_t phys_cpu_present_map;
     1.6  
     1.7 -u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
     1.8 +u32 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
     1.9  
    1.10  /*
    1.11   * Intel MP BIOS table parsing routines:
     2.1 --- a/xen/arch/x86/numa.c	Thu May 01 10:50:09 2008 +0100
     2.2 +++ b/xen/arch/x86/numa.c	Thu May 01 11:30:42 2008 +0100
     2.3 @@ -262,7 +262,7 @@ void __init init_cpu_to_node(void)
     2.4  {
     2.5  	int i;
     2.6   	for (i = 0; i < NR_CPUS; i++) {
     2.7 -		u8 apicid = x86_cpu_to_apicid[i];
     2.8 +		u32 apicid = x86_cpu_to_apicid[i];
     2.9  		if (apicid == BAD_APICID)
    2.10  			continue;
    2.11  		if (apicid_to_node[apicid] == NUMA_NO_NODE)
     3.1 --- a/xen/arch/x86/setup.c	Thu May 01 10:50:09 2008 +0100
     3.2 +++ b/xen/arch/x86/setup.c	Thu May 01 11:30:42 2008 +0100
     3.3 @@ -245,7 +245,7 @@ static void __init init_idle_domain(void
     3.4  static void __init srat_detect_node(int cpu)
     3.5  {
     3.6      unsigned node;
     3.7 -    u8 apicid = x86_cpu_to_apicid[cpu];
     3.8 +    u32 apicid = x86_cpu_to_apicid[cpu];
     3.9  
    3.10      node = apicid_to_node[apicid];
    3.11      if ( node == NUMA_NO_NODE )
     4.1 --- a/xen/arch/x86/smpboot.c	Thu May 01 10:50:09 2008 +0100
     4.2 +++ b/xen/arch/x86/smpboot.c	Thu May 01 11:30:42 2008 +0100
     4.3 @@ -103,8 +103,8 @@ static int __devinitdata tsc_sync_disabl
     4.4  struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
     4.5  EXPORT_SYMBOL(cpu_data);
     4.6  
     4.7 -u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly =
     4.8 -			{ [0 ... NR_CPUS-1] = 0xff };
     4.9 +u32 x86_cpu_to_apicid[NR_CPUS] __read_mostly =
    4.10 +			{ [0 ... NR_CPUS-1] = -1U };
    4.11  EXPORT_SYMBOL(x86_cpu_to_apicid);
    4.12  
    4.13  static void map_cpu_to_logical_apicid(void);
    4.14 @@ -543,7 +543,7 @@ extern struct {
    4.15  	unsigned short ss;
    4.16  } stack_start;
    4.17  
    4.18 -u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID };
    4.19 +u32 cpu_2_logical_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID };
    4.20  
    4.21  static void map_cpu_to_logical_apicid(void)
    4.22  {
     5.1 --- a/xen/include/asm-x86/mach-generic/mach_apic.h	Thu May 01 10:50:09 2008 +0100
     5.2 +++ b/xen/include/asm-x86/mach-generic/mach_apic.h	Thu May 01 11:30:42 2008 +0100
     5.3 @@ -21,9 +21,9 @@ static inline void enable_apic_mode(void
     5.4  	/*es7000_sw_apic();*/
     5.5  }
     5.6  
     5.7 -#define apicid_to_node(apicid) ((int)apicid_to_node[(u8)apicid])
     5.8 +#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid])
     5.9  
    5.10 -extern u8 bios_cpu_apicid[];
    5.11 +extern u32 bios_cpu_apicid[];
    5.12  static inline int cpu_present_to_apicid(int mps_cpu)
    5.13  {
    5.14  	if (mps_cpu < NR_CPUS)
     6.1 --- a/xen/include/asm-x86/processor.h	Thu May 01 10:50:09 2008 +0100
     6.2 +++ b/xen/include/asm-x86/processor.h	Thu May 01 11:30:42 2008 +0100
     6.3 @@ -167,9 +167,9 @@ struct cpuinfo_x86 {
     6.4      int  x86_cache_size; /* in KB - valid for CPUS which support this call  */
     6.5      int  x86_cache_alignment;    /* In bytes */
     6.6      int  x86_power;
     6.7 -    unsigned char x86_max_cores; /* cpuid returned max cores value */
     6.8 -    unsigned char booted_cores;  /* number of cores as seen by OS */
     6.9 -    unsigned char apicid;
    6.10 +    __u32 x86_max_cores; /* cpuid returned max cores value */
    6.11 +    __u32 booted_cores;  /* number of cores as seen by OS */
    6.12 +    __u32 apicid;
    6.13      unsigned short x86_clflush_size;
    6.14  } __cacheline_aligned;
    6.15  
     7.1 --- a/xen/include/asm-x86/smp.h	Thu May 01 10:50:09 2008 +0100
     7.2 +++ b/xen/include/asm-x86/smp.h	Thu May 01 11:30:42 2008 +0100
     7.3 @@ -22,7 +22,7 @@
     7.4  #endif
     7.5  #endif
     7.6  
     7.7 -#define BAD_APICID 0xFFu
     7.8 +#define BAD_APICID -1U
     7.9  #ifdef CONFIG_SMP
    7.10  #ifndef __ASSEMBLY__
    7.11  
    7.12 @@ -45,7 +45,7 @@ extern void zap_low_mappings(l2_pgentry_
    7.13  #endif
    7.14  
    7.15  #define MAX_APICID 256
    7.16 -extern u8 x86_cpu_to_apicid[];
    7.17 +extern u32 x86_cpu_to_apicid[];
    7.18  
    7.19  #define cpu_physical_id(cpu)	x86_cpu_to_apicid[cpu]
    7.20