Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp643802rwd; Tue, 16 May 2023 06:09:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4poF/7ZL0EGWsm1VhiH1LTmcFeaa+lfcBh6Yo+zkN591qBkeTG/4AwInsz4cJfmNbdIF0l X-Received: by 2002:a17:903:230e:b0:1a6:8031:59e7 with SMTP id d14-20020a170903230e00b001a6803159e7mr47884075plh.46.1684242557506; Tue, 16 May 2023 06:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684242557; cv=none; d=google.com; s=arc-20160816; b=mQ8VwTjA5QGF62A/eNw4W8F3gVHswxjj1nor67S1ByF2eHjp31adX4MSPfbkkPnKTV TOYX4bLEQ8bP6gv2bunlz+ho37J3lqWiP6nScOpt3Vqb40EWZtGnXVRd9+kYModjEtRr r8OKeLq1n1PsJQLP0x8YGwPO0Hly0ZUhM5pkv21hcDzd4iejVqd1P1cnkAwBSscmT4se pq4tTQCK29B/zIZA8NN/aFHIBCnbrkJSR7G4SUbRnk09Lo+Seoc1Yw+Yt1sHBWuBTwL5 bEE82L+ifF53NdeidBNQbv1j+zX0gFAsvrAOkNGs2Jpy7GpS4AOoc45poZi/lk0B4lPa OC4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dmTy7RERLTTlHMDvbmWoaYSTmqTCStLXSnB9hgIg4f0=; b=g8BTdQ2+xzTsrE+TFm7H77jfkkc2YnfBZsPXhSu9vndEZQMZg0xxzDpCg0qC7K/Iv5 5DFDOUrX6b/Rkctc5P76hkGAIWcE4prtVIsv77rjwbsGYqXefssg4trJ27hLdY1rHiMK YN/2Oxvj2Cf7guiJDnWjmpAVEn4ZpujqPlTVVcNe/4km0Y/UpTW8fixHbGitgjXPIWZW mGfRCY4SrBwGJK37rnh/TyU4uafKuZuEZSUONYXceDyIxAalxGo8jTkL9cSD1td7/rKi vy6mgMIXH0dMEafZLghL/9RX7734+vnqdJvjnJA/DXMtxBQhHfMiN+TqTd1y4YoPV4Rw kUvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BYDN4fKx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a170902eccd00b001ac5896c746si19802437plh.329.2023.05.16.06.09.01; Tue, 16 May 2023 06:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BYDN4fKx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233322AbjEPM40 (ORCPT + 99 others); Tue, 16 May 2023 08:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233244AbjEPM4O (ORCPT ); Tue, 16 May 2023 08:56:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B742691 for ; Tue, 16 May 2023 05:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684241691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dmTy7RERLTTlHMDvbmWoaYSTmqTCStLXSnB9hgIg4f0=; b=BYDN4fKx2dQpO8j11g36uxkfu9q4E/eJYeYljtqwnLDwLzlpzCgFqyuVZR6o2ipyiydFjH Xygqwf5t6gAaiy8/1yES/fJU4OB5SwLK7drgFQh+g1Nk1BzRrB+SJSbCZaF7NoC32hzO9X 040J02LIPN47kyVwFKZ+ULFe+hmxzNg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-z_NlnuGROBOnKL3k1Ydrsw-1; Tue, 16 May 2023 08:54:47 -0400 X-MC-Unique: z_NlnuGROBOnKL3k1Ydrsw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C8652808E75; Tue, 16 May 2023 12:54:46 +0000 (UTC) Received: from localhost (ovpn-12-79.pek2.redhat.com [10.72.12.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA0EDC15BA0; Tue, 16 May 2023 12:54:44 +0000 (UTC) Date: Tue, 16 May 2023 20:54:41 +0800 From: Baoquan He To: Mike Rapoport 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: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/16/23 at 09:15am, Mike Rapoport wrote: > 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. Right, will remove this, thanks a lot for careful reviewing. > > > 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. >