aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/unaligned.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index 001e8518331f..bb2d68577855 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -279,12 +279,21 @@ static void kernel_mna_trap_fault(void)
279 279
280asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) 280asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
281{ 281{
282 static unsigned long count, last_time;
282 enum direction dir = decode_direction(insn); 283 enum direction dir = decode_direction(insn);
283 int size = decode_access_size(insn); 284 int size = decode_access_size(insn);
284 285
285 current_thread_info()->kern_una_regs = regs; 286 current_thread_info()->kern_una_regs = regs;
286 current_thread_info()->kern_una_insn = insn; 287 current_thread_info()->kern_una_insn = insn;
287 288
289 if (jiffies - last_time > 5 * HZ)
290 count = 0;
291 if (count < 5) {
292 last_time = jiffies;
293 count++;
294 printk("Kernel unaligned access at TPC[%lx]\n", regs->tpc);
295 }
296
288 if (!ok_for_kernel(insn) || dir == both) { 297 if (!ok_for_kernel(insn) || dir == both) {
289 printk("Unsupported unaligned load/store trap for kernel " 298 printk("Unsupported unaligned load/store trap for kernel "
290 "at <%016lx>.\n", regs->tpc); 299 "at <%016lx>.\n", regs->tpc);