- hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup.patch removed from -mm tree

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

 



The patch titled

     hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup

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

     hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup
From: Keith Mannthey <kmannth@xxxxxxxxxx>

In cases where the acpi memory-add event does not containe the pxm (node)
infomation allow the driver to look up node info based on the address.  The
acpi_get_node call returns -1 if it can't decode the pxm info, this causes
add_memory to panic.  acpi_get_node would have to decode the resource from the
handle (a lenghty proposition).  This seems to be the cleanist point to
interject the hook.

[kamezawa.hiroyu@xxxxxxxxxxxxxx: build fixes]
[y-goto@xxxxxxxxxxxxxx: build fixes]
Signed-off-by: Keith Mannthey<kmannth@xxxxxxxxxx>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Signed-off-by: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/ia64/mm/numa.c            |   18 ++++++++++++++++++
 arch/x86_64/mm/init.c          |    1 +
 arch/x86_64/mm/srat.c          |    2 ++
 drivers/acpi/acpi_memhotplug.c |    4 ++++
 4 files changed, 25 insertions(+)

diff -puN arch/ia64/mm/numa.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup arch/ia64/mm/numa.c
--- a/arch/ia64/mm/numa.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup
+++ a/arch/ia64/mm/numa.c
@@ -16,6 +16,7 @@
 #include <linux/node.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/module.h>
 #include <asm/mmzone.h>
 #include <asm/numa.h>
 
@@ -69,4 +70,21 @@ int early_pfn_to_nid(unsigned long pfn)
 
 	return 0;
 }
+
+#ifdef CONFIG_MEMORY_HOTPLUG
+/*
+ *  SRAT information is stored in node_memblk[], then we can use SRAT
+ *  information at memory-hot-add if necessary.
+ */
+
+int memory_add_physaddr_to_nid(u64 addr)
+{
+	int nid = paddr_to_nid(addr);
+	if (nid < 0)
+		return 0;
+	return nid;
+}
+
+EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
+#endif
 #endif
diff -puN arch/x86_64/mm/init.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup
+++ a/arch/x86_64/mm/init.c
@@ -498,6 +498,7 @@ int memory_add_physaddr_to_nid(u64 start
 {
 	return 0;
 }
+EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
 #endif
 
 #else /* CONFIG_MEMORY_HOTPLUG */
diff -puN arch/x86_64/mm/srat.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup arch/x86_64/mm/srat.c
--- a/arch/x86_64/mm/srat.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup
+++ a/arch/x86_64/mm/srat.c
@@ -477,3 +477,5 @@ int memory_add_physaddr_to_nid(u64 start
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
+
diff -puN drivers/acpi/acpi_memhotplug.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup drivers/acpi/acpi_memhotplug.c
--- a/drivers/acpi/acpi_memhotplug.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup
+++ a/drivers/acpi/acpi_memhotplug.c
@@ -238,6 +238,10 @@ static int acpi_memory_enable_device(str
 			num_enabled++;
 			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;
_

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

origin.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