X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fia64%2Fmm%2Fnuma.c;h=b73bf1838e57750fb69f3ae27d6950bcc9dc46c8;hb=2c6e6db41f01b6b4eb98809350827c9678996698;hp=64e4c21f311cdc7f328165b18ae189e07476f885;hpb=026477c1141b67e98e3bd8bdedb7d4b88a3ecd09;p=linux-2.6-omap-h63xx.git diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c index 64e4c21f311..b73bf1838e5 100644 --- a/arch/ia64/mm/numa.c +++ b/arch/ia64/mm/numa.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,9 @@ */ int num_node_memblks; struct node_memblk_s node_memblk[NR_NODE_MEMBLKS]; -struct node_cpuid_s node_cpuid[NR_CPUS]; +struct node_cpuid_s node_cpuid[NR_CPUS] = + { [0 ... NR_CPUS-1] = { .phys_id = 0, .nid = NUMA_NO_NODE } }; + /* * This is a matrix with "distances" between nodes, they should be * proportional to the memory access latency ratios. @@ -69,4 +72,21 @@ int early_pfn_to_nid(unsigned long pfn) return 0; } + +#ifdef CONFIG_MEMORY_HOTPLUG +/* + * SRAT information is stored in node_memblk[], then we can use SRAT + * information at memory-hot-add if necessary. + */ + +int memory_add_physaddr_to_nid(u64 addr) +{ + int nid = paddr_to_nid(addr); + if (nid < 0) + return 0; + return nid; +} + +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); +#endif #endif