diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-22 07:31:08 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 08:15:11 +0200 |
commit | 27cc64c7cc9e41788e53655c717aeca2f55f2041 (patch) | |
tree | 2ea1c64dcbf34013499d12f95fdb9db2b947d43c /arch/sparc64/kernel/unaligned.c | |
parent | [SPARC64]: Disable verbose PCI IRQ probing messages by default. (diff) | |
download | linux-27cc64c7cc9e41788e53655c717aeca2f55f2041.tar.xz linux-27cc64c7cc9e41788e53655c717aeca2f55f2041.zip |
[SPARC64]: Rate limited kernel unaligned trap logging, ala IA64.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | arch/sparc64/kernel/unaligned.c | 9 |
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) asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) { + static unsigned long count, last_time; enum direction dir = decode_direction(insn); int size = decode_access_size(insn); current_thread_info()->kern_una_regs = regs; current_thread_info()->kern_una_insn = insn; + if (jiffies - last_time > 5 * HZ) + count = 0; + if (count < 5) { + last_time = jiffies; + count++; + printk("Kernel unaligned access at TPC[%lx]\n", regs->tpc); + } + if (!ok_for_kernel(insn) || dir == both) { printk("Unsupported unaligned load/store trap for kernel " "at <%016lx>.\n", regs->tpc); |