On Mon, 25 Nov 2024, Arnd Bergmann wrote: > > May I suggest to call `serial8250_isa_init_ports': > > > > if (IS_ENABLED(CONFIG_ISA) || IS_ENABLED(CONFIG_ALPHA) || > > IS_ENABLED(CONFIG_M68K) || IS_ENABLED(CONFIG_X86)) > > > > then (or have an equivalent `select' in the relevant Kconfig files)? > > Right, I think that makes sense, but I'm a little worried > about renumbering or incorrectly configuring the uarts on > a non-x86 system that might have ISA slots and also register > a 8250 console. > > E.g. on the RM200, two serial ports get registered on > MMIO addresses: > > arch/mips/sni/rm200.c:static struct serial8250_platform_data rm200_data[] = { > arch/mips/sni/rm200.c- MEMPORT(0x160003f8, RM200_I8259A_IRQ_BASE + 4), > arch/mips/sni/rm200.c- MEMPORT(0x160002f8, RM200_I8259A_IRQ_BASE + 3), > arch/mips/sni/rm200.c- { }, > arch/mips/sni/rm200.c-}; > > so these would become ports ttyS4 and ttyS5 if the first four > ports get reserved for ISA cards, or disappear when using the > default CONFIG_SERIAL_8250_NR_UARTS=4. I think it's still the correct thing to do or ISA card ports won't be accessible. Then where there are platform ports, they ought to be given precedence so that they are given lower indices. I'm undecided as to whether we actually need to get it sorted now or wait for someone with an RM200 system to trigger the problem (with the possible workarounds being: 1. Do not plug any ISA cards with serial ports. 2. Set CONFIG_SERIAL_8250_RUNTIME_UARTS or "8250.nr_uarts" to 0. ). It might be quite easy to get sorted though, so I'd be leaning towards at least checking how feasible it would be. Maciej