Lines Matching refs:cache
33 struct regcache_flat_data *cache; in regcache_flat_init() local
39 cache = kzalloc_flex(*cache, data, cache_size, map->alloc_flags); in regcache_flat_init()
40 if (!cache) in regcache_flat_init()
43 cache->valid = bitmap_zalloc(cache_size, map->alloc_flags); in regcache_flat_init()
44 if (!cache->valid) in regcache_flat_init()
47 map->cache = cache; in regcache_flat_init()
52 kfree(cache); in regcache_flat_init()
58 struct regcache_flat_data *cache = map->cache; in regcache_flat_exit() local
60 if (cache) in regcache_flat_exit()
61 bitmap_free(cache->valid); in regcache_flat_exit()
63 kfree(cache); in regcache_flat_exit()
64 map->cache = NULL; in regcache_flat_exit()
71 struct regcache_flat_data *cache = map->cache; in regcache_flat_populate() local
78 cache->data[index] = map->reg_defaults[i].def; in regcache_flat_populate()
79 __set_bit(index, cache->valid); in regcache_flat_populate()
90 if (test_bit(index, cache->valid)) in regcache_flat_populate()
96 cache->data[index] = value; in regcache_flat_populate()
97 __set_bit(index, cache->valid); in regcache_flat_populate()
107 struct regcache_flat_data *cache = map->cache; in regcache_flat_read() local
111 if (unlikely(!test_bit(index, cache->valid))) in regcache_flat_read()
115 *value = cache->data[index]; in regcache_flat_read()
123 struct regcache_flat_data *cache = map->cache; in regcache_flat_sparse_read() local
126 if (unlikely(!test_bit(index, cache->valid))) in regcache_flat_sparse_read()
129 *value = cache->data[index]; in regcache_flat_sparse_read()
137 struct regcache_flat_data *cache = map->cache; in regcache_flat_write() local
140 cache->data[index] = value; in regcache_flat_write()
141 __set_bit(index, cache->valid); in regcache_flat_write()
149 struct regcache_flat_data *cache = map->cache; in regcache_flat_drop() local
153 bitmap_clear(cache->valid, bitmap_min, bitmap_max + 1 - bitmap_min); in regcache_flat_drop()