From: "Arnd Bergmann" <arnd@arndb.de>
To: "Baoquan He" <bhe@redhat.com>, linux-kernel@vger.kernel.org
Cc: 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: Wed, 01 Mar 2023 15:06:57 +0100 [thread overview]
Message-ID: <5edd5304-ef11-4607-9189-a07613ecfee2@app.fastmail.com> (raw)
In-Reply-To: <20230301102208.148490-2-bhe@redhat.com>
On Wed, Mar 1, 2023, at 11:22, Baoquan He wrote:
> With the adding, some default ioremap_xx methods defined in
> asm-generic/io.h can be used. E.g the default ioremap_uc() returning
> NULL.
>
> Here, remove the <asm/io.h> including in asm/mmiowb.h, otherwise nested
> including will cause compiling error.
>
> Signed-off-by: Baoquan He <bhe@redhat.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Cc: linux-mips@vger.kernel.org
This looks good to me,
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
but it obviously needs to be properly reviewed by the MIPS
maintainers as well. I think others have tried to do this
in the past but did not make it in.
> @@ -548,6 +552,46 @@ extern void (*_dma_cache_inv)(unsigned long start,
> unsigned long size);
> #define csr_out32(v, a) (*(volatile u32 *)((unsigned long)(a) +
> __CSR_32_ADJUST) = (v))
> #define csr_in32(a) (*(volatile u32 *)((unsigned long)(a) +
> __CSR_32_ADJUST))
>
> +
> +#define inb_p inb_p
> +#define inw_p inw_p
> +#define inl_p inl_p
> +#define insb insb
> +#define insw insw
> +#define insl insl
I would prefer to put the #defines next to the function declarations,
even when they come from macros.
>
> -#include <asm/io.h>
> -
> #define mmiowb() iobarrier_w()
>
I think this only works as long as asm/spinlock.h also includes
asm/io.h, otherwise linux/spinlock.h will be missing the
iobarrier_w definition.
Most likely this is implicitly included from somewhere else
below linux/spinlock.h, but it would be better not to rely
on that, and instead define mmiowb() to wmb() directly.
Arnd
next prev parent reply other threads:[~2023-03-01 14:07 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 [this message]
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
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=5edd5304-ef11-4607-9189-a07613ecfee2@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bhe@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®