[IA64] Increase max node count on SN platforms
authorJack Steiner <steiner@sgi.com>
Thu, 2 Mar 2006 22:02:25 +0000 (16:02 -0600)
committerTony Luck <tony.luck@intel.com>
Fri, 24 Mar 2006 21:14:21 +0000 (13:14 -0800)
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>
arch/ia64/kernel/acpi.c
include/asm-ia64/acpi.h

index 24fe7c81e10890941e1c73e0856c371390521875..a4e218ce2edb89c045efc53ddb07b2eb2c472255 100644 (file)
@@ -420,6 +420,26 @@ int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 int __initdata nid_to_pxm_map[MAX_NUMNODES];
 static struct acpi_table_slit __initdata *slit_table;
 
+static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa)
+{
+       int pxm;
+
+       pxm = pa->proximity_domain;
+       if (ia64_platform_is("sn2"))
+               pxm += pa->reserved[0] << 8;
+       return pxm;
+}
+
+static int get_memory_proximity_domain(struct acpi_table_memory_affinity *ma)
+{
+       int pxm;
+
+       pxm = ma->proximity_domain;
+       if (ia64_platform_is("sn2"))
+               pxm += ma->reserved1[0] << 8;
+       return pxm;
+}
+
 /*
  * ACPI 2.0 SLIT (System Locality Information Table)
  * 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)
 void __init
 acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
 {
+       int pxm;
+
        if (!pa->flags.enabled)
                return;
 
+       pxm = get_processor_proximity_domain(pa);
+
        /* record this node in proximity bitmap */
-       pxm_bit_set(pa->proximity_domain);
+       pxm_bit_set(pxm);
 
        node_cpuid[srat_num_cpus].phys_id =
            (pa->apic_id << 8) | (pa->lsapic_eid);
        /* nid should be overridden as logical node id later */
-       node_cpuid[srat_num_cpus].nid = pa->proximity_domain;
+       node_cpuid[srat_num_cpus].nid = pxm;
        srat_num_cpus++;
 }
 
@@ -460,10 +484,10 @@ void __init
 acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
 {
        unsigned long paddr, size;
-       u8 pxm;
+       int pxm;
        struct node_memblk_s *p, *q, *pend;
 
-       pxm = ma->proximity_domain;
+       pxm = get_memory_proximity_domain(ma);
 
        /* fill node memory chunk structure */
        paddr = ma->base_addr_hi;
index f7a517654308e03f4c0ee880dc5cb88fbfaad615..d734585a23cfc37444dd61a76c1386833a0700fe 100644 (file)
@@ -111,7 +111,11 @@ extern int additional_cpus;
 
 #ifdef CONFIG_ACPI_NUMA
 /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
+#ifdef CONFIG_IA64_NR_NODES
+#define MAX_PXM_DOMAINS CONFIG_IA64_NR_NODES
+#else
 #define MAX_PXM_DOMAINS (256)
+#endif
 extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
 #endif