- hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable.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 enable

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

     hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable.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 enable
From: Keith Mannthey <kmannth@xxxxxxxxxx>

The api for hot-add memory already has a construct for finding nodes based on
an address, memory_add_physaddr_to_nid.  This patch allows the fucntion to do
something besides return 0.  It uses the nodes_add infomation to lookup to
node info for a hot add event.

Signed-off-by: Keith Mannthey<kmannth@xxxxxxxxxx>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/x86_64/mm/init.c |   20 +++++++-------------
 arch/x86_64/mm/srat.c |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 14 deletions(-)

diff -puN arch/x86_64/mm/init.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable
+++ a/arch/x86_64/mm/init.c
@@ -463,19 +463,6 @@ void online_page(struct page *page)
 
 #ifdef CONFIG_MEMORY_HOTPLUG
 /*
- * XXX: memory_add_physaddr_to_nid() is to find node id from physical address
- *	via probe interface of sysfs. If acpi notifies hot-add event, then it
- *	can tell node id by searching dsdt. But, probe interface doesn't have
- *	node id. So, return 0 as node id at this time.
- */
-#ifdef CONFIG_NUMA
-int memory_add_physaddr_to_nid(u64 start)
-{
-	return 0;
-}
-#endif
-
-/*
  * Memory is added always to NORMAL zone. This means you will never get
  * additional DMA/DMA32 memory.
  */
@@ -506,6 +493,13 @@ int remove_memory(u64 start, u64 size)
 }
 EXPORT_SYMBOL_GPL(remove_memory);
 
+#ifndef CONFIG_ACPI_NUMA
+int memory_add_physaddr_to_nid(u64 start)
+{
+	return 0;
+}
+#endif
+
 #else /* CONFIG_MEMORY_HOTPLUG */
 /*
  * Memory Hotadd without sparsemem. The mem_maps have been allocated in advance,
diff -puN arch/x86_64/mm/srat.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable arch/x86_64/mm/srat.c
--- a/arch/x86_64/mm/srat.c~hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable
+++ a/arch/x86_64/mm/srat.c
@@ -27,7 +27,7 @@ static struct acpi_table_slit *acpi_slit
 
 static nodemask_t nodes_parsed __initdata;
 static struct bootnode nodes[MAX_NUMNODES] __initdata;
-static struct bootnode nodes_add[MAX_NUMNODES] __initdata;
+static struct bootnode nodes_add[MAX_NUMNODES];
 static int found_add_area __initdata;
 int hotadd_percent __initdata = 0;
 
@@ -466,3 +466,14 @@ int __node_distance(int a, int b)
 }
 
 EXPORT_SYMBOL(__node_distance);
+
+int memory_add_physaddr_to_nid(u64 start)
+{
+	int i, ret = 0;
+
+	for_each_node(i)
+		if (nodes_add[i].start <= start && nodes_add[i].end > start)
+			ret = i;
+
+	return ret;
+}
_

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