From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux-kernel@vger.kernel.org
Subject: [patch] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT
Date: Fri, 28 Jul 2006 15:08:52 +0200 [thread overview]
Message-ID: <20060728130852.GB9559@osiris.boeblingen.de.ibm.com> (raw)
From: Heiko Carstens <heiko.carstens@de.ibm.com>
__alloc_bootmem_low() and __alloc_bootmem_low_node() should use
MAX_DMA_ADDRESS as limit which is per architecture instead of a global
LOW32LIMIT. Otherwise the bootmem allocator may return addresses
to memory regions which cannot be used for DMA access.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
mm/bootmem.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 50353e0..541bbe9 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -436,8 +436,6 @@ void * __init __alloc_bootmem_node(pg_da
return __alloc_bootmem(size, align, goal);
}
-#define LOW32LIMIT 0xffffffff
-
void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, unsigned long goal)
{
bootmem_data_t *bdata;
@@ -445,7 +443,7 @@ void * __init __alloc_bootmem_low(unsign
list_for_each_entry(bdata, &bdata_list, list)
if ((ptr = __alloc_bootmem_core(bdata, size,
- align, goal, LOW32LIMIT)))
+ align, goal, MAX_DMA_ADDRESS)))
return(ptr);
/*
@@ -459,5 +457,6 @@ void * __init __alloc_bootmem_low(unsign
void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
unsigned long align, unsigned long goal)
{
- return __alloc_bootmem_core(pgdat->bdata, size, align, goal, LOW32LIMIT);
+ return __alloc_bootmem_core(pgdat->bdata, size, align, goal,
+ MAX_DMA_ADDRESS);
}
next reply other threads:[~2006-07-28 13:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 13:08 Heiko Carstens [this message]
2006-07-28 13:13 ` Ingo Molnar
2006-07-28 14:58 ` Martin Schwidefsky
2006-07-28 19:41 ` Heiko Carstens
2006-07-29 3:55 ` Ingo Molnar
2006-08-07 5:27 ` Randy.Dunlap
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=20060728130852.GB9559@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
/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®