ia64: remove custom __early_pfn_to_nid()
[sfrench/cifs-2.6.git] / arch / ia64 / mm / numa.c
index f34964271101a2f894d92733a52576b7457040ab..46b6e5f3a40f204e6cbdaeac32251c18866330a2 100644 (file)
@@ -58,36 +58,6 @@ paddr_to_nid(unsigned long paddr)
 EXPORT_SYMBOL(paddr_to_nid);
 
 #if defined(CONFIG_SPARSEMEM) && defined(CONFIG_NUMA)
-/*
- * Because of holes evaluate on section limits.
- * If the section of memory exists, then return the node where the section
- * resides.  Otherwise return node 0 as the default.  This is used by
- * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where
- * the section resides.
- */
-int __meminit __early_pfn_to_nid(unsigned long pfn,
-                                       struct mminit_pfnnid_cache *state)
-{
-       int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;
-
-       if (section >= state->last_start && section < state->last_end)
-               return state->last_nid;
-
-       for (i = 0; i < num_node_memblks; i++) {
-               ssec = node_memblk[i].start_paddr >> PA_SECTION_SHIFT;
-               esec = (node_memblk[i].start_paddr + node_memblk[i].size +
-                       ((1L << PA_SECTION_SHIFT) - 1)) >> PA_SECTION_SHIFT;
-               if (section >= ssec && section < esec) {
-                       state->last_start = ssec;
-                       state->last_end = esec;
-                       state->last_nid = node_memblk[i].nid;
-                       return node_memblk[i].nid;
-               }
-       }
-
-       return -1;
-}
-
 void numa_clear_node(int cpu)
 {
        unmap_cpu_from_node(cpu, NUMA_NO_NODE);