Mark Brown wrote:
That's possibly problematic because the flat cache will of necessity end up with defaults (of 0 from the kzalloc()) for all the registers. You'll still have default values in the cache, though some of the behaviour around optimising syncs does change without them explicitly given. It does deal with the allocation issue but given that the issue was incorrect defaults I'd be a bit concerned.
Ok, I'm confused. Granted, all of this regcache stuff was added after I stopped working on this driver, so I'm out of the loop. But it appears that the regcache cannot properly handle an uninitialized cache. I would expect it to know to perform hard reads of any registers that are uninitialized.
If the regcache wants to have an initialized cache, then it should automatically perform reads an all non-volatile, non-precious registers at initialization.