summaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-12-29 14:34:46 +0100
committerMichal Simek <monstr@monstr.eu>2011-01-03 10:08:29 +0100
commite3288f310111f7d18c323d95ae998765dee8c825 (patch)
tree764dce005788f16e0a894257edf7237b4e4c81bd /arch/microblaze
parenta3c26959cc893cafc78a8c4e7d7ca6d4ffe4525c (diff)
downloadlinux-e3288f310111f7d18c323d95ae998765dee8c825.tar.gz
linux-e3288f310111f7d18c323d95ae998765dee8c825.tar.bz2
linux-e3288f310111f7d18c323d95ae998765dee8c825.zip
microblaze: Fix unaligned exception for little endian platform
Half word unaligned accesses need to be fixed. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/hw_exception_handler.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S
index 781195438ee6..25f6e07d8de8 100644
--- a/arch/microblaze/kernel/hw_exception_handler.S
+++ b/arch/microblaze/kernel/hw_exception_handler.S
@@ -945,11 +945,20 @@ store3: sbi r3, r4, 2;
store4: sbi r3, r4, 3; /* Delay slot */
ex_shw_vm:
/* Store the lower half-word, byte-by-byte into destination address */
+#ifdef __MICROBLAZEEL__
+ lbui r3, r5, 0;
+store5: sbi r3, r4, 0;
+ lbui r3, r5, 1;
+ brid ret_from_exc;
+store6: sbi r3, r4, 1; /* Delay slot */
+#else
lbui r3, r5, 2;
store5: sbi r3, r4, 0;
lbui r3, r5, 3;
brid ret_from_exc;
store6: sbi r3, r4, 1; /* Delay slot */
+#endif
+
ex_sw_end_vm: /* Exception handling of store word, ends. */
/* We have to prevent cases that get/put_user macros get unaligned pointer