diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:49:57 -0400 |
commit | 69e1a33f62eff9b228a8cc2c3e4429dbee8966c9 (patch) | |
tree | 985f088d05f2d936cfafa5dd0232aa59391dc663 /arch/i386/kernel/srat.c | |
parent | 413588c7cb8113c03d0044f1d41b832ad7201c29 (diff) |
[PATCH] x86-64: Use ACPI PXM to parse PCI<->node assignments
Since this is shared code I had to implement it for i386 too
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/srat.c')
-rw-r--r-- | arch/i386/kernel/srat.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c index 7b3b27d64409..516bf5653b02 100644 --- a/arch/i386/kernel/srat.c +++ b/arch/i386/kernel/srat.c | |||
@@ -213,12 +213,18 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c | |||
213 | node_end_pfn[nid] = memory_chunk->end_pfn; | 213 | node_end_pfn[nid] = memory_chunk->end_pfn; |
214 | } | 214 | } |
215 | 215 | ||
216 | static u8 pxm_to_nid_map[MAX_PXM_DOMAINS];/* _PXM to logical node ID map */ | ||
217 | |||
218 | int pxm_to_node(int pxm) | ||
219 | { | ||
220 | return pxm_to_nid_map[pxm]; | ||
221 | } | ||
222 | |||
216 | /* Parse the ACPI Static Resource Affinity Table */ | 223 | /* Parse the ACPI Static Resource Affinity Table */ |
217 | static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) | 224 | static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) |
218 | { | 225 | { |
219 | u8 *start, *end, *p; | 226 | u8 *start, *end, *p; |
220 | int i, j, nid; | 227 | int i, j, nid; |
221 | u8 pxm_to_nid_map[MAX_PXM_DOMAINS];/* _PXM to logical node ID map */ | ||
222 | u8 nid_to_pxm_map[MAX_NUMNODES];/* logical node ID to _PXM map */ | 228 | u8 nid_to_pxm_map[MAX_NUMNODES];/* logical node ID to _PXM map */ |
223 | 229 | ||
224 | start = (u8 *)(&(sratp->reserved) + 1); /* skip header */ | 230 | start = (u8 *)(&(sratp->reserved) + 1); /* skip header */ |