From: Ben Wolsieffer <ben.wolsieffer@hefring.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ben Whitten <ben.whitten@gmail.com>
Subject: Re: [PATCH] regmap: prevent noinc writes from clobbering cache
Date: Wed, 1 Nov 2023 16:20:08 -0400 [thread overview]
Message-ID: <ZUKy-ETSbM7yNvNK@dell-precision-5540> (raw)
In-Reply-To: <b0e8c9f5-7aff-4adc-b5bc-d61c6107c07f@sirena.org.uk>
Hi Mark,
On Wed, Nov 01, 2023 at 05:05:39PM +0000, Mark Brown wrote:
> On Wed, Nov 01, 2023 at 10:29:27AM -0400, Ben Wolsieffer wrote:
> > Currently, noinc writes are cached as if they were standard incrementing
> > writes, overwriting unrelated register values in the cache. Instead, we
> > want to cache the last value written to the register, as is done in the
> > accelerated noinc handler (regmap_noinc_readwrite).
>
> Could you please add a kunit test for this?
I started to look into this, but it is not currently possible to test
noinc behavior with regmap_[raw_]ram. The same bulk write operation is
used by both incrementing and non-incrementing writes, and the difference
in behavior is due to how the hardware handles the bulk write to a
particular register.
To test this behavior, regmap_raw_ram (raw because it supports bulk
writes) would have to be told that certain of its registers should
implement noinc semantics.
Is this something I should implement?
Thanks, Ben
next prev parent reply other threads:[~2023-11-01 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 14:29 Ben Wolsieffer
2023-11-01 17:05 ` Mark Brown
2023-11-01 20:20 ` Ben Wolsieffer [this message]
2023-11-01 20:24 ` Mark Brown
2023-11-01 18:06 ` Greg Kroah-Hartman
2023-11-02 11:52 ` 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=ZUKy-ETSbM7yNvNK@dell-precision-5540 \
--to=ben.wolsieffer@hefring.com \
--cc=ben.whitten@gmail.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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
all inboxes | Powered by JetHome®