diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-28 21:37:20 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-29 20:31:44 +0900 |
commit | 4aa5ac4ef44dd8c986241c54298abd7910b78b3f (patch) | |
tree | 960cfde9c92d8d50ae04e3c6042143e101d16ae1 /arch/sh/kernel/traps_32.c | |
parent | e79d57479c86e388051244e1f17851a0e63d1ff0 (diff) | |
download | linux-4aa5ac4ef44dd8c986241c54298abd7910b78b3f.tar.gz linux-4aa5ac4ef44dd8c986241c54298abd7910b78b3f.tar.bz2 linux-4aa5ac4ef44dd8c986241c54298abd7910b78b3f.zip |
sh: Only shout about fixing up unexpected unaligned accesses
Some unaligned accesses are completely expected. For example, the
trapped_io code uses the unaligned access fixup code path so there's no
need to warn about having to fixup the unaligned access.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps_32.c')
-rw-r--r-- | arch/sh/kernel/traps_32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index c581dc31d92a..583ace55b0dc 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -449,7 +449,7 @@ static inline int handle_delayslot(struct pt_regs *regs, #define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4) int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, - struct mem_access *ma) + struct mem_access *ma, int expected) { u_int rm; int ret, index; @@ -458,7 +458,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, rm = regs->regs[index]; /* shout about fixups */ - if (printk_ratelimit()) + if (!expected && printk_ratelimit()) printk(KERN_NOTICE "Fixing up unaligned %s access " "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", user_mode(regs) ? "userspace" : "kernel", @@ -657,7 +657,7 @@ fixup: set_fs(USER_DS); tmp = handle_unaligned_access(instruction, regs, - &user_mem_access); + &user_mem_access, 0); set_fs(oldfs); if (tmp==0) @@ -694,7 +694,8 @@ uspace_segv: die("insn faulting in do_address_error", regs, 0); } - handle_unaligned_access(instruction, regs, &user_mem_access); + handle_unaligned_access(instruction, regs, + &user_mem_access, 0); set_fs(oldfs); } } |