Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1712310ybh; Tue, 14 Jul 2020 05:30:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLlQqFStvIMqt6/YyHrY3Ql1IVPa289CNJg8EuugFvN8ftTWpuoYBJ04e1456f++3hdXJO X-Received: by 2002:a17:907:100a:: with SMTP id ox10mr4073593ejb.351.1594729838427; Tue, 14 Jul 2020 05:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594729838; cv=none; d=google.com; s=arc-20160816; b=sLGQbfXM/Y3t5hXDQvfjTYLLudIstTEoEZh+XQGLwxxUl8qQXfGrb/V8miux6NHGq3 dcxLc49G8iIqCunUA5DOWe/64LsJ+T30RuJzzNfaYbvj7ckY+I04oQwU2U01KFmHdPYh ZYsRkStalh68AMyMAy06LH+TB+ccQb2BkVnw5KVyXdAGeO7KJ245D4pZ4+n7e9GkzPs0 MrwBMb+rA3a1D6XLl3+Sz2yTP/p/5355SObQC/vhm/xPlxA5RGrZ+vTSu2nRAE61SbZM 0qlIeUcQF8wDTT+K2wcbLCqJcMNAaSoAzwlmo0Vkikh6Ff7bV4cXO7mfueXKTZuYPP/P rwyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tYiJ8awb7HQY8NHNAGR9Uf0rHCnZXmo9pJDwUfvh/fs=; b=slZ3ssj4VponaaLApl95hpo6ZuWPVkhPJem1MvBj/aA8Kd/QRYl0CvsEXfTf1AQnlb dbzbg0tc09Z0ABIT9r3leQQsSMEYkKJR3zo3Tcs5T13AZfzbxX+U9ztbwV4yVB3x/vwY lEditvymr2y/s3KR0y/ShyestKE56bEyvrmrg2z1p/AuJIAGRCRSGvkmCub5PNRttQ3C ak7fM0j+x8ooA2CvZV/DQpCY+G1oQccmJSCZmtiWx2U6Kgdcz+q6sKdy0++L1iponAc5 keCjxJzZ5qMHQ1Q9NJA6Njb+OrkMiMj3qVAdnd4HicRo1mSsQTAjbuZasDSY08d3JuFH /MFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=bxmEmpIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si11912505edw.306.2020.07.14.05.30.14; Tue, 14 Jul 2020 05:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=bxmEmpIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbgGNMaE (ORCPT + 99 others); Tue, 14 Jul 2020 08:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbgGNMaD (ORCPT ); Tue, 14 Jul 2020 08:30:03 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42048C061755; Tue, 14 Jul 2020 05:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=tYiJ8awb7HQY8NHNAGR9Uf0rHCnZXmo9pJDwUfvh/fs=; b=bxmEmpIE4k4/J4WlA22h1Ikk8b pqYZVMO1Hfldvmu1M7np4M6sr/SuWEVQ1X/aoL/U8NMcuhsM64thR8J/Srsi08aYU6H6GclV6Ngje 8MzaPFl+XzFcskCVto8Nuy+se/fXLlaloo0JABFkMxkMs1fGeheAKMgCM3qKo51atbJdAeW44WOdr fU3e4w4VxzNuLnNn/jwJP3feu8tCwBr/rr3YOU/CEaS5bKHjgMHizfWKBWrUqte7xYfh/8J7+SC08 NCAfdpX2NskbZUSe+/EbwU04F1mrtdxFbgXFSwWat7wuujeDK0YbNhO50Ccp5saKbjqsPJF8GeU/H FhyL/25g==; Received: from 089144201169.atnat0010.highway.a1.net ([89.144.201.169] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK4H-0001ud-AI; Tue, 14 Jul 2020 12:29:55 +0000 From: Christoph Hellwig To: Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/10] sh: move ioremap_fixed details out of Date: Tue, 14 Jul 2020 14:18:50 +0200 Message-Id: <20200714121856.955680-5-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714121856.955680-1-hch@lst.de> References: <20200714121856.955680-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ioremap_fixed is an internal implementation detail and should not be exposed to drivers. Signed-off-by: Christoph Hellwig --- arch/sh/include/asm/io.h | 16 ---------------- arch/sh/mm/init.c | 1 + arch/sh/mm/ioremap.c | 1 + arch/sh/mm/ioremap.h | 23 +++++++++++++++++++++++ arch/sh/mm/ioremap_fixed.c | 1 + 5 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 arch/sh/mm/ioremap.h diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 1fd06ef6a19454..357a7e0c86d682 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -346,22 +346,6 @@ ioremap_prot(phys_addr_t offset, unsigned long size, unsigned long flags) } #endif -#ifdef CONFIG_IOREMAP_FIXED -extern void __iomem *ioremap_fixed(phys_addr_t, unsigned long, pgprot_t); -extern int iounmap_fixed(void __iomem *); -extern void ioremap_fixed_init(void); -#else -static inline void __iomem * -ioremap_fixed(phys_addr_t phys_addr, unsigned long size, pgprot_t prot) -{ - BUG(); - return NULL; -} - -static inline void ioremap_fixed_init(void) { } -static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; } -#endif - #define ioremap_uc ioremap /* diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index a70ba0fdd0b382..da7ea48f9439e2 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -28,6 +28,7 @@ #include #include #include +#include "ioremap.h" pgd_t swapper_pg_dir[PTRS_PER_PGD]; diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index f6d02246d665bd..d9ec85b6bb2130 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c @@ -24,6 +24,7 @@ #include #include #include +#include "ioremap.h" /* * Remap an arbitrary physical address space into the kernel virtual diff --git a/arch/sh/mm/ioremap.h b/arch/sh/mm/ioremap.h new file mode 100644 index 00000000000000..f2544e721a3526 --- /dev/null +++ b/arch/sh/mm/ioremap.h @@ -0,0 +1,23 @@ +#ifndef _SH_MM_IORMEMAP_H +#define _SH_MM_IORMEMAP_H 1 + +#ifdef CONFIG_IOREMAP_FIXED +void __iomem *ioremap_fixed(phys_addr_t, unsigned long, pgprot_t); +int iounmap_fixed(void __iomem *); +void ioremap_fixed_init(void); +#else +static inline void __iomem * +ioremap_fixed(phys_addr_t phys_addr, unsigned long size, pgprot_t prot) +{ + BUG(); + return NULL; +} +static inline void ioremap_fixed_init(void) +{ +} +static inline int iounmap_fixed(void __iomem *addr) +{ + return -EINVAL; +} +#endif /* CONFIG_IOREMAP_FIXED */ +#endif /* _SH_MM_IORMEMAP_H */ diff --git a/arch/sh/mm/ioremap_fixed.c b/arch/sh/mm/ioremap_fixed.c index 07e744d75fa01b..1914b79d1c530b 100644 --- a/arch/sh/mm/ioremap_fixed.c +++ b/arch/sh/mm/ioremap_fixed.c @@ -24,6 +24,7 @@ #include #include #include +#include "ioremap.h" struct ioremap_map { void __iomem *addr; -- 2.26.2