<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/regmap/regmap-kunit.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-26T22:17:50Z</updated>
<entry>
<title>regmap: kunit: Ensure that changed bytes are actually different</title>
<updated>2024-03-26T22:17:50Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2024-02-11T16:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1dc31e1463aae4efd5dff8b42c1eb0e87cc603a'/>
<id>urn:sha1:d1dc31e1463aae4efd5dff8b42c1eb0e87cc603a</id>
<content type='text'>
[ Upstream commit 2f0dbb24f78a333433a2b875c0b76bf55c119cd4 ]

During the cache sync test we verify that values we expect to have been
written only to the cache do not appear in the hardware. This works most
of the time but since we randomly generate both the original and new values
there is a low probability that these values may actually be the same.
Wrap get_random_bytes() to ensure that the values are different, there
are other tests which should have similar verification that we actually
changed something.

While we're at it refactor the test to use three changed values rather
than attempting to use one of them twice, that just complicates checking
that our new values are actually new.

We use random generation to try to avoid data dependencies in the tests.

Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://msgid.link/r/20240211-regmap-kunit-random-change-v3-1-e387a9ea4468@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: kunit: Add test for cache sync interaction with ranges</title>
<updated>2023-10-26T13:00:42Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-10-23T17:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a2e332c2cbddd17d7dcb8f334953593f1324c8e'/>
<id>urn:sha1:6a2e332c2cbddd17d7dcb8f334953593f1324c8e</id>
<content type='text'>
Hector Martin reports that since when doing a cache sync we enable cache
bypass if the selector register for a range is cached then we might leave
the physical selector register pointing to a different value to that which
we have in the cache. If we then try to write to the page that our cache
tells us is selected we will not update the selector register and write to
the wrong page. Add a test case covering this.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20231023-regmap-test-window-cache-v1-2-d8a71f441968@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: kunit: Fix marking of the range window as volatile</title>
<updated>2023-10-26T13:00:42Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-10-23T17:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fabe32cc1eca7857837abcb56b242bc4845b7067'/>
<id>urn:sha1:fabe32cc1eca7857837abcb56b242bc4845b7067</id>
<content type='text'>
For some reason the regmap used for testing ranges was not including the
end of the range of paged registers as volatile since it found the end by
counting from the selector register rather than the base of the window.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20231023-regmap-test-window-cache-v1-1-d8a71f441968@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Merge up fixes from mainline</title>
<updated>2023-07-23T22:34:06Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-07-23T22:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c214af0bd0f43df214470a35bc38dd5602b666f'/>
<id>urn:sha1:9c214af0bd0f43df214470a35bc38dd5602b666f</id>
<content type='text'>
There's several things here that will really help my CI.
</content>
</entry>
<entry>
<title>regmap: Disable locking for RBTREE and MAPLE unit tests</title>
<updated>2023-07-20T12:57:01Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2023-07-20T03:28:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9e26169cfda651802f88262a315146fbe4bc74c'/>
<id>urn:sha1:a9e26169cfda651802f88262a315146fbe4bc74c</id>
<content type='text'>
REGCACHE_RBTREE and REGCACHE_MAPLE dynamically allocate memory
for regmap operations. This is incompatible with spinlock based locking
which is used for fast_io operations. Disable locking for the associated
unit tests to avoid lockdep splashes.

Fixes: f033c26de5a5 ("regmap: Add maple tree based register cache")
Fixes: 2238959b6ad2 ("regmap: Add some basic kunit tests")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20230720032848.1306349-1-linux@roeck-us.net
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Provide test for regcache_reg_present()</title>
<updated>2023-07-18T14:05:11Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-07-17T20:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d881ee5a872fd539a8c693e4c8656b9343c9aae0'/>
<id>urn:sha1:d881ee5a872fd539a8c693e4c8656b9343c9aae0</id>
<content type='text'>
Provide a KUnit test for the newly added API.

Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230717-regmap-cache-check-v1-2-73ef688afae3@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Allow reads from write only registers with the flat cache</title>
<updated>2023-06-19T11:59:41Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-06-17T20:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0c99ffe212679b338d12fe283964e6e43ce1501'/>
<id>urn:sha1:d0c99ffe212679b338d12fe283964e6e43ce1501</id>
<content type='text'>
The flat cache is intended for devices that need the lowest overhead so
doesn't track any sparseness.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230617-regmap-kunit-read-writeonly-flat-v1-1-efd3ed66dec6@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Add test to make sure we don't sync to read only registers</title>
<updated>2023-06-14T11:27:08Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-06-13T20:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=357a1ebd0c012f5421252547ebf4ee619b45733d'/>
<id>urn:sha1:357a1ebd0c012f5421252547ebf4ee619b45733d</id>
<content type='text'>
Ensure that a read only value in the register cache does not result in a
write during regcache_sync().

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230613-regmap-kunit-read-write-v1-3-2db337c52827@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Add a test case for write only registers</title>
<updated>2023-06-14T11:27:07Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-06-13T20:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a07bff4054c9e2b3a5c5790312a4a45aaeca7afe'/>
<id>urn:sha1:a07bff4054c9e2b3a5c5790312a4a45aaeca7afe</id>
<content type='text'>
Validate that attempts to read from write only registers fail and don't
somehow trigger spurious hardware accesses.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230613-regmap-kunit-read-write-v1-2-2db337c52827@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Add test that writes to write only registers are prevented</title>
<updated>2023-06-14T11:27:06Z</updated>
<author>
<name>Mark Brown</name>
</author>
<published>2023-06-13T20:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=180033061e203a7c5510e7c38bccd885657de517'/>
<id>urn:sha1:180033061e203a7c5510e7c38bccd885657de517</id>
<content type='text'>
We should have error checking that verifies that writes to write only
registers are suppressed, verify that this happens as it should.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230613-regmap-kunit-read-write-v1-1-2db337c52827@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
