linux/drivers/tty/serial/8250
Sebastian Andrzej Siewior 9d7c249a1e serial: 8250: drop the printk from serial8250_interrupt()
The printk() in serial8250_interrupt() was once hidden behind a debug
macro in commit f4f653e987 ("serial: 8250, disable "too much work"
messages") and reverted back in commit 12de375ec4 ("Revert "serial:
8250, disable "too much work" messages"").

This was introduced first in 0.99.13k with the "serial" driver itself
(and called pass_number with a limit of 64 and no print). In 1.1.13 it
was renamed to pass_counter and the printk was behind #if 0. In 1.1.94
the limit of 64 was increased to 256 and hidden behind
RS_ISR_PASS_LIMIT. With this change the #if 0 turned into #if 1. It
slowly become what we have today with a loop limit of 512.

Usually, that printk isn't hit. However on KVM with a busy UART and
overloaded host it might happen. It is also likely with threaded
interrupts and a task which preempts the interrupt handler.

If the UART has (legitimate) work to do and we break out of the loop,
nothing changes: the interrupt is most likely already pending in the
interrupt controller and we end up in the handler anyway. This printk is
hardly helping.

Older kernels also had a comment saying that a bad configuration might
lead to this but I don't see how that should happen because a wrongly
configured interrupt number would let the handler leave "early" with
IRQ_NONE and the spurious detected will handle that (weill since 2.6.11,
before that we had no spurious detector). In that case, we would never
loop that often here.

This loop looks like an optimisation in order to pull the bytes from the
FIFO which were received while we were already here instead of waiting
for the interrupt. This might have been a good idea while the CPUs were
slow and FIFOs small.
There are other serial driver in tree, like the amba-pl*, which also
have this kind of a loop but without the printk (and were based on this
driver).

Remove the printk which might trigger in otherwise valid situtations.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 16:07:23 +02:00
..
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_aspeed_vuart.c serial/aspeed-vuart: fix a couple mod_timer() calls 2018-05-14 13:51:11 +02:00
8250_bcm2835aux.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_core.c serial: 8250: drop the printk from serial8250_interrupt() 2018-09-18 16:07:23 +02:00
8250_dma.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_dw.c serial: 8250_dw: Add ACPI support for uart on Broadcom SoC 2018-08-02 10:11:32 +02:00
8250_early.c serial: 8250_early: Setup divider when uartclk is passed 2018-04-25 14:56:12 +02:00
8250_em.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_exar.c serial: 8250_exar: Read INT0 from slave device, too 2018-08-02 10:11:35 +02:00
8250_fintek.c serial: 8250_fintek: Fix crash with baud rate B0 2017-11-08 13:09:35 +01:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_gsc.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_hp300.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c serial: 8250_ingenic: Parse earlycon options 2018-01-09 16:49:14 +01:00
8250_lpc18xx.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_lpss.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_men_mcb.c 8250-men-mcb: add support for 16z025 and 16z057 2018-03-15 18:12:55 +01:00
8250_mid.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_moxa.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_mtk.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_of.c serial: 8250: of: Defer probe on missing IRQ 2018-07-16 11:56:22 +02:00
8250_omap.c serial: 8250_omap: Add support for AM654 UART controller 2018-06-28 21:23:44 +09:00
8250_pci.c serial: 8250_pci: Remove stalled entries in blacklist 2018-06-28 21:34:39 +09:00
8250_pnp.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_port.c tty: serial: 8250: Revert NXP SC16C2552 workaround 2018-08-12 18:53:30 +02:00
8250_pxa.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_uniphier.c serial: 8250_uniphier: fix error return code in uniphier_uart_probe() 2018-01-09 16:45:17 +01:00
8250.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
Kconfig 8250-men-mcb: add support for 16z025 and 16z057 2018-03-15 18:12:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
serial_cs.c drivers/tty: add error handling for pcmcia_loop_config 2018-06-28 21:23:44 +09:00