android_kernel_google_msm/drivers/tty/serial
Liang Li 5d2a2c7173 pch_uart: fix a deadlock when pch_uart as console
commit 384e301e35 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>
2013-07-03 10:59:05 -07:00
..
8250 serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller 2013-03-20 13:04:58 -07:00
cpm_uart
jsm
21285.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
68328serial.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
68328serial.h
altera_jtaguart.c
altera_uart.c tty: serial: altera_uart: Check for NULL platform_data in probe. 2012-04-09 10:30:39 -07:00
amba-pl010.c
amba-pl011.c serial: pl011: handle corruption at high clock speeds 2012-10-07 08:32:25 -07:00
apbuart.c
apbuart.h
ar933x_uart.c
atmel_serial.c tty: atmel_serial_probe(): index of atmel_ports[] fix 2013-04-05 10:04:18 -07:00
bcm63xx_uart.c
bfin_sport_uart.c
bfin_sport_uart.h
bfin_uart.c serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset. 2012-03-13 14:33:39 -07:00
clps711x.c ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR 2012-04-18 15:19:50 -07:00
crisv10.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
crisv10.h
dz.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
dz.h
efm32-uart.c
icom.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
icom.h
ifx6x60.c serial:ifx6x60:Delete SPI timer when shut down port 2013-01-21 11:45:26 -08:00
ifx6x60.h
imx.c tty: serial: imx: console write routing is unsafe on SMP 2012-10-02 10:30:21 -07:00
ioc3_serial.c
ioc4_serial.c TTY: remove serialP.h inclusion from some files 2012-03-08 11:47:02 -08:00
ip22zilog.c
ip22zilog.h
Kconfig tty: serial: fix typo "ARCH_S5P6450" 2013-03-20 13:04:59 -07:00
kgdboc.c
lantiq.c
m32r_sio.c TTY: remove serialP.h inclusion from some files 2012-03-08 11:47:02 -08:00
m32r_sio.h TTY: serial, include pci.h in m32r_sio 2012-03-08 11:47:02 -08:00
m32r_sio_reg.h
Makefile Merge tag 'tty-3.3-rc3' tty-next 2012-02-10 10:25:27 -08:00
max3100.c
max3107.c
max3107.h
mcf.c
mfd.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
mpc52xx_uart.c mpc5200b/uart: select more tolerant uart prescaler on low baudrates 2012-03-08 13:15:50 -08:00
mpsc.c
mrst_max3110.c
mrst_max3110.h
msm_serial.c
msm_serial.h
msm_serial_hs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
msm_smd_tty.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
mux.c tty/serial/mux.c: linux/tty.h included twice 2012-02-24 13:50:45 -08:00
mxs-auart.c Add missing call to uart_update_timeout() 2012-06-01 15:18:20 +08:00
netx-serial.c
nwpserial.c
of_serial.c
omap-serial.c Revert "serial: omap: fix software flow control" 2012-11-26 11:38:44 -08:00
pch_uart.c pch_uart: fix a deadlock when pch_uart as console 2013-07-03 10:59:05 -07:00
pmac_zilog.c pmac_zilog,kdb: Fix console poll hook to return instead of loop 2012-08-26 15:00:43 -07:00
pmac_zilog.h
pnx8xxx_uart.c
pxa.c ARM: device tree work 2012-03-27 16:47:35 -07:00
sa1100.c ARM: 7342/2: sa1100: prepare for sparse irq conversion 2012-03-25 23:57:20 +01:00
samsung.c serial: samsung: fix omission initialize ulcon in reset port fn() 2012-04-09 10:30:39 -07:00
samsung.h
sb1250-duart.c
sc26xx.c
serial_core.c serial_core.c: add put_device() after device_find_child() 2013-05-07 19:51:53 -07:00
serial_ks8695.c
serial_txx9.c
sh-sci.c serial: sh-sci: use serial_port_in/out vs sci_in/out. 2012-03-30 19:50:15 +09:00
sh-sci.h serial: sh-sci: use serial_port_in/out vs sci_in/out. 2012-03-30 19:50:15 +09:00
sirfsoc_uart.c pinctrl: API changes to support multiple states per device 2012-03-05 11:22:59 +01:00
sirfsoc_uart.h serial/sirf: fixup for changes to pin control 2012-02-22 17:59:12 +01:00
sn_console.c Miscellaneous Itanium patches 2012-03-23 17:19:37 -07:00
suncore.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunhv.c Disintegrate asm/system.h for Sparc 2012-03-28 18:30:03 +01:00
sunsab.c Disintegrate asm/system.h for Sparc 2012-03-28 18:30:03 +01:00
sunsab.h
sunsu.c sunsu: Fix panic in case of nonexistent port at "console=ttySY" cmdline option 2013-03-28 12:11:52 -07:00
sunzilog.c serial/sunzilog: fix keyboard on SUN SPARCstation 2012-04-04 00:37:10 -07:00
sunzilog.h
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c tty: serial: vt8500: fix annotations for probe/remove 2012-03-12 10:21:55 -07:00
xilinx_uartps.c
zs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
zs.h