* [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
* [PATCH] fs: btrfs: Add missing cache aligned allocation
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
1 sibling, 0 replies; 3+ messages in thread
From: Marek Behun @ 2021-05-19 6:33 UTC (permalink / raw)
To: u-boot
On Tue, 18 May 2021 00:39:39 +0200
Marek Vasut <marex@denx.de> wrote:
> 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>
> ---
Reviewed-by: Marek Beh?n <marek.behun@nic.cz>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: btrfs: Add missing cache aligned allocation
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
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-05-27 11:42 UTC (permalink / raw)
To: Marek Vasut; +Cc: u-boot, Marek Behún, Qu Wenruo
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On Tue, May 18, 2021 at 12:39:39AM +0200, Marek Vasut wrote:
> 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>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [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