Skip to contentSkip to conversation

tile: provide default ioremap declaration

PATCH New [email protected] 1 participant 1 message Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 6/108 tile: provide default ioremap declaration

From: Logan Gunthorpe <[email protected]>
Subject: tile: provide default ioremap declaration

Add a default ioremap function which was not provided in all circumstances. (Only when CONFIG_PCI and CONFIG_TILEGX was set).

I have designs to use them in scatterlist.c where they'd likely never be called with this architecture, but it is needed to compile. Thus, if the function is ever hit it returns NULL.

---

 arch/tile/mm/pgtable.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
arch/tile/mm/pgtable.c renamed from arch/tile/mm/pgtable.c~tile-provide-default-ioremap-declaration +11 -0
diff -puN arch/tile/mm/pgtable.c~tile-provide-default-ioremap-declaration arch/tile/mm/pgtable.c
@@ -503,6 +503,17 @@ void __iomem *ioremap_prot(resource_size
 }
 EXPORT_SYMBOL(ioremap_prot);
 
+#if !defined(CONFIG_PCI) || !defined(CONFIG_TILEGX)
+/* ioremap is conditionally declared in pci_gx.c */
+
+void __iomem *ioremap(resource_size_t phys_addr, unsigned long size)
+{
+	return NULL;
+}
+EXPORT_SYMBOL(ioremap);
+
+#endif
+
 /* Unmap an MMIO VA mapping. */
 void iounmap(volatile void __iomem *addr_in)
 {

_