Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650604
| From | Logan Gunthorpe <logang@deltatee.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] s390: provide default ioremap and iounmap declaration |
| Date | 2017-05-25 17:50 +0200 |
| Message-ID | <tL3bs-1AL-27@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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@deltatee.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
---
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] s390: provide default ioremap and iounmap declaration Logan Gunthorpe <logang@deltatee.com> - 2017-05-25 17:50 +0200
Re: [PATCH] s390: provide default ioremap and iounmap declaration Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-05-26 14:40 +0200
Re: [PATCH] s390: provide default ioremap and iounmap declaration Logan Gunthorpe <logang@deltatee.com> - 2017-05-26 19:00 +0200
Re: [PATCH] s390: provide default ioremap and iounmap declaration Sebastian Ott <sebott@linux.vnet.ibm.com> - 2017-05-29 18:10 +0200
csiph-web