On Tue, 2006-08-01 at 22:34 +0900, Yasunori Goto wrote: > Hello. > > This patch is to avoid returning negative value for node id if _PXM is not > defined in ACPI's DSDT. There are 2 possible cases. > > 1) The hot-add code is executed with NUMA kernel on NON-NUMA box. > 2) Firmware expects only SRAT table's information to find pxm, > and it doesn't expect DSDT. > > If -1 is returned for node id, kernel will touch no-pgdat address > when hot-add is executed. > > To fix case 2) exactly, kernel should search memory block information > which cames from SRAT at boottime. But, it will be arch dependent code > and it is not written for i386 and ia64 yet. And it will be post later. > So, at least, kernel panic should be avoided on 2.6.18 by this patch. > > This patch is for 2.6.18-rc3. And I tested this patch on my Tiger4 with > hot-add emulation. > > Please apply. I would rather give the arch a chance to sort out what the node is. I don't think Linux should require the ACPI add event to contain the _pxm information. (I don't see it required in the spec). acpi_get_node is only going to work with systems that implement the acpi table in this way. I think something like this might be better... diff -urN linux-2.6.18-rc3-stock/drivers/acpi/acpi_memhotplug.c linux-2.6.17/drivers/acpi/acpi_memhotplug.c --- linux-2.6.18-rc3-stock/drivers/acpi/acpi_memhotplug.c 2006-07-31 19:59:05.000000000 -0400 +++ linux-2.6.17/drivers/acpi/acpi_memhotplug.c 2006-08-01 13:56:03.000000000 -0400 @@ -241,6 +241,9 @@ continue; } + if (node < 0) + node = memory_add_physaddr_to_nid(info->start_addr); + result = add_memory(node, info->start_addr, info->length); if (result) continue; - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html