- hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix.patch removed from -mm tree

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

 



The patch titled

     Make CONFIG_MEMORY_HOTPLUG_RESERVE and CONFIG_MEMORY_HOTPLUG_SPARSE build in the same tree

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

     hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix.patch

This patch was dropped because it was folded into hot-add-mem-x86_64-use-config_memory_hotplug_reserve.patch

------------------------------------------------------
Subject: Make CONFIG_MEMORY_HOTPLUG_RESERVE and CONFIG_MEMORY_HOTPLUG_SPARSE build in the same tree
From: Keith Mannthey <kmannth@xxxxxxxxxx>


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 |   10 ++++--
 mm/memory_hotplug.c   |   60 ++++++++++++++++++++--------------------
 2 files changed, 36 insertions(+), 34 deletions(-)

diff -puN arch/x86_64/mm/init.c~hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c~hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix
+++ a/arch/x86_64/mm/init.c
@@ -528,12 +528,12 @@ int arch_add_memory(int nid, u64 start, 
 	unsigned long nr_pages = size >> PAGE_SHIFT;
 	int ret;
 
+	init_memory_mapping(start, (start + size -1));
+
 	ret = __add_pages(zone, start_pfn, nr_pages);
 	if (ret)
 		goto error;
 
-	init_memory_mapping(start, (start + size -1));
-
 	return ret;
 error:
 	printk("%s: Problem encountered in __add_pages!\n", __func__);
@@ -562,7 +562,9 @@ int memory_add_physaddr_to_nid(u64 start
 }
 #endif
 
-#else /* CONFIG_MEMORY_HOTPLUG */
+#endif /* CONFIG_MEMORY_HOTPLUG */
+
+#ifdef CONFIG_MEMORY_HOTPLUG_RESERVE
 /*
  * Memory Hotadd without sparsemem. The mem_maps have been allocated in advance,
  * just online the pages.
@@ -588,7 +590,7 @@ int __add_pages(struct zone *z, unsigned
 	}
 	return err;
 }
-#endif /* CONFIG_MEMORY_HOTPLUG */
+#endif
 
 static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
 			 kcore_vsyscall;
diff -puN mm/memory_hotplug.c~hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix
+++ a/mm/memory_hotplug.c
@@ -24,6 +24,36 @@
 
 #include <asm/tlbflush.h>
 
+/* add this memory to iomem resource */
+static struct resource *register_memory_resource(u64 start, u64 size)
+{
+	struct resource *res;
+	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
+	BUG_ON(!res);
+
+	res->name = "System RAM";
+	res->start = start;
+	res->end = start + size - 1;
+	res->flags = IORESOURCE_MEM;
+	if (request_resource(&iomem_resource, res) < 0) {
+		printk("System RAM resource %llx - %llx cannot be added\n",
+		(unsigned long long)res->start, (unsigned long long)res->end);
+		kfree(res);
+		res = NULL;
+	}
+	return res;
+}
+
+static void release_memory_resource(struct resource *res)
+{
+	if (!res)
+		return;
+	release_resource(res);
+	kfree(res);
+	return;
+}
+
+
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
 {
@@ -220,36 +250,6 @@ static void rollback_node_hotadd(int nid
 	return;
 }
 
-/* add this memory to iomem resource */
-static struct resource *register_memory_resource(u64 start, u64 size)
-{
-	struct resource *res;
-	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
-	BUG_ON(!res);
-
-	res->name = "System RAM";
-	res->start = start;
-	res->end = start + size - 1;
-	res->flags = IORESOURCE_MEM;
-	if (request_resource(&iomem_resource, res) < 0) {
-		printk("System RAM resource %llx - %llx cannot be added\n",
-		(unsigned long long)res->start, (unsigned long long)res->end);
-		kfree(res);
-		res = NULL;
-	}
-	return res;
-}
-
-static void release_memory_resource(struct resource *res)
-{
-	if (!res)
-		return;
-	release_resource(res);
-	kfree(res);
-	return;
-}
-
-
 
 int add_memory(int nid, u64 start, u64 size)
 {
_

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

i386-bootioremap--kexec-fix.patch
i386-fix-flat-mode-numa-on-a-real-numa-system.patch
hot-add-mem-x86_64-fixup-externs.patch
hot-add-mem-x86_64-kconfig-changes.patch
hot-add-mem-x86_64-enable-sparsemem-in-sratc.patch
hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable.patch
hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup.patch
hot-add-mem-x86_64-use-config_memory_hotplug_sparse.patch
hot-add-mem-x86_64-use-config_memory_hotplug_reserve.patch
hot-add-mem-x86_64-use-config_memory_hotplug_reserve-fix.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