aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/srat.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/srat.c')
-rw-r--r--arch/i386/kernel/srat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c
index 32413122c4c2..f7e735c077c3 100644
--- a/arch/i386/kernel/srat.c
+++ b/arch/i386/kernel/srat.c
@@ -30,6 +30,7 @@
30#include <linux/nodemask.h> 30#include <linux/nodemask.h>
31#include <asm/srat.h> 31#include <asm/srat.h>
32#include <asm/topology.h> 32#include <asm/topology.h>
33#include <asm/smp.h>
33 34
34/* 35/*
35 * proximity macros and definitions 36 * proximity macros and definitions
@@ -54,6 +55,7 @@ struct node_memory_chunk_s {
54static struct node_memory_chunk_s node_memory_chunk[MAXCHUNKS]; 55static struct node_memory_chunk_s node_memory_chunk[MAXCHUNKS];
55 56
56static int num_memory_chunks; /* total number of memory chunks */ 57static int num_memory_chunks; /* total number of memory chunks */
58static u8 __initdata apicid_to_pxm[MAX_APICID];
57 59
58extern void * boot_ioremap(unsigned long, unsigned long); 60extern void * boot_ioremap(unsigned long, unsigned long);
59 61
@@ -69,6 +71,8 @@ static void __init parse_cpu_affinity_structure(char *p)
69 /* mark this node as "seen" in node bitmap */ 71 /* mark this node as "seen" in node bitmap */
70 BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain); 72 BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain);
71 73
74 apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain;
75
72 printk("CPU 0x%02X in proximity domain 0x%02X\n", 76 printk("CPU 0x%02X in proximity domain 0x%02X\n",
73 cpu_affinity->apic_id, cpu_affinity->proximity_domain); 77 cpu_affinity->apic_id, cpu_affinity->proximity_domain);
74} 78}
@@ -235,6 +239,9 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp)
235 printk("Number of logical nodes in system = %d\n", num_online_nodes()); 239 printk("Number of logical nodes in system = %d\n", num_online_nodes());
236 printk("Number of memory chunks in system = %d\n", num_memory_chunks); 240 printk("Number of memory chunks in system = %d\n", num_memory_chunks);
237 241
242 for (i = 0; i < MAX_APICID; i++)
243 apicid_2_node[i] = pxm_to_node(apicid_to_pxm[i]);
244
238 for (j = 0; j < num_memory_chunks; j++){ 245 for (j = 0; j < num_memory_chunks; j++){
239 struct node_memory_chunk_s * chunk = &node_memory_chunk[j]; 246 struct node_memory_chunk_s * chunk = &node_memory_chunk[j];
240 printk("chunk %d nid %d start_pfn %08lx end_pfn %08lx\n", 247 printk("chunk %d nid %d start_pfn %08lx end_pfn %08lx\n",