The patch titled Subject: mm/dmapool.c: align to ARCH_DMA_MINALIGN in non-coherent DMA mode has been added to the -mm tree. Its filename is mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Huacai Chen <chenhc@xxxxxxxxxx> Subject: mm/dmapool.c: align to ARCH_DMA_MINALIGN in non-coherent DMA mode In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so the dmapool objects should be aligned to ARCH_DMA_MINALIGN. Link: http://lkml.kernel.org/r/1505294451-21312-1-git-send-email-chenhc@xxxxxxxxxx Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx> Cc: Fuxin Zhang <zhangfx@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/dmapool.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/dmapool.c~mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode mm/dmapool.c --- a/mm/dmapool.c~mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode +++ a/mm/dmapool.c @@ -140,6 +140,9 @@ struct dma_pool *dma_pool_create(const c else if (align & (align - 1)) return NULL; + if (!plat_device_is_coherent(dev)) + align = max_t(size_t, align, dma_get_cache_alignment()); + if (size == 0) return NULL; else if (size < 4) _ Patches currently in -mm which might be from chenhc@xxxxxxxxxx are mm-dmapool-align-to-arch_dma_minalign-in-non-coherent-dma-mode.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html