diff -urN orig/arch/x86_64/Kconfig work/arch/x86_64/Kconfig --- orig/arch/x86_64/Kconfig 2006-07-28 13:57:35.000000000 -0400 +++ work/arch/x86_64/Kconfig 2006-07-28 21:20:16.000000000 -0400 @@ -343,6 +343,10 @@ def_bool y depends on MEMORY_HOTPLUG +config ARCH_FIND_NODE + def_bool y + depends on MEMORY_HOTPLUG + config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA diff -urN orig/arch/x86_64/mm/srat.c work/arch/x86_64/mm/srat.c --- orig/arch/x86_64/mm/srat.c 2006-07-28 13:57:35.000000000 -0400 +++ work/arch/x86_64/mm/srat.c 2006-07-28 21:19:01.000000000 -0400 @@ -450,3 +450,15 @@ } EXPORT_SYMBOL(__node_distance); + +int arch_find_node(unsigned long start, unsigned long size) +{ + int i, ret = 0; + unsigned long end = start+size; + + for_each_node(i) { + if (nodes_add[i].start <= start && nodes_add[i].end >= end) + ret = i; + } + return ret; +}