From 36632d9e4994044689dd9fdb592b0b4b7dc1a23e Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 22 Aug 2007 14:01:03 -0700 Subject: [PATCH] --- yaml --- r: 64219 b: refs/heads/master c: 85770ffe4f0cdd4396b17f14762adc25a571a348 h: refs/heads/master i: 64217: efd0da3bcf420c71e33af67d9d40a5d49350a687 64215: 0231f3171d9fed91d884f9d49d23a647f42e5a4e v: v3 --- [refs] | 2 +- trunk/mm/sparse.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d7e910a90df0..e4c638660bfa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df068464169a84a6a66c05d140f43a46d5eb6176 +refs/heads/master: 85770ffe4f0cdd4396b17f14762adc25a571a348 diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 3047bf06c1f3..239f5a720d38 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -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 @@ -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; @@ -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)