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

From: Maciej W. Rozycki

Date: Mon May 04 2026 - 07:46:42 EST


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 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.

FWIW,

Maciej