diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2011-06-04 01:36:54 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-06-29 01:31:01 -0400 |
commit | 76462232c21dc011462522387ddad0598a4f11e4 (patch) | |
tree | a21be7280dd159e44f5a9a387c586a059a84485b /arch/powerpc/kernel/traps.c | |
parent | 9a8f99fab02db296815d7f0ae8ba8ce169df0063 (diff) |
arch/powerpc: use printk_ratelimited instead of printk_ratelimit
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited.
Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6414a0d5ba65..1a0141426cda 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/bug.h> | 34 | #include <linux/bug.h> |
35 | #include <linux/kdebug.h> | 35 | #include <linux/kdebug.h> |
36 | #include <linux/debugfs.h> | 36 | #include <linux/debugfs.h> |
37 | #include <linux/ratelimit.h> | ||
37 | 38 | ||
38 | #include <asm/emulated_ops.h> | 39 | #include <asm/emulated_ops.h> |
39 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
@@ -197,12 +198,11 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
197 | if (die("Exception in kernel mode", regs, signr)) | 198 | if (die("Exception in kernel mode", regs, signr)) |
198 | return; | 199 | return; |
199 | } else if (show_unhandled_signals && | 200 | } else if (show_unhandled_signals && |
200 | unhandled_signal(current, signr) && | 201 | unhandled_signal(current, signr)) { |
201 | printk_ratelimit()) { | 202 | printk_ratelimited(regs->msr & MSR_64BIT ? fmt64 : fmt32, |
202 | printk(regs->msr & MSR_64BIT ? fmt64 : fmt32, | 203 | current->comm, current->pid, signr, |
203 | current->comm, current->pid, signr, | 204 | addr, regs->nip, regs->link, code); |
204 | addr, regs->nip, regs->link, code); | 205 | } |
205 | } | ||
206 | 206 | ||
207 | memset(&info, 0, sizeof(info)); | 207 | memset(&info, 0, sizeof(info)); |
208 | info.si_signo = signr; | 208 | info.si_signo = signr; |
@@ -1342,9 +1342,8 @@ void altivec_assist_exception(struct pt_regs *regs) | |||
1342 | } else { | 1342 | } else { |
1343 | /* didn't recognize the instruction */ | 1343 | /* didn't recognize the instruction */ |
1344 | /* XXX quick hack for now: set the non-Java bit in the VSCR */ | 1344 | /* XXX quick hack for now: set the non-Java bit in the VSCR */ |
1345 | if (printk_ratelimit()) | 1345 | printk_ratelimited(KERN_ERR "Unrecognized altivec instruction " |
1346 | printk(KERN_ERR "Unrecognized altivec instruction " | 1346 | "in %s at %lx\n", current->comm, regs->nip); |
1347 | "in %s at %lx\n", current->comm, regs->nip); | ||
1348 | current->thread.vscr.u[3] |= 0x10000; | 1347 | current->thread.vscr.u[3] |= 0x10000; |
1349 | } | 1348 | } |
1350 | } | 1349 | } |
@@ -1548,9 +1547,8 @@ u32 ppc_warn_emulated; | |||
1548 | 1547 | ||
1549 | void ppc_warn_emulated_print(const char *type) | 1548 | void ppc_warn_emulated_print(const char *type) |
1550 | { | 1549 | { |
1551 | if (printk_ratelimit()) | 1550 | pr_warn_ratelimited("%s used emulated %s instruction\n", current->comm, |
1552 | pr_warning("%s used emulated %s instruction\n", current->comm, | 1551 | type); |
1553 | type); | ||
1554 | } | 1552 | } |
1555 | 1553 | ||
1556 | static int __init ppc_warn_emulated_init(void) | 1554 | static int __init ppc_warn_emulated_init(void) |