summaryrefslogtreecommitdiff
path: root/arch/mips/pci/pci-legacy.c
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2025-01-14 18:11:58 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 11:36:32 +0100
commitf7347511ed6ef04d6b2efb73c9dc4e89df4e70a5 (patch)
tree58a9666d466fcf3320de7871cbf25e114aa5226c /arch/mips/pci/pci-legacy.c
parentaf55b076168339b9030874dcc10675532ccaffe8 (diff)
downloadlinux-f7347511ed6ef04d6b2efb73c9dc4e89df4e70a5.tar.gz
linux-f7347511ed6ef04d6b2efb73c9dc4e89df4e70a5.tar.bz2
linux-f7347511ed6ef04d6b2efb73c9dc4e89df4e70a5.zip
MIPS: pci-legacy: Override pci_address_to_pio
commit df1b8d6e89db0edd572a1e375f5d3dd5575b9a9b upstream. 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: 4bfb53e7d317 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/pci/pci-legacy.c')
-rw-r--r--arch/mips/pci/pci-legacy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c
index ec2567f8efd8..66898fd182dc 100644
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -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