public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] fs: btrfs: Add missing cache aligned allocation
@ 2021-05-17 22:39 Marek Vasut
  2021-05-19  6:33 ` Marek Behun
  2021-05-27 11:42 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2021-05-17 22:39 UTC (permalink / raw)
  To: u-boot

The superblock buffer must be cache aligned, since it might be used
in DMA context, allocate it using ALLOC_CACHE_ALIGN_BUFFER() just
like it was done in btrfs_read_superblock() and read_tree_node().

This fixes this output on boot and non-working btrfs on iMX53:
CACHE: Misaligned operation at range [ced299d0, ced2a9d0]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Beh?n <marek.behun@nic.cz>
Cc: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index c6fdec95c16..349411c3ccd 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -291,7 +291,7 @@ error_out:
 int btrfs_read_dev_super(struct blk_desc *desc, struct disk_partition *part,
 			 struct btrfs_super_block *sb)
 {
-	char tmp[BTRFS_SUPER_INFO_SIZE];
+	ALLOC_CACHE_ALIGN_BUFFER(char, tmp, BTRFS_SUPER_INFO_SIZE);
 	struct btrfs_super_block *buf = (struct btrfs_super_block *)tmp;
 	int ret;
 
-- 
2.30.2

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

end of thread, other threads:[~2021-05-27 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-17 22:39 [PATCH] fs: btrfs: Add missing cache aligned allocation Marek Vasut
2021-05-19  6:33 ` Marek Behun
2021-05-27 11:42 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox