Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64219
b: refs/heads/master
c: 85770ff
h: refs/heads/master
i:
  64217: efd0da3
  64215: 0231f31
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Aug 23, 2007
1 parent 1b5c5dc commit 36632d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: df068464169a84a6a66c05d140f43a46d5eb6176
refs/heads/master: 85770ffe4f0cdd4396b17f14762adc25a571a348
14 changes: 10 additions & 4 deletions trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ int page_to_nid(struct page *page)
return section_to_node_table[page_to_section(page)];
}
EXPORT_SYMBOL(page_to_nid);

static void set_section_nid(unsigned long section_nr, int nid)
{
section_to_node_table[section_nr] = nid;
}
#else /* !NODE_NOT_IN_PAGE_FLAGS */
static inline void set_section_nid(unsigned long section_nr, int nid)
{
}
#endif

#ifdef CONFIG_SPARSEMEM_EXTREME
Expand Down Expand Up @@ -68,10 +77,6 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid)
struct mem_section *section;
int ret = 0;

#ifdef NODE_NOT_IN_PAGE_FLAGS
section_to_node_table[section_nr] = nid;
#endif

if (mem_section[root])
return -EEXIST;

Expand Down Expand Up @@ -148,6 +153,7 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
struct mem_section *ms;

sparse_index_init(section, nid);
set_section_nid(section, nid);

ms = __nr_to_section(section);
if (!ms->section_mem_map)
Expand Down

0 comments on commit 36632d9

Please sign in to comment.