linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] memhotplug testing: hack for flat systems
@ 2005-09-30 15:25 Dave Hansen
  2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2005-09-30 15:25 UTC (permalink / raw)
  To: magnus; +Cc: linux-mm, Dave Hansen

Before this patch, the sparse code is only hooked into the NUMA
subarchitectures on i386.  This patch makes sure that normal,
contiguous systems get their memory put into sparsemem correctly.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 arch/i386/mach-default/setup.c           |    0 
 memhotplug-dave/arch/i386/kernel/setup.c |    8 ++++++++
 2 files changed, 8 insertions(+)

diff -puN arch/i386/kernel/setup.c~C1-memory_present-for-contig-systems arch/i386/kernel/setup.c
--- memhotplug/arch/i386/kernel/setup.c~C1-memory_present-for-contig-systems	2005-09-29 12:33:19.000000000 -0700
+++ memhotplug-dave/arch/i386/kernel/setup.c	2005-09-29 12:33:19.000000000 -0700
@@ -978,6 +978,12 @@ efi_find_max_pfn(unsigned long start, un
 	return 0;
 }
 
+static int __init
+efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
+{
+	memory_present(0, start, end);
+	return 0;
+}
 
 /*
  * Find the highest page frame number we have available
@@ -989,6 +995,7 @@ void __init find_max_pfn(void)
 	max_pfn = 0;
 	if (efi_enabled) {
 		efi_memmap_walk(efi_find_max_pfn, &max_pfn);
+		efi_memmap_walk(efi_memory_present_wrapper, NULL);
 		return;
 	}
 
@@ -1003,6 +1010,7 @@ void __init find_max_pfn(void)
 			continue;
 		if (end > max_pfn)
 			max_pfn = end;
+		memory_present(0, start, end);
 	}
 }
 
diff -puN mm/Kconfig~C1-memory_present-for-contig-systems mm/Kconfig
diff -puN mm/page_alloc.c~C1-memory_present-for-contig-systems mm/page_alloc.c
diff -L build_zonelists_fix -puN /dev/null /dev/null
diff -puN arch/i386/mm/init.c~C1-memory_present-for-contig-systems arch/i386/mm/init.c
diff -puN arch/i386/mach-default/setup.c~C1-memory_present-for-contig-systems arch/i386/mach-default/setup.c
diff -L arch/i386/mm/setup.c -puN /dev/null /dev/null
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-03  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-30 15:25 [PATCH 1/2] memhotplug testing: hack for flat systems Dave Hansen
2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
2005-10-03  5:40   ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox