[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060803123322.baa6877b.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 3 Aug 2006 12:33:22 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: LHMS <lhms-devel@...ts.sourceforge.net>,
"kmannth@...ibm.com" <kmannth@...ibm.com>,
"y-goto@...fujitsu.com" <y-goto@...fujitsu.com>,
Andrew Morton <akpm@...l.org>
Subject: [PATCH] memory hotadd fixes [2/5] change find_next_system_ram's
return value manner
find_next_system_ram() returns valid memory range which meets requested
area, only used by memory-hot-add.
This function always rewrite requested resource even if returned area is
not fully fit in requested one. And sometimes the returnd resource is larger
than requested area. This annoyes the caller.
This patch changes the returned value to fit in requested area.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
kernel/resource.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: linux-2.6.18-rc3/kernel/resource.c
===================================================================
--- linux-2.6.18-rc3.orig/kernel/resource.c 2006-08-01 16:11:56.000000000 +0900
+++ linux-2.6.18-rc3/kernel/resource.c 2006-08-01 16:38:45.000000000 +0900
@@ -261,8 +261,10 @@
if (!p)
return -1;
/* copy data */
- res->start = p->start;
- res->end = p->end;
+ if (res->start < p->start)
+ res->start = p->start;
+ if (res->end > p->end)
+ res->end = p->end;
return 0;
}
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists