From: Andy Whitcroft <apw@shadowen.org>
To: akpm@osdl.org
Cc: apw@shadowen.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i386 bootmem restrictions
Date: Thu, 26 Aug 2004 10:54:38 +0100 [thread overview]
Message-ID: <E1C0Gxq-00039Q-DE@localhost.localdomain> (raw)
The bootmem allocator is initialised before the kernel virtual address space
has been fully established. As a result, any allocations which are made
before paging_init() has completed may point to invalid kernel addresses.
This patch notes this limitation and indicates where the allocator is
fully available.
Revision: $Rev: 572 $
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
diffstat 100-ia32_bootmem
---
setup.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletion(-)
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/kernel/setup.c current/arch/i386/kernel/setup.c
--- reference/arch/i386/kernel/setup.c 2004-08-25 12:13:32.000000000 +0100
+++ current/arch/i386/kernel/setup.c 2004-08-26 10:27:59.000000000 +0100
@@ -1350,7 +1350,12 @@ void __init setup_arch(char **cmdline_p)
/*
* NOTE: before this point _nobody_ is allowed to allocate
- * any memory using the bootmem allocator.
+ * any memory using the bootmem allocator. Although the
+ * alloctor is now initialised only the first 8Mb of the kernel
+ * virtual address space has been mapped. All allocations before
+ * paging_init() has completed must use the alloc_bootmem_low_pages()
+ * variant (which allocates DMA'able memory) and care must be taken
+ * not to exceed the 8Mb limit.
*/
#ifdef CONFIG_SMP
@@ -1358,6 +1363,10 @@ void __init setup_arch(char **cmdline_p)
#endif
paging_init();
+ /*
+ * NOTE: at this point the bootmem allocator is fully available.
+ */
+
#ifdef CONFIG_EARLY_PRINTK
{
char *s = strstr(*cmdline_p, "earlyprintk=");
reply other threads:[~2004-08-26 10:02 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=E1C0Gxq-00039Q-DE@localhost.localdomain \
--to=apw@shadowen.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®