diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2010-01-22 03:16:19 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-01 19:58:17 -0500 |
commit | 61ef2489dbf587258526cfd4ebf4bba3b079f401 (patch) | |
tree | 4806ed052c73d84821d958f306699b2a27da965e /arch | |
parent | ccef086454d4c97e7b722e9303390207d681cb4c (diff) |
resources: introduce generic page_is_ram()
It's based on walk_system_ram_range(), for archs that don't have
their own page_is_ram().
The static verions in MIPS and SCORE are also made global.
v4: prefer plain 1 instead of PAGE_IS_RAM (H. Peter Anvin)
v3: add comment (KAMEZAWA Hiroyuki)
"AFAIK, this "System RAM" information has been used for kdump to
grab valid memory area and seems good for the kernel itself."
v2: add PAGE_IS_RAM macro (Américo Wang)
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Américo Wang <xiyou.wangcong@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Yinghai Lu <yinghai@kernel.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
LKML-Reference: <20100122081619.GA6431@localhost>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/mm/init.c | 2 | ||||
-rw-r--r-- | arch/score/mm/init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 15aa1902a78..4d72aabe835 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -294,7 +294,7 @@ void __init fixrange_init(unsigned long start, unsigned long end, | |||
294 | } | 294 | } |
295 | 295 | ||
296 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 296 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
297 | static int __init page_is_ram(unsigned long pagenr) | 297 | int page_is_ram(unsigned long pagenr) |
298 | { | 298 | { |
299 | int i; | 299 | int i; |
300 | 300 | ||
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c index 4e3dcd0c471..f684a590c21 100644 --- a/arch/score/mm/init.c +++ b/arch/score/mm/init.c | |||
@@ -59,7 +59,7 @@ static unsigned long setup_zero_page(void) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 61 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
62 | static int __init page_is_ram(unsigned long pagenr) | 62 | int page_is_ram(unsigned long pagenr) |
63 | { | 63 | { |
64 | if (pagenr >= min_low_pfn && pagenr < max_low_pfn) | 64 | if (pagenr >= min_low_pfn && pagenr < max_low_pfn) |
65 | return 1; | 65 | return 1; |