Lines Matching refs:cache_map

38 struct cache_map {  struct
81 static struct cache_map init_cache_map[CACHE_MAP_MAX] __initdata;
82 static struct cache_map *cache_map __refdata = init_cache_map;
169 memmove(cache_map + idx, cache_map + idx + 1, in rm_map_entry_at()
170 sizeof(*cache_map) * (cache_map_n - idx)); in rm_map_entry_at()
192 struct cache_map *prev = cache_map + idx - 1; in add_map_entry_at()
199 struct cache_map *next = cache_map + idx; in add_map_entry_at()
206 cache_map[idx - 1].end = cache_map[idx].end; in add_map_entry_at()
211 cache_map[idx - 1].end = end; in add_map_entry_at()
215 cache_map[idx].start = start; in add_map_entry_at()
227 memmove(cache_map + idx + 1, cache_map + idx, in add_map_entry_at()
228 sizeof(*cache_map) * (cache_map_n - idx)); in add_map_entry_at()
231 cache_map[idx].start = start; in add_map_entry_at()
232 cache_map[idx].end = end; in add_map_entry_at()
233 cache_map[idx].type = type; in add_map_entry_at()
234 cache_map[idx].fixed = 0; in add_map_entry_at()
243 int ret = start != cache_map[idx].start; in clr_map_range_at()
246 if (start == cache_map[idx].start && end == cache_map[idx].end) { in clr_map_range_at()
248 } else if (start == cache_map[idx].start) { in clr_map_range_at()
249 cache_map[idx].start = end; in clr_map_range_at()
250 } else if (end == cache_map[idx].end) { in clr_map_range_at()
251 cache_map[idx].end = start; in clr_map_range_at()
253 tmp = cache_map[idx].end; in clr_map_range_at()
254 cache_map[idx].end = start; in clr_map_range_at()
255 add_map_entry_at(end, tmp, cache_map[idx].type, idx + 1); in clr_map_range_at()
273 if (start >= cache_map[i].end) in add_map_entry()
276 if (start < cache_map[i].start) { in add_map_entry()
278 tmp = min(end, cache_map[i].start); in add_map_entry()
284 new_type = get_effective_type(type, cache_map[i].type); in add_map_entry()
285 old_type = cache_map[i].type; in add_map_entry()
287 if (cache_map[i].fixed || new_type == old_type) { in add_map_entry()
289 start = cache_map[i].end; in add_map_entry()
294 tmp = min(end, cache_map[i].end); in add_map_entry()
318 cache_map[cache_map_n - 1].fixed = 1; in map_add_var()
383 cache_map[i].fixed = 1; in mtrr_build_map()
395 cache_map[i].start, cache_map[i].end - 1, in mtrr_build_map()
396 mtrr_attrib_to_str(cache_map[i].type)); in mtrr_build_map()
407 cache_map = NULL; in mtrr_copy_map()
413 cache_map = kzalloc_objs(*cache_map, new_size); in mtrr_copy_map()
414 if (cache_map) { in mtrr_copy_map()
415 memmove(cache_map, init_cache_map, in mtrr_copy_map()
416 cache_map_n * sizeof(*cache_map)); in mtrr_copy_map()
531 if (start >= cache_map[i].end) in mtrr_type_lookup()
535 if (start < cache_map[i].start) { in mtrr_type_lookup()
539 if (end <= cache_map[i].start) in mtrr_type_lookup()
544 type = type_merge(type, cache_map[i].type, uniform); in mtrr_type_lookup()
546 start = cache_map[i].end; in mtrr_type_lookup()