From: John Garry <john.garry@huawei.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Sinan Kaya <okaya@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
"xuwei (O)" <xuwei5@hisilicon.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Will Deacon <will@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: About commit "io: change inX() to have their own IO barrier overrides"
Date: Wed, 11 Mar 2020 16:12:58 +0000 [thread overview]
Message-ID: <96b407eb-f9cd-960c-02e5-5e2a4ece33d8@huawei.com> (raw)
In-Reply-To: <15e7158d-184d-9591-89a6-cd6b10ef054d@huawei.com>
On 06/03/2020 16:43, John Garry wrote:
> On 06/03/2020 16:29, Arnd Bergmann wrote:
>>> The idea is good, but it would be nice if we just somehow use a common
>>> asm-generic io.h definition directly in logic_pio.c, like:
>>>
>>> asm-generic io.h:
>>>
>>> #ifndef __raw_inw // name?
>>> #define __raw_inw __raw_inw
>>> static inline u16 __raw_inw(unsigned long addr)
>>> {
>>> u16 val;
>>>
>>> __io_pbr();
>>> val = __le16_to_cpu(__raw_readw(addr));
>>> __io_par(val);
>>> return val;
>>> }
>>> #endif
>>>
>>> #include <linux/logic_pio.h>
>>>
>>> #ifndef inw
>>> #define inw __raw_inw
>>> #endif
>> Yes, makes sense. Maybe __arch_inw() then? Not great either, but I think
>> that's better than __raw_inw() because __raw_* would sound like it
>> mirrors __raw_readl() that lacks the barriers and byteswaps.
>
> Right, I had the same concern. And maybe the "arch" prefix is
> misleading. Just __inw could be ok, and hopefully not conflict with the
> arch/arm/mach-* definitions.
>
I think that it hasn't been mentioned already, but it looks like the
outX methods also need the same treatment, from a7851aa54c.
thanks,
John
next prev parent reply other threads:[~2020-03-11 16:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 9:52 About commit "io: change inX() to have their own IO barrier overrides" John Garry
2020-02-28 23:57 ` Sinan Kaya
2020-03-02 12:35 ` John Garry
2020-03-02 16:44 ` Sinan Kaya
2020-03-03 13:18 ` John Garry
2020-03-03 16:40 ` Arnd Bergmann
2020-03-03 17:16 ` John Garry
2020-03-06 3:44 ` Sinan Kaya
2020-03-06 7:54 ` Arnd Bergmann
2020-03-06 10:39 ` John Garry
2020-03-06 15:16 ` Arnd Bergmann
2020-03-06 16:18 ` John Garry
2020-03-06 16:29 ` Arnd Bergmann
2020-03-06 16:43 ` John Garry
2020-03-11 16:12 ` John Garry [this message]
2020-03-06 21:15 ` Sinan Kaya
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=96b407eb-f9cd-960c-02e5-5e2a4ece33d8@huawei.com \
--to=john.garry@huawei.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=okaya@kernel.org \
--cc=will@kernel.org \
--cc=xuwei5@hisilicon.com \
/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;
as well as URLs for NNTP newsgroup(s).