From: Logan Gunthorpe <logang@deltatee.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Logan Gunthorpe <logang@deltatee.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Al Viro <viro@ZenIV.linux.org.uk>
Subject: [PATCH] s390: provide default ioremap and iounmap declaration
Date: Thu, 25 May 2017 09:43:48 -0600 [thread overview]
Message-ID: <1495727028-27656-1-git-send-email-logang@deltatee.com> (raw)
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
next reply other threads:[~2017-05-25 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 15:43 Logan Gunthorpe [this message]
2017-05-26 12:38 ` [PATCH] s390: provide default ioremap and iounmap declaration Heiko Carstens
2017-05-26 16:52 ` Logan Gunthorpe
2017-05-29 16:07 ` Sebastian Ott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495727028-27656-1-git-send-email-logang@deltatee.com \
--to=logang@deltatee.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox