Skip to contentSkip to conversation

tile: provide default ioremap declaration

PATCH Superseded Logan Gunthorpe 1 participant 1 message May 24, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Cc Chris Metcalf <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Vlastimil Babka <[email protected]>
---
 arch/tile/mm/pgtable.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/tile/mm/pgtable.c +13 -0
index 492a736..c61df18 100644
@@ -503,6 +503,19 @@ void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long 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)
+{
+	pgprot_t pgprot = {};
+
+	return ioremap_prot(phys_addr, size, pgprot);
+}
+EXPORT_SYMBOL(ioremap);
+
+#endif
+
 /* Unmap an MMIO VA mapping. */
 void iounmap(volatile void __iomem *addr_in)
 {
Signature · 1 line
2.1.4