diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-12-14 13:05:54 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-04 09:14:51 -0500 |
commit | 24f9c37a2b7c0751f04a6e3a3e76c203cc1cb18f (patch) | |
tree | e4b54076d6c80d43b7c904eed33d730bb408532a /drivers | |
parent | 86e1d4089f25f763fc19388151628b371f9f6d71 (diff) |
rt: Improve the serial console PASS_LIMIT
Beyond the warning:
drivers/tty/serial/8250.c:1613:6: warning: unused variable ‘pass_counter’ [-Wunused-variable]
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/8250.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 687b1ad0cade..3bf482cb7f51 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c @@ -81,7 +81,16 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ #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) @@ -1631,14 +1640,12 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) 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); |