Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2848
b: refs/heads/master
c: c2ebaa4
h: refs/heads/master
v: v3
  • Loading branch information
Dave Hansen authored and Linus Torvalds committed Jun 23, 2005
1 parent 8bcad39 commit 977bf96
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 408fde81c1bff15c875a3618481e93a01dcc79ea
refs/heads/master: c2ebaa425e6630adcbf757b004d257dd4204925b
15 changes: 15 additions & 0 deletions trunk/arch/i386/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,21 @@ static void __init find_max_pfn_node(int nid)
BUG();
}

/* Find the owning node for a pfn. */
int early_pfn_to_nid(unsigned long pfn)
{
int nid;

for_each_node(nid) {
if (node_end_pfn[nid] == 0)
break;
if (node_start_pfn[nid] <= pfn && node_end_pfn[nid] >= pfn)
return nid;
}

return 0;
}

/*
* Allocate memory for the pg_data_t for this node via a crude pre-bootmem
* method. For node zero take this from the bottom of memory, for
Expand Down

0 comments on commit 977bf96

Please sign in to comment.