aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2006-03-02 17:02:25 -0500
committerTony Luck <tony.luck@intel.com>2006-03-24 16:14:21 -0500
commit3ad5ef8b9d0d0cc2d4b2c63e766ef903d482dfc7 (patch)
treec17d6073e4629bdf59972d5800368c12c5147aff
parentb354a8388891adc5dc5e5fb0130f000152f3fb94 (diff)
[IA64] Increase max node count on SN platforms
Add support in IA64 acpi for platforms that support more than 256 nodes. Currently, ACPI is limited to 256 nodes because the proximity domain number is 8-bits. Long term, we expect to use ACPI3.0 to support >256 nodes. This patch is an interim solution that works with platforms that pass the high order bits of the proximity domain in "reserved" fields of the ACPI tables. This code is enabled ONLY on SN platforms. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/kernel/acpi.c32
-rw-r--r--include/asm-ia64/acpi.h4
2 files changed, 32 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;
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
index f7a517654308..d734585a23cf 100644
--- a/include/asm-ia64/acpi.h
+++ b/include/asm-ia64/acpi.h
@@ -111,7 +111,11 @@ extern int additional_cpus;
111 111
112#ifdef CONFIG_ACPI_NUMA 112#ifdef CONFIG_ACPI_NUMA
113/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ 113/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
114#ifdef CONFIG_IA64_NR_NODES
115#define MAX_PXM_DOMAINS CONFIG_IA64_NR_NODES
116#else
114#define MAX_PXM_DOMAINS (256) 117#define MAX_PXM_DOMAINS (256)
118#endif
115extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; 119extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
116extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; 120extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
117#endif 121#endif