• Benjamin Herrenschmidt's avatar
    [POWERPC] Workaround for iommu page alignment · d262c32a
    Benjamin Herrenschmidt authored
    Commit 5d2efba6 changed our iommu code
    so that it always uses an iommu page size of 4kB.  That means with our
    current code, drivers may do a dma_map_sg() of a 64kB page and obtain
    a dma_addr_t that is only 4k aligned.
    
    This works fine in most cases except for some infiniband HW it seems,
    where they tell the HW about the page size and it ignores the low bits
    of the DMA address.
    
    This works around it by making our IOMMU code enforce a PAGE_SIZE alignment
    for mappings of objects that are page aligned in the first place and whose
    size is larger or equal to a page.
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    d262c32a
iommu.c 17.5 KB