From: okaya@codeaurora.org
To: Arnd Bergmann <arnd@arndb.de>
Cc: Timur Tabi <timur@codeaurora.org>,
sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Ley Foon Tan <lftan@altera.com>,
"moderated list:NIOS2 ARCHITECTURE"
<nios2-dev@lists.rocketboards.org>,
arndbergmann@gmail.com
Subject: Re: [PATCH v4 1/5] io: define several IO & PIO barrier types for the asm-generic version
Date: Fri, 06 Apr 2018 08:50:50 -0400 [thread overview]
Message-ID: <fa0b02f16cb4cb993775518fabccfb2d@codeaurora.org> (raw)
In-Reply-To: <CAK8P3a0Ahf9uuXYy0fxdC5_O84gmSqTUsP6xjpGQFE8n1Tw7HA@mail.gmail.com>
On 2018-04-06 06:19, Arnd Bergmann wrote:
> On Thu, Apr 5, 2018 at 3:09 PM, Sinan Kaya <okaya@codeaurora.org>
> wrote:
>> Getting ready to harden readX()/writeX() and inX()/outX() semantics
>> for the
>> generic implementation.
>>
>> Defining two set of macros as __io_br() and __io_ar() to indicate
>> actions
>> to be taken before and after MMIO read.
>>
>> Defining two set of macros as __io_bw() and __io_aw() to indicate
>> actions
>> to be taken before and after MMIO write.
>>
>> Defining two set of macros as __io_pbw() and __io_paw() to indicate
>> actions
>> to be taken before and after Port IO write.
>>
>> Defining two set of macros as __io_pbr() and __io_par() to indicate
>> actions
>> to be taken before and after Port IO read.
>>
>> If rmb() is available for the architecture, prefer rmb() as the
>> default
>> implementation of __io_ar()/__io_par().
>>
>> If wmb() is available for the architecture, prefer wmb() as the
>> default
>> implementation of __io_bw()/__io_pbw().
>>
>> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
>
> I've applied the series to my asm-generic tree now, I will give it a
> few days
> in linux-next to see if any obvious regressions happen, and then send
> a pull request.
>
> Checking the list of architectures that are affected by this, I see
> h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32,
> and xtensa, all of which use asm-generic/io.h without overriding
> the default readl/writel.
>
> I would guess that at least s390 doesn't need the barriers
> (maintainers on Cc now), but there may be others that want to
> override the new barriers with weaker ones where an MMIO
> access is guaranteed to serialize against DMA, or where
> a specialized barrier for this case exists.
>
> Looking over the asm-generic implementation once more now,
> I wonder if we should change the relaxed accessors to not have
> any barriers (back to the version before your series) rather than
> defaulting them to having the same barriers as the regular
> readl/writel.
I can do a follow up patch. You want to map them to raw api without any
barriers as before. Right?
>
> Arnd
WARNING: multiple messages have this Message-ID (diff)
From: okaya@codeaurora.org (okaya at codeaurora.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/5] io: define several IO & PIO barrier types for the asm-generic version
Date: Fri, 06 Apr 2018 08:50:50 -0400 [thread overview]
Message-ID: <fa0b02f16cb4cb993775518fabccfb2d@codeaurora.org> (raw)
In-Reply-To: <CAK8P3a0Ahf9uuXYy0fxdC5_O84gmSqTUsP6xjpGQFE8n1Tw7HA@mail.gmail.com>
On 2018-04-06 06:19, Arnd Bergmann wrote:
> On Thu, Apr 5, 2018 at 3:09 PM, Sinan Kaya <okaya@codeaurora.org>
> wrote:
>> Getting ready to harden readX()/writeX() and inX()/outX() semantics
>> for the
>> generic implementation.
>>
>> Defining two set of macros as __io_br() and __io_ar() to indicate
>> actions
>> to be taken before and after MMIO read.
>>
>> Defining two set of macros as __io_bw() and __io_aw() to indicate
>> actions
>> to be taken before and after MMIO write.
>>
>> Defining two set of macros as __io_pbw() and __io_paw() to indicate
>> actions
>> to be taken before and after Port IO write.
>>
>> Defining two set of macros as __io_pbr() and __io_par() to indicate
>> actions
>> to be taken before and after Port IO read.
>>
>> If rmb() is available for the architecture, prefer rmb() as the
>> default
>> implementation of __io_ar()/__io_par().
>>
>> If wmb() is available for the architecture, prefer wmb() as the
>> default
>> implementation of __io_bw()/__io_pbw().
>>
>> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
>
> I've applied the series to my asm-generic tree now, I will give it a
> few days
> in linux-next to see if any obvious regressions happen, and then send
> a pull request.
>
> Checking the list of architectures that are affected by this, I see
> h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32,
> and xtensa, all of which use asm-generic/io.h without overriding
> the default readl/writel.
>
> I would guess that at least s390 doesn't need the barriers
> (maintainers on Cc now), but there may be others that want to
> override the new barriers with weaker ones where an MMIO
> access is guaranteed to serialize against DMA, or where
> a specialized barrier for this case exists.
>
> Looking over the asm-generic implementation once more now,
> I wonder if we should change the relaxed accessors to not have
> any barriers (back to the version before your series) rather than
> defaulting them to having the same barriers as the regular
> readl/writel.
I can do a follow up patch. You want to map them to raw api without any
barriers as before. Right?
>
> Arnd
next prev parent reply other threads:[~2018-04-06 12:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 13:09 [PATCH v4 1/5] io: define several IO & PIO barrier types for the asm-generic version Sinan Kaya
2018-04-05 13:09 ` Sinan Kaya
2018-04-05 13:09 ` [PATCH v4 2/5] io: define stronger ordering for the default readX() implementation Sinan Kaya
2018-04-05 13:09 ` Sinan Kaya
2018-04-09 3:37 ` Sasha Levin
2018-04-09 3:37 ` Sasha Levin
2018-04-05 13:09 ` [PATCH v4 3/5] io: define stronger ordering for the default writeX() implementation Sinan Kaya
2018-04-05 13:09 ` Sinan Kaya
2018-04-05 13:09 ` [PATCH v4 4/5] io: change outX() to have their own IO barrier overrides Sinan Kaya
2018-04-05 13:09 ` Sinan Kaya
2018-04-05 13:09 ` [PATCH v4 5/5] io: change inX() " Sinan Kaya
2018-04-05 13:09 ` Sinan Kaya
2018-04-06 10:19 ` [PATCH v4 1/5] io: define several IO & PIO barrier types for the asm-generic version Arnd Bergmann
2018-04-06 10:19 ` Arnd Bergmann
2018-04-06 12:50 ` okaya [this message]
2018-04-06 12:50 ` okaya at codeaurora.org
2018-04-06 13:20 ` Arnd Bergmann
2018-04-06 13:20 ` Arnd Bergmann
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=fa0b02f16cb4cb993775518fabccfb2d@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=arnd@arndb.de \
--cc=arndbergmann@gmail.com \
--cc=heiko.carstens@de.ibm.com \
--cc=lftan@altera.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nios2-dev@lists.rocketboards.org \
--cc=schwidefsky@de.ibm.com \
--cc=sulrich@codeaurora.org \
--cc=timur@codeaurora.org \
/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.