Re: [PATCH v2 02/15] serial: core: add uart_iotype_mmio/legacy_io helper functions

From: Andy Shevchenko

Date: Mon May 04 2026 - 10:42:58 EST


On Mon, May 04, 2026 at 12:44:41PM +0100, Maciej W. Rozycki wrote:
> On Mon, 4 May 2026, Andy Shevchenko wrote:

...

> > > > Why do we use 'legacy'? Still in use in modern CPUs...
> > >
> > > Deprecated in PCIe and not available in numerous systems. Also actually
> > > called "legacy" in some serial port datasheets aged ~20 years now. While
> > > some contemporary CPUs indeed retain the port I/O address space, it's for
> > > legacy use anyway, you don't want to rely on it in new designs.
> >
> > For the holder of the new (modern) CPU which supports the IO ports, this is
> > definitely not a legacy interface despite on whatever PCIe or other datasheets
> > call it.
>
> I appreciate your point of view, however I disagree that the presence of an
> interface in a contemporary chip makes the interface modern.

I appreciate a bike shedding.

> I see the port I/O space so much legacy as say the PC/AT DMA controller
> (8237 pair), which is similarly present in current x86 chipsets. If this
> stuff was not present, such as say the PC/AT interrupt controller (8259A
> pair), which I believe has been removed from some x86 system designs, then
> it would be obsolete/removed rather than legacy.
>
> It is analogous to PCI/e systems that lack a southbridge and are called
> "legacy-free", as the whole southbridge stuff, the main consumer of the
> port I/O space still remaining in use, is legacy nowadays (the other one I
> know of being the 8255-based PC parallel port, which has been considered a
> legacy interface as well, even though you can still buy and plug one into
> a modern PCIe system).
>
> NB I have a couple of modern x86 CPUs around too that support the port
> I/O space, but it doesn't change my view as to the nomenclature.

Is the regular user assumed to go to dig to the mailing list (at best) or drawn
into the search of the documentation for all this? In their perspective they
possess modern CPU with support of that technology. If the same user possesses
the HW uses that ("legacy") technology, it doesn't make so in their eyes.

On top of that the additional word occupies more space in the code, making it
harder to read. It's just a redundant word. I see no value at all of using it.

P.S.
I see no value in this discussion. And I see no point to add a word where it's
not needed at all.

--
With Best Regards,
Andy Shevchenko