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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92E2AC7EE32 for ; Wed, 1 Mar 2023 14:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjCAOHX (ORCPT ); Wed, 1 Mar 2023 09:07:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjCAOHV (ORCPT ); Wed, 1 Mar 2023 09:07:21 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34672A6F3; Wed, 1 Mar 2023 06:07:20 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 52EA25C00E2; Wed, 1 Mar 2023 09:07:19 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 01 Mar 2023 09:07:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1677679639; x=1677766039; bh=5m3HfYKwmw BaOjWZWUy6qvDlncIvme0bGcT9RvLhnCs=; b=NY6zRLj9LNQXp1PiMPVL+Sr2oM 7BYgON/qWAtNrM7M8WK2lJjFXaTtPW4TtKYCcqbe47p//ahHMaHQLwWFuIFATzjk KeqqWMXthvgK6HbJf2swGC57Xh3eXlECzJiL0gb5jDESuRLq6HNxOCT1146Xgx55 ijgcnmQaLTV3bBWWFboOhI4iAcpadeSB6l4B3KOZMqN+I+1aMsLrcmMZq3WgDZCb v1+MXnjnnCKnOUAmqlHIHwnIHo18eTxn17OueOcnYbiy0ISVe2dEvnICjwgTDT0y ix2Ubj7mtVdljq1Qt9nDwyFDEBOLeZ58cjofqrckolUcunsiEIuE2k7lbWiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1677679639; x=1677766039; bh=5m3HfYKwmwBaOjWZWUy6qvDlncIv me0bGcT9RvLhnCs=; b=PAmVBsQn04eoXV7tafopSDqW1GPJUefcqlmXK9zwvsJo uuXz52sQwkE8j/aIiAR8OtC3BOTi2V1EhCRZqi9sw5Tl5ruA+b0iI4ip2AXvLh3C oh/shkGAA8TP3P3irDX9SBcugi1Q6yYpnUw4EkBrQRAkOCCPnnIP9iR23uFGqXAw q6wNgyzecjaVQSGPlMDd9d+hJAF2SOiWmXB0HS7hG+/vchOIuyAiu67MO/E1fZcj AS7BdrOkWre003ihJhlHjCarbJEfKLuJm6mBas3w0m7mnJjqCso8FGoYTqVgDoIT NpakBSvosoXDk/GmDa9DaQokJmngemfbheJzVwvIDw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudelhedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 75B41B60089; Wed, 1 Mar 2023 09:07:18 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-183-gbf7d00f500-fm-20230220.001-gbf7d00f5 Mime-Version: 1.0 Message-Id: <5edd5304-ef11-4607-9189-a07613ecfee2@app.fastmail.com> In-Reply-To: <20230301102208.148490-2-bhe@redhat.com> References: <20230301102208.148490-1-bhe@redhat.com> <20230301102208.148490-2-bhe@redhat.com> Date: Wed, 01 Mar 2023 15:06:57 +0100 From: "Arnd Bergmann" To: "Baoquan He" , linux-kernel@vger.kernel.org Cc: Linux-Arch , linux-mm@kvack.org, "Geert Uytterhoeven" , "Christoph Hellwig" , "Luis Chamberlain" , "Thomas Bogendoerfer" , "Huacai Chen" , "Jiaxun Yang" , linux-mips@vger.kernel.org Subject: Re: [PATCH v2 1/2] mips: add including Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 1, 2023, at 11:22, Baoquan He wrote: > With the adding, some default ioremap_xx methods defined in > asm-generic/io.h can be used. E.g the default ioremap_uc() returning > NULL. > > Here, remove the including in asm/mmiowb.h, otherwise nested > including will cause compiling error. > > Signed-off-by: Baoquan He > Cc: Thomas Bogendoerfer > Cc: Huacai Chen > Cc: Jiaxun Yang > Cc: linux-mips@vger.kernel.org This looks good to me, Reviewed-by: Arnd Bergmann but it obviously needs to be properly reviewed by the MIPS maintainers as well. I think others have tried to do this in the past but did not make it in. > @@ -548,6 +552,46 @@ extern void (*_dma_cache_inv)(unsigned long start, > unsigned long size); > #define csr_out32(v, a) (*(volatile u32 *)((unsigned long)(a) + > __CSR_32_ADJUST) = (v)) > #define csr_in32(a) (*(volatile u32 *)((unsigned long)(a) + > __CSR_32_ADJUST)) > > + > +#define inb_p inb_p > +#define inw_p inw_p > +#define inl_p inl_p > +#define insb insb > +#define insw insw > +#define insl insl I would prefer to put the #defines next to the function declarations, even when they come from macros. > > -#include > - > #define mmiowb() iobarrier_w() > I think this only works as long as asm/spinlock.h also includes asm/io.h, otherwise linux/spinlock.h will be missing the iobarrier_w definition. Most likely this is implicitly included from somewhere else below linux/spinlock.h, but it would be better not to rely on that, and instead define mmiowb() to wmb() directly. Arnd