|
@@ -5937,13 +5937,15 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,
|
|
|
unsigned long *zone_end_pfn,
|
|
unsigned long *zone_end_pfn,
|
|
|
unsigned long *ignored)
|
|
unsigned long *ignored)
|
|
|
{
|
|
{
|
|
|
|
|
+ unsigned long zone_low = arch_zone_lowest_possible_pfn[zone_type];
|
|
|
|
|
+ unsigned long zone_high = arch_zone_highest_possible_pfn[zone_type];
|
|
|
/* When hotadd a new node from cpu_up(), the node should be empty */
|
|
/* When hotadd a new node from cpu_up(), the node should be empty */
|
|
|
if (!node_start_pfn && !node_end_pfn)
|
|
if (!node_start_pfn && !node_end_pfn)
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
/* Get the start and end of the zone */
|
|
/* Get the start and end of the zone */
|
|
|
- *zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
|
|
|
|
|
- *zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
|
|
|
|
|
|
|
+ *zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high);
|
|
|
|
|
+ *zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high);
|
|
|
adjust_zone_range_for_zone_movable(nid, zone_type,
|
|
adjust_zone_range_for_zone_movable(nid, zone_type,
|
|
|
node_start_pfn, node_end_pfn,
|
|
node_start_pfn, node_end_pfn,
|
|
|
zone_start_pfn, zone_end_pfn);
|
|
zone_start_pfn, zone_end_pfn);
|