All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers
@ 2017-08-23 16:46 Stefan Agner
  2017-08-24  7:48 ` Bin Meng
  2017-08-26 20:47 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Agner @ 2017-08-23 16:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers
  2017-08-23 16:46 [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers Stefan Agner
@ 2017-08-24  7:48 ` Bin Meng
  2017-08-26 20:47 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Bin Meng @ 2017-08-24  7:48 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 24, 2017 at 12:46 AM, Stefan Agner <stefan@agner.ch> wrote:
> 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(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] disk: part: align buffer so it can be used with DMA enabled drivers
  2017-08-23 16:46 [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers Stefan Agner
  2017-08-24  7:48 ` Bin Meng
@ 2017-08-26 20:47 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-08-26 20:47 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 23, 2017 at 09:46:17AM -0700, Stefan Agner wrote:

> 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>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/36d515db/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-26 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 16:46 [U-Boot] [PATCH] disk: part: align buffer so it can be used with DMA enabled drivers Stefan Agner
2017-08-24  7:48 ` Bin Meng
2017-08-26 20:47 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.