diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-09-22 19:45:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:41 -0400 |
commit | 908eedc6168bd92e89f90d89fa389065a36358fa (patch) | |
tree | 612881abb2aae920ab1e62e88990ee7b6a988f51 /drivers | |
parent | 9492587cf35d370db33ef4b38375dfb35a105b61 (diff) |
walk system ram range
Originally, walk_memory_resource() was introduced to traverse all memory
of "System RAM" for detecting memory hotplug/unplug range. For doing so,
flags of IORESOUCE_MEM|IORESOURCE_BUSY was used and this was enough for
memory hotplug.
But for using other purpose, /proc/kcore, this may includes some firmware
area marked as IORESOURCE_BUSY | IORESOUCE_MEM. This patch makes the
check strict to find out busy "System RAM".
Note: PPC64 keeps their own walk_memory_resouce(), which walk through
ppc64's lmb informaton. Because old kclist_add() is called per lmb, this
patch makes no difference in behavior, finally.
And this patch removes CONFIG_MEMORY_HOTPLUG check from this function.
Because pfn_valid() just show "there is memmap or not* and cannot be used
for "there is physical memory or not", this function is useful in generic
to scan physical memory range.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Américo Wang <xiyou.wangcong@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_mrmw.c | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_qmr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 7663a2a9f130..7550a534005c 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -2463,7 +2463,7 @@ int ehca_create_busmap(void) | |||
2463 | int ret; | 2463 | int ret; |
2464 | 2464 | ||
2465 | ehca_mr_len = 0; | 2465 | ehca_mr_len = 0; |
2466 | ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, NULL, | 2466 | ret = walk_system_ram_range(0, 1ULL << MAX_PHYSMEM_BITS, NULL, |
2467 | ehca_create_busmap_callback); | 2467 | ehca_create_busmap_callback); |
2468 | return ret; | 2468 | return ret; |
2469 | } | 2469 | } |
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 3747457f5e69..bc7c5b7abb88 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c | |||
@@ -751,7 +751,7 @@ int ehea_create_busmap(void) | |||
751 | 751 | ||
752 | mutex_lock(&ehea_busmap_mutex); | 752 | mutex_lock(&ehea_busmap_mutex); |
753 | ehea_mr_len = 0; | 753 | ehea_mr_len = 0; |
754 | ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, NULL, | 754 | ret = walk_system_ram_range(0, 1ULL << MAX_PHYSMEM_BITS, NULL, |
755 | ehea_create_busmap_callback); | 755 | ehea_create_busmap_callback); |
756 | mutex_unlock(&ehea_busmap_mutex); | 756 | mutex_unlock(&ehea_busmap_mutex); |
757 | return ret; | 757 | return ret; |