From: Danilo Krummrich <danilokrummrich@dk-develop.de>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Linux Input <linux-input@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH] serio: PS2 gpio bit banging driver for the serio bus
Date: Thu, 17 Aug 2017 16:14:23 +0200 [thread overview]
Message-ID: <52be16427347cefff9238902146df110@dk-develop.de> (raw)
In-Reply-To: <20170817130103.GR20805@n2100.armlinux.org.uk>
On 2017-08-17 15:01, Russell King - ARM Linux wrote:
> On Thu, Aug 17, 2017 at 12:51:33PM +0200, Danilo Krummrich wrote:
>> That having the correct execution order is not enough on some buses
>> because
>> of buffering is really something to be aware of, thanks again for
>> pointing
>> this out.
>
> PCI guarantees the order of writes to a device, but there are
> situations
> on SoCs where you can't rely on that - for instance, if the writes go
> over different buses to different devices (eg, write to a peripheral
> vs write to an interrupt controller.)
>
> Even then, with interrupts delivered by message (eg, MSI) there's
> issues.
>
>> So for the scenario I was concerned about I would expect the irqchip
>> driver
>> guarantees the write actually hits the the hardware (if necessary read
>> it
>> back) before the function (disable_irq_nosync()) returns, is that
>> correct?
>> Though, having the need should be very unlikely.
>
> Well, disable_irq_nosync() doesn't guarantee that the interrupt handler
> isn't running - a CPU may have just received the interrupt and is just
> entering the interrupt handler when disable_irq_nosync() returns. The
> hint is the "nosync" - there's no synchronisation. If you need to
> guarantee that the interrupt handler is not running, disable_irq() does
> that. By implication, however, disable_irq() can not be called from
> within the same interrupt handler for the interrupt that is being
> disabled.
>
Thanks again, I'm aware of that. As in my case the code could be called
from
atomic context disable_irq() is not an option.
My main point is if it can be assumed that after disable_irq_nosync()
returns
it is guaranteed, by convention, that the hardware was hit. But I really
would
think so.
next prev parent reply other threads:[~2017-08-17 14:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 22:24 [PATCH] serio: PS2 gpio bit banging driver for the serio bus Danilo Krummrich
2017-08-07 9:03 ` Linus Walleij
2017-08-07 16:21 ` Danilo Krummrich
2017-08-08 2:49 ` Dmitry Torokhov
[not found] ` <20170807182207.348762301bf3d7f8509b1bf7@dk-develop.de>
2017-08-10 14:38 ` Danilo Krummrich
2017-08-11 9:16 ` Linus Walleij
2017-08-11 11:05 ` Danilo Krummrich
2017-08-17 9:09 ` Russell King - ARM Linux
2017-08-17 10:51 ` Danilo Krummrich
2017-08-17 13:01 ` Russell King - ARM Linux
2017-08-17 14:14 ` Danilo Krummrich [this message]
2017-08-22 13:35 ` Linus Walleij
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=52be16427347cefff9238902146df110@dk-develop.de \
--to=danilokrummrich@dk-develop.de \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=will.deacon@arm.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).