diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-11-26 00:29:58 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-12-22 18:43:48 +0900 |
commit | 95b781c239f53b4c7ecaf2989404ec6379b2409b (patch) | |
tree | 1459af74b141a507a903662dc9156b0e36cd1540 /arch/sh/include/asm/unaligned.h | |
parent | 716777db7270255f1f7210fd87a7188b08c9a267 (diff) | |
download | op-kernel-dev-95b781c239f53b4c7ecaf2989404ec6379b2409b.zip op-kernel-dev-95b781c239f53b4c7ecaf2989404ec6379b2409b.tar.gz |
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.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/include/asm/unaligned.h b/arch/sh/include/asm/unaligned.h index c1641a0..8c0ad5e 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 */ |