remarkable-linux/drivers/tty/serial/8250
Alexey Brodkin 699a11ba7e serial: 8250_port: Remove dangerous pr_debug()
With CONFIG_DYNAMIC_DEBUG if dyndbg enables debug output in
8250_port.c deadlock happens inevitably on UART IRQ handling.

That's the problematic execution path:
---------------------------->8------------------------
UART IRQ:
  serial8250_interrupt() ->
    serial8250_handle_irq(): lock "port->lock" ->
      pr_debug() ->
        serial8250_console_write(): bump in locked "port->lock".

      OR (if above pr_debug() gets removed):
      serial8250_tx_chars() ->
        pr_debug() ->
          serial8250_console_write(): bump in locked "port->lock".
---------------------------->8------------------------

So let's get rid of those not that much useful debug entries.

Discussed problem could be easily reproduced with QEMU for x86_64.
As well as this fix could be mimicked with muting of dynamic debug for
the problematic lines as simple as:
---------------------------->8------------------------
dyndbg="+p; file 8250_port.c line 1756 -p; file 8250_port.c line 1822 -p"
---------------------------->8------------------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Phillip Raffeck <phillip.raffeck@fau.de>
Cc: Anton Wuerfel <anton.wuerfel@fau.de>
Cc: "Matwey V. Kornilov" <matwey@sai.msu.ru>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Thor Thayer <tthayer@opensource.altera.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-12 11:51:25 +01:00
..
8250.h serial: 8250: Add IrDA to UART capabilities 2016-11-16 10:59:38 +01:00
8250_accent.c
8250_acorn.c
8250_bcm2835aux.c
8250_boca.c
8250_core.c serial: 8250: Expose set_ldisc function 2016-11-16 10:59:38 +01:00
8250_dma.c serial: 8250_dma: power off device after TX is done 2016-11-16 10:57:26 +01:00
8250_dw.c serial: 8250_dw: Add support for IrDA SIR mode 2016-11-16 10:59:38 +01:00
8250_early.c serial: 8250_early: Add earlycon support for Synopsys DesignWare ABP UART 2016-06-25 09:12:55 -07:00
8250_em.c
8250_exar_st16c554.c
8250_fintek.c serial: 8250_fintek: Add F81865 Support 2016-10-27 16:28:17 +02:00
8250_fourport.c
8250_fsl.c
8250_gsc.c
8250_hp300.c
8250_hub6.c
8250_ingenic.c serial: 8250_ingenic: drop #if conditional surrounding earlycon code 2016-06-25 14:31:04 -07:00
8250_lpc18xx.c
8250_lpss.c serial: 8250_lpss: avoid potential kernel crash when remove 2017-01-12 11:51:25 +01:00
8250_mid.c serial: 8250_mid fix calltrace when hotplug 8250 serial controller 2016-11-30 13:06:08 +01:00
8250_moxa.c serial: 8250: moxa: Store num_ports in brd 2017-01-12 11:51:25 +01:00
8250_mtk.c serial: 8250_mtk: support big baud rate. 2016-08-31 16:01:26 +02:00
8250_of.c serial: 8250: pxa: add devicetree earlyconsole 2016-10-27 16:27:24 +02:00
8250_omap.c Revert "tty/serial/8250: use mctrl_gpio helpers" 2016-08-31 15:36:01 +02:00
8250_pci.c serial: 8250_fintek: Add resource check for Fintek F81504/508/512 2017-01-12 11:51:24 +01:00
8250_pnp.c
8250_port.c serial: 8250_port: Remove dangerous pr_debug() 2017-01-12 11:51:25 +01:00
8250_pxa.c serial: pxa2xx: mark PM functions as __maybe_unused 2016-11-10 14:50:46 +01:00
8250_uniphier.c serial: 8250_uniphier: avoid locking for FCR register write 2016-11-10 14:30:09 +01:00
Kconfig serial: rewrite pxa2xx-uart to use 8250_core 2016-10-27 16:03:09 +02:00
Makefile serial: rewrite pxa2xx-uart to use 8250_core 2016-10-27 16:03:09 +02:00
serial_cs.c