From: Mark Brown <broonie@kernel.org>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
Peter Crosthwaite <pcrost@xilinx.com>,
Peter Crosthwaite <peter.crosthwaite@petalogix.com>,
Grant Likely <grant.likely@linaro.org>,
spi-devel-general@lists.sourceforge.net,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/3] spi: spi-xilinx: Remove ISR race condition
Date: Tue, 4 Jun 2013 18:32:10 +0100 [thread overview]
Message-ID: <20130604173210.GL31367@sirena.org.uk> (raw)
In-Reply-To: <041d7ca272ef9499fab630294e3395110b3e31ac.1370354549.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Tue, Jun 04, 2013 at 04:02:34PM +0200, Michal Simek wrote:
> The ISR currently consumes the rx buffer data and re-enables transmission
> from within interrupt context. This is bad because if the interrupt
> occurs again before the ISR exits, the new interrupt will be erroneously
> cleared by the still completing ISR.
> Simplified the ISR by just setting the completion variable and exiting with
> no action. Then just looped the transmit functionality in
> xilinx_spi_txrx_bufs().
Applied but this is a bit sad, having to defer the refill to process
context means that we're adding extra latency which takes us further
away from being able to saturate the bus. There ought to be a way to
avoid the issue though I can't think of a non-racy one - I guess level
triggered interrupts aren't an option?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-06-04 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 14:02 [PATCH 1/3] spi: spi-xilinx: Remove ISR race condition Michal Simek
2013-06-04 14:02 ` [PATCH 2/3] spi: spi-xilinx: Clear dma_mask for xilinx spi controller Michal Simek
2013-06-04 17:36 ` Mark Brown
2013-06-05 14:39 ` Michal Simek
2013-06-04 14:02 ` [PATCH 3/3] spi: spi-xilinx: Add run run-time endian detection Michal Simek
2013-06-04 17:37 ` Mark Brown
2013-06-04 17:32 ` Mark Brown [this message]
2015-10-08 15:10 ` [PATCH 1/3] spi: spi-xilinx: Remove ISR race condition Jean-Francois Dagenais
2015-10-12 12:21 ` Shubhrajyoti Datta
2015-12-04 5:22 ` Shubhrajyoti Datta
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=20130604173210.GL31367@sirena.org.uk \
--to=broonie@kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=pcrost@xilinx.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=tglx@linutronix.de \
/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