From: Andi Kleen <ak@muc.de>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, gone@us.ibm.com
Subject: [PATCH] Fix i386 bootup with HIGHMEM+SLAB_DEBUG+NUMA and no real highmem
Date: Fri, 16 Jul 2004 14:11:22 +0200 [thread overview]
Message-ID: <m3fz7s2lud.fsf@averell.firstfloor.org> (raw)
For some reason I booted a NUMA and SLAB_DEBUG i386 kernel on a non
NUMA 512MB machine. This caused an oops at bootup in change_page_attr.
The reason was that highmem_start_start page ended up zero and
that triggered the highmem check in change_page_attr when the
slab debug code would unmap a kernel mapping.
Fix is straightforward: if there is no highmem set highmem_start_page
to max_low_pfn+1
-Andi
diff -u linux-2.6.8rc1-work/arch/i386/mm/discontig.c-o linux-2.6.8rc1-work/arch/i386/mm/discontig.c
--- linux-2.6.8rc1-work/arch/i386/mm/discontig.c-o 2004-07-15 08:41:17.000000000 +0200
+++ linux-2.6.8rc1-work/arch/i386/mm/discontig.c 2004-07-16 12:21:37.000000000 +0200
@@ -448,7 +448,11 @@
void __init set_max_mapnr_init(void)
{
#ifdef CONFIG_HIGHMEM
- highmem_start_page = NODE_DATA(0)->node_zones[ZONE_HIGHMEM].zone_mem_map;
+ struct zone *high0 = &NODE_DATA(0)->node_zones[ZONE_HIGHMEM];
+ if (high0->spanned_pages > 0)
+ highmem_start_page = high0->zone_mem_map;
+ else
+ highmem_start_page = pfn_to_page(max_low_pfn+1);
num_physpages = highend_pfn;
#else
num_physpages = max_low_pfn;
reply other threads:[~2004-07-16 12:13 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=m3fz7s2lud.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=gone@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).