From: Sameer Pujar <spujar@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>, <broonie@kernel.org>
Cc: <jonathanh@nvidia.com>, <linux-kernel@vger.kernel.org>,
<linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v3] regmap: add iopoll-like atomic polling macro
Date: Thu, 9 Jan 2020 12:54:31 +0530 [thread overview]
Message-ID: <b9f5459f-007e-3139-a3cf-c7dfd3fc335a@nvidia.com> (raw)
In-Reply-To: <fa5198bf-0001-3a57-017f-1b40e0188606@gmail.com>
On 1/9/2020 11:30 AM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 09.01.2020 08:09, Sameer Pujar пишет:
>> This patch adds a macro 'regmap_read_poll_timeout_atomic' that works
>> similar to 'readx_poll_timeout_atomic' defined in linux/iopoll.h; This
>> is atomic version of already available 'regmap_read_poll_timeout' macro.
>>
>> It should be noted that above atomic macro cannot be used by all regmaps.
>> If the regmap is set up for atomic use (flat or no cache and MMIO) then
>> only it can use.
>>
>> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
>> ---
> Could you please explain what is the targeted use-case here?
I was trying to use regmap_read_poll_timeout() to poll for status change
of a register. This resulted in "BUG: scheduling while atomic". The
callback function, in which I was trying to use the macro, runs in
atomic context. Hence new atomic macro is added. I was checking ALSA
playback/capture and trigger() callback had to monitor some register status.
In general, the new macro can be used in atomic callbacks where regmap
interface is used and polling is required.
next prev parent reply other threads:[~2020-01-09 7:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 5:09 [PATCH v3] regmap: add iopoll-like atomic polling macro Sameer Pujar
2020-01-09 6:00 ` Dmitry Osipenko
2020-01-09 7:24 ` Sameer Pujar [this message]
2020-01-09 13:57 ` Dmitry Osipenko
2020-01-10 4:50 ` Sameer Pujar
2020-01-10 22:07 ` Dmitry Osipenko
2020-01-09 21:30 ` Applied "regmap: add iopoll-like atomic polling macro" to the regmap tree Mark Brown
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=b9f5459f-007e-3139-a3cf-c7dfd3fc335a@nvidia.com \
--to=spujar@nvidia.com \
--cc=broonie@kernel.org \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
/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