aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2005-10-19 18:52:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-20 02:11:33 -0400
commit281dd25cdc0d6903929b79183816d151ea626341 (patch)
treeed7898462492d853e422eb7f130f0b6e7efc0b69 /arch
parent51b190b304bbeb1090ba20b0623d39917fa62997 (diff)
[PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory
This introduces a limit parameter to the core bootmem allocator; The new parameter indicates that physical memory allocated by the bootmem allocator should be within the requested limit. We also introduce alloc_bootmem_low_pages_limit, alloc_bootmem_node_limit, alloc_bootmem_low_pages_node_limit apis, but alloc_bootmem_low_pages_limit is the only api used for swiotlb. The existing alloc_bootmem_low_pages() api could instead have been changed and made to pass right limit to the core allocator. But that would make the patch more intrusive for 2.6.14, as other arches use alloc_bootmem_low_pages(). We may be done that post 2.6.14 as a cleanup. With this, swiotlb gets memory within 4G for both x86_64 and ia64 arches. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Ravikiran G Thirumalai <kiran@scalex86.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/lib/swiotlb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c
index dbc0b3e449c5..a604efc7f6c9 100644
--- a/arch/ia64/lib/swiotlb.c
+++ b/arch/ia64/lib/swiotlb.c
@@ -123,8 +123,8 @@ swiotlb_init_with_default_size (size_t default_size)
123 /* 123 /*
124 * Get IO TLB memory from the low pages 124 * Get IO TLB memory from the low pages
125 */ 125 */
126 io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs * 126 io_tlb_start = alloc_bootmem_low_pages_limit(io_tlb_nslabs *
127 (1 << IO_TLB_SHIFT)); 127 (1 << IO_TLB_SHIFT), 0x100000000);
128 if (!io_tlb_start) 128 if (!io_tlb_start)
129 panic("Cannot allocate SWIOTLB buffer"); 129 panic("Cannot allocate SWIOTLB buffer");
130 io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT); 130 io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);