Skip to content

Commit

Permalink
disk: part: align buffer so it can be used with DMA enabled drivers
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
  • Loading branch information
Stefan Agner authored and trini committed Aug 26, 2017
1 parent 527d865 commit 5c27535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion disk/part_iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5c27535

Please sign in to comment.