Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-10 Thread Mark Brown
On Tue, Jan 09, 2018 at 11:47:19AM -0600, Andrew F. Davis wrote: > On 01/09/2018 10:24 AM, Mark Brown wrote: > > That's a bit strong; we just used the supplied defaults from bss after > > all! Feel free to contribute documentation. > I meant it to be strong, a cache that never consults the backi

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-09 Thread Andrew F. Davis
On 01/09/2018 10:24 AM, Mark Brown wrote: > On Mon, Jan 08, 2018 at 10:46:58AM -0600, Andrew F. Davis wrote: >> On 01/08/2018 10:36 AM, Mark Brown wrote: > >>> Users are supposed to ensure that the cache is fully initialized either >>> by supplying defaults or writing to all the registers. Adding

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-09 Thread Mark Brown
On Mon, Jan 08, 2018 at 10:46:58AM -0600, Andrew F. Davis wrote: > On 01/08/2018 10:36 AM, Mark Brown wrote: > > Users are supposed to ensure that the cache is fully initialized either > > by supplying defaults or writing to all the registers. Adding reads is > > problematic since we'd suddenly s

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-08 Thread Andrew F. Davis
On 01/08/2018 10:36 AM, Mark Brown wrote: > On Mon, Jan 08, 2018 at 10:25:28AM -0600, Andrew F. Davis wrote: > >> I can understand the need for a fast cache type, but without this change >> the implementation is simply wrong IMHO. Reading from a register that >> has not been read/written to should

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-08 Thread Mark Brown
On Mon, Jan 08, 2018 at 10:25:28AM -0600, Andrew F. Davis wrote: > I can understand the need for a fast cache type, but without this change > the implementation is simply wrong IMHO. Reading from a register that > has not been read/written to should not just assume the default value is > 0, it sho

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-08 Thread Andrew F. Davis
On 01/08/2018 06:08 AM, Mark Brown wrote: > On Sun, Jan 07, 2018 at 05:22:34PM -0600, Andrew F. Davis wrote: >> Other regmap cache types (LZO, RBtree) report back un-successful register >> lookups when a value has not been previously written into the cache. This >> allows regmap core to perform a r

Re: [PATCH 3/3] regcache: flat: Add valid bit to this cache type

2018-01-08 Thread Mark Brown
On Sun, Jan 07, 2018 at 05:22:34PM -0600, Andrew F. Davis wrote: > Other regmap cache types (LZO, RBtree) report back un-successful register > lookups when a value has not been previously written into the cache. This > allows regmap core to perform a real un-cached lookup to fetch the value. > The