From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Danilo Krummrich <danilokrummrich@dk-develop.de>
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 14:01:03 +0100 [thread overview]
Message-ID: <20170817130103.GR20805@n2100.armlinux.org.uk> (raw)
In-Reply-To: <d9966e58f98ed5820154d9a979ca19f2@dk-develop.de>
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.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
next prev parent reply other threads:[~2017-08-17 13:01 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 [this message]
2017-08-17 14:14 ` Danilo Krummrich
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=20170817130103.GR20805@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=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=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).