From: Heiko Carstens <[email protected]>
__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 <[email protected]>
---
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);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]