Commit b5685e92 authored by Xishi Qiu's avatar Xishi Qiu Committed by Linus Torvalds

memory-hotplug: fix comments in zone_spanned_pages_in_node() and zone_spanned_pages_in_node()

When hot adding a node from add_memory(), we will add memblock first, so
the node is not empty.  But when called from cpu_up(), the node should
be empty.
Signed-off-by: default avatarXishi Qiu <qiuxishi@huawei.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>\
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 34b10060
...@@ -5085,7 +5085,7 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid, ...@@ -5085,7 +5085,7 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,
{ {
unsigned long zone_start_pfn, zone_end_pfn; unsigned long zone_start_pfn, zone_end_pfn;
/* When hotadd a new node, 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;
...@@ -5152,7 +5152,7 @@ static unsigned long __meminit zone_absent_pages_in_node(int nid, ...@@ -5152,7 +5152,7 @@ static unsigned long __meminit zone_absent_pages_in_node(int nid,
unsigned long zone_high = arch_zone_highest_possible_pfn[zone_type]; unsigned long zone_high = arch_zone_highest_possible_pfn[zone_type];
unsigned long zone_start_pfn, zone_end_pfn; unsigned long zone_start_pfn, zone_end_pfn;
/* When hotadd a new node, 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment