2012-06-17 19:52:06 +00:00
|
|
|
|
From b60f416efa14addfbb35b438df85cc9375e855d9 Mon Sep 17 00:00:00 2001
|
2011-12-15 14:24:33 +00:00
|
|
|
|
From: Ingo Molnar <mingo@elte.hu>
|
2012-06-17 19:52:06 +00:00
|
|
|
|
Date: Wed, 14 Dec 2011 13:05:54 +0100
|
|
|
|
|
Subject: [195/254] rt: Improve the serial console PASS_LIMIT
|
|
|
|
|
MIME-Version: 1.0
|
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
|
Content-Transfer-Encoding: 8bit
|
2011-12-15 14:24:33 +00:00
|
|
|
|
|
|
|
|
|
Beyond the warning:
|
|
|
|
|
|
2012-06-04 21:20:09 +00:00
|
|
|
|
drivers/tty/serial/8250/8250.c:1613:6: warning: unused variable ‘pass_counter’ [-Wunused-variable]
|
2011-12-15 14:24:33 +00:00
|
|
|
|
|
|
|
|
|
the solution of just looping infinitely was ugly - up it to 1 million to
|
|
|
|
|
give it a chance to continue in some really ugly situation.
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
|
---
|
2012-06-04 21:20:09 +00:00
|
|
|
|
drivers/tty/serial/8250/8250.c | 13 ++++++++++---
|
2011-12-15 14:24:33 +00:00
|
|
|
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
|
|
2012-06-17 19:52:06 +00:00
|
|
|
|
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
|
|
|
|
|
index ff93c70..a785ec0 100644
|
|
|
|
|
--- a/drivers/tty/serial/8250/8250.c
|
|
|
|
|
+++ b/drivers/tty/serial/8250/8250.c
|
|
|
|
|
@@ -80,7 +80,16 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */
|
2011-12-15 14:24:33 +00:00
|
|
|
|
#define DEBUG_INTR(fmt...) do { } while (0)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
-#define PASS_LIMIT 512
|
|
|
|
|
+/*
|
|
|
|
|
+ * On -rt we can have a more delays, and legitimately
|
|
|
|
|
+ * so - so don't drop work spuriously and spam the
|
|
|
|
|
+ * syslog:
|
|
|
|
|
+ */
|
|
|
|
|
+#ifdef CONFIG_PREEMPT_RT_FULL
|
|
|
|
|
+# define PASS_LIMIT 1000000
|
|
|
|
|
+#else
|
|
|
|
|
+# define PASS_LIMIT 512
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
|
|
|
|
|
|
2012-06-17 19:52:06 +00:00
|
|
|
|
@@ -1584,14 +1593,12 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id)
|
2011-12-15 14:24:33 +00:00
|
|
|
|
|
|
|
|
|
l = l->next;
|
|
|
|
|
|
|
|
|
|
-#ifndef CONFIG_PREEMPT_RT_FULL
|
|
|
|
|
if (l == i->head && pass_counter++ > PASS_LIMIT) {
|
|
|
|
|
/* If we hit this, we're dead. */
|
|
|
|
|
printk_ratelimited(KERN_ERR
|
|
|
|
|
"serial8250: too much work for irq%d\n", irq);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
-#endif
|
|
|
|
|
} while (l != end);
|
|
|
|
|
|
|
|
|
|
spin_unlock(&i->lock);
|