lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9f5459f-007e-3139-a3cf-c7dfd3fc335a@nvidia.com>
Date:   Thu, 9 Jan 2020 12:54:31 +0530
From:   Sameer Pujar <spujar@...dia.com>
To:     Dmitry Osipenko <digetx@...il.com>, <broonie@...nel.org>
CC:     <jonathanh@...dia.com>, <linux-kernel@...r.kernel.org>,
        <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v3] regmap: add iopoll-like atomic polling macro


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@...dia.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ