From: John Garry <john.garry@huawei.com>
To: <xuwei5@huawei.com>, <arnd@arndb.de>
Cc: <okaya@kernel.org>, <bhelgaas@google.com>,
<linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>,
<olof@lixom.net>, <jiaxun.yang@flygoat.com>,
"John Garry" <john.garry@huawei.com>
Subject: [PATCH v2 3/3] logic_pio: Use _inX() and _outX()
Date: Sat, 28 Mar 2020 00:06:14 +0800 [thread overview]
Message-ID: <1585325174-195915-4-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1585325174-195915-1-git-send-email-john.garry@huawei.com>
Use _inX() and _outX(), which include memory barriers which may be
overridden per arch.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Garry <john.garry@huawei.com>
---
lib/logic_pio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index 21dc731bec88..f32fe481b492 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -235,7 +235,7 @@ type logic_in##bwl(unsigned long addr) \
type ret = (type)~0; \
\
if (addr < MMIO_UPPER_LIMIT) { \
- ret = read##bwl(PCI_IOBASE + addr); \
+ ret = _in##bwl(addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \
\
@@ -251,7 +251,7 @@ type logic_in##bwl(unsigned long addr) \
void logic_out##bwl(type value, unsigned long addr) \
{ \
if (addr < MMIO_UPPER_LIMIT) { \
- write##bwl(value, PCI_IOBASE + addr); \
+ _out##bwl(value, addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \
\
--
2.16.4
next prev parent reply other threads:[~2020-03-27 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 16:06 [PATCH v2 0/3] io.h, logic_pio: Allow barriers for inX() and outX() be overridden John Garry
2020-03-27 16:06 ` [PATCH v2 1/3] io: Provide _inX() and _outX() John Garry
2020-03-27 16:06 ` [PATCH v2 2/3] logic_pio: Improve macro argument name John Garry
2020-03-27 16:06 ` John Garry [this message]
2020-05-15 7:07 ` [PATCH v2 0/3] io.h, logic_pio: Allow barriers for inX() and outX() be overridden Wei Xu
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=1585325174-195915-4-git-send-email-john.garry@huawei.com \
--to=john.garry@huawei.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.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=linuxarm@huawei.com \
--cc=okaya@kernel.org \
--cc=olof@lixom.net \
--cc=xuwei5@huawei.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
all inboxes | Powered by JetHome®