[PATCH] s390: provide default ioremap and iounmap declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---

Thanks to Al Viro for pointing out this corner case in s390.

 arch/s390/include/asm/io.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
index 437e9af..f4140d4 100644
--- a/arch/s390/include/asm/io.h
+++ b/arch/s390/include/asm/io.h
@@ -73,6 +73,17 @@ static inline void ioport_unmap(void __iomem *p)
 #define __raw_writel	zpci_write_u32
 #define __raw_writeq	zpci_write_u64

+#else
+
+static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
+{
+	return NULL;
+}
+
+static inline void iounmap(void __iomem *addr)
+{
+}
+
 #endif /* CONFIG_PCI */

 #include <asm-generic/io.h>
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux