Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88338
b: refs/heads/master
c: bead9a3
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Apr 16, 2008
1 parent 4d58746 commit 7e9db10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf39cc3b56bc4a562db6242d3069f65034ec7549
refs/heads/master: bead9a3abd15710b0bdfd418daef606722d86282
10 changes: 10 additions & 0 deletions trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,18 @@ static inline int sparse_early_nid(struct mem_section *section)
/* Record a memory area against a node. */
void __init memory_present(int nid, unsigned long start, unsigned long end)
{
unsigned long max_arch_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
unsigned long pfn;

/*
* Sanity checks - do not allow an architecture to pass
* in larger pfns than the maximum scope of sparsemem:
*/
if (start >= max_arch_pfn)
return;
if (end >= max_arch_pfn)
end = max_arch_pfn;

start &= PAGE_SECTION_MASK;
for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {
unsigned long section = pfn_to_section_nr(pfn);
Expand Down

0 comments on commit 7e9db10

Please sign in to comment.