From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1A5AC77B75 for ; Tue, 16 May 2023 06:16:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3519E900003; Tue, 16 May 2023 02:16:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 300E4900002; Tue, 16 May 2023 02:16:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CAB7900003; Tue, 16 May 2023 02:16:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0F7AE900002 for ; Tue, 16 May 2023 02:16:05 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D668F121412 for ; Tue, 16 May 2023 06:16:04 +0000 (UTC) X-FDA: 80795107848.08.10A7020 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id 27F711C000B for ; Tue, 16 May 2023 06:16:01 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HUdGEoKr; spf=pass (imf18.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684217762; a=rsa-sha256; cv=none; b=iPsy6pHsSzBcCjxjWU2OFnKlJyLXBMcNi8/R2gxWmIM4Zsb2Yu5dB/4YuUx7KwOtLxSB0o ulUs/CTm3C9c1xwRCCdlDIXg6oKgezNgHmz5FzuOoUztKsH3SxV9RNPU+W3gr0ncuOMbE0 lk2XM+KDt/IaWNwRt9Ks62/zu4S7/dg= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HUdGEoKr; spf=pass (imf18.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684217762; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=dPMg9Cq2QrbdZQfo/+AXvVyEd+nxeM+WxmaNx48zJe8=; b=lLQ72FAO5mQN3jrfRkC2gRRyIQfMOjKOl0UFk+OpbnMnb6pSS1oHUbewcFUjuubJEmj4dM zDIWhZ6QeoWbTXa4T/cB3rWTg8+RlWxJQ1FRHCuVYF5KWGP16GAuE6w3j0vbneg/7zAfcB p5rD7sQpY8hOo2WeSgi3TwMB/+QgbV4= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 027D06347D; Tue, 16 May 2023 06:16:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 907F1C433D2; Tue, 16 May 2023 06:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684217760; bh=JSKxIFbAGqeUfrEyWSCXAbIJPXLuLup+2ppnOocd+Xk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HUdGEoKrHYqdQV9SKzKvV4HYtCsB6X2tL91pPrPLU7aNWXYb1cOIHv9LSMrHFD7CI 0UTMXTpKUNkE9khoCtx9RUXA27WX/8zAAqq3qWqx7wkmbqiEDA9g8zX2B9xH3F+edr xWXEJ+1QmffpOMNcS1tYLp1lC2jqrVqLE/mM56vjQpDQB5I22BUv18GXFSNkei6e/5 Lnopwl4GmIA1AWbZ9ApJSlye00mdX/GHqSbo/wMwd+5PuEF2+6V9I/luIZwajeiQqi HijxI+kept+Q4t/F6SqagBMmOxLf1/y5W+58LQldnVuOyrQH6/M5/nNwJ5xypS1sOp Ez80gpOsB3pew== Date: Tue, 16 May 2023 09:15:51 +0300 From: Mike Rapoport To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, christophe.leroy@csgroup.eu, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David.Laight@aculab.com, shorne@gmail.com, willy@infradead.org, deller@gmx.de, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v5 RESEND 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros Message-ID: References: <20230515090848.833045-1-bhe@redhat.com> <20230515090848.833045-2-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515090848.833045-2-bhe@redhat.com> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 27F711C000B X-Stat-Signature: hr4go68bw5ayj73ax8ccwn834fkrge1m X-HE-Tag: 1684217761-760362 X-HE-Meta: U2FsdGVkX185XjlQKgbfdzCJXQfcJwe11g3blp1xrFR3q39KPhMI/xGBPnMRCEajRV2JCe7GNd5TKzfC6EZz8oWcStQD5l4o+hz6q/Dtw4qHjG26NsoCrZ4lhn2dm11Jk7v+l9N6oFW7h6Fmvs6oMmvzybhLxxVmqR78C03Nrj427jRe/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tslcWesrxdTBxlDHD9LMUaVFheN1oW+tq5RQVKTWVkiZLyXuaGZU0m7ojju1VqVGAECnGdjj/C7hVybxA5VUvHyeaiRxXiMs2ZufEhUL5yAZurj63hwaJSXmYy4sdK91pb/fr/P/OSr0Jn3f1GDr0qQLwCaLoFv6RmoSNl4I61jLhaBh/BiuDoviktyvznlm2Ae2vqPfPN392UMG81et4X6vfe/gSfbdDVH4Ni3kIVTZK1hTt2iGugLVgD1iV4Hg+XjFE+rmFixykoN988oVW0jz/Jhcods2fmIKC8eS/reZ0931XZ7D+k1D5oCmBKLOxLF1LicKmNE4gPr7kMXHUiqRg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, On Mon, May 15, 2023 at 05:08:32PM +0800, Baoquan He wrote: > Let's use '#define ioremap_xx' and "#ifdef ioremap_xx" instead. > > For each architecture to remove defined ARCH_HAS_IOREMAP_xx macros in This sentence seems to be stale. > To remove defined ARCH_HAS_IOREMAP_xx macros in of each ARCH, > the ARCH's own ioremap_wc|wt|np definition need be above > "#include . Otherwise the redefinition error would > be seen during compiling. So the relevant adjustments are made to avoid > compiling error: > > loongarch: > - doesn't include , defining ARCH_HAS_IOREMAP_WC > is redundant, so simply remove it. > > m68k: > - selected GENERIC_IOMAP, has been added in > , and is included above > , so simply remove ARCH_HAS_IOREMAP_WT defining. > > mips: > - move "#include " below ioremap_wc definition > in > > powerpc: > - remove "#include " in because it's > duplicated with the one in , let's rely on the > latter. > > x86: > - selected GENERIC_IOMAP, remove #include in > the middle of . Let's rely on . > > Signed-off-by: Baoquan He > Cc: loongarch@lists.linux.dev > Cc: linux-m68k@lists.linux-m68k.org > Cc: linux-mips@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: x86@kernel.org > Cc: netdev@vger.kernel.org > Cc: linux-arch@vger.kernel.org Reviewed-by: Mike Rapoport (IBM) > --- > arch/loongarch/include/asm/io.h | 2 -- > arch/m68k/include/asm/io_mm.h | 2 -- > arch/m68k/include/asm/kmap.h | 2 -- > arch/mips/include/asm/io.h | 5 ++--- > arch/powerpc/include/asm/io.h | 9 +-------- > arch/x86/include/asm/io.h | 5 ----- > drivers/net/ethernet/sfc/io.h | 2 +- > drivers/net/ethernet/sfc/siena/io.h | 2 +- > include/asm-generic/iomap.h | 6 +++--- > 9 files changed, 8 insertions(+), 27 deletions(-) > > diff --git a/arch/loongarch/include/asm/io.h b/arch/loongarch/include/asm/io.h > index 545e2708fbf7..5fef1246c6fb 100644 > --- a/arch/loongarch/include/asm/io.h > +++ b/arch/loongarch/include/asm/io.h > @@ -5,8 +5,6 @@ > #ifndef _ASM_IO_H > #define _ASM_IO_H > > -#define ARCH_HAS_IOREMAP_WC > - > #include > #include > > diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h > index d41fa488453b..6a0abd4846c6 100644 > --- a/arch/m68k/include/asm/io_mm.h > +++ b/arch/m68k/include/asm/io_mm.h > @@ -26,8 +26,6 @@ > #include > #include > > -#include > - > #ifdef CONFIG_ATARI > #define atari_readb raw_inb > #define atari_writeb raw_outb > diff --git a/arch/m68k/include/asm/kmap.h b/arch/m68k/include/asm/kmap.h > index dec05743d426..4efb3efa593a 100644 > --- a/arch/m68k/include/asm/kmap.h > +++ b/arch/m68k/include/asm/kmap.h > @@ -4,8 +4,6 @@ > > #ifdef CONFIG_MMU > > -#define ARCH_HAS_IOREMAP_WT > - > /* Values for nocacheflag and cmode */ > #define IOMAP_FULL_CACHING 0 > #define IOMAP_NOCACHE_SER 1 > diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h > index cc28d207a061..477773328a06 100644 > --- a/arch/mips/include/asm/io.h > +++ b/arch/mips/include/asm/io.h > @@ -12,8 +12,6 @@ > #ifndef _ASM_IO_H > #define _ASM_IO_H > > -#define ARCH_HAS_IOREMAP_WC > - > #include > #include > #include > @@ -25,7 +23,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -210,6 +207,8 @@ void iounmap(const volatile void __iomem *addr); > #define ioremap_wc(offset, size) \ > ioremap_prot((offset), (size), boot_cpu_data.writecombine) > > +#include > + > #if defined(CONFIG_CPU_CAVIUM_OCTEON) > #define war_io_reorder_wmb() wmb() > #else > diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h > index f1e657c9bbe8..67a3fb6de498 100644 > --- a/arch/powerpc/include/asm/io.h > +++ b/arch/powerpc/include/asm/io.h > @@ -3,11 +3,6 @@ > #define _ASM_POWERPC_IO_H > #ifdef __KERNEL__ > > -#define ARCH_HAS_IOREMAP_WC > -#ifdef CONFIG_PPC32 > -#define ARCH_HAS_IOREMAP_WT > -#endif > - > /* > */ > > @@ -732,9 +727,7 @@ static inline void name at \ > #define writel_relaxed(v, addr) writel(v, addr) > #define writeq_relaxed(v, addr) writeq(v, addr) > > -#ifdef CONFIG_GENERIC_IOMAP > -#include > -#else > +#ifndef CONFIG_GENERIC_IOMAP > /* > * Here comes the implementation of the IOMAP interfaces. > */ > diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h > index e9025640f634..76238842406a 100644 > --- a/arch/x86/include/asm/io.h > +++ b/arch/x86/include/asm/io.h > @@ -35,9 +35,6 @@ > * - Arnaldo Carvalho de Melo > */ > > -#define ARCH_HAS_IOREMAP_WC > -#define ARCH_HAS_IOREMAP_WT > - > #include > #include > #include > @@ -212,8 +209,6 @@ void memset_io(volatile void __iomem *, int, size_t); > #define memcpy_toio memcpy_toio > #define memset_io memset_io > > -#include > - > /* > * ISA space is 'always mapped' on a typical x86 system, no need to > * explicitly ioremap() it. The fact that the ISA IO space is mapped > diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h > index 30439cc83a89..07f99ad14bf3 100644 > --- a/drivers/net/ethernet/sfc/io.h > +++ b/drivers/net/ethernet/sfc/io.h > @@ -70,7 +70,7 @@ > */ > #ifdef CONFIG_X86_64 > /* PIO is a win only if write-combining is possible */ > -#ifdef ARCH_HAS_IOREMAP_WC > +#ifdef ioremap_wc > #define EFX_USE_PIO 1 > #endif > #endif > diff --git a/drivers/net/ethernet/sfc/siena/io.h b/drivers/net/ethernet/sfc/siena/io.h > index 30439cc83a89..07f99ad14bf3 100644 > --- a/drivers/net/ethernet/sfc/siena/io.h > +++ b/drivers/net/ethernet/sfc/siena/io.h > @@ -70,7 +70,7 @@ > */ > #ifdef CONFIG_X86_64 > /* PIO is a win only if write-combining is possible */ > -#ifdef ARCH_HAS_IOREMAP_WC > +#ifdef ioremap_wc > #define EFX_USE_PIO 1 > #endif > #endif > diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h > index 08237ae8b840..196087a8126e 100644 > --- a/include/asm-generic/iomap.h > +++ b/include/asm-generic/iomap.h > @@ -93,15 +93,15 @@ extern void __iomem *ioport_map(unsigned long port, unsigned int nr); > extern void ioport_unmap(void __iomem *); > #endif > > -#ifndef ARCH_HAS_IOREMAP_WC > +#ifndef ioremap_wc > #define ioremap_wc ioremap > #endif > > -#ifndef ARCH_HAS_IOREMAP_WT > +#ifndef ioremap_wt > #define ioremap_wt ioremap > #endif > > -#ifndef ARCH_HAS_IOREMAP_NP > +#ifndef ioremap_np > /* See the comment in asm-generic/io.h about ioremap_np(). */ > #define ioremap_np ioremap_np > static inline void __iomem *ioremap_np(phys_addr_t offset, size_t size) > -- > 2.34.1 > > -- Sincerely yours, Mike.