aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
-rw-r--r--arch/ia64/kernel/acpi.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 24fe7c81e108..a4e218ce2edb 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -420,6 +420,26 @@ int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
420int __initdata nid_to_pxm_map[MAX_NUMNODES]; 420int __initdata nid_to_pxm_map[MAX_NUMNODES];
421static struct acpi_table_slit __initdata *slit_table; 421static struct acpi_table_slit __initdata *slit_table;
422 422
423static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa)
424{
425 int pxm;
426
427 pxm = pa->proximity_domain;
428 if (ia64_platform_is("sn2"))
429 pxm += pa->reserved[0] << 8;
430 return pxm;
431}
432
433static int get_memory_proximity_domain(struct acpi_table_memory_affinity *ma)
434{
435 int pxm;
436
437 pxm = ma->proximity_domain;
438 if (ia64_platform_is("sn2"))
439 pxm += ma->reserved1[0] << 8;
440 return pxm;
441}
442
423/* 443/*
424 * ACPI 2.0 SLIT (System Locality Information Table) 444 * ACPI 2.0 SLIT (System Locality Information Table)
425 * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf 445 * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
@@ -443,16 +463,20 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
443void __init 463void __init
444acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) 464acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
445{ 465{
466 int pxm;
467
446 if (!pa->flags.enabled) 468 if (!pa->flags.enabled)
447 return; 469 return;
448 470
471 pxm = get_processor_proximity_domain(pa);
472
449 /* record this node in proximity bitmap */ 473 /* record this node in proximity bitmap */
450 pxm_bit_set(pa->proximity_domain); 474 pxm_bit_set(pxm);
451 475
452 node_cpuid[srat_num_cpus].phys_id = 476 node_cpuid[srat_num_cpus].phys_id =
453 (pa->apic_id << 8) | (pa->lsapic_eid); 477 (pa->apic_id << 8) | (pa->lsapic_eid);
454 /* nid should be overridden as logical node id later */ 478 /* nid should be overridden as logical node id later */
455 node_cpuid[srat_num_cpus].nid = pa->proximity_domain; 479 node_cpuid[srat_num_cpus].nid = pxm;
456 srat_num_cpus++; 480 srat_num_cpus++;
457} 481}
458 482
@@ -460,10 +484,10 @@ void __init
460acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) 484acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
461{ 485{
462 unsigned long paddr, size; 486 unsigned long paddr, size;
463 u8 pxm; 487 int pxm;
464 struct node_memblk_s *p, *q, *pend; 488 struct node_memblk_s *p, *q, *pend;
465 489
466 pxm = ma->proximity_domain; 490 pxm = get_memory_proximity_domain(ma);
467 491
468 /* fill node memory chunk structure */ 492 /* fill node memory chunk structure */
469 paddr = ma->base_addr_hi; 493 paddr = ma->base_addr_hi;