Messages in this thread | | | Subject | Re: [PATCH kernel v2 1/2] dma: Allow mixing bypass and normal IOMMU operation | From | Alexey Kardashevskiy <> | Date | Thu, 29 Oct 2020 10:11:45 +1100 |
| |
On 29/10/2020 04:21, Christoph Hellwig wrote: > On Wed, Oct 28, 2020 at 05:55:23PM +1100, Alexey Kardashevskiy wrote: >> >> It is passing an address of the end of the mapped area so passing a page >> struct means passing page and offset which is an extra parameter and we do >> not want to do anything with the page in those hooks anyway so I'd keep it >> as is. >> >> >>> and >>> maybe even hide the dma_map_direct inside it. >> >> Call dma_map_direct() from arch_dma_map_page_direct() if >> arch_dma_map_page_direct() is defined? Seems suboptimal as it is going to >> be bypass=true in most cases and we save one call by avoiding calling >> arch_dma_map_page_direct(). Unless I missed something? > > C does not even evaluate the right hand side of a || expression if the > left hand evaluates to true.
Right, this is what I meant. dma_map_direct() is inline and fast so I did not want it inside the arch hook which is not inline.
-- Alexey
| |