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 7AAC0C6FD1D for ; Wed, 15 Mar 2023 00:50:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA5856B0071; Tue, 14 Mar 2023 20:50:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C551B6B0072; Tue, 14 Mar 2023 20:50:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1EBC8E0001; Tue, 14 Mar 2023 20:50:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A28426B0071 for ; Tue, 14 Mar 2023 20:50:12 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 716ADAB0E4 for ; Wed, 15 Mar 2023 00:50:12 +0000 (UTC) X-FDA: 80569301064.28.6257BE3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 3F4F840006 for ; Wed, 15 Mar 2023 00:50:10 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EYgO3M4K; spf=pass (imf17.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1678841410; 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=H+V2OenhBTZO+D4X2yTvwE20arRuy3dfWbSmOimZmE0=; b=h/ioUcpRRZw4ZIXTjniw0gw/IFl0MgNdTmVmdzeT7M1F49lq0N6F98D0PcQabP+Dk5IE60 v7I7qPvsh1xvHpxasalrKmF8zN2ssxLbuy25fRshsfY5HzWrypUvxA18L5cuClqMXXeMMN q3acCh7nJDQYfDhEm6Ia4wNuwaTQm/U= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EYgO3M4K; spf=pass (imf17.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1678841410; a=rsa-sha256; cv=none; b=gaFrgMXoZvQ25JG9Y08CFH7WOTyOgtdWwfqpd0OH9CFlCCEVhNGNO2sVvamE3v5CG55wkC df6FrywEJpqZ5MktHfAH/IDFOyKQv/ISOJNkhGxWkMbHNS/bk+L35qr+ZGuUroz9IpeASz sI6aHGEQAIgLL34IQ0p/Xyh1wMl0J/M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678841409; 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=H+V2OenhBTZO+D4X2yTvwE20arRuy3dfWbSmOimZmE0=; b=EYgO3M4Kdvg6I7qgDVk3DIo5d7HqzD2M5hPirCfbQQMzukh7//V1KZHCcrGrWsin0+p06d ntOe+2Yb/c6VhkpII4o4aZayXfsA7FOS7vd90Vj31FqcMMJr0MNGaIlhffaDWbDeh9nppY fijJtXfq+awi73mBCvuXX1PhZEoG2vQ= 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-221-lAQsurbtNuCcZXpZ9h2LkQ-1; Tue, 14 Mar 2023 20:50:06 -0400 X-MC-Unique: lAQsurbtNuCcZXpZ9h2LkQ-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 151B3857A87; Wed, 15 Mar 2023 00:50:05 +0000 (UTC) Received: from localhost (ovpn-12-81.pek2.redhat.com [10.72.12.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19BE0400F52; Wed, 15 Mar 2023 00:49:57 +0000 (UTC) Date: Wed, 15 Mar 2023 08:49:53 +0800 From: Baoquan He To: Arnd Bergmann Cc: Florian Fainelli , Thomas Bogendoerfer , linux-kernel@vger.kernel.org, Linux-Arch , linux-mm@kvack.org, Michael Ellerman , Geert Uytterhoeven , Luis Chamberlain , Christoph Hellwig , Helge Deller , Serge Semin , Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org Subject: Re: [PATCH v4 2/4] mips: add including Message-ID: References: <20230308130710.368085-1-bhe@redhat.com> <20230308130710.368085-3-bhe@redhat.com> <20230313175521.GA14404@alpha.franken.de> <20230314153421.GA13322@alpha.franken.de> <7f39daad-05b0-46f8-bc89-185b336d8fd4@gmail.com> <3fd94bd7-ab10-4d50-bcb6-7c13a3346d6a@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3fd94bd7-ab10-4d50-bcb6-7c13a3346d6a@app.fastmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3F4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FBtpPu4Xge0vT7Baa3SCXdaAoKjEdHjORx0tHL/PTB8UUP0+CyO30Jv5ou01EuoY+dDogbwIlXiAk4mzSYKD+UPqIm2Uf1qMIH/J8QLdB1JSAjKKlWrnThNRCDYSw+U8hYrbvFoPxun0sHxM14mh2PIfMCWOtNyi0cdK30WLdssWfiHHpAyGmX1XdG53XQHe+bllrXabtEZRsgZaXa6rl6ZnlMoGOwzoSyLQHiLeMBiDiOkOFXubNrYAsPQtWfsXhSXR9QOntNeDPiuVV3TbPY2s 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/14/23 at 06:19pm, Arnd Bergmann wrote: > On Tue, Mar 14, 2023, at 17:31, Florian Fainelli wrote: > > On 3/14/23 08:34, Thomas Bogendoerfer wrote: > >> On Tue, Mar 14, 2023 at 10:56:36AM +0800, Baoquan He wrote: > >>>> In file included from /local/tbogendoerfer/korg/linux/include/linux/spinlock.h:311:0, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/vmalloc.h:5, > >>>> from /local/tbogendoerfer/korg/linux/include/asm-generic/io.h:994, > >>>> from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/io.h:618, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/io.h:13, > >>>> from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/mips-cps.h:11, > >>>> from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/smp-ops.h:16, > >>>> from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/smp.h:21, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/smp.h:113, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/lockdep.h:14, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/rcupdate.h:29, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/rculist.h:11, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/pid.h:5, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/sched.h:14, > >>>> from /local/tbogendoerfer/korg/linux/include/linux/utsname.h:6, > >>>> from /local/tbogendoerfer/korg/linux/init/version.c:17: > >> > >> already tried it, but it doesn't fix the issue. I've attached the > >> config. > > > > I had attempted a similar approach before as Baoquan did, but met the > > same build issue as Thomas that was not immediately clear to me why it > > popped up. I would be curious to see how this can be resolved. > > I think this is the result of recursive header inclusion: > spinlock.h includes lockdep.h, but its header guard is already > there from the include chain. > > There is probably something in one of the mips asm/*.h headers that > causes this recursion that is not present elsewhere. > > I think this should fix it, but is likely to cause another problem elsewhere: > > --- a/arch/mips/include/asm/smp-ops.h > +++ b/arch/mips/include/asm/smp-ops.h > @@ -13,8 +13,6 @@ > > #include > > -#include > - > #ifdef CONFIG_SMP > > #include Will meet below compiling error after appllying above patch. Adding asm/mips-cps.h including in arch/mips/kernel/setup.c will fix it as below. arch/mips/kernel/setup.c: In function ‘setup_arch’: arch/mips/kernel/setup.c:781:9: error: implicit declaration of function ‘mips_cm_probe’ [-Werror=implicit-function-declaration] 781 | mips_cm_probe(); | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f1c88f8a1dc5..e8c4020ef367 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef CONFIG_MIPS_ELF_APPENDED_DTB char __section(".appended_dtb") __appended_dtb[0x100000];