diff options
author | Liang Li <liang.li@windriver.com> | 2013-01-19 17:52:10 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-03 11:03:24 -0700 |
commit | db61e4ec623437237d05b5ab8ce97d9377682de2 (patch) | |
tree | ac23384cb73ecfbe95f140b89bd6537658f17ba7 /lib/irq_regs.c | |
parent | c6c46477761504a89d5c68331f3b86fe31b51338 (diff) | |
download | kernel_samsung_aries-db61e4ec623437237d05b5ab8ce97d9377682de2.zip kernel_samsung_aries-db61e4ec623437237d05b5ab8ce97d9377682de2.tar.gz kernel_samsung_aries-db61e4ec623437237d05b5ab8ce97d9377682de2.tar.bz2 |
pch_uart: fix a deadlock when pch_uart as console
commit 384e301e3519599b000c1a2ecd938b533fc15d85 upstream.
When we use pch_uart as system console like 'console=ttyPCH0,115200',
then 'send break' to it. We'll encounter the deadlock on a cpu/core,
with interrupts disabled on the core. When we happen to have all irqs
affinity to cpu0 then the deadlock on cpu0 actually deadlock whole
system.
In pch_uart_interrupt, we have spin_lock_irqsave(&priv->lock, flags)
then call pch_uart_err_ir when break is received. Then the call to
dev_err would actually call to pch_console_write then we'll run into
another spin_lock(&priv->lock), with interrupts disabled.
So in the call sequence lead by pch_uart_interrupt, we should be
carefully to call functions that will 'print message to console' only
in case the uart port is not being used as serial console.
Signed-off-by: Liang Li <liang.li@windriver.com>
Cc: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/irq_regs.c')
0 files changed, 0 insertions, 0 deletions