kernel_optimize_test/drivers/tty
Lino Sanfilippo 45bbe00801 serial: amba-pl011: do not request memory region twice
[ Upstream commit d1180405c7b5c7a1c6bde79d5fc24fe931430737 ]

With commit 3873e2d7f6 ("drivers: PL011: refactor pl011_probe()") the
function devm_ioremap() called from pl011_setup_port() was replaced with
devm_ioremap_resource(). Since this function not only remaps but also
requests the ports io memory region it now collides with the .config_port()
callback which requests the same region at uart port registration.

Since devm_ioremap_resource() already claims the memory successfully, the
request in .config_port() fails.

Later at uart port deregistration the attempt to release the unclaimed
memory also fails. The failure results in a “Trying to free nonexistent
resource" warning.

Fix these issues by removing the callbacks that implement the redundant
memory allocation/release. Also make sure that changing the drivers io
memory base address via TIOCSSERIAL is not allowed any more.

Fixes: 3873e2d7f6 ("drivers: PL011: refactor pl011_probe()")
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Link: https://lore.kernel.org/r/20211129174238.8333-1-LinoSanfilippo@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 10:53:53 +01:00
..
hvc xen/console: harden hvc_xen against event channel storms 2021-12-22 09:30:59 +01:00
ipwireless
serdev
serial serial: amba-pl011: do not request memory region twice 2022-01-27 10:53:53 +01:00
vt tty: Fix out-of-bound vmalloc access in imageblit 2021-10-06 15:55:45 +02:00
amiserial.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig
Makefile
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c tty: n_hdlc: make n_hdlc_tty_wakeup() asynchronous 2021-12-22 09:30:56 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c tty: nozomi: Fix the error handling path of 'nozomi_card_init()' 2021-07-14 16:56:39 +02:00
pty.c
rocket_int.h
rocket.c
rocket.h
synclink_gt.c tty: synclink_gt: rename a conflicting function name 2021-09-30 10:11:03 +02:00
synclink.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc 2021-11-26 10:39:10 +01:00
tty_io.c tty: Fix data race between tiocsti() and flush_to_ldisc() 2021-09-15 09:50:47 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c
ttynull.c
vcc.c