From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers
Date: Wed, 23 Aug 2017 09:46:17 -0700 [thread overview]
Message-ID: <20170823164617.3439-1-stefan@agner.ch> (raw)
From: Stefan Agner <stefan.agner@toradex.com>
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 <stefan.agner@toradex.com>
---
disk/part_iso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/disk/part_iso.c b/disk/part_iso.c
index bb8ed658f2..8aef251f4e 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)
--
2.14.1
next reply other threads:[~2017-08-23 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 16:46 Stefan Agner [this message]
2017-08-24 7:48 ` [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers Bin Meng
2017-08-26 20:47 ` [U-Boot] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823164617.3439-1-stefan@agner.ch \
--to=stefan@agner.ch \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox