aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-04-06 22:03:42 +0000
committerJonas Gorski <jogo@openwrt.org>2014-04-06 22:03:42 +0000
commit788655ef85ecb3d15ddae02dea1ca283b7ca1297 (patch)
treefc20cfa075baa615a28d418398c4898034bd88c1
parentc580cc13d786d7d2f64cd81a6993496d7cfb58e0 (diff)
downloadmaster-187ad058-788655ef85ecb3d15ddae02dea1ca283b7ca1297.tar.gz
master-187ad058-788655ef85ecb3d15ddae02dea1ca283b7ca1297.tar.bz2
master-187ad058-788655ef85ecb3d15ddae02dea1ca283b7ca1297.zip
brcm63xx: hack around jffs2 corruption with SMP
mempy_fromio seems to be randomly failing when the destination is unaligned; work around it by forcing the name to be aligned in memory. Should fix jffs2 and SMP for now, but needs to be some additional looking into as it does not fix the source. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40396 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/brcm63xx/patches-3.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch26
-rw-r--r--target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch26
2 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch b/target/linux/brcm63xx/patches-3.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
new file mode 100644
index 0000000000..8b603e8b66
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.10/803-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
+@@ -255,7 +255,7 @@ struct jffs2_full_dirent
+ uint32_t ino; /* == zero for unlink */
+ unsigned int nhash;
+ unsigned char type;
+- unsigned char name[0];
++ unsigned char name[0] __attribute__((aligned((sizeof(long)))));
+ };
+
+ /*
diff --git a/target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch b/target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
new file mode 100644
index 0000000000..8b603e8b66
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/803-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
+@@ -255,7 +255,7 @@ struct jffs2_full_dirent
+ uint32_t ino; /* == zero for unlink */
+ unsigned int nhash;
+ unsigned char type;
+- unsigned char name[0];
++ unsigned char name[0] __attribute__((aligned((sizeof(long)))));
+ };
+
+ /*