Re: [PATCH v1 1/1] regmap: Synchronize cache for the page selector
From: Andy Shevchenko
Date: Fri Nov 22 2024 - 09:01:40 EST
On Fri, Nov 22, 2024 at 03:47:34PM +0200, Andy Shevchenko wrote:
> If the selector register is represented in each page, its value
> in accordance to the debugfs is stale because it gets synchronized
> only after the real page switch happens. Synchronize cache for
> the page selector.
>
> Before (offset followed by hexdump, the first byte is selector):
>
> // Real registers
> 18: 05 ff 00 00 ff 0f 00 00 f0 00 00 00
> ...
> // Virtual (per port)
> 40: 05 ff 00 00 e0 e0 00 00 00 00 00 1f
> 50: 00 ff 00 00 e0 e0 00 00 00 00 00 1f
> 60: 01 ff 00 00 ff ff 00 00 00 00 00 00
> 70: 02 ff 00 00 cf f3 00 00 00 00 00 0c
> 80: 03 ff 00 00 00 00 00 00 00 00 00 ff
> 90: 04 ff 00 00 ff 0f 00 00 f0 00 00 00
>
> After:
>
> // Real registers
> 18: 05 ff 00 00 ff 0f 00 00 f0 00 00 00
> ...
> // Virtual (per port)
> 40: 00 ff 00 00 e0 e0 00 00 00 00 00 1f
> 50: 01 ff 00 00 e0 e0 00 00 00 00 00 1f
> 60: 02 ff 00 00 ff ff 00 00 00 00 00 00
> 70: 03 ff 00 00 cf f3 00 00 00 00 00 0c
> 80: 04 ff 00 00 00 00 00 00 00 00 00 ff
> 90: 05 ff 00 00 ff 0f 00 00 f0 00 00 00
Oh, while it works in my case, it is not the final (*) version I have!
Scratch this, I'll send a v2.
*) it has better check for the selector to be present in the virtual window.
--
With Best Regards,
Andy Shevchenko