aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2022-05-18 22:52:06 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2022-05-20 12:21:03 +0200
commit6a1e7c767f197b80385f4be9ac7a4b5af27cb4ec (patch)
tree61c2f6077baf9dbdc058815d49c5f211984a3f4f /target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
parent810eac8c7ffad958345f8fd02f83636afecf7fcd (diff)
downloadupstream-6a1e7c767f197b80385f4be9ac7a4b5af27cb4ec.tar.gz
upstream-6a1e7c767f197b80385f4be9ac7a4b5af27cb4ec.tar.bz2
upstream-6a1e7c767f197b80385f4be9ac7a4b5af27cb4ec.zip
bmips: add linux v5.15 support
Build system: x86_64 Build-tested: generic, nand Run-tested: generic/AR-5387un, nand/VR-3032u Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch')
-rw-r--r--target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch b/target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
new file mode 100644
index 0000000000..d98d27c6b4
--- /dev/null
+++ b/target/linux/bmips/patches-5.15/800-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
@@ -0,0 +1,26 @@
+From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Sun, 6 Apr 2014 22:33:16 +0200
+Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp
+
+Unligned memcpy_fromio randomly fails with an unaligned dst. Work around
+it by ensuring we are always doing aligned copies.
+
+Should fix filename corruption in jffs2 with SMP.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ fs/jffs2/nodelist.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/jffs2/nodelist.h
++++ b/fs/jffs2/nodelist.h
+@@ -259,7 +259,7 @@ struct jffs2_full_dirent
+ uint32_t ino; /* == zero for unlink */
+ unsigned int nhash;
+ unsigned char type;
+- unsigned char name[];
++ unsigned char name[] __attribute__((aligned((sizeof(long)))));
+ };
+
+ /*