Message ID | 20090205180617.8ee3dfb5.kamezawa.hiroyu@jp.fujitsu.com |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Date: Thu, 5 Feb 2009 18:06:17 +0900 > @@ -2632,7 +2633,8 @@ void __meminit memmap_init_zone(unsigned > if (context == MEMMAP_EARLY) { > if (!early_pfn_valid(pfn)) > continue; > - if (!early_pfn_in_nid(pfn, nid)) > + tmp = early_pfn_in_nid(pfn, nid); > + if (tmp > -1 && tmp != nid) early_pfn_in_nid() returns true or false, not the found nid I think you meant to change this to call early_pfn_to_nid() I'll make that correction and test your patch. BTW, if you make that conversion there is no need for early_pfn_in_nid() since there will be no other users. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: mmotm-2.6.29-Feb03/mm/page_alloc.c =================================================================== --- mmotm-2.6.29-Feb03.orig/mm/page_alloc.c +++ mmotm-2.6.29-Feb03/mm/page_alloc.c @@ -2618,6 +2618,7 @@ void __meminit memmap_init_zone(unsigned unsigned long end_pfn = start_pfn + size; unsigned long pfn; struct zone *z; + int tmp; if (highest_memmap_pfn < end_pfn - 1) highest_memmap_pfn = end_pfn - 1; @@ -2632,7 +2633,8 @@ void __meminit memmap_init_zone(unsigned if (context == MEMMAP_EARLY) { if (!early_pfn_valid(pfn)) continue; - if (!early_pfn_in_nid(pfn, nid)) + tmp = early_pfn_in_nid(pfn, nid); + if (tmp > -1 && tmp != nid) continue; } page = pfn_to_page(pfn); @@ -2999,8 +3001,9 @@ int __meminit early_pfn_to_nid(unsigned return early_node_map[i].nid; } - return 0; + return -1; } + #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ /* Basic iterator support to walk early_node_map[] */