From: David Laight <David.Laight@ACULAB.COM>
To: 'Mark Brown' <broonie@kernel.org>
Cc: 'Sameer Pujar' <spujar@nvidia.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"perex@perex.cz" <perex@perex.cz>,
"tiwai@suse.com" <tiwai@suse.com>,
"jonathanh@nvidia.com" <jonathanh@nvidia.com>,
"mkumard@nvidia.com" <mkumard@nvidia.com>,
"sheetal@nvidia.com" <sheetal@nvidia.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Oder Chiou <oder_chiou@realtek.com>
Subject: RE: [PATCH v2 3/5] ASoC: rt5640: Fix sleep in atomic context
Date: Thu, 29 Jun 2023 10:21:06 +0000 [thread overview]
Message-ID: <953c899d04e543f681e44daad4ec2ff7@AcuMS.aculab.com> (raw)
In-Reply-To: <550e5c8f-0bfb-4ffc-9a43-1ecb153c6a02@sirena.org.uk>
From: Mark Brown
> Sent: 29 June 2023 11:11
>
> On Thu, Jun 29, 2023 at 08:38:09AM +0000, David Laight wrote:
> > From: Sameer Pujar
>
> > > Following prints are observed while testing audio on Jetson AGX Orin which
> > > has onboard RT5640 audio codec:
> > >
> > > BUG: sleeping function called from invalid context at kernel/workqueue.c:3027
> > > in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
>
> > My 'gut feel' is that this will just move the problem elsewhere.
>
> > If the ISR is responsible for adding audio buffers (etc) then it is
> > also not unlikely that the scheduling delays in running a threaded ISR
> > will cause audio glitches if the system is busy.
>
> What makes you think this is anything to do with audio glitches? The
> bug is literally what is described, it is not valid to sleep in atomic
> contexts and if we ever actually try things are likely to go badly.
What I mean is that deferring the ISR to process context
is likely to generate audio glitches on a busy system.
I realise that sleeping in an ISR goes badly wrong.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-06-29 10:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 5:12 [PATCH v2 0/5] Few audio fixes on Tegra platforms Sameer Pujar
2023-06-29 5:12 ` [PATCH v2 1/5] ASoC: tegra: Fix AMX byte map Sameer Pujar
2023-06-29 5:12 ` [PATCH v2 2/5] ASoC: tegra: Fix ADX " Sameer Pujar
2023-06-29 5:12 ` [PATCH v2 3/5] ASoC: rt5640: Fix sleep in atomic context Sameer Pujar
2023-06-29 8:38 ` David Laight
2023-06-29 10:11 ` Mark Brown
2023-06-29 10:21 ` David Laight [this message]
2023-06-29 10:27 ` Mark Brown
2023-06-29 5:12 ` [PATCH v2 4/5] arm64: tegra: Update AHUB clock parent and rate on Tegra234 Sameer Pujar
2023-06-29 5:12 ` [PATCH v2 5/5] arm64: tegra: Update AHUB clock parent and rate Sameer Pujar
2023-06-29 11:43 ` (subset) [PATCH v2 0/5] Few audio fixes on Tegra platforms Mark Brown
2023-07-13 15:14 ` Thierry Reding
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=953c899d04e543f681e44daad4ec2ff7@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=sheetal@nvidia.com \
--cc=spujar@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).