From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942433AbdEYPn4 (ORCPT ); Thu, 25 May 2017 11:43:56 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39650 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933931AbdEYPnw (ORCPT ); Thu, 25 May 2017 11:43:52 -0400 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Logan Gunthorpe , Martin Schwidefsky , Heiko Carstens , Al Viro Date: Thu, 25 May 2017 09:43:48 -0600 Message-Id: <1495727028-27656-1-git-send-email-logang@deltatee.com> X-Mailer: git-send-email 2.1.4 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, logang@deltatee.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, viro@ZenIV.linux.org.uk X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH] s390: provide default ioremap and iounmap declaration X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Al Viro --- 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 -- 2.1.4