diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-05-13 15:07:50 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-05-13 15:07:50 -0700 |
commit | 1eb6f7db6d9d4baef6976437e7b2bbd8809c0cf8 (patch) | |
tree | 2527df8e064bb9f4c5ef7493b28ae58b166c630d /drivers/tty | |
parent | cbe151c53d5efa99085c537bc1d8a8c6a08933ad (diff) | |
parent | 08ad4e77699a8e2374fcc19df0f1cfb5d0175222 (diff) |
Merge tag 'v3.18.11-rt7-lno1' of git://git.linaro.org/people/anders.roxell/linux-rt into linux-linaro-lsk-v3.18-rt
Linux 3.18.11-rt7
* tag 'v3.18.11-rt7-lno1' of git://git.linaro.org/people/anders.roxell/linux-rt: (2276 commits)
localversion.patch
workqueue: Prevent deadlock/stall on RT
sched: Do not clear PF_NO_SETAFFINITY flag in select_fallback_rq()
md: disable bcache
rt,ntp: Move call to schedule_delayed_work() to helper thread
scheduling while atomic in cgroup code
cgroups: use simple wait in css_release()
a few open coded completions
completion: Use simple wait queues
rcu-more-swait-conversions.patch
kernel/treercu: use a simple waitqueue
work-simple: Simple work queue implemenation
simple-wait: rename and export the equivalent of waitqueue_active()
wait-simple: Rework for use with completions
wait-simple: Simple waitqueue implementation
wait.h: include atomic.h
drm/i915: drop trace_i915_gem_ring_dispatch on rt
gpu/i915: don't open code these things
mmc: sdhci: don't provide hard irq handler
mmci: Remove bogus local_irq_save()
...
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 14 | ||||
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 15 | ||||
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 12 |
3 files changed, 26 insertions, 15 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index e5c31eadb0ac..dbd63ae2d079 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -37,6 +37,7 @@ #include <linux/nmi.h> #include <linux/mutex.h> #include <linux/slab.h> +#include <linux/kdb.h> #include <linux/uaccess.h> #include <linux/pm_runtime.h> #ifdef CONFIG_SPARC @@ -81,7 +82,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) @@ -3197,7 +3207,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) serial8250_rpm_get(up); - if (port->sysrq || oops_in_progress) + if (port->sysrq || oops_in_progress || in_kdb_printk()) locked = spin_trylock_irqsave(&port->lock, flags); else spin_lock_irqsave(&port->lock, flags); diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 02016fcd91b8..5ef2c62bb904 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1935,13 +1935,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_enable(uap->clk); - local_irq_save(flags); + /* + * local_irq_save(flags); + * + * This local_irq_save() is nonsense. If we come in via sysrq + * handling then interrupts are already disabled. Aside of + * that the port.sysrq check is racy on SMP regardless. + */ if (uap->port.sysrq) locked = 0; else if (oops_in_progress) - locked = spin_trylock(&uap->port.lock); + locked = spin_trylock_irqsave(&uap->port.lock, flags); else - spin_lock(&uap->port.lock); + spin_lock_irqsave(&uap->port.lock, flags); /* * First save the CR then disable the interrupts @@ -1963,8 +1969,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) writew(old_cr, uap->port.membase + UART011_CR); if (locked) - spin_unlock(&uap->port.lock); - local_irq_restore(flags); + spin_unlock_irqrestore(&uap->port.lock, flags); clk_disable(uap->clk); } diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 18c30cabe27f..6f0629ead171 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1270,13 +1270,10 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_get_sync(up->dev); - local_irq_save(flags); - if (up->port.sysrq) - locked = 0; - else if (oops_in_progress) - locked = spin_trylock(&up->port.lock); + if (up->port.sysrq || oops_in_progress) + locked = spin_trylock_irqsave(&up->port.lock, flags); else - spin_lock(&up->port.lock); + spin_lock_irqsave(&up->port.lock, flags); /* * First save the IER then disable the interrupts @@ -1305,8 +1302,7 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_mark_last_busy(up->dev); pm_runtime_put_autosuspend(up->dev); if (locked) - spin_unlock(&up->port.lock); - local_irq_restore(flags); + spin_unlock_irqrestore(&up->port.lock, flags); } static int __init |