linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Problem with dma_alloc_coherent at linux-2.6.33-arm1 , with RealView platform,board PBX-A9 and armv7 instructions.
@ 2010-07-15  9:13 David Yang
  2010-07-15  9:31 ` Ben Dooks
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: David Yang @ 2010-07-15  9:13 UTC (permalink / raw)
  To: linux-arm-kernel

hi ,everybody:

       I encountered this problem when porting my ethernet driver from
linux-2.6.28 to linux-2.6.33-arm1.

       In the linux-2.6.28, I used the dma_alloc_coherent to share the
informations between cpu and ethernet device.The program flow in the
function ndo_start_xmit:
               1,preparing the struct sk_buff->data for device internal DMA to
read,using the dma_map_single function.
               2,update the information in the memory which is allocated by
dma_alloc_coherent to tell the device DMA the data is readable.
               3,write the device register to inform the device DMA
to read the data.
               4,cpu captures the interrupt of reading completion
form the device.

       In the linux-2.6.28,the whole program flow soon complete in order.
       But when the driver was ported to the linux-2.6.33-arm1,the problem
came:
                I found when the cpu executed from step 1-3, the
device DMA alarm the
step 2 was not completed.As a result,the step 4 was not triggered.This
is different form linux-2.6.28.

               After some tests, I think the problem comes from the
dma_alloc_coherent.It looks like ,in the linux-2.6.33-arm1, when the
memory allocated by dma_alloc_coherent is written,the data entry into
the ddr much slower than the same process in linux-2.6.28.Therefore,when
cpu has executed the step 3, the step 2 has not yet completed.So the DMA
can't get the correct information ,and the step 4 will never be reached.

       I don't know the reason until now.I guess the memory allocated by the
dma_alloc_coherent may be cached....if not , why it is so slowly?

 Thanks!

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

end of thread, other threads:[~2010-07-20  9:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15  9:13 Problem with dma_alloc_coherent at linux-2.6.33-arm1 , with RealView platform,board PBX-A9 and armv7 instructions David Yang
2010-07-15  9:31 ` Ben Dooks
2010-07-15  9:38   ` Russell King - ARM Linux
2010-07-15  9:56     ` David Yang
2010-07-15  9:59       ` Russell King - ARM Linux
2010-07-15 10:06         ` David Yang
2010-07-15 10:04       ` Shilimkar, Santosh
2010-07-15 10:09         ` Russell King - ARM Linux
2010-07-15 11:16           ` David Yang
2010-07-15 11:28             ` Russell King - ARM Linux
2010-07-15 12:15           ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , withRealView " Catalin Marinas
2010-07-15  9:40   ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , with RealView " David Yang
2010-07-15 12:19   ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , withRealView " Catalin Marinas
2010-07-15  9:35 ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , with RealView " Russell King - ARM Linux
2010-07-15 12:21   ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , withRealView " Catalin Marinas
2010-07-15 12:52     ` David Yang
2010-07-15 12:56       ` Catalin Marinas
2010-07-15 13:10         ` David Yang
2010-07-15 13:17           ` Catalin Marinas
2010-07-17  7:05             ` David Yang
2010-07-19 12:29               ` Catalin Marinas
2010-07-20  3:17                 ` David Yang
2010-07-20  8:53                   ` Catalin Marinas
2010-07-20  9:22                     ` David Yang
2010-07-20  9:26                       ` Catalin Marinas
2010-07-15 12:25 ` Problem with dma_alloc_coherent at linux-2.6.33-arm1 , with RealView " Catalin Marinas
2010-07-15 12:57   ` David Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).