lkml.org 
[lkml]   [2014]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2 4/5] iommu: Use dma_addr_t for IOVA arguments
    Date
    On Tuesday 06 May 2014 16:48:40 Bjorn Helgaas wrote:
    > Convert the "iova" arguments of iommu_map(), iommu_unmap(), etc., from
    > "unsigned long" to dma_addr_t.
    >
    > bb5547acfcd8 ("iommu/fsl: Make iova dma_addr_t in the iommu_iova_to_phys
    > API") did this for iommu_iova_to_phys(), but didn't fix the rest of the
    > IOMMU API.

    This patch looks 100% correct, but I'm not convinced it's a good idea:
    On 32-bit platforms (i.e. most of the ones you change), doing 64-bit
    arithmetic has a noticeable overhead. I am not aware of an IOMMU that
    actually uses 64-bit DMA addresses on its slave side, usually they
    are used to translate addresses from 32-bit masters into 64-bit
    memory addresses, so using 'unsigned long' seems better from a practical
    point of view as opposed to the strict type correctness.

    Arnd


    \
     
     \ /
      Last update: 2014-05-07 10:21    [W:4.357 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site