diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-19 01:41:50 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-19 01:41:50 -0500 |
commit | 88ea1a445a84fcfbedb810c01e84d6711352bd82 (patch) | |
tree | 0af28645ead1e1cf8b40e9d1cdef7d6670d855b0 /arch/sh/mm | |
parent | 3ef2932b8c1fc89408ef1fd4b1e1c2caabc7f07d (diff) |
sh64: Fix up PC casting in unaligned fixup notifier with 32bit ABI.
Presently the build bails with the following:
CC arch/sh/mm/alignment.o
cc1: warnings being treated as errors
arch/sh/mm/alignment.c: In function 'unaligned_fixups_notify':
arch/sh/mm/alignment.c:69: warning: cast to pointer from integer of different size
arch/sh/mm/alignment.c:74: warning: cast to pointer from integer of different size
make[2]: *** [arch/sh/mm/alignment.o] Error 1
This is due to the fact that regs->pc is always 64-bit, while the pointer size
depends on the ABI. Wrapping through instruction_pointer() takes care of the
appropriate casting for both configurations.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/alignment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/mm/alignment.c b/arch/sh/mm/alignment.c index e615151eac3b..2da808802a4c 100644 --- a/arch/sh/mm/alignment.c +++ b/arch/sh/mm/alignment.c | |||
@@ -69,12 +69,12 @@ void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn, | |||
69 | pr_notice("Fixing up unaligned userspace access " | 69 | pr_notice("Fixing up unaligned userspace access " |
70 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 70 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", |
71 | tsk->comm, task_pid_nr(tsk), | 71 | tsk->comm, task_pid_nr(tsk), |
72 | (void *)regs->pc, insn); | 72 | (void *)instruction_pointer(regs), insn); |
73 | else if (se_kernmode_warn && printk_ratelimit()) | 73 | else if (se_kernmode_warn && printk_ratelimit()) |
74 | pr_notice("Fixing up unaligned kernel access " | 74 | pr_notice("Fixing up unaligned kernel access " |
75 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 75 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", |
76 | tsk->comm, task_pid_nr(tsk), | 76 | tsk->comm, task_pid_nr(tsk), |
77 | (void *)regs->pc, insn); | 77 | (void *)instruction_pointer(regs), insn); |
78 | } | 78 | } |
79 | 79 | ||
80 | static const char *se_usermode_action[] = { | 80 | static const char *se_usermode_action[] = { |