[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f4420b19-05cd-5817-9ba4-8f6f166a7e5c@ozlabs.ru>
Date: Thu, 29 Oct 2020 10:11:45 +1100
From: Alexey Kardashevskiy <aik@...abs.ru>
To: Christoph Hellwig <hch@....de>
Cc: linuxppc-dev@...ts.ozlabs.org,
Michael Ellerman <mpe@...erman.id.au>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH kernel v2 1/2] dma: Allow mixing bypass and normal IOMMU
operation
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
Powered by blists - more mailing lists