diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-14 12:57:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-14 12:57:36 -0400 |
commit | 43bc61d86f8ea6edef2e02d1dc47617883fa9a9c (patch) | |
tree | 4f7752888f2e9ca5dcfa9680edefea12aa4a6e8d /arch/sh/include/asm/system_32.h | |
parent | 0837f52463583f76670ab2350e0f1541cb0351f5 (diff) |
sh: Add register alignment helpers for shared flushers.
This plugs in some register alignment helpers for the shared flushers,
allowing them to also be used on SH-5. The main rationale here is that
in the SH-5 case we have a variable ABI, where the pointer size may not
equal the register width. This register extension is taken care of by
the SH-5 code already today, and is otherwise unused on the SH-4 code.
This combines the two and allows us to kill off the SH-5 implementation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/system_32.h')
-rw-r--r-- | arch/sh/include/asm/system_32.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h index 6c68a51f1cc5..d7299d69ff79 100644 --- a/arch/sh/include/asm/system_32.h +++ b/arch/sh/include/asm/system_32.h | |||
@@ -198,6 +198,11 @@ do { \ | |||
198 | }) | 198 | }) |
199 | #endif | 199 | #endif |
200 | 200 | ||
201 | static inline reg_size_t register_align(void *val) | ||
202 | { | ||
203 | return (unsigned long)(signed long)val; | ||
204 | } | ||
205 | |||
201 | int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, | 206 | int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, |
202 | struct mem_access *ma); | 207 | struct mem_access *ma); |
203 | 208 | ||