All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about DMA mapping.
@ 2018-08-31  0:53 phind.uet at gmail.com
  2018-08-31 14:09 ` valdis.kletnieks at vt.edu
  0 siblings, 1 reply; 2+ messages in thread
From: phind.uet at gmail.com @ 2018-08-31  0:53 UTC (permalink / raw)
  To: kernelnewbies

Hi everyone,

Thank for your time, I'm new to linux kernel. I am reading LDD3 chapter 
15, Dirrect Memory Access section. I see that when I call function 
/dma_map_single/ and /dma_unmap_single/, I need to pass a direction as a 
parameter. I wonder what is purpose of it? Does It relate to something 
like permission? Can I call /dma_map_single /with DMA_BIDIRECTIONAL and 
then call /dma_unmap_single /with DMA_TO_DEVICE? Will it cause any problem?

Thank you very much.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180831/08d3cccb/attachment.html>

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

* Question about DMA mapping.
  2018-08-31  0:53 Question about DMA mapping phind.uet at gmail.com
@ 2018-08-31 14:09 ` valdis.kletnieks at vt.edu
  0 siblings, 0 replies; 2+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-08-31 14:09 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 31 Aug 2018 08:53:29 +0800, "phind.uet at gmail.com" said:

> Thank for your time, I'm new to linux kernel. I am reading LDD3 chapter
> 15, Dirrect Memory Access section. I see that when I call function
> /dma_map_single/ and /dma_unmap_single/, I need to pass a direction as a
> parameter.

Please note that the LDD is current as of 2.6.10, which is from 2005, and
before git was used to maintain the kernel.

[/usr/src/linux-next] git diff --shortstat v2.6.12 v4.19-rc1
 70553 files changed, 23122660 insertions(+), 4318380 deletions(-)

The *concepts* in LDD3 are still valid.  However, the *exact* APIs
are almost certainly changed by now.

[/usr/src/linux-next] ls -l Documentation/DMA*
-rw-r--r--. 1 source source 34951 Jul 18  2017 Documentation/DMA-API-HOWTO.txt
-rw-rw-r--. 1 source source 28310 Sep  7  2017 Documentation/DMA-API.txt
-rw-r--r--. 1 source source  5209 Jul 18  2017 Documentation/DMA-ISA-LPC.txt
-rw-r--r--. 1 source source  7062 Jul 18  2017 Documentation/DMA-attributes.txt

Start there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180831/7a12ed2d/attachment.sig>

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

end of thread, other threads:[~2018-08-31 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31  0:53 Question about DMA mapping phind.uet at gmail.com
2018-08-31 14:09 ` valdis.kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.