lkml.org 
[lkml]   [2017]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports
From
Date
>> @@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
>> if (!dev->archdata.dma_ops)
>> dev->archdata.dma_ops = &swiotlb_dma_ops;
>>
>> + /*
>> + * Whatever the parent bus can set. A device must not set
>> + * a DMA mask larger than this.
>> + */
>> + if (enforce_range)
>> + dev->archdata.parent_dma_mask = size - 1;
>> + else
>> + dev->archdata.parent_dma_mask = DMA_BIT_MASK(64);
>> +
>> dev->archdata.dma_coherent = coherent;
>> __iommu_setup_dma_ops(dev, dma_base, size, iommu);
>>
>
> Could we just pass the mask instead of the size here?

We don't want to change API now.

Nikita

\
 
 \ /
  Last update: 2017-01-12 07:00    [W:0.136 / U:2.400 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site