Re: [PATCH v2] iommu/dma: Rationalise types for DMA masks

2019-12-17 Thread Joerg Roedel
On Wed, Dec 11, 2019 at 08:02:35PM +0100, Christoph Hellwig wrote: > On Wed, Dec 11, 2019 at 06:33:26PM +, Robin Murphy wrote: > > Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus > > limit, it makes more sense to pass them around in their native u64 > > rather than convert

Re: [PATCH v2] iommu/dma: Rationalise types for DMA masks

2019-12-11 Thread Nicolas Saenz Julienne
On Wed, 2019-12-11 at 18:33 +, Robin Murphy wrote: > Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus > limit, it makes more sense to pass them around in their native u64 > rather than converting to dma_addr_t early. Do that, and resolve the > remaining type discrepancy aga

Re: [PATCH v2] iommu/dma: Rationalise types for DMA masks

2019-12-11 Thread Nathan Chancellor
On Wed, Dec 11, 2019 at 06:33:26PM +, Robin Murphy wrote: > Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus > limit, it makes more sense to pass them around in their native u64 > rather than converting to dma_addr_t early. Do that, and resolve the > remaining type discrepa

Re: [PATCH v2] iommu/dma: Rationalise types for DMA masks

2019-12-11 Thread Christoph Hellwig
On Wed, Dec 11, 2019 at 06:33:26PM +, Robin Murphy wrote: > Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus > limit, it makes more sense to pass them around in their native u64 > rather than converting to dma_addr_t early. Do that, and resolve the > remaining type discrepa

[PATCH v2] iommu/dma: Rationalise types for DMA masks

2019-12-11 Thread Robin Murphy
Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus limit, it makes more sense to pass them around in their native u64 rather than converting to dma_addr_t early. Do that, and resolve the remaining type discrepancy against the domain geometry with a cheeky cast to keep things simp