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.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 4722ec51c70c..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,13 +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
468 if (!pa->flags.enabled)
469 return;
470
471 pxm = get_processor_proximity_domain(pa);
472
446 /* record this node in proximity bitmap */ 473 /* record this node in proximity bitmap */
447 pxm_bit_set(pa->proximity_domain); 474 pxm_bit_set(pxm);
448 475
449 node_cpuid[srat_num_cpus].phys_id = 476 node_cpuid[srat_num_cpus].phys_id =
450 (pa->apic_id << 8) | (pa->lsapic_eid); 477 (pa->apic_id << 8) | (pa->lsapic_eid);
451 /* nid should be overridden as logical node id later */ 478 /* nid should be overridden as logical node id later */
452 node_cpuid[srat_num_cpus].nid = pa->proximity_domain; 479 node_cpuid[srat_num_cpus].nid = pxm;
453 srat_num_cpus++; 480 srat_num_cpus++;
454} 481}
455 482
@@ -457,10 +484,10 @@ void __init
457acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) 484acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
458{ 485{
459 unsigned long paddr, size; 486 unsigned long paddr, size;
460 u8 pxm; 487 int pxm;
461 struct node_memblk_s *p, *q, *pend; 488 struct node_memblk_s *p, *q, *pend;
462 489
463 pxm = ma->proximity_domain; 490 pxm = get_memory_proximity_domain(ma);
464 491
465 /* fill node memory chunk structure */ 492 /* fill node memory chunk structure */
466 paddr = ma->base_addr_hi; 493 paddr = ma->base_addr_hi;