mm: fix memmap init for handling memory hole
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Wed, 18 Feb 2009 22:48:33 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 00:52:46 +0000 (17:52 -0700)
commit9d126f32c569c747d2103156fef6033e6444804d
treeaffcab1e81e66e2d7dfd7e9923cff1b9f124fd23
parent819aa5607804c588ea669584bbeb8f92df021022
mm: fix memmap init for handling memory hole

commit cc2559bccc72767cb446f79b071d96c30c26439b upstream.

Now, early_pfn_in_nid(PFN, NID) may returns false if PFN is a hole.
and memmap initialization was not done. This was a trouble for
sparc boot.

To fix this, the PFN should be initialized and marked as PG_reserved.
This patch changes early_pfn_in_nid() return true if PFN is a hole.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reported-by: David Miller <davem@davemlloft.net>
Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/ia64/mm/numa.c
include/linux/mmzone.h
mm/page_alloc.c