From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] irqchip: bcm2836: Use a more generic memory barrier call
Date: Mon, 11 Apr 2016 09:52:27 -0600 [thread overview]
Message-ID: <570BC83B.4020106@wwwdotorg.org> (raw)
In-Reply-To: <878u0l1fj0.fsf@eliezer.anholt.net>
On 04/10/2016 12:32 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 04/08/2016 12:20 PM, Eric Anholt wrote:
>>> Stephen Warren <swarren@wwwdotorg.org> writes:
>>>
>>>> On 04/04/2016 09:44 PM, Eric Anholt wrote:
>>>>> dsb() requires an argument on arm64, so we needed to add "sy".
>>>>> Instead, take this opportunity to switch to the same smp_wmb() call
>>>>> that gic uses for its IPIs. This is a less strong barrier than we
>>>>> were doing before (dmb(ishst) compared to dsb(sy)), but it seems to be
>>>>> the correct one.
>>>>
>>>> I assume all MMIO is part of the ish domain?
>>>>
>>>> If so, the series,
>>>> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
>>>
>>> I don't know if this barrier implies ordering all the way out to AXI on
>>> this HW, but I don't think that's a requirement of this function.
>>
>> My understanding was that the barrier was explicitly to work around a
>> bug in the bus fabric of the SoC, and hence the barrier very much does
>> have to affect the transaction all the way out to AXI. Re-reading
>> BCM2835-ARM-Peripherals.pdf section 1.3 "Peripheral access precautions
>> for correct memory ordering" seems to confirm this.
>
> My understanding of the explicit barrier here, which was copied from
> other irqchips, is "Make sure that normal memory writes before our IPI
> on this CPU appear on the other CPUs before they get the IPI" (like the
> comment says). This barrier was not put in to deal with the
> 283x-specific weird AXI behavior.
>
> Note that we had previously decided that the weird AXI ordering
> behavior, which is about repeated reads or repeated writes from the same
> CPU across different peripherals, is already covered by the barriers
> present in readl() and writel(). The writel() barrier happens to be a
> dsb() as well, so this explicit barrier is actually redundant.
Ah OK. In that case, the change seems fine.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Eric Anholt <eric@anholt.net>
Cc: linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [PATCH 4/4] irqchip: bcm2836: Use a more generic memory barrier call
Date: Mon, 11 Apr 2016 09:52:27 -0600 [thread overview]
Message-ID: <570BC83B.4020106@wwwdotorg.org> (raw)
In-Reply-To: <878u0l1fj0.fsf@eliezer.anholt.net>
On 04/10/2016 12:32 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 04/08/2016 12:20 PM, Eric Anholt wrote:
>>> Stephen Warren <swarren@wwwdotorg.org> writes:
>>>
>>>> On 04/04/2016 09:44 PM, Eric Anholt wrote:
>>>>> dsb() requires an argument on arm64, so we needed to add "sy".
>>>>> Instead, take this opportunity to switch to the same smp_wmb() call
>>>>> that gic uses for its IPIs. This is a less strong barrier than we
>>>>> were doing before (dmb(ishst) compared to dsb(sy)), but it seems to be
>>>>> the correct one.
>>>>
>>>> I assume all MMIO is part of the ish domain?
>>>>
>>>> If so, the series,
>>>> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
>>>
>>> I don't know if this barrier implies ordering all the way out to AXI on
>>> this HW, but I don't think that's a requirement of this function.
>>
>> My understanding was that the barrier was explicitly to work around a
>> bug in the bus fabric of the SoC, and hence the barrier very much does
>> have to affect the transaction all the way out to AXI. Re-reading
>> BCM2835-ARM-Peripherals.pdf section 1.3 "Peripheral access precautions
>> for correct memory ordering" seems to confirm this.
>
> My understanding of the explicit barrier here, which was copied from
> other irqchips, is "Make sure that normal memory writes before our IPI
> on this CPU appear on the other CPUs before they get the IPI" (like the
> comment says). This barrier was not put in to deal with the
> 283x-specific weird AXI behavior.
>
> Note that we had previously decided that the weird AXI ordering
> behavior, which is about repeated reads or repeated writes from the same
> CPU across different peripherals, is already covered by the barriers
> present in readl() and writel(). The writel() barrier happens to be a
> dsb() as well, so this explicit barrier is actually redundant.
Ah OK. In that case, the change seems fine.
next prev parent reply other threads:[~2016-04-11 15:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 3:44 [PATCH 0/4] irqchip: bcm2835: arm64 port Eric Anholt
2016-04-05 3:44 ` Eric Anholt
2016-04-05 3:44 ` [PATCH 1/4] irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ Eric Anholt
2016-04-05 3:44 ` Eric Anholt
2016-04-05 3:44 ` [PATCH 2/4] irqchip: bcm2836: Drop smp_set_ops on arm64 builds Eric Anholt
2016-04-05 3:44 ` Eric Anholt
2016-04-05 13:44 ` Marc Zyngier
2016-04-05 13:44 ` Marc Zyngier
2016-04-08 20:43 ` Arnd Bergmann
2016-04-08 20:43 ` Arnd Bergmann
2016-04-13 19:49 ` Eric Anholt
2016-04-13 19:49 ` Eric Anholt
2016-04-05 3:44 ` [PATCH 3/4] irqchip: bcm2836: Fix compiler warning on 64-bit build Eric Anholt
2016-04-05 3:44 ` Eric Anholt
2016-04-05 3:44 ` [PATCH 4/4] irqchip: bcm2836: Use a more generic memory barrier call Eric Anholt
2016-04-05 3:44 ` Eric Anholt
2016-04-06 4:59 ` Stephen Warren
2016-04-06 4:59 ` Stephen Warren
2016-04-08 18:20 ` Eric Anholt
2016-04-08 18:20 ` Eric Anholt
2016-04-09 5:26 ` Stephen Warren
2016-04-09 5:26 ` Stephen Warren
2016-04-10 18:32 ` Eric Anholt
2016-04-10 18:32 ` Eric Anholt
2016-04-11 15:52 ` Stephen Warren [this message]
2016-04-11 15:52 ` Stephen Warren
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=570BC83B.4020106@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-arm-kernel@lists.infradead.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.