public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory hotadd fixes [4/5] avoid check in acpi
@ 2006-08-03  3:36 KAMEZAWA Hiroyuki
  2006-08-03 18:28 ` keith mannthey
  2006-08-04  0:13 ` keith mannthey
  0 siblings, 2 replies; 22+ messages in thread
From: KAMEZAWA Hiroyuki @ 2006-08-03  3:36 UTC (permalink / raw)
  To: LKML; +Cc: LHMS, kmannth@us.ibm.com, y-goto@jp.fujitsu.com, Andrew Morton


add_memory() does all necessary check to avoid collision.
then, acpi layer doesn't have to check region by itself.

(*) pfn_valid() just returns page struct is valid or not. It returns 0
    if a section has been already added even is ioresource is not added.
    ioresource collision check in mm/memory_hotplug.c can do more precise
    collistion check.
    added enabled bit check just for sanity check..

Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


 drivers/acpi/acpi_memhotplug.c |    9 +--------
 1 files changed, 1 insertion(+), 8 deletions(-)

Index: linux-2.6.18-rc3/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.18-rc3.orig/drivers/acpi/acpi_memhotplug.c	2006-08-01 16:11:47.000000000 +0900
+++ linux-2.6.18-rc3/drivers/acpi/acpi_memhotplug.c	2006-08-02 14:12:45.000000000 +0900
@@ -230,17 +230,10 @@
 	 * (i.e. memory-hot-remove function)
 	 */
 	list_for_each_entry(info, &mem_device->res_list, list) {
-		u64 start_pfn, end_pfn;
-
-		start_pfn = info->start_addr >> PAGE_SHIFT;
-		end_pfn = (info->start_addr + info->length - 1) >> PAGE_SHIFT;
-
-		if (pfn_valid(start_pfn) || pfn_valid(end_pfn)) {
-			/* already enabled. try next area */
+		if (info->enabled) { /* just sanity check...*/
 			num_enabled++;
 			continue;
 		}
-
 		result = add_memory(node, info->start_addr, info->length);
 		if (result)
 			continue;


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-08-04 21:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03  3:36 [PATCH] memory hotadd fixes [4/5] avoid check in acpi KAMEZAWA Hiroyuki
2006-08-03 18:28 ` keith mannthey
2006-08-03 23:09   ` [Lhms-devel] " keith mannthey
2006-08-04  0:22     ` KAMEZAWA Hiroyuki
2006-08-04  0:13 ` keith mannthey
2006-08-04  0:44   ` KAMEZAWA Hiroyuki
2006-08-04  1:54     ` keith mannthey
2006-08-04  2:15       ` KAMEZAWA Hiroyuki
2006-08-04  2:32         ` [PATCH] memory hotadd fixes [6/5] enhance collistion check KAMEZAWA Hiroyuki
2006-08-04  3:09           ` keith mannthey
2006-08-04  3:19             ` KAMEZAWA Hiroyuki
2006-08-04 21:01           ` keith mannthey
2006-08-04  3:00         ` [PATCH] memory hotadd fixes [4/5] avoid check in acpi keith mannthey
2006-08-04  3:13           ` KAMEZAWA Hiroyuki
2006-08-04  3:23             ` keith mannthey
2006-08-04  3:48               ` KAMEZAWA Hiroyuki
2006-08-04  4:25                 ` keith mannthey
2006-08-04  4:32                   ` KAMEZAWA Hiroyuki
2006-08-04  8:23                   ` Mika Penttilä
2006-08-04  8:32                     ` keith mannthey
2006-08-04  5:46                 ` Yasunori Goto
2006-08-04  5:59                   ` [Lhms-devel] " KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox