diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-14 03:46:09 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-14 03:46:09 +0100 |
commit | 1232d88a47626cad13ba82f3a9ea814820bc1c65 (patch) | |
tree | 96a856dc78468ce8186e521f72124eaf4d1ed583 /arch/sh | |
parent | sh: Couple kernel and user write page perm bits for CONFIG_X2TLB (diff) | |
download | linux-1232d88a47626cad13ba82f3a9ea814820bc1c65.tar.xz linux-1232d88a47626cad13ba82f3a9ea814820bc1c65.zip |
sh: Make the unaligned trap handler always obey notification levels.
Presently there are a couple of paths in to the alignment handler, where
only the address error path presently quiets the notificiation messages
based on the configuration settings. We carry over the notification level
tests to the default alignment handler itself incase so that they behave
uniformly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/traps_32.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index 3da5a125d884..86639beac3a2 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -452,12 +452,18 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, rm = regs->regs[index]; /* shout about fixups */ - 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", - current->comm, task_pid_nr(current), - (void *)regs->pc, instruction); + if (!expected) { + if (user_mode(regs) && (se_usermode & 1) && printk_ratelimit()) + pr_notice("Fixing up unaligned userspace access " + "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", + current->comm, task_pid_nr(current), + (void *)regs->pc, instruction); + else if (se_kernmode_warn && printk_ratelimit()) + pr_notice("Fixing up unaligned kernel access " + "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", + current->comm, task_pid_nr(current), + (void *)regs->pc, instruction); + } ret = -EFAULT; switch (instruction&0xF000) { |