From: Baoquan He <bhe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-mm@kvack.org, Geert Uytterhoeven <geert@linux-m68k.org>,
Christoph Hellwig <hch@infradead.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
linux-mips@vger.kernel.org
Subject: Re: [PATCH v2 1/2] mips: add <asm-generic/io.h> including
Date: Fri, 3 Mar 2023 17:13:06 +0800 [thread overview]
Message-ID: <ZAG6Ilwj7+pcJdK7@MiWiFi-R3L-srv> (raw)
In-Reply-To: <b2958824-786b-46d7-a880-17c948fbe2b0@app.fastmail.com>
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 <asm-generic/mmiowb.h>
> > #include <asm/io.h>
> >
> > #define mmiowb() iobarrier_w()
> > -
> > -#include <asm-generic/mmiowb.h>
> > -
> > #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();
| ^~~~~~~~
next prev parent reply other threads:[~2023-03-03 9:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 10:22 [PATCH v2 0/2] arch/*/io.h: remove ioremap_uc in some architectures Baoquan He
2023-03-01 10:22 ` [PATCH v2 1/2] mips: add <asm-generic/io.h> including Baoquan He
2023-03-01 14:06 ` Arnd Bergmann
2023-03-02 4:12 ` Baoquan He
2023-03-02 7:12 ` Arnd Bergmann
2023-03-02 9:09 ` Baoquan He
2023-03-03 9:13 ` Baoquan He [this message]
2023-03-01 10:22 ` [PATCH v2 2/2] arch/*/io.h: remove ioremap_uc in some architectures Baoquan He
2023-03-01 13:37 ` [PATCH v2 0/2] " Baoquan He
2023-03-02 19:57 ` Luis Chamberlain
2023-03-03 10:24 ` 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=ZAG6Ilwj7+pcJdK7@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--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=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.