diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 22:32:03 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 06:32:05 +0900 |
commit | 103340cc36384c1afee4453b65a784d8b20d9d8d (patch) | |
tree | 8450f9a431a3aaca2841c90b3f808dee9b73c4a2 /include/asm-sh | |
parent | 11325f035edba6ba4bc005d2cdebea19d7d8f388 (diff) | |
download | linux-103340cc36384c1afee4453b65a784d8b20d9d8d.tar.bz2 |
sh: Fix up unaligned current_text_addr().
As noted by Adrian:
Commit 3ab83521378268044a448113c6aa9a9e245f4d2f (kexec jump)
causes the following build error on sh:
<-- snip -->
...
CC kernel/kexec.o
{standard input}: Assembler messages:
{standard input}:1518: Error: offset to unaligned destination
make[2]: *** [kernel/kexec.o] Error 1
<-- snip -->
If I understand the assembler correctly it fails at
include/asm-sh/kexec.h:59
The issue here is that the mova reference lacks an explicit alignment,
and previous code paths would end up with this on a 16-bit boundary,
so we make the alignment explicit.
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/processor_32.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-sh/processor_32.h b/include/asm-sh/processor_32.h index c6583f267071..0dadd75bd93c 100644 --- a/include/asm-sh/processor_32.h +++ b/include/asm-sh/processor_32.h @@ -19,7 +19,7 @@ * Default implementation of macro that returns current * instruction pointer ("program counter"). */ -#define current_text_addr() ({ void *pc; __asm__("mova 1f, %0\n1:":"=z" (pc)); pc; }) +#define current_text_addr() ({ void *pc; __asm__("mova 1f, %0\n.align 2\n1:":"=z" (pc)); pc; }) /* Core Processor Version Register */ #define CCN_PVR 0xff000030 |