summaryrefslogtreecommitdiff
path: root/arch/sh/mm/alignment.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-07-08 15:58:56 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-07-08 15:58:56 -0700
commita448bfbd8e15bb2ed380a75f20adeb6e8d752abb (patch)
tree1ab81f3867a5f7e0e9a6cc06fac678d670c2d464 /arch/sh/mm/alignment.c
parent2aced4d6099ce987233ab2ffad42b90800dadf09 (diff)
parent0226f8a76da6bc97c9bb4af3fd2f6eeb03c5b0b0 (diff)
Merge branch 'upstream/android-3.0' into linaro-android-3.0
Diffstat (limited to 'arch/sh/mm/alignment.c')
-rw-r--r--arch/sh/mm/alignment.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/sh/mm/alignment.c b/arch/sh/mm/alignment.c
index b2595b8548e..620fa7ff9ee 100644
--- a/arch/sh/mm/alignment.c
+++ b/arch/sh/mm/alignment.c
@@ -13,6 +13,7 @@
#include <linux/seq_file.h>
#include <linux/proc_fs.h>
#include <linux/uaccess.h>
+#include <linux/ratelimit.h>
#include <asm/alignment.h>
#include <asm/processor.h>
@@ -95,13 +96,13 @@ int set_unalign_ctl(struct task_struct *tsk, unsigned int val)
void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn,
struct pt_regs *regs)
{
- if (user_mode(regs) && (se_usermode & UM_WARN) && printk_ratelimit())
- pr_notice("Fixing up unaligned userspace access "
+ if (user_mode(regs) && (se_usermode & UM_WARN))
+ pr_notice_ratelimited("Fixing up unaligned userspace access "
"in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
tsk->comm, task_pid_nr(tsk),
(void *)instruction_pointer(regs), insn);
- else if (se_kernmode_warn && printk_ratelimit())
- pr_notice("Fixing up unaligned kernel access "
+ else if (se_kernmode_warn)
+ pr_notice_ratelimited("Fixing up unaligned kernel access "
"in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
tsk->comm, task_pid_nr(tsk),
(void *)instruction_pointer(regs), insn);