Skip to content

Commit

Permalink
MIPS: pci-legacy: Override pci_address_to_pio
Browse files Browse the repository at this point in the history
pci-legacy systems are not using logic_pio to managed PIO
allocations, thus the generic pci_address_to_pio won't work
when PCI_IOBASE is defined.

Override the function to use architecture implementation to
fix the problem.

Cc: stable@vger.kernel.org
Fixes: 4bfb53e ("mips: add <asm-generic/io.h> including")
Reported-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Closes: https://lore.kernel.org/r/99f75c66-4c2d-45dc-a808-b5ba440c7551@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Jiaxun Yang authored and Thomas Bogendoerfer committed Jan 20, 2025
1 parent a3c4afc commit df1b8d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/mips/pci/pci-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ static LIST_HEAD(controllers);

static int pci_initialized;

unsigned long pci_address_to_pio(phys_addr_t address)
{
if (address > IO_SPACE_LIMIT)
return (unsigned long)-1;

return (unsigned long) address;
}

/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the
Expand Down

0 comments on commit df1b8d6

Please sign in to comment.