Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp302372ybl; Sat, 17 Aug 2019 00:49:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqymmxKO1TsBhirkHb+o+Iz4S/YuqeS9KJqO1cEa98h6ImKsrf4KeQjg5TbV0fgyBguR6XCA X-Received: by 2002:a62:aa13:: with SMTP id e19mr14000658pff.37.1566028192923; Sat, 17 Aug 2019 00:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566028192; cv=none; d=google.com; s=arc-20160816; b=yGewXhglCGaASitpRJwxUQQiX+IX/kMOZ0I6aIxeKLEKrJOgnPaerNxYntRHqMiNjX Om4M0MgsBfCN7dTpUF00p86dsEW1tPeQpl6m2QumgnmqiJyIu/TcSBThEjXK8PcM716n BRcoW/8tptU3NNpXrBaheRMlyEuSmYcpuollZn2m5K8ZhsK0KNrjPk8LLnbGd4RIizYS ELfSkkPlIAP1fyr2UAgVw6ITj+Z/7v/QE3/LAfxy6EphyEGfu5Azp/xMB4LEXemDN3/t QSEPqExxW+vWs1XT/CmkECl9rDKGmAZRGfk0Lyxxs0Jxit6AQHB14jfdN9+TcMdb3p4U Y1Rg== 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=FX04uJGNdq/Yp5y2MJBzjZbPxUQfO+iCaj0twVF6zA4=; b=ZRvHfiI41n3cysCZ3Ul841xyROXOksLp6SXeo1pb4EG/yBOJspbjhOcSbPfwnakuLo l5IvZOoRJLkBd5A8rQJ2wrQ1bJkpuG45YwMblwLAMIACNSo43Rg8BSgKM3dSqt3ZQdHz SF2tMNBvWcDlWAXE5aJ4GsTtOkFHn/bgsRx0CnrenDyhFbNNH/1SA05xwPFcVD+OsdII K2Z8vGVdaW+P9zjzHuw0Vkq312GvzKrYJaC81CdUuwbZHrSRNHWNlWAz11wbzvvNoAA8 hVglkvz8ecRPISo5ejMJ57aykHqEbY2/ISIL8nsUfCz70hQVAUab4kNhxZfWfLUm0rs/ 0VZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FqajDALy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si5387021pgw.298.2019.08.17.00.49.39; Sat, 17 Aug 2019 00:49:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FqajDALy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbfHQHsr (ORCPT + 99 others); Sat, 17 Aug 2019 03:48:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35708 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfHQHsq (ORCPT ); Sat, 17 Aug 2019 03:48:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FX04uJGNdq/Yp5y2MJBzjZbPxUQfO+iCaj0twVF6zA4=; b=FqajDALycfb3RLQsUvPVbgMPZz dOpsoNefkCkTkLOaUQRGC8tl371AnmtMs6thFxyNwkW1yB+7T0jMHPB65jBRdYz/I80D14AQ6ZpBw BDYJQsjgjLlR04v31PZV0oT60nsijEpUHC1RRG+jxHwJlhBqHgVEGMZMTWIYDiOqybAapjylrP6Pq /qPcKzZV3rHqe7SwrY7J778iGraDjHz/Z+sErABUK//lsbWGR8mA4dxVHMpkCfqNTFN8YM0E3k+zr 6pQnG2H5clsP0FQfNouxdRC54eU8Y7E2BTkOKJH/Oagbm2XrsbWa+ET09Ko1zazTtcz1PQzUXJ5qL cYcHBYyw==; Received: from [2001:4bb8:18c:28b5:44f9:d544:957f:32cb] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hytS3-0004wM-1D; Sat, 17 Aug 2019 07:48:39 +0000 From: Christoph Hellwig To: Arnd Bergmann , Guo Ren , Michal Simek , Greentime Hu , Vincent Chen , Guan Xuetao , x86@kernel.org Cc: linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-mtd@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/26] nios2: remove __ioremap Date: Sat, 17 Aug 2019 09:32:37 +0200 Message-Id: <20190817073253.27819-11-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190817073253.27819-1-hch@lst.de> References: <20190817073253.27819-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.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 The cacheflag argument to __ioremap is always 0, so just implement ioremap directly. Signed-off-by: Christoph Hellwig --- arch/nios2/include/asm/io.h | 20 ++++---------------- arch/nios2/mm/ioremap.c | 17 +++-------------- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h index 9010243077ab..74ab34aa6731 100644 --- a/arch/nios2/include/asm/io.h +++ b/arch/nios2/include/asm/io.h @@ -25,29 +25,17 @@ #define writew_relaxed(x, addr) writew(x, addr) #define writel_relaxed(x, addr) writel(x, addr) -extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, - unsigned long cacheflag); +void __iomem *ioremap(unsigned long physaddr, unsigned long size); extern void __iounmap(void __iomem *addr); -static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) -{ - return __ioremap(physaddr, size, 0); -} - -static inline void __iomem *ioremap_nocache(unsigned long physaddr, - unsigned long size) -{ - return __ioremap(physaddr, size, 0); -} - static inline void iounmap(void __iomem *addr) { __iounmap(addr); } -#define ioremap_nocache ioremap_nocache -#define ioremap_wc ioremap_nocache -#define ioremap_wt ioremap_nocache +#define ioremap_nocache ioremap +#define ioremap_wc ioremap +#define ioremap_wt ioremap /* Pages to physical address... */ #define page_to_phys(page) virt_to_phys(page_to_virt(page)) diff --git a/arch/nios2/mm/ioremap.c b/arch/nios2/mm/ioremap.c index 3a28177a01eb..7a1a27f3daa3 100644 --- a/arch/nios2/mm/ioremap.c +++ b/arch/nios2/mm/ioremap.c @@ -112,8 +112,7 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr, /* * Map some physical address range into the kernel address space. */ -void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, - unsigned long cacheflag) +void __iomem *ioremap(unsigned long phys_addr, unsigned long size) { struct vm_struct *area; unsigned long offset; @@ -139,15 +138,6 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, return NULL; } - /* - * Map uncached objects in the low part of address space to - * CONFIG_NIOS2_IO_REGION_BASE - */ - if (IS_MAPPABLE_UNCACHEABLE(phys_addr) && - IS_MAPPABLE_UNCACHEABLE(last_addr) && - !(cacheflag & _PAGE_CACHED)) - return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr); - /* Mappings have to be page-aligned */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; @@ -158,14 +148,13 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, if (!area) return NULL; addr = area->addr; - if (remap_area_pages((unsigned long) addr, phys_addr, size, - cacheflag)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, 0)) { vunmap(addr); return NULL; } return (void __iomem *) (offset + (char *)addr); } -EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(ioremap); /* * __iounmap unmaps nearly everything, so be careful -- 2.20.1