[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3fd94bd7-ab10-4d50-bcb6-7c13a3346d6a@app.fastmail.com>
Date: Tue, 14 Mar 2023 18:19:34 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Florian Fainelli" <f.fainelli@...il.com>,
"Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
"Baoquan He" <bhe@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Linux-Arch <linux-arch@...r.kernel.org>, linux-mm@...ck.org,
"Michael Ellerman" <mpe@...erman.id.au>,
"Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Luis Chamberlain" <mcgrof@...nel.org>,
"Christoph Hellwig" <hch@...radead.org>,
"Helge Deller" <deller@....de>,
"Serge Semin" <fancer.lancer@...il.com>,
"Huacai Chen" <chenhuacai@...nel.org>,
"Jiaxun Yang" <jiaxun.yang@...goat.com>, linux-mips@...r.kernel.org
Subject: Re: [PATCH v4 2/4] mips: add <asm-generic/io.h> including
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 <linux/errno.h>
-#include <asm/mips-cps.h>
-
#ifdef CONFIG_SMP
#include <linux/cpumask.h>
Arnd
Powered by blists - more mailing lists