[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2411251820200.44939@angie.orcam.me.uk>
Date: Mon, 25 Nov 2024 18:42:09 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Arnd Bergmann <arnd@...nel.org>
cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Guenter Roeck <linux@...ck-us.net>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
linux-serial@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
linux-kernel@...r.kernel.org, Yang Yingliang <yangyingliang@...wei.com>
Subject: Re: [PATCH 1/1] tty: serial: handle HAS_IOPORT dependencies
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
Powered by blists - more mailing lists