diff options
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch')
-rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch deleted file mode 100644 index 6fc594f00b..0000000000 --- a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 7d026a85946a08b8167dcd792ea6660bf6a49e08 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yuanjie Huang <Yuanjie.Huang@windriver.com> | ||
3 | Date: Thu, 2 Mar 2017 10:43:56 +0100 | ||
4 | Subject: [PATCH] Fix alignment trap triggered by NEON instructions | ||
5 | |||
6 | NEON instruction VLD1.64 was used to copy 64 bits data after type | ||
7 | casting, and they will trigger alignment trap. | ||
8 | This patch uses memcpy to avoid alignment problem. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com> | ||
13 | Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> | ||
14 | --- | ||
15 | ubifs-utils/mkfs.ubifs/key.h | 16 ++++++++++------ | ||
16 | 1 file changed, 10 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/ubifs-utils/mkfs.ubifs/key.h b/ubifs-utils/mkfs.ubifs/key.h | ||
19 | index 39379fd..118858b 100644 | ||
20 | --- a/ubifs-utils/mkfs.ubifs/key.h | ||
21 | +++ b/ubifs-utils/mkfs.ubifs/key.h | ||
22 | @@ -159,10 +159,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum, | ||
23 | */ | ||
24 | static inline void key_write(const union ubifs_key *from, void *to) | ||
25 | { | ||
26 | - union ubifs_key *t = to; | ||
27 | + __le32 x[2]; | ||
28 | |||
29 | - t->j32[0] = cpu_to_le32(from->u32[0]); | ||
30 | - t->j32[1] = cpu_to_le32(from->u32[1]); | ||
31 | + x[0] = cpu_to_le32(from->u32[0]); | ||
32 | + x[1] = cpu_to_le32(from->u32[1]); | ||
33 | + | ||
34 | + memcpy(to, &x, 8); | ||
35 | memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8); | ||
36 | } | ||
37 | |||
38 | @@ -174,10 +176,12 @@ static inline void key_write(const union ubifs_key *from, void *to) | ||
39 | */ | ||
40 | static inline void key_write_idx(const union ubifs_key *from, void *to) | ||
41 | { | ||
42 | - union ubifs_key *t = to; | ||
43 | + __le32 x[2]; | ||
44 | + | ||
45 | + x[0] = cpu_to_le32(from->u32[0]); | ||
46 | + x[1] = cpu_to_le32(from->u32[1]); | ||
47 | |||
48 | - t->j32[0] = cpu_to_le32(from->u32[0]); | ||
49 | - t->j32[1] = cpu_to_le32(from->u32[1]); | ||
50 | + memcpy(to, &x, 8); | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | -- | ||
55 | 2.6.1 | ||