[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Make apicid 32 bits in preparation for x2APIC support.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1209637842 -3600
# Node ID f13ff27fa0d1ca8eed461ba47e49f784716b874b
# Parent  becd9b77f951fe66bb68616426ef13a2894d0191
x86: Make apicid 32 bits in preparation for x2APIC support.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xen/arch/x86/mpparse.c                       |    2 +-
 xen/arch/x86/numa.c                          |    2 +-
 xen/arch/x86/setup.c                         |    2 +-
 xen/arch/x86/smpboot.c                       |    6 +++---
 xen/include/asm-x86/mach-generic/mach_apic.h |    4 ++--
 xen/include/asm-x86/processor.h              |    6 +++---
 xen/include/asm-x86/smp.h                    |    4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff -r becd9b77f951 -r f13ff27fa0d1 xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c    Thu May 01 10:50:09 2008 +0100
+++ b/xen/arch/x86/mpparse.c    Thu May 01 11:30:42 2008 +0100
@@ -73,7 +73,7 @@ static unsigned int __devinitdata num_pr
 /* 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:
diff -r becd9b77f951 -r f13ff27fa0d1 xen/arch/x86/numa.c
--- a/xen/arch/x86/numa.c       Thu May 01 10:50:09 2008 +0100
+++ b/xen/arch/x86/numa.c       Thu May 01 11:30:42 2008 +0100
@@ -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)
diff -r becd9b77f951 -r f13ff27fa0d1 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu May 01 10:50:09 2008 +0100
+++ b/xen/arch/x86/setup.c      Thu May 01 11:30:42 2008 +0100
@@ -245,7 +245,7 @@ static void __init srat_detect_node(int 
 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 )
diff -r becd9b77f951 -r f13ff27fa0d1 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Thu May 01 10:50:09 2008 +0100
+++ b/xen/arch/x86/smpboot.c    Thu May 01 11:30:42 2008 +0100
@@ -103,8 +103,8 @@ struct cpuinfo_x86 cpu_data[NR_CPUS] __c
 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)
 {
diff -r becd9b77f951 -r f13ff27fa0d1 
xen/include/asm-x86/mach-generic/mach_apic.h
--- a/xen/include/asm-x86/mach-generic/mach_apic.h      Thu May 01 10:50:09 
2008 +0100
+++ b/xen/include/asm-x86/mach-generic/mach_apic.h      Thu May 01 11:30:42 
2008 +0100
@@ -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)
diff -r becd9b77f951 -r f13ff27fa0d1 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h   Thu May 01 10:50:09 2008 +0100
+++ b/xen/include/asm-x86/processor.h   Thu May 01 11:30:42 2008 +0100
@@ -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;
 
diff -r becd9b77f951 -r f13ff27fa0d1 xen/include/asm-x86/smp.h
--- a/xen/include/asm-x86/smp.h Thu May 01 10:50:09 2008 +0100
+++ b/xen/include/asm-x86/smp.h Thu May 01 11:30:42 2008 +0100
@@ -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_
 #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]
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.