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 2F546C7EE30 for ; Thu, 2 Mar 2023 09:10:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjCBJKK (ORCPT ); Thu, 2 Mar 2023 04:10:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjCBJKI (ORCPT ); Thu, 2 Mar 2023 04:10:08 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B7AC144A0 for ; Thu, 2 Mar 2023 01:09:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677748167; 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=BAmp8cQXmAY8O+zkFjEu1kD8x7lwlOJ1BmEXR6luRcA=; b=AxDawPApns2lZvmjYsj/mudAIM7a3JCuZmRXJgR26ZqUxL3w83uh47W2mKBkIhxHdb5qN7 ct4BJJXajFbt7d+uB637GriKWiiHBk+pX04+5914eB0zK7Ls0Fgw1bZB34ELG1G/xybP9o 4lBIHgAuP8+2qavyDtwE21bWdwBql2o= 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-357-S7owwZrhMpm03B2s7hegTg-1; Thu, 02 Mar 2023 04:09:23 -0500 X-MC-Unique: S7owwZrhMpm03B2s7hegTg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C59DD80351F; Thu, 2 Mar 2023 09:09:22 +0000 (UTC) Received: from localhost (ovpn-12-142.pek2.redhat.com [10.72.12.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8382492B00; Thu, 2 Mar 2023 09:09:21 +0000 (UTC) Date: Thu, 2 Mar 2023 17:09:18 +0800 From: Baoquan He To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, 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 Message-ID: References: <20230301102208.148490-1-bhe@redhat.com> <20230301102208.148490-2-bhe@redhat.com> <5edd5304-ef11-4607-9189-a07613ecfee2@app.fastmail.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.10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/23 at 08:12am, Arnd Bergmann wrote: > On Thu, Mar 2, 2023, at 05:12, Baoquan He wrote: > > On 03/01/23 at 03:06pm, Arnd Bergmann wrote: > > > > Yeah, defining mmiowb() to wmb() directly is also good to me. I tried > > to comb including sequence and find where asm/io.h is included, but > > failed. Mainly asm/mmiowb.h including asm/io.h will cause below > > compiling error, the asm/io.h need see mmiowb_set_pending which is > > defnined in asm-generic/mmiowb.h. Moving asm-generic/mmiowb.h to above > > asm/io.h can also fix the compiling error. > > > > ============= > > diff --git a/arch/mips/include/asm/mmiowb.h b/arch/mips/include/asm/mmiowb.h > > index a40824e3ef8e..cae2745935bc 100644 > > --- a/arch/mips/include/asm/mmiowb.h > > +++ b/arch/mips/include/asm/mmiowb.h > > @@ -2,10 +2,8 @@ > > #ifndef _ASM_MMIOWB_H > > #define _ASM_MMIOWB_H > > > > +#include > > #include > > > > #define mmiowb() iobarrier_w() > > - > > -#include > > - > > #endif /* _ASM_MMIOWB_H */ > > According to the comment in asm-generic/mmiowb.h, the intention is > to have the mmiowb definition before the #include, though this would > only be necessary if there was an "#ifndef mmiowb" fallback in that > file. If the definition to wmb() works, I'd go for that one and > leave the include order unchanged. Ah, I didn't notice the comment. Then will change the definition to wmb(). Thanks.