From: "Nuno Sá" <noname.nuno@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Jonathan Santos <Jonathan.Santos@analog.com>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com,
michael.hennerich@analog.com, jonath4nns@gmail.com,
andriy.shevchenko@intel.com
Subject: Re: [PATCH v2 2/2] spi: axi-spi-engine: fix stale SYNC IRQ pending in trigger_enable
Date: Thu, 01 Oct 2026 07:55:45 +0100 [thread overview]
Message-ID: <a1fb38b1aef69d344d31235fbb4bb55d75aaa1d4.camel@gmail.com> (raw)
In-Reply-To: <8ba05b99-36ac-4a76-ac11-e6ad92c631d4@sirena.org.uk>
On Wed, 2026-09-30 at 14:09 +0100, Mark Brown wrote:
> On Tue, Sep 29, 2026 at 11:17:45PM -0300, Jonathan Santos wrote:
> > spi_engine_trigger_enable() sends SYNC(1) and polls SYNC_ID, it never
> > clears the INT_PENDING[SYNC] bit afterward. This leaves a stale pending
> > interrupt that can fire spuriously when INT_SYNC is later enabled.
>
> > +
> > + /* Clear the stale SYNC pending bit so it doesn't fire when the IRQ is
> > later enabled */
> > + writel_relaxed(SPI_ENGINE_INT_SYNC, spi_engine->base +
> > SPI_ENGINE_REG_INT_PENDING);
> > +
> > if (ret)
> > return ret;
>
> I'm not seeing anything here for the issue with ensuring posted writes
> are completed before we drop the lock? The write may not be visible on
> enother CPU, we need a read from the controller or something.
Just for my understanding, why would it be an issue? The trigger register seems to
only be accessible from the trigger callbacks which are protected by a lock where we
have implied barriers. Im sure I'm missing what can go wrong here :)
- Nuno Sá
next prev parent reply other threads:[~2026-10-01 6:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 2:17 [PATCH v2 0/2] spi: axi-spi-engine: fix stale SYNC IRQ pending Jonathan Santos
2026-09-30 2:17 ` [PATCH v2 1/2] " Jonathan Santos
2026-09-30 2:17 ` [PATCH v2 2/2] spi: axi-spi-engine: fix stale SYNC IRQ pending in trigger_enable Jonathan Santos
2026-09-30 13:09 ` Mark Brown
2026-10-01 6:55 ` Nuno Sá [this message]
2026-10-01 11:58 ` Mark Brown
2026-10-01 12:24 ` Nuno Sá
2026-09-30 11:59 ` [PATCH v2 0/2] spi: axi-spi-engine: fix stale SYNC IRQ pending Nuno Sá
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=a1fb38b1aef69d344d31235fbb4bb55d75aaa1d4.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Jonathan.Santos@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jonath4nns@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.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
all inboxes | Powered by JetHome®