diff options
author | Zhang Zhen <zhenzhang.zhang@huawei.com> | 2014-06-04 19:10:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:12 -0400 |
commit | 7d018176e6d50510b142bccbd60d8c6ed5e72e56 (patch) | |
tree | d375782660f877755a4bf5a46c60e909e009c83f /mm | |
parent | daa5ba768b9e15da8867824d2f1e8d455f1acac2 (diff) |
mm/page_alloc.c: cleanup add_active_range() related comments
add_active_range() has been repalced by memblock_set_node(). Clean up the
comments to comply with that change.
Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8f785b1534a3..a59bdb653958 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4387,9 +4387,6 @@ int __meminit init_currently_empty_zone(struct zone *zone, | |||
4387 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | 4387 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID |
4388 | /* | 4388 | /* |
4389 | * Required by SPARSEMEM. Given a PFN, return what node the PFN is on. | 4389 | * Required by SPARSEMEM. Given a PFN, return what node the PFN is on. |
4390 | * Architectures may implement their own version but if add_active_range() | ||
4391 | * was used and there are no special requirements, this is a convenient | ||
4392 | * alternative | ||
4393 | */ | 4390 | */ |
4394 | int __meminit __early_pfn_to_nid(unsigned long pfn) | 4391 | int __meminit __early_pfn_to_nid(unsigned long pfn) |
4395 | { | 4392 | { |
@@ -4444,10 +4441,9 @@ bool __meminit early_pfn_in_nid(unsigned long pfn, int node) | |||
4444 | * @nid: The node to free memory on. If MAX_NUMNODES, all nodes are freed. | 4441 | * @nid: The node to free memory on. If MAX_NUMNODES, all nodes are freed. |
4445 | * @max_low_pfn: The highest PFN that will be passed to memblock_free_early_nid | 4442 | * @max_low_pfn: The highest PFN that will be passed to memblock_free_early_nid |
4446 | * | 4443 | * |
4447 | * If an architecture guarantees that all ranges registered with | 4444 | * If an architecture guarantees that all ranges registered contain no holes |
4448 | * add_active_ranges() contain no holes and may be freed, this | 4445 | * and may be freed, this this function may be used instead of calling |
4449 | * this function may be used instead of calling memblock_free_early_nid() | 4446 | * memblock_free_early_nid() manually. |
4450 | * manually. | ||
4451 | */ | 4447 | */ |
4452 | void __init free_bootmem_with_active_regions(int nid, unsigned long max_low_pfn) | 4448 | void __init free_bootmem_with_active_regions(int nid, unsigned long max_low_pfn) |
4453 | { | 4449 | { |
@@ -4469,9 +4465,8 @@ void __init free_bootmem_with_active_regions(int nid, unsigned long max_low_pfn) | |||
4469 | * sparse_memory_present_with_active_regions - Call memory_present for each active range | 4465 | * sparse_memory_present_with_active_regions - Call memory_present for each active range |
4470 | * @nid: The node to call memory_present for. If MAX_NUMNODES, all nodes will be used. | 4466 | * @nid: The node to call memory_present for. If MAX_NUMNODES, all nodes will be used. |
4471 | * | 4467 | * |
4472 | * If an architecture guarantees that all ranges registered with | 4468 | * If an architecture guarantees that all ranges registered contain no holes and may |
4473 | * add_active_ranges() contain no holes and may be freed, this | 4469 | * be freed, this function may be used instead of calling memory_present() manually. |
4474 | * function may be used instead of calling memory_present() manually. | ||
4475 | */ | 4470 | */ |
4476 | void __init sparse_memory_present_with_active_regions(int nid) | 4471 | void __init sparse_memory_present_with_active_regions(int nid) |
4477 | { | 4472 | { |
@@ -4489,7 +4484,7 @@ void __init sparse_memory_present_with_active_regions(int nid) | |||
4489 | * @end_pfn: Passed by reference. On return, it will have the node end_pfn. | 4484 | * @end_pfn: Passed by reference. On return, it will have the node end_pfn. |
4490 | * | 4485 | * |
4491 | * It returns the start and end page frame of a node based on information | 4486 | * It returns the start and end page frame of a node based on information |
4492 | * provided by an arch calling add_active_range(). If called for a node | 4487 | * provided by memblock_set_node(). If called for a node |
4493 | * with no available memory, a warning is printed and the start and end | 4488 | * with no available memory, a warning is printed and the start and end |
4494 | * PFNs will be 0. | 4489 | * PFNs will be 0. |
4495 | */ | 4490 | */ |
@@ -5066,7 +5061,7 @@ static unsigned long __init find_min_pfn_for_node(int nid) | |||
5066 | * find_min_pfn_with_active_regions - Find the minimum PFN registered | 5061 | * find_min_pfn_with_active_regions - Find the minimum PFN registered |
5067 | * | 5062 | * |
5068 | * It returns the minimum PFN based on information provided via | 5063 | * It returns the minimum PFN based on information provided via |
5069 | * add_active_range(). | 5064 | * memblock_set_node(). |
5070 | */ | 5065 | */ |
5071 | unsigned long __init find_min_pfn_with_active_regions(void) | 5066 | unsigned long __init find_min_pfn_with_active_regions(void) |
5072 | { | 5067 | { |
@@ -5287,7 +5282,7 @@ static void check_for_memory(pg_data_t *pgdat, int nid) | |||
5287 | * @max_zone_pfn: an array of max PFNs for each zone | 5282 | * @max_zone_pfn: an array of max PFNs for each zone |
5288 | * | 5283 | * |
5289 | * This will call free_area_init_node() for each active node in the system. | 5284 | * This will call free_area_init_node() for each active node in the system. |
5290 | * Using the page ranges provided by add_active_range(), the size of each | 5285 | * Using the page ranges provided by memblock_set_node(), the size of each |
5291 | * zone in each node and their holes is calculated. If the maximum PFN | 5286 | * zone in each node and their holes is calculated. If the maximum PFN |
5292 | * between two adjacent zones match, it is assumed that the zone is empty. | 5287 | * between two adjacent zones match, it is assumed that the zone is empty. |
5293 | * For example, if arch_max_dma_pfn == arch_max_dma32_pfn, it is assumed | 5288 | * For example, if arch_max_dma_pfn == arch_max_dma32_pfn, it is assumed |