1
0
Fork 0
alistair23-linux/drivers/tty
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
..
hvc tty: hvc: hvc_write() fix break condition 2018-09-10 18:04:31 +02:00
ipwireless tty: ipwireless: Replace GFP_ATOMIC with GFP_KERNEL in ipwireless_network_create 2018-04-23 10:57:06 +02:00
serdev serdev: add dev_pm_domain_attach|detach() 2018-07-15 12:23:53 +02:00
serial serial: 8250: drop the printk from serial8250_interrupt() 2018-09-18 16:07:23 +02:00
vt TTY/Serial driver patches for 4.19-rc1 2018-08-18 10:50:41 -07:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-04-09 09:04:10 -07:00
Makefile tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers 2018-03-26 15:57:24 +02:00
amiserial.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
cyclades.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
ehv_bytechan.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
goldfish.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
isicom.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mips_ejtag_fdc.c tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
moxa.c tty: moxa: Add support for CMSPAR 2017-11-28 15:32:33 +01:00
moxa.h tty: moxa: Add support for CMSPAR 2017-11-28 15:32:33 +01:00
mxser.c tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
mxser.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n_gsm.c Merge 4.17-rc3 into tty-next 2018-04-30 05:14:55 -07:00
n_hdlc.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
n_null.c tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
n_r3964.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
n_tracerouter.c tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
n_tracesink.c tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
n_tracesink.h tty: Remove redundant license text 2017-11-08 13:08:12 +01:00
n_tty.c n_tty: Access echo_* variables carefully. 2018-06-28 21:30:16 +09:00
nozomi.c tty/nozomi: fix inconsistent indentation 2018-04-25 14:54:26 +02:00
pty.c pty: fix O_CLOEXEC for TIOCGPTPEER 2018-07-21 09:08:47 +02:00
rocket.c tty: rocket: Fix possible buffer overwrite on register_PCI 2018-08-02 10:11:32 +02:00
rocket.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rocket_int.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
synclink.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
synclink_gt.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
synclinkmp.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
sysrq.c signal: Pass pid type into do_send_sig_info 2018-07-21 12:57:35 -05:00
tty_audit.c audit: eliminate audit_enabled magic number comparison 2018-06-19 10:43:55 -04:00
tty_baudrate.c tty: support CIBAUD without BOTHER 2018-07-16 12:00:43 +02:00
tty_buffer.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
tty_io.c Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2018-08-21 13:47:29 -07:00
tty_ioctl.c tty: add missing const to termios hw-change helper 2018-05-22 10:08:05 +02:00
tty_jobctrl.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
tty_ldisc.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
tty_ldsem.c atomic/tty: Fix up atomic abuse in ldsem 2018-06-28 21:07:55 +09:00
tty_mutex.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tty_port.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
vcc.c tty: vcc: Convert timers to use timer_setup() 2017-11-04 12:01:54 +01:00