- x86_64-memory-hot-add-fix-acpi-motherboardc.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     x86_64 memory hot-add: fix acpi motherboard.c

has been removed from the -mm tree.  Its filename is

     x86_64-memory-hot-add-fix-acpi-motherboardc.patch

This patch was dropped because rework is expected

------------------------------------------------------
Subject: x86_64 memory hot-add: fix acpi motherboard.c
From: keith mannthey <kmannth@xxxxxxxxxx>

Fix an issue I encountered while doing hot-add memroy on my platform (IBM
Summit).

My system loads to acpi memory hot plug driver just fine during boot.  It
installs and registers acpi_memory_device_driver and it's handler.  When the
hot add memory event occurs the handler is called.  this is the relevant call
path

acpi_memory_get_device
acpi_bus_add
acpi_add_single_object
acpi_bus_find_driver
acpi_bus_driver_init
driver->ops.add

The algorithm it try to match devices from acpi_bus_drivers.  It looks for
drivers that are on the right bus and calls acpi_bus_driver_init.  If it gets
a good return value for acpi_bus_driver_init it thinks it found the device and
returns.  The problem is the motherboard driver driver->ops.add is getting
called and it ALWAYS returns AE_OK.

The device that is passed back up the call chain is the wrong one (the
motherboard device) and whole things break down.

My solution is to make the motherboard value fail to return a AE_OK for
devices it does not expect (like my hot-add memory event).

Without this patch I cannot do real hot-add memory with my hardware.

Thanks to KAMEZAWA Hiroyuki for helping to debug the issue and Patrick
Mochel for providing input.

Signed-off-by: Keith Mannthey <kmannth@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/acpi/motherboard.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff -puN drivers/acpi/motherboard.c~x86_64-memory-hot-add-fix-acpi-motherboardc drivers/acpi/motherboard.c
--- a/drivers/acpi/motherboard.c~x86_64-memory-hot-add-fix-acpi-motherboardc
+++ a/drivers/acpi/motherboard.c
@@ -87,6 +87,7 @@ static acpi_status acpi_reserve_io_range
 		}
 	} else {
 		/* Memory mapped IO? */
+		 return -EINVAL;
 	}
 
 	if (requested_res)
@@ -96,11 +97,16 @@ static acpi_status acpi_reserve_io_range
 
 static int acpi_motherboard_add(struct acpi_device *device)
 {
+	acpi_status status;
 	if (!device)
 		return -EINVAL;
-	acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+
+	status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
 			    acpi_reserve_io_ranges, NULL);
 
+	if (ACPI_FAILURE(status))
+		return -ENODEV;
+
 	return 0;
 }
 
_

Patches currently in -mm which might be from kmannth@xxxxxxxxxx are

x86_64-memory-hot-add-fix-acpi-motherboardc.patch
convert-i386-numa-kva-space-to-bootmem.patch
convert-i386-numa-kva-space-to-bootmem-tidy.patch
convert-i386-summit-subarch-to-use-srat-info-for-apicid_to_node-calls.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux