summaryrefslogtreecommitdiff
path: root/arch/ia64/kernel/irq_ia64.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 11:41:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 11:41:52 -0700
commitcf77e988ddfc7f047ac1ddc72cadb5eee7e09293 (patch)
treed4870b7290ea50fe01ed4d56febad449f1206172 /arch/ia64/kernel/irq_ia64.c
parent1d3c6ff44ad4b5f113602e153026a338f0f9b3ff (diff)
parent2a2ae2426bba944ce6dbcad35e1580df57aafcf1 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Drop duplicated "config IOMMU_HELPER" [IA64] invoke oom-killer from page fault [IA64] use __ratelimit [IA64] Use set_cpus_allowed_ptr [IA64] Use set_cpus_allowed_ptr [IA64] arch/ia64/hp/common/sba_iommu.c: Rename dev_info to adi [IA64] removing redundant ifdef
Diffstat (limited to 'arch/ia64/kernel/irq_ia64.c')
-rw-r--r--arch/ia64/kernel/irq_ia64.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 640479304ac0..f14c35f9b03a 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -29,6 +29,7 @@
#include <linux/threads.h>
#include <linux/bitops.h>
#include <linux/irq.h>
+#include <linux/ratelimit.h>
#include <asm/delay.h>
#include <asm/intrinsics.h>
@@ -467,13 +468,9 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
sp = ia64_getreg(_IA64_REG_SP);
if ((sp - bsp) < 1024) {
- static unsigned char count;
- static long last_time;
+ static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
- if (time_after(jiffies, last_time + 5 * HZ))
- count = 0;
- if (++count < 5) {
- last_time = jiffies;
+ if (__ratelimit(&ratelimit)) {
printk("ia64_handle_irq: DANGER: less than "
"1KB of free stack space!!\n"
"(bsp=0x%lx, sp=%lx)\n", bsp, sp);