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: <f7cf3e43-c7bc-67ac-e9ea-e7a79bcd8a88@fi.rohmeurope.com>
Date:   Fri, 28 Apr 2023 12:36:51 +0000
From:   "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To:     Mark Brown <broonie@...nel.org>,
        Matti Vaittinen <mazziesaccount@...il.com>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] regmap: force update_bits() to write to HW when reg
 is volatile

On 4/28/23 14:35, Mark Brown wrote:
> On Fri, Apr 28, 2023 at 08:44:06AM +0300, Matti Vaittinen wrote:
>> In many cases the volatile registers are expected to be written to
>> regardless of the existing value (because, the value of a volatile
>> register can't be trusted to stay the same during RMW cycle). In fact, it
>> is questionable if the volatile registers and regmap_update_bits()
>> conceptually make sense without device specific map->reg_update_bits.
> 
> I think you're looking for regmap_write_bits() here.

Yes. Thanks for pointing this out to me. This is the functionality I 
searched for.

However, my question really was if the regmap_update_bits() (and 
regmap_set_bits() / regmap_clear_bits()) should automatically work as 
regmap_write_bits() for volatile registers. I'll take your answer as 
"no" - and try to remember just use regmap_write_bits() with volatile 
registers which may require forcing writing the value even when it is 
not changed. Thanks!

Yours,
	-- Matti


-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ