Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322953
b: refs/heads/master
c: f14851a
h: refs/heads/master
i:
  322951: 06def7b
v: v3
  • Loading branch information
qiuxishi authored and Linus Torvalds committed Sep 17, 2012
1 parent ddd0ae3 commit 8cd26b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ba8f2d59304dfe69b59c034de723ad80f7ab9ac
refs/heads/master: f14851af0ebb32745c6c5a2e400aa0549f9d20df
16 changes: 10 additions & 6 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
struct mem_section *ms;
struct page *page, *memmap;

if (!pfn_valid(start_pfn))
return;

section_nr = pfn_to_section_nr(start_pfn);
ms = __nr_to_section(section_nr);

Expand Down Expand Up @@ -187,9 +184,16 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
end_pfn = pfn + pgdat->node_spanned_pages;

/* register_section info */
for (; pfn < end_pfn; pfn += PAGES_PER_SECTION)
register_page_bootmem_info_section(pfn);

for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
/*
* Some platforms can assign the same pfn to multiple nodes - on
* node0 as well as nodeN. To avoid registering a pfn against
* multiple nodes we check that this pfn does not already
* reside in some other node.
*/
if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
register_page_bootmem_info_section(pfn);
}
}
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */

Expand Down

0 comments on commit 8cd26b5

Please sign in to comment.