public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT
@ 2006-07-28 13:08 Heiko Carstens
  2006-07-28 13:13 ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Carstens @ 2006-07-28 13:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, Martin Schwidefsky, linux-kernel

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);
 }

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-07  5:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-28 13:08 [patch] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT Heiko Carstens
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox