• C
    dma-mapping: truncate dma masks to what dma_addr_t can hold · 4a54d16f
    Christoph Hellwig 提交于
    The dma masks in struct device are always 64-bits wide.  But for builds
    using a 32-bit dma_addr_t we need to ensure we don't store an
    unsupportable value.  Before Linux 5.0 this was handled at least by
    the ARM dma mapping code by never allowing to set a larger dma_mask,
    but these days we allow the driver to just set the largest supported
    value and never fall back to a smaller one.  Ensure this always works
    by truncating the value.
    
    Fixes: 9eb9e96e ("Documentation/DMA-API-HOWTO: update dma_mask sections")
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    4a54d16f
mapping.c 10.2 KB