Failed to alloc 4M DMA memory in the 256M system

Previous thread: Re: ps3_gelic_wireless: fix format warning by Geert Uytterhoeven on Sunday, March 7, 2010 - 11:33 pm. (2 messages)

Next thread: [PATCH 0/7][v7] PV extension of HVM (Hybrid) for Xen by Sheng Yang on Monday, March 8, 2010 - 12:18 am. (23 messages)
From: FUJITA Tomonori
Date: Sunday, March 7, 2010 - 11:54 pm

- It looks incorrect to use blk_rq_map_sg with pci_map_page here about
  DMA mappings. dma_map_sg?

- better to use dma_map_page instead of pci_map_page.
  http://marc.info/?l=linux-kernel&m=126596737604808&w=2

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 Documentation/block/biodoc.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 6fab97e..508b5b2 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -1162,8 +1162,8 @@ where a driver received a request ala this before:
 
 As mentioned, there is no virtual mapping of a bio. For DMA, this is
 not a problem as the driver probably never will need a virtual mapping.
-Instead it needs a bus mapping (pci_map_page for a single segment or
-use blk_rq_map_sg for scatter gather) to be able to ship it to the driver. For
+Instead it needs a bus mapping (dma_map_page for a single segment or
+use dma_map_sg for scatter gather) to be able to ship it to the driver. For
 PIO drivers (or drivers that need to revert to PIO transfer once in a
 while (IDE for example)), where the CPU is doing the actual data
 transfer a virtual mapping is needed. If the driver supports highmem I/O,
-- 
1.6.5

--

From: Zhu, Yijun (NSN - CN/Beijing)
Date: Monday, March 8, 2010 - 12:02 am

Hi All:

I try to alloc 4M memory for the DMA purpose in the 256M system running
V2.6.29. But failed.

I check the system, there is no 4M DMA memory in the DMA zone free list
indeed, So I'd like to
ask for that Is it possible for me to alloc 4M(or larger) DMA memory in
the linux system. 
if YES, HOW?

I forgot to say my hardware is based on X86. 

Thank you in advance.
--

From: Mark Hounschell
Date: Wednesday, March 10, 2010 - 3:37 am

There is still a bigphysarea patch around that works for me. (attached)  I
know of no other way using the hardware I need to do it with. IE, no
scatter/gather capabilities so memory must be contiguous. I personally
haven't used it with more than 2M but it should work.

Regards
Mark
From: Jens Axboe
Date: Monday, March 8, 2010 - 1:10 am

Thanks, when this was written, dma_map_page() didn't exist yet.

-- 
Jens Axboe

--

Previous thread: Re: ps3_gelic_wireless: fix format warning by Geert Uytterhoeven on Sunday, March 7, 2010 - 11:33 pm. (2 messages)

Next thread: [PATCH 0/7][v7] PV extension of HVM (Hybrid) for Xen by Sheng Yang on Monday, March 8, 2010 - 12:18 am. (23 messages)