aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/genapic_64.c4
-rw-r--r--arch/x86/kernel/mpparse_64.c4
-rw-r--r--arch/x86/kernel/smpboot_64.c2
-rw-r--r--arch/x86/mm/numa_64.c2
-rw-r--r--arch/x86/mm/srat_64.c22
-rw-r--r--include/asm-x86/processor.h14
-rw-r--r--include/asm-x86/smp_64.h8
7 files changed, 30 insertions, 26 deletions
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index ce703e21c912..ac2b78f24074 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -32,10 +32,10 @@
32 * array during this time. Is it zeroed when the per_cpu 32 * array during this time. Is it zeroed when the per_cpu
33 * data area is removed. 33 * data area is removed.
34 */ 34 */
35u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata 35u16 x86_cpu_to_apicid_init[NR_CPUS] __initdata
36 = { [0 ... NR_CPUS-1] = BAD_APICID }; 36 = { [0 ... NR_CPUS-1] = BAD_APICID };
37void *x86_cpu_to_apicid_ptr; 37void *x86_cpu_to_apicid_ptr;
38DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID; 38DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
39EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); 39EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
40 40
41struct genapic __read_mostly *genapic = &apic_flat; 41struct genapic __read_mostly *genapic = &apic_flat;
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index ef4aab123581..17d21e5b22d6 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -67,7 +67,7 @@ unsigned disabled_cpus __cpuinitdata;
67/* Bitmask of physically existing CPUs */ 67/* Bitmask of physically existing CPUs */
68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; 68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
69 69
70u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; 70u16 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
71 71
72 72
73/* 73/*
@@ -132,7 +132,7 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
132 * area is created. 132 * area is created.
133 */ 133 */
134 if (x86_cpu_to_apicid_ptr) { 134 if (x86_cpu_to_apicid_ptr) {
135 u8 *x86_cpu_to_apicid = (u8 *)x86_cpu_to_apicid_ptr; 135 u16 *x86_cpu_to_apicid = (u16 *)x86_cpu_to_apicid_ptr;
136 x86_cpu_to_apicid[cpu] = m->mpc_apicid; 136 x86_cpu_to_apicid[cpu] = m->mpc_apicid;
137 } else { 137 } else {
138 per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; 138 per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid;
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 5bd42ce144da..1fea185c9dca 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -65,7 +65,7 @@ int smp_num_siblings = 1;
65EXPORT_SYMBOL(smp_num_siblings); 65EXPORT_SYMBOL(smp_num_siblings);
66 66
67/* Last level cache ID of each logical CPU */ 67/* Last level cache ID of each logical CPU */
68DEFINE_PER_CPU(u8, cpu_llc_id) = BAD_APICID; 68DEFINE_PER_CPU(u16, cpu_llc_id) = BAD_APICID;
69 69
70/* Bitmask of currently online CPUs */ 70/* Bitmask of currently online CPUs */
71cpumask_t cpu_online_map __read_mostly; 71cpumask_t cpu_online_map __read_mostly;
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 551e3590e5c5..650001a87c8f 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -626,7 +626,7 @@ void __init init_cpu_to_node(void)
626 int i; 626 int i;
627 627
628 for (i = 0; i < NR_CPUS; i++) { 628 for (i = 0; i < NR_CPUS; i++) {
629 u8 apicid = x86_cpu_to_apicid_init[i]; 629 u16 apicid = x86_cpu_to_apicid_init[i];
630 630
631 if (apicid == BAD_APICID) 631 if (apicid == BAD_APICID)
632 continue; 632 continue;
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 5c0637e4c2f4..b367bc342fe0 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -130,6 +130,9 @@ void __init
130acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) 130acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
131{ 131{
132 int pxm, node; 132 int pxm, node;
133 int apic_id;
134
135 apic_id = pa->apic_id;
133 if (srat_disabled()) 136 if (srat_disabled())
134 return; 137 return;
135 if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) { 138 if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) {
@@ -145,10 +148,10 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
145 bad_srat(); 148 bad_srat();
146 return; 149 return;
147 } 150 }
148 apicid_to_node[pa->apic_id] = node; 151 apicid_to_node[apic_id] = node;
149 acpi_numa = 1; 152 acpi_numa = 1;
150 printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", 153 printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
151 pxm, pa->apic_id, node); 154 pxm, apic_id, node);
152} 155}
153 156
154int update_end_of_memory(unsigned long end) {return -1;} 157int update_end_of_memory(unsigned long end) {return -1;}
@@ -343,7 +346,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
343 /* First clean up the node list */ 346 /* First clean up the node list */
344 for (i = 0; i < MAX_NUMNODES; i++) { 347 for (i = 0; i < MAX_NUMNODES; i++) {
345 cutoff_node(i, start, end); 348 cutoff_node(i, start, end);
346 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { 349 /* ZZZ why was this needed. At least add a comment */
350 if (nodes[i].end && (nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
347 unparse_node(i); 351 unparse_node(i);
348 node_set_offline(i); 352 node_set_offline(i);
349 } 353 }
@@ -384,6 +388,12 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
384} 388}
385 389
386#ifdef CONFIG_NUMA_EMU 390#ifdef CONFIG_NUMA_EMU
391static int fake_node_to_pxm_map[MAX_NUMNODES] __initdata = {
392 [0 ... MAX_NUMNODES-1] = PXM_INVAL
393};
394static unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] __initdata = {
395 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
396};
387static int __init find_node_by_addr(unsigned long addr) 397static int __init find_node_by_addr(unsigned long addr)
388{ 398{
389 int ret = NUMA_NO_NODE; 399 int ret = NUMA_NO_NODE;
@@ -414,12 +424,6 @@ static int __init find_node_by_addr(unsigned long addr)
414void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) 424void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes)
415{ 425{
416 int i, j; 426 int i, j;
417 int fake_node_to_pxm_map[MAX_NUMNODES] = {
418 [0 ... MAX_NUMNODES-1] = PXM_INVAL
419 };
420 unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] = {
421 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
422 };
423 427
424 printk(KERN_INFO "Faking PXM affinity for fake nodes on real " 428 printk(KERN_INFO "Faking PXM affinity for fake nodes on real "
425 "topology.\n"); 429 "topology.\n");
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index e701ac5487e5..81ecfed83e47 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -90,14 +90,14 @@ struct cpuinfo_x86 {
90#ifdef CONFIG_SMP 90#ifdef CONFIG_SMP
91 cpumask_t llc_shared_map; /* cpus sharing the last level cache */ 91 cpumask_t llc_shared_map; /* cpus sharing the last level cache */
92#endif 92#endif
93 unsigned char x86_max_cores; /* cpuid returned max cores value */ 93 u16 x86_max_cores; /* cpuid returned max cores value */
94 unsigned char apicid; 94 u16 apicid;
95 unsigned short x86_clflush_size; 95 u16 x86_clflush_size;
96#ifdef CONFIG_SMP 96#ifdef CONFIG_SMP
97 unsigned char booted_cores; /* number of cores as seen by OS */ 97 u16 booted_cores; /* number of cores as seen by OS */
98 __u8 phys_proc_id; /* Physical processor id. */ 98 u16 phys_proc_id; /* Physical processor id. */
99 __u8 cpu_core_id; /* Core id */ 99 u16 cpu_core_id; /* Core id */
100 __u8 cpu_index; /* index into per_cpu list */ 100 u16 cpu_index; /* index into per_cpu list */
101#endif 101#endif
102} __attribute__((__aligned__(SMP_CACHE_BYTES))); 102} __attribute__((__aligned__(SMP_CACHE_BYTES)));
103 103
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index 2feddda91e12..b1d5381aa760 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -26,14 +26,14 @@ extern void unlock_ipi_call_lock(void);
26extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), 26extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *),
27 void *info, int wait); 27 void *info, int wait);
28 28
29extern u8 __initdata x86_cpu_to_apicid_init[]; 29extern u16 __initdata x86_cpu_to_apicid_init[];
30extern void *x86_cpu_to_apicid_ptr; 30extern void *x86_cpu_to_apicid_ptr;
31extern u8 bios_cpu_apicid[]; 31extern u16 bios_cpu_apicid[];
32 32
33DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 33DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
34DECLARE_PER_CPU(cpumask_t, cpu_core_map); 34DECLARE_PER_CPU(cpumask_t, cpu_core_map);
35DECLARE_PER_CPU(u8, cpu_llc_id); 35DECLARE_PER_CPU(u16, cpu_llc_id);
36DECLARE_PER_CPU(u8, x86_cpu_to_apicid); 36DECLARE_PER_CPU(u16, x86_cpu_to_apicid);
37 37
38static inline int cpu_present_to_apicid(int mps_cpu) 38static inline int cpu_present_to_apicid(int mps_cpu)
39{ 39{