From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938703AbdEYPlz (ORCPT ); Thu, 25 May 2017 11:41:55 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39627 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938560AbdEYPlx (ORCPT ); Thu, 25 May 2017 11:41:53 -0400 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org Cc: Logan Gunthorpe , Stephen Bates , Chris Metcalf , Andrew Morton , Mel Gorman , Michal Hocko , Johannes Weiner , Vlastimil Babka , Al Viro Date: Thu, 25 May 2017 09:41:44 -0600 Message-Id: <1495726904-27380-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, logang@deltatee.com, sbates@raithlin.com, cmetcalf@mellanox.com, akpm@linux-foundation.org, mgorman@techsingularity.net, mhocko@suse.com, hannes@cmpxchg.org, vbabka@suse.cz, viro@ZenIV.linux.org.uk X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v2] tile: provide default ioremap 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 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. Thus, if the function is ever hit it returns NULL. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Chris Metcalf Cc: Andrew Morton Cc: Mel Gorman Cc: Michal Hocko Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Al Viro --- Changes for v2: * Per feedback from Al Viro, the ioremap function was changed to fail if it ever actually gets used. arch/tile/mm/pgtable.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c index 492a736..ec5576f 100644 --- a/arch/tile/mm/pgtable.c +++ b/arch/tile/mm/pgtable.c @@ -503,6 +503,17 @@ 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) +{ + return NULL; +} +EXPORT_SYMBOL(ioremap); + +#endif + /* Unmap an MMIO VA mapping. */ void iounmap(volatile void __iomem *addr_in) { -- 2.1.4