mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
x86: Make apicid 32 bits in preparation for x2APIC support.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This commit is contained in:
1 parent
fe30f626cc
commit
6176d3cd0b
7 files changed
+13
-13
No files matched your search
@@ -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:
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||