From: Ludovic Desroches Date: Thu, 12 May 2016 14:54:08 +0000 (+0200) Subject: dmaengine: at_xdmac: align descriptors on 64 bits X-Git-Tag: firefly_0821_release~176^2~4^2~36^2~63 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1b60fcdcf9bc09d3f86084b17d75c050cfed13a8;p=firefly-linux-kernel-4.4.55.git dmaengine: at_xdmac: align descriptors on 64 bits commit 4a9723e8df68cfce4048517ee32e37f78854b6fb upstream. Having descriptors aligned on 64 bits allows update CNDA and CUBC in an atomic way. Signed-off-by: Ludovic Desroches Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Reviewed-by: Nicolas Ferre Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 02f9aa4ebe05..6251969d1cf9 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -242,7 +242,7 @@ struct at_xdmac_lld { u32 mbr_dus; /* Destination Microblock Stride Register */ }; - +/* 64-bit alignment needed to update CNDA and CUBC registers in an atomic way. */ struct at_xdmac_desc { struct at_xdmac_lld lld; enum dma_transfer_direction direction; @@ -253,7 +253,7 @@ struct at_xdmac_desc { unsigned int xfer_size; struct list_head descs_list; struct list_head xfer_node; -}; +} __aligned(sizeof(u64)); static inline void __iomem *at_xdmac_chan_reg_base(struct at_xdmac *atxdmac, unsigned int chan_nb) {