|
@@ -3000,16 +3000,33 @@ int __meminit __early_pfn_to_nid(unsigned long pfn)
|
|
if (start_pfn <= pfn && pfn < end_pfn)
|
|
if (start_pfn <= pfn && pfn < end_pfn)
|
|
return early_node_map[i].nid;
|
|
return early_node_map[i].nid;
|
|
}
|
|
}
|
|
-
|
|
|
|
- return 0;
|
|
|
|
|
|
+ /* This is a memory hole */
|
|
|
|
+ return -1;
|
|
}
|
|
}
|
|
#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
|
|
#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
|
|
|
|
|
|
int __meminit early_pfn_to_nid(unsigned long pfn)
|
|
int __meminit early_pfn_to_nid(unsigned long pfn)
|
|
{
|
|
{
|
|
- return __early_pfn_to_nid(pfn);
|
|
|
|
|
|
+ int nid;
|
|
|
|
+
|
|
|
|
+ nid = __early_pfn_to_nid(pfn);
|
|
|
|
+ if (nid >= 0)
|
|
|
|
+ return nid;
|
|
|
|
+ /* just returns 0 */
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_NODES_SPAN_OTHER_NODES
|
|
|
|
+bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
|
|
|
|
+{
|
|
|
|
+ int nid;
|
|
|
|
+
|
|
|
|
+ nid = __early_pfn_to_nid(pfn);
|
|
|
|
+ if (nid >= 0 && nid != node)
|
|
|
|
+ return false;
|
|
|
|
+ return true;
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
|
|
/* Basic iterator support to walk early_node_map[] */
|
|
/* Basic iterator support to walk early_node_map[] */
|
|
#define for_each_active_range_index_in_nid(i, nid) \
|
|
#define for_each_active_range_index_in_nid(i, nid) \
|