public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 2/2]:ACPI: Ingore the memory block with zero block size in course of memory hotplug
@ 2009-07-03  2:50 yakui
  0 siblings, 0 replies; 2+ messages in thread
From: yakui @ 2009-07-03  2:50 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

From: Zhao Yakui <yakui.zhao@intel.com>

If the memory block size is zero, ignore it and don't do the memory hotplug
flowchart. Otherwise it will complain the following warning message:
  >System RAM resource 0 - ffffffffffffffff cannot be added

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/acpi_memhotplug.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpi_memhotplug.c	2009-07-03 10:22:22.000000000 +0800
+++ linux-2.6/drivers/acpi/acpi_memhotplug.c	2009-07-03 10:36:07.000000000 +0800
@@ -242,7 +242,12 @@
 			num_enabled++;
 			continue;
 		}
-
+		/*
+		 * If the memory block size is zero, please ignore it.
+		 * Don't try to do the following memory hotplug flowchart.
+		 */
+		if (!info->length)
+			continue;
 		if (node < 0)
 			node = memory_add_physaddr_to_nid(info->start_addr);
 
@@ -257,8 +262,15 @@
 		mem_device->state = MEMORY_INVALID_STATE;
 		return -EINVAL;
 	}
-
-	return result;
+	/*
+	 * Sometimes the memory device will contain several memory blocks.
+	 * When one memory block is hot-added to the system memory, it will
+	 * be regarded as a success.
+	 * Otherwise if the last memory block can't be hot-added to the system
+	 * memory, it will be failure and the memory device can't be bound with
+	 * driver.
+	 */
+	return 0;
 }
 
 static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)



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

* [Patch 2/2]:ACPI: Ingore the memory block with zero block size in course of memory hotplug
@ 2009-07-07  2:56 yakui
  0 siblings, 0 replies; 2+ messages in thread
From: yakui @ 2009-07-07  2:56 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

From: Zhao Yakui <yakui.zhao@intel.com>

If the memory block size is zero, ignore it and don't do the memory hotplug
flowchart. Otherwise it will complain the following warning message:
  >System RAM resource 0 - ffffffffffffffff cannot be added

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/acpi_memhotplug.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpi_memhotplug.c	2009-07-07 10:33:43.000000000 +0800
+++ linux-2.6/drivers/acpi/acpi_memhotplug.c	2009-07-07 10:52:26.000000000 +0800
@@ -244,7 +244,12 @@
 			num_enabled++;
 			continue;
 		}
-
+		/*
+		 * If the memory block size is zero, please ignore it.
+		 * Don't try to do the following memory hotplug flowchart.
+		 */
+		if (!info->length)
+			continue;
 		if (node < 0)
 			node = memory_add_physaddr_to_nid(info->start_addr);
 
@@ -259,8 +264,15 @@
 		mem_device->state = MEMORY_INVALID_STATE;
 		return -EINVAL;
 	}
-
-	return result;
+	/*
+	 * Sometimes the memory device will contain several memory blocks.
+	 * When one memory block is hot-added to the system memory, it will
+	 * be regarded as a success.
+	 * Otherwise if the last memory block can't be hot-added to the system
+	 * memory, it will be failure and the memory device can't be bound with
+	 * driver.
+	 */
+	return 0;
 }
 
 static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)



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

end of thread, other threads:[~2009-07-07  2:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07  2:56 [Patch 2/2]:ACPI: Ingore the memory block with zero block size in course of memory hotplug yakui
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03  2:50 yakui

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