From: Dave Hansen <haveblue@us.ibm.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Dave Hansen <haveblue@us.ibm.com>
Subject: [PATCH] make highmem_start access only valid addresses (i386)
Date: Fri, 25 Feb 2005 10:54:34 -0800 [thread overview]
Message-ID: <E1D4kbj-0004UG-00@kernel.beaverton.ibm.com> (raw)
When CONFIG_HIGHMEM=y, but ZONE_NORMAL isn't quite full, there is, of course,
no actual memory at *high_memory. This isn't a problem with normal
virt<->phys translations because it's never dereferenced, but CONFIG_NONLINEAR
is a bit more finicky. So, don't do __va() in non-existent addresses.
BTW, this can certainly wait until the 2.6.12 series.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---
sparse-dave/arch/i386/mm/init.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN arch/i386/mm/init.c~A4-highmem_start-valid_addrs arch/i386/mm/init.c
--- sparse/arch/i386/mm/init.c~A4-highmem_start-valid_addrs 2005-02-24 08:56:43.000000000 -0800
+++ sparse-dave/arch/i386/mm/init.c 2005-02-24 08:56:43.000000000 -0800
@@ -563,9 +563,9 @@ void __init mem_init(void)
set_max_mapnr_init();
#ifdef CONFIG_HIGHMEM
- high_memory = (void *) __va(highstart_pfn * PAGE_SIZE);
+ high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
#else
- high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
+ high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
#endif
/* this will put all low memory onto the freelists */
_
--
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:"aart@kvack.org"> aart@kvack.org </a>
reply other threads:[~2005-02-25 18:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1D4kbj-0004UG-00@kernel.beaverton.ibm.com \
--to=haveblue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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