]> xenbits.xensource.com Git - xen.git/commitdiff
x86: Make apicid 32 bits in preparation for x2APIC support.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 1 May 2008 10:30:42 +0000 (11:30 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 1 May 2008 10:30:42 +0000 (11:30 +0100)
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
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

index 8bea5ab7824a2a93c897c3259bb5276f0a3cf03f..0d14f35c77f292f2e3976b12eb58e2d76377fe5e 100644 (file)
@@ -73,7 +73,7 @@ static unsigned int __devinitdata num_processors;
 /* Bitmask of physically existing CPUs */
 physid_mask_t phys_cpu_present_map;
 
-u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
+u32 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
 
 /*
  * Intel MP BIOS table parsing routines:
index 9f983db06dbaf84805ee6f299615e350f45a1cc8..ab3050b3e60e8e85fc7083fb2a6732fab18a1049 100644 (file)
@@ -262,7 +262,7 @@ void __init init_cpu_to_node(void)
 {
        int i;
        for (i = 0; i < NR_CPUS; i++) {
-               u8 apicid = x86_cpu_to_apicid[i];
+               u32 apicid = x86_cpu_to_apicid[i];
                if (apicid == BAD_APICID)
                        continue;
                if (apicid_to_node[apicid] == NUMA_NO_NODE)
index 400db8ad09c0d792ad4c0d62d8fb22f77a8caa13..362cfb69e7518e9fd2b285e1a6ce65b37d0bd97c 100644 (file)
@@ -245,7 +245,7 @@ static void __init init_idle_domain(void)
 static void __init srat_detect_node(int cpu)
 {
     unsigned node;
-    u8 apicid = x86_cpu_to_apicid[cpu];
+    u32 apicid = x86_cpu_to_apicid[cpu];
 
     node = apicid_to_node[apicid];
     if ( node == NUMA_NO_NODE )
index 1377355048fb80493634fcbaa0e04c60021eeddd..f5a705335f2a9559afa154b2cda21f900d1d9603 100644 (file)
@@ -103,8 +103,8 @@ static int __devinitdata tsc_sync_disabled;
 struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
 EXPORT_SYMBOL(cpu_data);
 
-u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly =
-                       { [0 ... NR_CPUS-1] = 0xff };
+u32 x86_cpu_to_apicid[NR_CPUS] __read_mostly =
+                       { [0 ... NR_CPUS-1] = -1U };
 EXPORT_SYMBOL(x86_cpu_to_apicid);
 
 static void map_cpu_to_logical_apicid(void);
@@ -543,7 +543,7 @@ extern struct {
        unsigned short ss;
 } stack_start;
 
-u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID };
+u32 cpu_2_logical_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID };
 
 static void map_cpu_to_logical_apicid(void)
 {
index 10f845756129749a179ca419910e8f1423d2c5cb..02746d47e6e590194a6c91d7d9cf17d13da3e4dd 100644 (file)
@@ -21,9 +21,9 @@ static inline void enable_apic_mode(void)
        /*es7000_sw_apic();*/
 }
 
-#define apicid_to_node(apicid) ((int)apicid_to_node[(u8)apicid])
+#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid])
 
-extern u8 bios_cpu_apicid[];
+extern u32 bios_cpu_apicid[];
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
        if (mps_cpu < NR_CPUS)
index 3c789fbf79ba01339eec6abf4fe03f6c95279ac4..d584d45b9e3e2a7784b1237a6b61dbc7157389c6 100644 (file)
@@ -167,9 +167,9 @@ struct cpuinfo_x86 {
     int  x86_cache_size; /* in KB - valid for CPUS which support this call  */
     int  x86_cache_alignment;    /* In bytes */
     int  x86_power;
-    unsigned char x86_max_cores; /* cpuid returned max cores value */
-    unsigned char booted_cores;  /* number of cores as seen by OS */
-    unsigned char apicid;
+    __u32 x86_max_cores; /* cpuid returned max cores value */
+    __u32 booted_cores;  /* number of cores as seen by OS */
+    __u32 apicid;
     unsigned short x86_clflush_size;
 } __cacheline_aligned;
 
index cf5159603dc4fb8610739273171be559f1e2a864..67dd5c6c691c4dfa92ef4e6ce18d09865a86bfbf 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 #endif
 
-#define BAD_APICID 0xFFu
+#define BAD_APICID -1U
 #ifdef CONFIG_SMP
 #ifndef __ASSEMBLY__
 
@@ -45,7 +45,7 @@ extern void zap_low_mappings(l2_pgentry_t *base);
 #endif
 
 #define MAX_APICID 256
-extern u8 x86_cpu_to_apicid[];
+extern u32 x86_cpu_to_apicid[];
 
 #define cpu_physical_id(cpu)   x86_cpu_to_apicid[cpu]