From: Stefan Agner Date: Wed, 23 Aug 2017 16:46:17 +0000 (-0700) Subject: disk: part: align buffer so it can be used with DMA enabled drivers X-Git-Tag: v2017.09-rc3~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c27535dc9a0a4858cb3efad2400ffe83c678441;p=platform%2Fkernel%2Fu-boot.git disk: part: align buffer so it can be used with DMA enabled drivers When using ISO partitions with a DMA enabled block device driver reading the ISO partition leads to unaligned DMA operations: CACHE: Misaligned operation at range [bffb7da8, bffb85a8] Align the buffer to make sure we pass a buffer which works for DMA operations. Signed-off-by: Stefan Agner Reviewed-by: Bin Meng --- diff --git a/disk/part_iso.c b/disk/part_iso.c index bb8ed65..8aef251 100644 --- a/disk/part_iso.c +++ b/disk/part_iso.c @@ -24,7 +24,7 @@ #undef CHECK_FOR_POWERPC_PLATTFORM #define CD_SECTSIZE 2048 -static unsigned char tmpbuf[CD_SECTSIZE]; +static unsigned char tmpbuf[CD_SECTSIZE] __aligned(ARCH_DMA_MINALIGN); unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *buffer)