From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
linux-rt-users@vger.kernel.org,
Arseniy Krasnov <avkrasnov@salutedevices.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
kernel@sberdevices.ru, oxffffaa@gmail.com,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v1] ASoC: meson: axg-fifo: set option to use raw spinlock
Date: Tue, 6 Aug 2024 08:57:40 +0200 [thread overview]
Message-ID: <20240806065740.DAZwSnQ7@linutronix.de> (raw)
In-Reply-To: <04b2b8c5-8b18-4594-9eeb-9971d8cf3786@sirena.org.uk>
On 2024-08-05 17:56:22 [+0100], Mark Brown wrote:
> On Mon, Aug 05, 2024 at 05:33:09PM +0200, Sebastian Andrzej Siewior wrote:
>
> > I'm not sure if making the lock a raw_spinlock_t solves all the
> > problems. The regmap is regmap_mmio so direct memory-access and looks
> > simple enough to do so. In regmap_mmio_write() I see clk_enable() and
> > and this uses a spinlock_t so we should be back at the same problem.
>
> The clk_enable() is optional, users simply shouldn't use the internal
> clock management with devices that it'll cause problems for.
>
> > There might be an additional problem if reg-caching is enabled.
>
> The flat cache is there mostly for the benefit of things accessed from
> interrupt context, it guarantees to never do any allocations and doesn't
> lock. You can also use other caches if you ensure that any registers
> accessed in interrupt context are already cached so won't trigger any
> new allocations.
My point is simply that those two things could complicate things further
if the desired fix is to (always) use raw_spinlock_t.
Sebastian
prev parent reply other threads:[~2024-08-06 6:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240729131652.3012327-1-avkrasnov@salutedevices.com>
[not found] ` <1ja5i0wags.fsf@starbuckisacylon.baylibre.com>
[not found] ` <2b16b95e-196e-4d8a-98c3-3be568cdd18a@sirena.org.uk>
[not found] ` <1j5xsow839.fsf@starbuckisacylon.baylibre.com>
[not found] ` <7dfdade5-3a57-4883-bfac-067c50ec0ffb@sirena.org.uk>
2024-07-29 15:57 ` [PATCH v1] ASoC: meson: axg-fifo: set option to use raw spinlock Jerome Brunet
2024-08-05 15:33 ` Sebastian Andrzej Siewior
2024-08-05 16:07 ` Jerome Brunet
2024-08-06 6:50 ` Sebastian Andrzej Siewior
2024-08-06 9:21 ` Jerome Brunet
2024-08-06 10:03 ` Sebastian Andrzej Siewior
2024-08-05 16:56 ` Mark Brown
2024-08-06 6:57 ` Sebastian Andrzej Siewior [this message]
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=20240806065740.DAZwSnQ7@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=alsa-devel@alsa-project.org \
--cc=avkrasnov@salutedevices.com \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=kernel@sberdevices.ru \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=oxffffaa@gmail.com \
--cc=perex@perex.cz \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.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