Re: [PATCH] MIPS: pci-legacy: Override pci_address_to_pio

From: Arnd Bergmann
Date: Tue Jan 14 2025 - 14:03:47 EST


On Tue, Jan 14, 2025, at 19:11, Jiaxun Yang wrote:
>
> +unsigned long pci_address_to_pio(phys_addr_t address)
> +{
> + if (address > IO_SPACE_LIMIT)
> + return (unsigned long)-1;
> +
> + return (unsigned long) address;
> +}
> +
> /*

Isn't the argument to this function a CPU physical address? I
don't think there is a point comparing it to IO_SPACE_LIMIT
on architectures where I/O space is memory mapped.

I see that you copied the above from the the non-PCI_IOBASE case
of drivers/pci/pci.c, but that only really makes sense for
architectures that have special port I/O instructions (x86,
ia64) or that use logic_pio.

Arnd