|
@@ -5675,8 +5675,11 @@ static void __init find_zone_movable_pfns_for_nodes(void)
|
|
required_kernelcore = max(required_kernelcore, corepages);
|
|
required_kernelcore = max(required_kernelcore, corepages);
|
|
}
|
|
}
|
|
|
|
|
|
- /* If kernelcore was not specified, there is no ZONE_MOVABLE */
|
|
|
|
- if (!required_kernelcore)
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If kernelcore was not specified or kernelcore size is larger
|
|
|
|
+ * than totalpages, there is no ZONE_MOVABLE.
|
|
|
|
+ */
|
|
|
|
+ if (!required_kernelcore || required_kernelcore >= totalpages)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
/* usable_startpfn is the lowest possible pfn ZONE_MOVABLE can be at */
|
|
/* usable_startpfn is the lowest possible pfn ZONE_MOVABLE can be at */
|