* [PATCH][-mm only] Error handling in walk_memory_resource()
@ 2007-10-01 22:07 Badari Pulavarty
2007-10-02 0:32 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 2+ messages in thread
From: Badari Pulavarty @ 2007-10-01 22:07 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki, Andrew Morton; +Cc: linux-mm
Hi,
I found this while trying to get hotplug memory remove working on ppc64.
ppc64 doesn't show all the memory regions in /proc/iomem like ia64 or
x86_64 and we end up wrongly offling pages.
Thanks,
Badari
walk_memory_resource() should return failure, if it can't find the memory
region in the /proc/iomem. Otherwise, offline_pages() would end up isolating
pages wrongly.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
kernel/resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.23-rc8/kernel/resource.c
===================================================================
--- linux-2.6.23-rc8.orig/kernel/resource.c 2007-10-01 14:09:01.000000000 -0700
+++ linux-2.6.23-rc8/kernel/resource.c 2007-10-01 14:09:35.000000000 -0700
@@ -284,7 +284,7 @@ walk_memory_resource(unsigned long start
struct resource res;
unsigned long pfn, len;
u64 orig_end;
- int ret;
+ int ret = -1;
res.start = (u64) start_pfn << PAGE_SHIFT;
res.end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1;
res.flags = IORESOURCE_MEM;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][-mm only] Error handling in walk_memory_resource()
2007-10-01 22:07 [PATCH][-mm only] Error handling in walk_memory_resource() Badari Pulavarty
@ 2007-10-02 0:32 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 2+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-10-02 0:32 UTC (permalink / raw)
To: Badari Pulavarty; +Cc: Andrew Morton, linux-mm
On Mon, 01 Oct 2007 15:07:18 -0700
Badari Pulavarty <pbadari@us.ibm.com> wrote:
> Index: linux-2.6.23-rc8/kernel/resource.c
> ===================================================================
> --- linux-2.6.23-rc8.orig/kernel/resource.c 2007-10-01 14:09:01.000000000 -0700
> +++ linux-2.6.23-rc8/kernel/resource.c 2007-10-01 14:09:35.000000000 -0700
> @@ -284,7 +284,7 @@ walk_memory_resource(unsigned long start
> struct resource res;
> unsigned long pfn, len;
> u64 orig_end;
> - int ret;
> + int ret = -1;
Thank you!
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-02 0:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-01 22:07 [PATCH][-mm only] Error handling in walk_memory_resource() Badari Pulavarty
2007-10-02 0:32 ` KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox