aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/unaligned.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-11-26 00:29:58 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-12-22 18:43:48 +0900
commit95b781c239f53b4c7ecaf2989404ec6379b2409b (patch)
tree1459af74b141a507a903662dc9156b0e36cd1540 /arch/sh/include/asm/unaligned.h
parent716777db7270255f1f7210fd87a7188b08c9a267 (diff)
sh: Provide optimized unaligned loads on SH-4A.
This adds support for unaligned loads on SH-4A, using the SH-4A's neutered movua.l instruction. As movua.l is r0-inspired, stores are still handled through the packed struct. Based on asm-generic/unaligned.h by Harvey Harrison. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/unaligned.h')
-rw-r--r--arch/sh/include/asm/unaligned.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/include/asm/unaligned.h b/arch/sh/include/asm/unaligned.h
index c1641a01d50..8c0ad5e4487 100644
--- a/arch/sh/include/asm/unaligned.h
+++ b/arch/sh/include/asm/unaligned.h
@@ -1,7 +1,11 @@
#ifndef _ASM_SH_UNALIGNED_H
#define _ASM_SH_UNALIGNED_H
-/* SH can't handle unaligned accesses. */
+#ifdef CONFIG_CPU_SH4A
+/* SH-4A can handle unaligned loads in a relatively neutered fashion. */
+#include <asm/unaligned-sh4a.h>
+#else
+/* Otherwise, SH can't handle unaligned accesses. */
#ifdef __LITTLE_ENDIAN__
# include <linux/unaligned/le_struct.h>
# include <linux/unaligned/be_byteshift.h>
@@ -15,5 +19,6 @@
# define get_unaligned __get_unaligned_be
# define put_unaligned __put_unaligned_be
#endif
+#endif
#endif /* _ASM_SH_UNALIGNED_H */