]> git.itanic.dy.fi Git - linux-stable/commit
MIPS: ralink: don't define PC_IOBASE but increase IO_SPACE_LIMIT
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sun, 22 Aug 2021 16:10:03 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Sep 2021 15:30:55 +0000 (17:30 +0200)
commit159697474db41732ef3b6c2e8d9395f09d1f659e
tree66fb760f743e4670417629c208474e88ae39e75e
parent51a72ec705dfa7f5ae2a70041cdbc53804ba6ee8
MIPS: ralink: don't define PC_IOBASE but increase IO_SPACE_LIMIT

Defining PCI_IOBASE results in pci resource handling working but the
addresses generated for IO accesses are wrong since the ioremap in the pci core
function 'pci_parse_request_of_pci_ranges' tries to remap to a fixed virtual
address (PC_IOBASE) which can't work for KSEG1 addresses. To get it working this
way, we would need to put PCI_IOBASE somewhere into KSEG2 which will result in
creating TLB entries for IO addresses, which most of the time isn't needed on
MIPS because of access via KSEG1. So avoid to define PCI_IOBASE and increase
IO_SPACE_LIMIT resource for ralink MIPS platform instead, to get valid IO
addresses for resources from pci core 'pci_address_to_pio' function.

Fixes: 222b27713d7f ("MIPS: ralink: Define PCI_IOBASE")
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210822161005.22467-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/mach-ralink/spaces.h