linux/drivers/tty/serial
Ilpo Järvinen 2bf95a9bcb serial: 8250: Fix 8250_rsa symbol loop
Depmod fails for a kernel made with:
  make allnoconfig
  echo -e "CONFIG_MODULES=y\nCONFIG_SERIAL_8250=m\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_RSA=y" >> .config
  make olddefconfig

...due to a dependency loop:

  depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
  depmod: ERROR: Found 2 modules in dependency cycles!

This is caused by the move of 8250 RSA code from 8250_port.c (in
8250_base.ko) into 8250_rsa.c (in 8250.ko) by the commit 5a128fb475
("serial: 8250: move RSA functions to 8250_rsa.c"). The commit
b20d6576cd ("serial: 8250: export RSA functions") tried to fix a
missing symbol issue with EXPORTs but those then cause this dependency
cycle.

Break dependency loop by moving 8250_rsa.o from 8250.ko to 8250_base.ko
and by passing univ8250_port_base_ops to univ8250_rsa_support() that
can make a local copy of it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Alex Davis <alex47794@gmail.com>
Fixes: 5a128fb475 ("serial: 8250: move RSA functions to 8250_rsa.c")
Fixes: b20d6576cd ("serial: 8250: export RSA functions")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
Link: https://lore.kernel.org/all/CADiockCvM6v+d+UoFZpJSMoLAdpy99_h-hJdzUsdfaWGn3W7-g@mail.gmail.com/
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20251110105043.4062-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-11-26 13:16:53 +01:00
..
8250 serial: 8250: Fix 8250_rsa symbol loop 2025-11-26 13:16:53 +01:00
jsm
21285.c
Kconfig TTY/Serial update for 6.18-rc1 2025-10-04 15:57:44 -07:00
Makefile
altera_jtaguart.c
altera_uart.c
amba-pl010.c
amba-pl011.c serial: amba-pl011: prefer dma_mapping_error() over explicit address checking 2025-10-28 15:26:47 +01:00
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c
atmel_serial.h
bcm63xx_uart.c
clps711x.c
cpm_uart.c
cpm_uart.h
digicolor-usart.c
dz.c
dz.h
earlycon-riscv-sbi.c
earlycon-semihost.c
earlycon.c
esp32_acm.c
esp32_uart.c
fsl_linflexuart.c
fsl_lpuart.c
icom.c
imx.c
imx_earlycon.c
ip22zilog.c
ip22zilog.h
kgdboc.c
lantiq.c
liteuart.c
lpc32xx_hs.c
ma35d1_serial.c
max310x.c
max3100.c
mcf.c
men_z135_uart.c
meson_uart.c
milbeaut_usio.c
mpc52xx_uart.c
mps2-uart.c
msm_serial.c
mux.c
mvebu-uart.c
mxs-auart.c
omap-serial.c
owl-uart.c
pch_uart.c
pic32_uart.c
pmac_zilog.c
pmac_zilog.h
pxa.c
qcom_geni_serial.c TTY driver fix for 6.18-rc1 2025-10-07 11:36:01 -07:00
rda-uart.c
rp2.c
rsci.c
rsci.h
sa1100.c
samsung_tty.c
sb1250-duart.c
sc16is7xx.c serial: sc16is7xx: remove useless enable of enhanced features 2025-10-22 12:12:06 +02:00
sc16is7xx.h
sc16is7xx_i2c.c
sc16is7xx_spi.c
sccnxp.c
serial-tegra.c
serial_base.h
serial_base_bus.c
serial_core.c
serial_ctrl.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_port.c
serial_txx9.c
sh-sci-common.h
sh-sci.c tty: serial: sh-sci: fix RSCI FIFO overrun handling 2025-10-22 12:11:17 +02:00
sh-sci.h
sifive.c
sprd_serial.c
st-asc.c
stm32-usart.c
stm32-usart.h
suncore.c
sunhv.c
sunplus-uart.c
sunsab.c
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
tegra-tcu.c
tegra-utc.c
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vt8500_serial.c
xilinx_uartps.c
zs.c
zs.h