All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mm@kvack.org, arnd@arndb.de, mpe@ellerman.id.au,
	geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org,
	Helge Deller <deller@gmx.de>,
	Serge Semin <fancer.lancer@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-mips@vger.kernel.org
Subject: Re: [PATCH v4 2/4] mips: add <asm-generic/io.h> including
Date: Tue, 14 Mar 2023 10:56:36 +0800	[thread overview]
Message-ID: <ZA/iZHEHaQ2WR+HL@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20230313175521.GA14404@alpha.franken.de>

On 03/13/23 at 06:55pm, Thomas Bogendoerfer wrote:
......
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:111:2: error: implicit declaration of function ‘LOCK_CONTENDED’ [-Werror=implicit-function-declaration]
>   LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
>   ^~~~~~~~~~~~~~
>   GEN     Makefile
>   Checking missing-syscalls for N32
>   CALL    /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh
>   Checking missing-syscalls for O32
>   CALL    /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh
>   CALL    /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh
>   CC      init/version.o
> 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:
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h: In function ‘__raw_spin_trylock’:
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function ‘spin_acquire’ [-Werror=implicit-function-declaration]
>    spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
>    ^~~~~~~~~~~~
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:90:21: error: ‘raw_spinlock_t {aka struct raw_spinlock}’ has no member named ‘dep_map’
>    spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
>                      ^~
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h: In function ‘__raw_spin_lock_irqsave’:
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:110:20: error: ‘raw_spinlock_t {aka struct raw_spinlock}’ has no member named ‘dep_map’
>   spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
>                     ^~
> /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:111:2: error: implicit declaration of function ‘LOCK_CONTENDED’ [-Werror=implicit-function-declaration]
>   LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
>   ^~~~~~~~~~~~~~
> [...]
> 
> I've cut the compiler output. Removing the asm-generic doesn't show this
> problem, but so far I fail to see the reason...

Thanks for trying this.

Do you have the kernel config file, I can try to reproduce on my local
machine. And by the way, it could be fixed with below patch, not very
sure. Earlier, Arnd suggested this to fix a similar case.


From b3310e58c063b695ba7ab3966c57269f57f16585 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Tue, 14 Mar 2023 08:53:15 +0800
Subject: [PATCH] mips: use wmb() instead to replace iobarrier_w()
Content-type: text/plain

Otherwise nested including of asm/io.h and asm/mmiowb.h will cause
compiling error.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 arch/mips/include/asm/mmiowb.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/mmiowb.h b/arch/mips/include/asm/mmiowb.h
index a40824e3ef8e..dd206792abed 100644
--- a/arch/mips/include/asm/mmiowb.h
+++ b/arch/mips/include/asm/mmiowb.h
@@ -2,9 +2,7 @@
 #ifndef _ASM_MMIOWB_H
 #define _ASM_MMIOWB_H
 
-#include <asm/io.h>
-
-#define mmiowb()	iobarrier_w()
+#define mmiowb()	wmb()
 
 #include <asm-generic/mmiowb.h>
 
-- 
2.34.1


  reply	other threads:[~2023-03-14  2:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 13:07 [PATCH v4 0/4] arch/*/io.h: remove ioremap_uc in some architectures Baoquan He
2023-03-08 13:07 ` [PATCH v4 1/4] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Baoquan He
2023-03-08 13:07   ` Baoquan He
2023-03-08 20:01   ` Luis Chamberlain
2023-03-08 20:01     ` Luis Chamberlain
2023-03-08 21:34     ` Arnd Bergmann
2023-03-08 21:34       ` Arnd Bergmann
2023-03-08 21:49       ` Helge Deller
2023-03-08 21:49         ` Helge Deller
2023-03-08 22:48     ` Ondrej Zary
2023-03-08 22:48       ` Ondrej Zary
2023-03-08 13:07 ` [PATCH v4 2/4] mips: add <asm-generic/io.h> including Baoquan He
2023-03-13 17:55   ` Thomas Bogendoerfer
2023-03-14  2:56     ` Baoquan He [this message]
2023-03-14 15:34       ` Thomas Bogendoerfer
2023-03-14 16:31         ` Florian Fainelli
2023-03-14 17:19           ` Arnd Bergmann
2023-03-15  0:49             ` Baoquan He
2023-03-15 12:52               ` Thomas Bogendoerfer
2023-03-08 13:07 ` [PATCH v4 3/4] arch/*/io.h: remove ioremap_uc in some architectures Baoquan He
2023-03-08 13:07   ` Baoquan He
2023-03-09 14:36   ` Thomas Bogendoerfer
2023-03-09 14:36     ` Thomas Bogendoerfer
2023-03-10  1:45     ` Baoquan He
2023-03-10  1:45       ` Baoquan He
2023-03-10 21:14       ` Helge Deller
2023-03-10 21:14         ` Helge Deller
2023-03-09 22:54   ` Michael Ellerman
2023-03-09 22:54     ` Michael Ellerman
2023-03-08 13:07 ` [PATCH v4 4/4] mips: io: remove duplicated codes Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZA/iZHEHaQ2WR+HL@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=deller@gmx.de \
    --cc=f.fainelli@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.