From patchwork Mon Mar 20 18:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 741137 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vn4bQ48csz9s3w for ; Tue, 21 Mar 2017 05:43:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932627AbdCTSnT (ORCPT ); Mon, 20 Mar 2017 14:43:19 -0400 Received: from mail.kernel.org ([198.145.29.136]:51970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932884AbdCTSnQ (ORCPT ); Mon, 20 Mar 2017 14:43:16 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D444202A1; Mon, 20 Mar 2017 18:43:09 +0000 (UTC) Received: from localhost (unknown [69.55.156.165]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 357F6201BC; Mon, 20 Mar 2017 18:43:08 +0000 (UTC) Subject: [PATCH v2 4/4] asm-generic/io.h: Drop ioremap_uc() stub for systems with MMU From: Bjorn Helgaas To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, "Luis R. Rodriguez" , linux-kernel@vger.kernel.org Date: Mon, 20 Mar 2017 13:43:07 -0500 Message-ID: <20170320184307.4858.40982.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20170320182014.4858.22352.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20170320182014.4858.22352.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, NML_ADSP_CUSTOM_MED,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 8c7ea50c010b ("x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default") added a default ioremap_uc() implementation that always returns NULL to indicate failure. For arches that don't implement their own ioremap_uc(), the default implementation allows us to *build* drivers that use ioremap_uc(), but they won't work. Remove the default ioremap_uc() so a driver that depends on it will fail at build-time rather than at run-time. Signed-off-by: Bjorn Helgaas --- include/asm-generic/io.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 3f8a7e589071..7b0617d2d210 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -798,29 +798,15 @@ static inline void *phys_to_virt(unsigned long address) } #endif +#ifndef CONFIG_MMU + /** * DOC: ioremap() and ioremap_*() variants * * If you have an MMU, your architecture must implement both ioremap() and - * iounmap(). + * iounmap(), as well as variants like ioremap_nocache(), ioremap_uc(), + * and ioremap_wc(). * - * It must also implement variants such as ioremap_uc(). The default - * implementation here returns failure (NULL) to avoid improper behavior. - */ - -#ifdef CONFIG_MMU - -#ifndef ioremap_uc -#define ioremap_uc ioremap_uc -static inline void __iomem *ioremap_uc(phys_addr_t offset, size_t size) -{ - return NULL; -} -#endif - -#else /* !CONFIG_MMU */ - -/* * If you don't have an MMU, the default implementations here provide * direct identity mapping. You can override these if necessary. */