linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: magnus@valinux.co.jp
Cc: linux-mm@kvack.org, Dave Hansen <haveblue@us.ibm.com>
Subject: [PATCH 1/2] memhotplug testing: hack for flat systems
Date: Fri, 30 Sep 2005 08:25:31 -0700	[thread overview]
Message-ID: <20050930152531.3FDB46D3@kernel.beaverton.ibm.com> (raw)

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>

             reply	other threads:[~2005-09-30 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 15:25 Dave Hansen [this message]
2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
2005-10-03  5:40   ` Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050930152531.3FDB46D3@kernel.beaverton.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=magnus@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox