linux-stable/arch/mips/pci
Tiezhu Yang 09d97da660 MIPS: Only define pci_remap_iospace() for Ralink
After commit 9f76779f24 ("MIPS: implement architecture-specific
'pci_remap_iospace()'"), there exists the following warning on the
Loongson64 platform:

    loongson-pci 1a000000.pci:       IO 0x0018020000..0x001803ffff -> 0x0000020000
    loongson-pci 1a000000.pci:      MEM 0x0040000000..0x007fffffff -> 0x0040000000
    ------------[ cut here ]------------
    WARNING: CPU: 2 PID: 1 at arch/mips/pci/pci-generic.c:55 pci_remap_iospace+0x84/0x90
    resource start address is not zero
    ...
    Call Trace:
    [<ffffffff8020dc78>] show_stack+0x40/0x120
    [<ffffffff80cf4a0c>] dump_stack_lvl+0x58/0x74
    [<ffffffff8023a0b0>] __warn+0xe0/0x110
    [<ffffffff80cee02c>] warn_slowpath_fmt+0xa4/0xd0
    [<ffffffff80cecf24>] pci_remap_iospace+0x84/0x90
    [<ffffffff807f9864>] devm_pci_remap_iospace+0x5c/0xb8
    [<ffffffff808121b0>] devm_of_pci_bridge_init+0x178/0x1f8
    [<ffffffff807f4000>] devm_pci_alloc_host_bridge+0x78/0x98
    [<ffffffff80819454>] loongson_pci_probe+0x34/0x160
    [<ffffffff809203cc>] platform_probe+0x6c/0xe0
    [<ffffffff8091d5d4>] really_probe+0xbc/0x340
    [<ffffffff8091d8f0>] __driver_probe_device+0x98/0x110
    [<ffffffff8091d9b8>] driver_probe_device+0x50/0x118
    [<ffffffff8091dea0>] __driver_attach+0x80/0x118
    [<ffffffff8091b280>] bus_for_each_dev+0x80/0xc8
    [<ffffffff8091c6d8>] bus_add_driver+0x130/0x210
    [<ffffffff8091ead4>] driver_register+0x8c/0x150
    [<ffffffff80200a8c>] do_one_initcall+0x54/0x288
    [<ffffffff811a5320>] kernel_init_freeable+0x27c/0x2e4
    [<ffffffff80cfc380>] kernel_init+0x2c/0x134
    [<ffffffff80205a2c>] ret_from_kernel_thread+0x14/0x1c
    ---[ end trace e4a0efe10aa5cce6 ]---
    loongson-pci 1a000000.pci: error -19: failed to map resource [io  0x20000-0x3ffff]

We can see that the resource start address is 0x0000020000, because
the ISA Bridge used the zero address which is defined in the dts file
arch/mips/boot/dts/loongson/ls7a-pch.dtsi:

    ISA Bridge: /bus@10000000/isa@18000000
    IO 0x0000000018000000..0x000000001801ffff  ->  0x0000000000000000

Based on the above analysis, the architecture-specific pci_remap_iospace()
is not suitable for Loongson64, we should only define pci_remap_iospace()
for Ralink on MIPS based on the commit background.

Fixes: 9f76779f24 ("MIPS: implement architecture-specific 'pci_remap_iospace()'")
Suggested-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2021-12-09 10:22:24 +01:00
..
fixup-ath79.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-bcm63xx.c
fixup-capcella.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-cobalt.c MIPS: Cobalt: Explain GT64111 early PCI fixup 2021-11-03 17:34:11 +01:00
fixup-fuloong2e.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-ip32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-jmr3927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-lemote2f.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-malta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-mpc30x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-rbtx4927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rbtx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rc32434.c
fixup-sb1250.c dma-mapping: treat dev->bus_dma_mask as a DMA limit 2019-11-21 18:14:35 +01:00
fixup-sni.c MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
fixup-tb0219.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0226.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0287.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
msi-octeon.c Disable MSI also when pcie-octeon.pcie_disable on 2019-01-10 10:57:13 -08:00
ops-bcm63xx.c MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
ops-bonito64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-gt64xxx_pci0.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ops-loongson2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 352 2019-06-05 17:37:09 +02:00
ops-mace.c
ops-msc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-rc32434.c
ops-sni.c
ops-tx3927.c
ops-tx4927.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ops-vr41xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-alchemy.c driver core: lift dma_default_coherent into common code 2021-02-13 09:51:45 +01:00
pci-ar71xx.c MIPS: pci: use devm_platform_ioremap_resource_byname 2020-09-18 15:29:35 +02:00
pci-ar724x.c MIPS: pci: use devm_platform_ioremap_resource_byname 2020-09-18 15:29:35 +02:00
pci-ar2315.c mips: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
pci-bcm47xx.c bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() 2021-10-18 18:11:15 +02:00
pci-bcm63xx.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
pci-bcm63xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-bcm1480.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-bcm1480ht.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-generic.c MIPS: Only define pci_remap_iospace() for Ralink 2021-12-09 10:22:24 +01:00
pci-ip27.c MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff 2020-01-09 15:29:50 -08:00
pci-ip32.c
pci-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-lantiq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-legacy.c MIPS: pci-legacy: revert "use generic pci_enable_resources" 2021-04-21 13:44:05 +02:00
pci-malta.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
pci-mt7620.c MIPS: pci-mt7620: fix PLL lock check 2021-03-12 10:13:55 +01:00
pci-octeon.c MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled 2019-01-29 11:47:02 -08:00
pci-rc32434.c
pci-rt2880.c MIPS: pci-rt2880: remove unneeded locks 2021-04-16 09:15:40 +02:00
pci-rt3883.c mips: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
pci-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-tx4927.c
pci-tx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-tx4939.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-vr41xx.c mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init() 2020-11-06 11:35:46 +01:00
pci-vr41xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-xtalk-bridge.c MIPS: Add missing linux/irqdomain.h includes 2021-06-10 13:09:16 +01:00
pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pcie-octeon.c MIPS: Octeon: Unify QLM data types in CIU header. 2018-07-03 16:00:43 -07:00