diff options
author | travis@sgi.com <travis@sgi.com> | 2008-01-30 07:33:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:10 -0500 |
commit | ef97001f3d869d7cc1956e0cc0d89e514e3f7db0 (patch) | |
tree | a66c041d96367f049143d63ebcc85e0b7d6dce34 /arch/x86/mm/srat_64.c | |
parent | a1bf250a6f31afb8caac166ae50dc7b89c38084c (diff) |
x86: change size of APICIDs from u8 to u16
Change the size of APICIDs from u8 to u16. This partially
supports the new x2apic mode that will be present on future
processor chips. (Chips actually support 32-bit APICIDs, but that
change is more intrusive. Supporting 16-bit is sufficient for now).
Signed-off-by: Jack Steiner <steiner@sgi.com>
I've included just the partial change from u8 to u16 apicids. The
remaining x2apic changes will be in a separate patch.
In addition, the fake_node_to_pxm_map[] and fake_apicid_to_node[]
tables have been moved from local data to the __initdata section
reducing stack pressure when MAX_NUMNODES and MAX_LOCAL_APIC are
increased in size.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r-- | arch/x86/mm/srat_64.c | 22 |
1 files changed, 13 insertions, 9 deletions
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 | |||
130 | acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | 130 | acpi_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 | ||
154 | int update_end_of_memory(unsigned long end) {return -1;} | 157 | int 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 |
391 | static int fake_node_to_pxm_map[MAX_NUMNODES] __initdata = { | ||
392 | [0 ... MAX_NUMNODES-1] = PXM_INVAL | ||
393 | }; | ||
394 | static unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] __initdata = { | ||
395 | [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE | ||
396 | }; | ||
387 | static int __init find_node_by_addr(unsigned long addr) | 397 | static 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) | |||
414 | void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) | 424 | void __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"); |