lkml.org 
[lkml]   [2023]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 7/7] dma-mapping: Simplify arch_setup_dma_ops()
From
On 04/12/2023 8:44 am, Christoph Hellwig wrote:
> On Wed, Nov 29, 2023 at 05:43:04PM +0000, Robin Murphy wrote:
>> The dma_base, size and iommu arguments are only used by ARM, and can
>> now easily be deduced from the device itself, so there's no need to pass
>> them through the callchain as well.
>
> This looks even better than the patch form Jason that only removed the
> iommu argument:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> I wonder if it makes sense to also remove the coherent argument
> by setting up dev->dma_coherent in the caller. That would require
> a pretty careful audit as we're doing a few weird things in that
> area, though.

Yeah, it crossed my mind too, but then I remembered we have at least the
ARM stuff which may have already set a platform-specific value for
dev->dma_coherent to take precedence over the firmware value, thus still
needs to differentiate between the two at this point. Leaving the
established argument in place seems neater IMO than having to go back to
arch-specific mechanisms for that and any other similar tricks.

Thanks,
Robin.

\
 
 \ /
  Last update: 2023-12-04 13:55    [W:0.084 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site