Re: [PATCH] regcache: disable cache_only before rewriting paging registers

From: Bui Duc Phuc

Date: Mon Jul 13 2026 - 09:15:55 EST


Hi Mark,

Thanks for the feedback.

>
> No, any access to the hardware is buggy - the whole point of cache only
> mode is that we can't access the hardware. The paging register is part
> of the context that needs to be rewritten when resyncing the cache.

To provide some context: I based this patch on your previous commit here:

https://patchew.org/linux/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@xxxxxxxxxx/

Reading that commit, I mistakenly understood that we must enforce
the hardware writes here at all costs. However, based on your explanation,
I see that I misunderstood the architectural intent.

Just to clarify for my understanding: does this mean regcache_sync()
is strictly
expected to be called only after cache_only has been set to false?

If so, I will drop this patch.

Best regards,
Phuc