All of lore.kernel.org
 help / color / mirror / Atom feed
* Why dma_alloc_coherent don't return direct mapped vaddr?
@ 2022-07-21  3:28 Li Chen
  2022-07-21  7:06 ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Li Chen @ 2022-07-21  3:28 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel

Hi Arnd,

dma_alloc_coherent two addr:
1. vaddr.
2. dma_addr

I noticed vaddr is not simply linear/direct mapped to dma_addr, which means I cannot use virt_to_phys/virt_to_page to get 
paddr/page. Instead, I should use dma_addr as paddr and phys_to_page(dma_addr) to get struct page.

My question is why dma_alloc_coherent not simply return phys_to_virt(dma_addr)? IOW, why vaddr is not directly mapped to dma_addr?

Regards,
Li

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-07-27  6:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21  3:28 Why dma_alloc_coherent don't return direct mapped vaddr? Li Chen
2022-07-21  7:06 ` Arnd Bergmann
2022-07-22  2:57   ` Li Chen
2022-07-22  6:50     ` Arnd Bergmann
2022-07-22  8:19       ` Li Chen
2022-07-22  9:06         ` Arnd Bergmann
2022-07-22 10:31           ` Li Chen
2022-07-22 11:06             ` Arnd Bergmann
2022-07-25  2:50               ` Li Chen
2022-07-25  7:03                 ` Arnd Bergmann
2022-07-25 11:06                   ` Li Chen
2022-07-25 11:45                     ` Arnd Bergmann
2022-07-26  6:50                       ` Li Chen
2022-07-27  3:02                         ` Li Chen
2022-07-27  6:40                           ` Arnd Bergmann

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.