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 6F97AC64EC4 for ; Fri, 3 Mar 2023 09:13:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF4396B007B; Fri, 3 Mar 2023 04:13:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA3FC6B007D; Fri, 3 Mar 2023 04:13:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D45836B007E; Fri, 3 Mar 2023 04:13:23 -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 C2EFE6B007B for ; Fri, 3 Mar 2023 04:13:23 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A75D8405A7 for ; Fri, 3 Mar 2023 09:13:23 +0000 (UTC) X-FDA: 80527023486.08.55B747F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id CD98340017 for ; Fri, 3 Mar 2023 09:13:21 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=V53BOkK2; spf=pass (imf27.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677834801; a=rsa-sha256; cv=none; b=DsX8x8v2ZVF5EBm3Nx0IXT6FwP60A/jDluDPtRdAoaWYBMrYN1gK7PvZNFNfjgy4UscqXl NgEEGI1+gh0ezGY2i14dKIhrodFioD0L7N1wABQAN8Ru/T9zW7Whx0S9JlOZ9ANFhIH5ki TbX9WdfiVVH86GosAD1p0UcPSnGNvOc= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=V53BOkK2; spf=pass (imf27.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677834801; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qkqklC5AeYT4qdgTWNNx2hQvOWihhGqU0jJXIqFqlS0=; b=JQYQ0miphJDMHQCi23jtjV+Yov9xpEfflKag8pJDmhqi91yy2hWjW6wOIthJpmqPVWXhvO OkGZdcganLOM05PuSat/IDlfLVDSThHqo78K6IFFOp2ABdODrIkm0pswnxLECj70wpOJ93 mt+uCvlUYCcxMtxJ2AJ0kUlG56egu1k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677834800; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qkqklC5AeYT4qdgTWNNx2hQvOWihhGqU0jJXIqFqlS0=; b=V53BOkK2Qtb+ktTVmDxXUiEn3RLwW6PzdQ4ZwQwTkrkd0Xbm9gTJSx7LZts3mnxm4EFMpn 4wqCt/IMlJX89YgC32lEUFVJY/HvV4nsrcPo2UBNvu61G4jf8RfZWthtD6wQbMJlfm1922 vqZVAB2R38PLvtNTGqdCtbma9dBuOtI= 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-76-EJzhNn_ZP7yE2cz9Z08MrQ-1; Fri, 03 Mar 2023 04:13:17 -0500 X-MC-Unique: EJzhNn_ZP7yE2cz9Z08MrQ-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 E12D185A5A3; Fri, 3 Mar 2023 09:13:16 +0000 (UTC) Received: from localhost (ovpn-13-150.pek2.redhat.com [10.72.13.150]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B380D492B00; Fri, 3 Mar 2023 09:13:15 +0000 (UTC) Date: Fri, 3 Mar 2023 17:13:06 +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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspam-User: X-Rspamd-Queue-Id: CD98340017 X-Rspamd-Server: rspam01 X-Stat-Signature: e3awor5yj7zcq9p9ktxk898bi4jdxfz5 X-HE-Tag: 1677834801-553495 X-HE-Meta: U2FsdGVkX18XdAZJFVQGVlpLsGtr9ET4bOuHDaR43nfze0KC2xHIGySauy8L0YfQavxlQORolnzpJKEpMMSPm4iR+egp2u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sqJakLy6Ym9Nick9365Jf7nqFPtEmzsViE9huL+sw== 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/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. I didn't add definition of outb(), so it caused the compiling error at below. Adding it can fix that. I will leave the asm/mmiowb.h as is since no issue now. In file included from ./arch/mips/include/asm/io.h:611, from ./arch/mips/include/asm/mmiowb.h:5, from ./include/linux/spinlock.h:65, from ./include/linux/ipc.h:5, from ./include/uapi/linux/sem.h:5, from ./include/linux/sem.h:5, from ./include/linux/compat.h:14, from arch/mips/kernel/asm-offsets.c:12: ./include/asm-generic/io.h: In function ‘_outb’: ./include/asm-generic/io.h:46:24: error: implicit declaration of function ‘mmiowb_set_pending’ [-Werror=implicit-function-declaration] 46 | #define __io_aw() mmiowb_set_pending() | ^~~~~~~~~~~~~~~~~~ ./include/asm-generic/io.h:54:24: note: in expansion of macro ‘__io_aw’ 54 | #define __io_paw() __io_aw() | ^~~~~~~ ./include/asm-generic/io.h:585:9: note: in expansion of macro ‘__io_paw’ 585 | __io_paw(); | ^~~~~~~~