diff mbox series

[RESEND] arm: Enlarge IO_SPACE_LIMIT needed for some SoC

Message ID 20210508175537.202-1-ansuelsmth@gmail.com
State New
Headers show
Series [RESEND] arm: Enlarge IO_SPACE_LIMIT needed for some SoC | expand

Commit Message

Christian Marangi May 8, 2021, 5:55 p.m. UTC
Ipq8064 SoC requires larger IO_SPACE_LIMIT or second and third pci port
fails to register the IO addresses and connected device doesn't work.

Cc: <stable@vger.kernel.org> # 4.9+
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 arch/arm/include/asm/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Laight May 9, 2021, 4:54 p.m. UTC | #1
...
> Well, an obvious question would be: do you really need that much IO
> space? PCs have got away with 64K of IO space without having a problem
> for years, so 64K per bus should be fine. If you have 3 buses, that
> should be 3 * 64K or 192K.

Not only that, but most modern PCI (even) cards don't require IO space.
Or does this include memory space - which can be much bigger.

I have cut one of our FPGA PCIe slaves down from two 8MB BARs to
two 1MB ones, with the extra small BARs (eg for MSI-X) the bridge
would have allocated 32MB, now 4MB.
Fortunately that card only needs to work on x86-64.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
diff mbox series

Patch

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index fc748122f1e0..6f3e89f08bd8 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -197,7 +197,7 @@  void __iomem *pci_remap_cfgspace(resource_size_t res_cookie, size_t size);
 #ifdef CONFIG_NEED_MACH_IO_H
 #include <mach/io.h>
 #elif defined(CONFIG_PCI)
-#define IO_SPACE_LIMIT	((resource_size_t)0xfffff)
+#define IO_SPACE_LIMIT	((resource_size_t)0xffffff)
 #define __io(a)		__typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT))
 #else
 #define __io(a)		__typesafe_io((a) & IO_SPACE_LIMIT)