14 #include <linux/kernel.h>
19 #include <linux/module.h>
20 #include <asm/mmzone.h>
50 return (i < num_node_memblks) ?
node_memblk[
i].nid : (num_node_memblks ? -1 : 0);
53 #if defined(CONFIG_SPARSEMEM) && defined(CONFIG_NUMA)
61 int __meminit __early_pfn_to_nid(
unsigned long pfn)
63 int i,
section = pfn >> PFN_SECTION_SHIFT, ssec, esec;
68 ((1
L << PA_SECTION_SHIFT) - 1)) >> PA_SECTION_SHIFT;
69 if (section >= ssec && section < esec)
76 #ifdef CONFIG_MEMORY_HOTPLUG
82 int memory_add_physaddr_to_nid(
u64 addr)