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 C4490C64ED6 for ; Wed, 1 Mar 2023 09:24:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 247CE6B0071; Wed, 1 Mar 2023 04:24:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F7E56B0072; Wed, 1 Mar 2023 04:24:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C0E96B0073; Wed, 1 Mar 2023 04:24:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id F17D06B0071 for ; Wed, 1 Mar 2023 04:24:42 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 90318C150B for ; Wed, 1 Mar 2023 09:24:42 +0000 (UTC) X-FDA: 80519794404.16.091C445 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf01.hostedemail.com (Postfix) with ESMTP id 3A0D44001A for ; Wed, 1 Mar 2023 09:24:38 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="WhSm/ig2"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf01.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677662680; 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=EjLBO2oSAz1qd2pyxymW7NNpmRhL/8rZkZFuY2z88lg=; b=tnnl/JDObZJ6or9s2qQfRu4ONBPLmVHKRh9ysiyZ1q7p/j9ieXyTv+jr9swbbo8tyTkQx2 qH/TxaLTc3aGWmJte7pzA2XneArqKb1Dr/xk94Aoe0uENEbuNRW0z03hyPfuOp2xgSyw4A T6zuEqk1SYO1oht0oDzaBPupISd0leQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="WhSm/ig2"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf01.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677662680; a=rsa-sha256; cv=none; b=ZpB/mjnjssOpepLCXD8xuCi5DffthOJUeRvImd6mkZddicPKW6SeuMuvon2VNRs8VYz0Xl ghDL6+IHSruPdcURUqo+xiuabuFHXtv2HALBXjU/oITovPx5yT0WDxqflqWK7eVcu/ghLb PUyjp3sJQXd9dHcLVkD6M03KQsXXLRY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677662678; 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=EjLBO2oSAz1qd2pyxymW7NNpmRhL/8rZkZFuY2z88lg=; b=WhSm/ig2q3uWy+EUlEyW1FQVhJ2a48IcohyWlvGH7w9IvTn3KvRmJedys4Dvfey9CdB12c xRKhKKpnedVMttd9CqA3wiDbKFSWAB5XEBHXqI8o68QmtP8xNQvyBBCk3beGGhl7EoVM/N TRT4x/IUtlx5Nkqmdx8dXy6Js3ELuRg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-280-y6BwrYfuMfy1XckhSv52eQ-1; Wed, 01 Mar 2023 04:24:33 -0500 X-MC-Unique: y6BwrYfuMfy1XckhSv52eQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 41D9A85CBE0; Wed, 1 Mar 2023 09:24:32 +0000 (UTC) Received: from localhost (ovpn-13-180.pek2.redhat.com [10.72.13.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F07B52026D76; Wed, 1 Mar 2023 09:24:28 +0000 (UTC) Date: Wed, 1 Mar 2023 17:24:26 +0800 From: Baoquan He To: Matthew Wilcox , Edward Cree 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, 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, Martin Habets Subject: Re: [PATCH v5 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros Message-ID: References: <20230301034247.136007-1-bhe@redhat.com> <20230301034247.136007-2-bhe@redhat.com> <7bd6db48-ffb1-7eb1-decf-afa8be032970@gmail.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.4 X-Rspamd-Queue-Id: 3A0D44001A X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: zr9feb71u5h7qfr4czurb6fkquysyq3o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aM1hmnurbNI0qAYxFeVozKn7dCd1ko9I6dxvo932fbMTjxWraz1gWZieUrVJLAecoqou3PpXBCmA/6atY3iUezFXI+hNcAMMZWM+jIbhBXOi9l2CtyKj0z4YQAqLylqcC9a8nHLWVg4NpI4ULnO3qOmhe6fua1vx0+rsyvFD4YfQDE1oPg+EBRg792wkLb+3P09Z2+NupYjyv3/M+0E4PqqXxAq59C/KTAcyiH859aLIxSO6JcsaLPkB/Ul/tPttI2cZn6mLcLpwNbSKbV2Q/Aw== 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: On 03/01/23 at 05:11am, Matthew Wilcox wrote: > On Wed, Mar 01, 2023 at 04:38:10AM +0000, Edward Cree wrote: > > On 01/03/2023 03:42, Baoquan He wrote: > > > 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 > > > > So I don't know how valid what we're doing here is... > > Well, x86 defines ARCH_HAS_IOREMAP_WC unconditionally, so it doesn't > affect you ... but you raise a good question about how a driver can > determine if it's actually getting WC memory. Yeah, this change doesn't affect sfc. Because ARCH_HAS_IOREMAP_WC is used to make ioremap_wc defined in override the default one in , this patch has made code have the same effect. Besides, I have a question still in my mind. Surely this is unrelated to this patch. In commit 38d9029a652c (parisc: Define ioremap_uc and ioremap_wc), ioremap_wc definition was added in arch/parisc/include/asm/io.h, and it didn't add ARCH_HAS_IOREMAP_WC definition. However, it won't cause redefinition of ioremap_wc, even though there's "#include " at below. I could be dizzy on these io.h and iomap.h. When I added ioremap_wt and ioremap_np to debug, ioremap_np will cause redefinition, while ioremap_wt woundn't. Does anyone know what I am missing? diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index c05e781be2f5..20d566eec3b3 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -127,6 +127,8 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr) */ void __iomem *ioremap(unsigned long offset, unsigned long size); #define ioremap_wc ioremap +#define ioremap_wt ioremap +#define ioremap_np ioremap #define ioremap_uc ioremap #define pci_iounmap pci_iounmap