Skip to content

Commit f294a5f

Browse files
ij-intelbjorn-helgaas
authored andcommitted
MIPS: Malta: Use pcibios_align_resource() to block io range
According to Maciej W. Rozycki <[email protected]>, the mips_pcibios_init() for malta adjusts root bus IO resource start address to prevent interfering with PIIX4 I/O cycle decoding. Adjusting lower bound leaves PIIX4 IO resources outside of the root bus resource and assign_fixed_resource_on_bus() does not link the resources into the resource tree. Prior to commit ae81aad ("MIPS: PCI: Use pci_enable_resources()") the arch specific pcibios_enable_resources() did not check if the resources were assigned which diverges from what PCI core checks, effectively hiding the PIIX4 IO resources were not properly within the resource tree. After starting to use pcibios_enable_resources() from PCI core, enabling PIIX4 fails: ata_piix 0000:00:0a.1: BAR 0 [io 0x01f0-0x01f7]: not claimed; can't enable device ata_piix 0000:00:0a.1: probe with driver ata_piix failed with error -22 MIPS PCI code already has support for enforcing lower bounds using PCIBIOS_MIN_IO in pcibios_align_resource() without altering the IO window start address itself. Make malta PCI code too to use PCIBIOS_MIN_IO. Fixes: ae81aad ("MIPS: PCI: Use pci_enable_resources()") Reported-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/linux-pci/[email protected]/ Suggested-by: Maciej W. Rozycki <[email protected]> Link: https://lore.kernel.org/linux-pci/[email protected]/ Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Guenter Roeck <[email protected]> Tested-by: Maciej W. Rozycki <[email protected]> Acked-by: Thomas Bogendoerfer <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 1d5d166 commit f294a5f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/mips/pci/pci-malta.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ void __init mips_pcibios_init(void)
230230
}
231231

232232
/* PIIX4 ACPI starts at 0x1000 */
233-
if (controller->io_resource->start < 0x00001000UL)
234-
controller->io_resource->start = 0x00001000UL;
233+
PCIBIOS_MIN_IO = 0x1000;
235234

236235
iomem_resource.end &= 0xfffffffffULL; /* 64 GB */
237236
ioport_resource.end = controller->io_resource->end;

0 commit comments

Comments
 (0)