Lines Matching refs:iscache
50 struct pt_image_section_cache *iscache; member
78 struct pt_image_section_cache *iscache);
80 struct pt_image_section_cache *iscache);
263 struct pt_image_section_cache *iscache) in pt_section_attach() argument
267 if (!section || !iscache) in pt_section_attach()
277 if (section->iscache || !ucount) in pt_section_attach()
280 section->iscache = iscache; in pt_section_attach()
295 if (section->iscache != iscache) in pt_section_attach()
308 struct pt_image_section_cache *iscache) in pt_section_detach() argument
312 if (!section || !iscache) in pt_section_detach()
319 if (section->iscache != iscache) in pt_section_detach()
333 section->iscache = NULL; in pt_section_detach()
344 struct pt_image_section_cache *iscache; in pt_section_map() local
359 iscache = section->iscache; in pt_section_map()
360 if (iscache) in pt_section_map()
361 status = pt_iscache_notify_map(iscache, section); in pt_section_map()
417 struct pt_image_section_cache *iscache; in pt_section_request_bcache() local
442 iscache = section->iscache; in pt_section_request_bcache()
443 if (iscache) { in pt_section_request_bcache()
444 errcode = pt_iscache_notify_resize(iscache, section, memsize); in pt_section_request_bcache()
537 struct pt_image_section_cache iscache; member
577 errcode = pt_iscache_init(&cfix->iscache, NULL); in cfix_init()
589 cfix->iscache.limit = 0x7800; in sfix_init()
592 status = pt_iscache_add(&cfix->iscache, cfix->section[idx], in sfix_init()
609 pt_iscache_fini(&cfix->iscache); in cfix_fini()
615 ptu_null(cfix->section[idx]->iscache); in cfix_fini()
654 struct pt_image_section_cache iscache; in add_null() local
661 errcode = pt_iscache_add(&iscache, NULL, 0ull); in add_null()
679 struct pt_image_section_cache iscache; in lookup_null() local
687 errcode = pt_iscache_lookup(&iscache, NULL, &laddr, 0); in lookup_null()
690 errcode = pt_iscache_lookup(&iscache, §ion, NULL, 0); in lookup_null()
715 struct pt_image_section_cache iscache; in add_file_null() local
721 errcode = pt_iscache_add_file(&iscache, NULL, 0ull, 0ull, 0ull); in add_file_null()
729 struct pt_image_section_cache iscache; in read_null() local
736 errcode = pt_iscache_read(&iscache, NULL, sizeof(buffer), 1ull, 0ull); in read_null()
739 errcode = pt_iscache_read(&iscache, &buffer, 0ull, 1, 0ull); in read_null()
757 pt_iscache_init(&cfix->iscache, "iscache-name"); in name()
759 name = pt_iscache_name(&cfix->iscache); in name()
769 pt_iscache_init(&cfix->iscache, NULL); in name_none()
771 name = pt_iscache_name(&cfix->iscache); in name_none()
781 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add()
799 errcode = pt_iscache_add(&cfix->iscache, §ion, 0ull); in add_no_name()
809 isid = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file()
823 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find()
826 found = pt_iscache_find(&cfix->iscache, section->filename, in find()
841 found = pt_iscache_find(&cfix->iscache, section->filename, in find_empty()
856 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_filename()
859 found = pt_iscache_find(&cfix->iscache, "bad-filename", in find_bad_filename()
870 errcode = pt_iscache_find(&cfix->iscache, NULL, 0ull, 0ull, 0ull); in find_null_filename()
884 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_offset()
887 found = pt_iscache_find(&cfix->iscache, section->filename, 0ull, in find_bad_offset()
902 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_size()
905 found = pt_iscache_find(&cfix->iscache, section->filename, in find_bad_size()
920 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_laddr()
923 found = pt_iscache_find(&cfix->iscache, section->filename, in find_bad_laddr()
936 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in lookup()
939 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in lookup()
956 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in lookup_bad_isid()
959 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, 0); in lookup_bad_isid()
962 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, -isid); in lookup_bad_isid()
965 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid + 1); in lookup_bad_isid()
975 errcode = pt_iscache_clear(&cfix->iscache); in clear_empty()
989 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in clear_find()
992 errcode = pt_iscache_clear(&cfix->iscache); in clear_find()
996 found = pt_iscache_find(&cfix->iscache, section->filename, in clear_find()
1009 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in clear_lookup()
1012 errcode = pt_iscache_clear(&cfix->iscache); in clear_lookup()
1015 errcode = pt_iscache_lookup(&cfix->iscache, §ion, &laddr, isid); in clear_lookup()
1025 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice()
1028 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice()
1041 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_same()
1047 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 0ull); in add_same()
1061 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice_different_laddr()
1064 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[0], 1ull); in add_twice_different_laddr()
1082 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_same_different_laddr()
1088 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 1ull); in add_same_different_laddr()
1102 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_different_same_laddr()
1105 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 0ull); in add_different_same_laddr()
1118 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same()
1121 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same()
1135 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same_different_laddr()
1138 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 1ull); in add_file_same_different_laddr()
1152 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_different_same_laddr()
1155 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 1ull, 1ull, 0ull); in add_file_different_same_laddr()
1169 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read()
1172 status = pt_iscache_read(&cfix->iscache, buffer, 2ull, isid, 0xa008ull); in read()
1186 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_truncate()
1189 status = pt_iscache_read(&cfix->iscache, buffer, sizeof(buffer), isid, in read_truncate()
1203 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_bad_vaddr()
1206 status = pt_iscache_read(&cfix->iscache, buffer, 1ull, isid, 0xb000ull); in read_bad_vaddr()
1218 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_bad_isid()
1221 status = pt_iscache_read(&cfix->iscache, buffer, 1ull, isid + 1, in read_bad_isid()
1233 cfix->iscache.limit = cfix->section[0]->size; in lru_map()
1234 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map()
1235 ptu_null(cfix->iscache.lru); in lru_map()
1237 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map()
1246 ptu_ptr(cfix->iscache.lru); in lru_map()
1247 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map()
1248 ptu_null(cfix->iscache.lru->next); in lru_map()
1249 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_map()
1259 cfix->iscache.limit = cfix->section[0]->size; in lru_read()
1260 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_read()
1261 ptu_null(cfix->iscache.lru); in lru_read()
1263 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_read()
1266 status = pt_iscache_read(&cfix->iscache, buffer, 2ull, isid, 0xa008ull); in lru_read()
1269 ptu_ptr(cfix->iscache.lru); in lru_read()
1270 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_read()
1271 ptu_null(cfix->iscache.lru->next); in lru_read()
1272 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_read()
1281 cfix->iscache.limit = 2 * cfix->section[0]->size; in lru_map_nodup()
1282 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_nodup()
1283 ptu_null(cfix->iscache.lru); in lru_map_nodup()
1285 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_nodup()
1300 ptu_ptr(cfix->iscache.lru); in lru_map_nodup()
1301 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map_nodup()
1302 ptu_null(cfix->iscache.lru->next); in lru_map_nodup()
1303 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_map_nodup()
1312 cfix->iscache.limit = cfix->section[0]->size - 1; in lru_map_too_big()
1313 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_too_big()
1314 ptu_null(cfix->iscache.lru); in lru_map_too_big()
1316 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_too_big()
1325 ptu_null(cfix->iscache.lru); in lru_map_too_big()
1326 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_too_big()
1335 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_map_add_front()
1336 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_add_front()
1337 ptu_null(cfix->iscache.lru); in lru_map_add_front()
1339 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_add_front()
1342 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_add_front()
1357 ptu_ptr(cfix->iscache.lru); in lru_map_add_front()
1358 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_map_add_front()
1359 ptu_ptr(cfix->iscache.lru->next); in lru_map_add_front()
1360 ptu_ptr_eq(cfix->iscache.lru->next->section, cfix->section[0]); in lru_map_add_front()
1361 ptu_null(cfix->iscache.lru->next->next); in lru_map_add_front()
1362 ptu_uint_eq(cfix->iscache.used, in lru_map_add_front()
1372 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_map_move_front()
1373 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_move_front()
1374 ptu_null(cfix->iscache.lru); in lru_map_move_front()
1376 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_move_front()
1379 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_move_front()
1400 ptu_ptr(cfix->iscache.lru); in lru_map_move_front()
1401 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map_move_front()
1402 ptu_ptr(cfix->iscache.lru->next); in lru_map_move_front()
1403 ptu_ptr_eq(cfix->iscache.lru->next->section, cfix->section[1]); in lru_map_move_front()
1404 ptu_null(cfix->iscache.lru->next->next); in lru_map_move_front()
1405 ptu_uint_eq(cfix->iscache.used, in lru_map_move_front()
1415 cfix->iscache.limit = cfix->section[0]->size + in lru_map_evict()
1417 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_evict()
1418 ptu_null(cfix->iscache.lru); in lru_map_evict()
1420 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_evict()
1423 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_evict()
1438 ptu_ptr(cfix->iscache.lru); in lru_map_evict()
1439 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_map_evict()
1440 ptu_null(cfix->iscache.lru->next); in lru_map_evict()
1441 ptu_uint_eq(cfix->iscache.used, cfix->section[1]->size); in lru_map_evict()
1450 cfix->iscache.limit = 4 * cfix->section[0]->size + in lru_bcache_evict()
1452 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_evict()
1453 ptu_null(cfix->iscache.lru); in lru_bcache_evict()
1455 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_bcache_evict()
1458 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_bcache_evict()
1476 ptu_ptr(cfix->iscache.lru); in lru_bcache_evict()
1477 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_bcache_evict()
1478 ptu_null(cfix->iscache.lru->next); in lru_bcache_evict()
1479 ptu_uint_eq(cfix->iscache.used, 4 * cfix->section[0]->size); in lru_bcache_evict()
1488 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_bcache_clear()
1489 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_clear()
1490 ptu_null(cfix->iscache.lru); in lru_bcache_clear()
1492 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_bcache_clear()
1495 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_bcache_clear()
1513 ptu_null(cfix->iscache.lru); in lru_bcache_clear()
1514 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_clear()
1523 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_limit_evict()
1524 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_limit_evict()
1525 ptu_null(cfix->iscache.lru); in lru_limit_evict()
1527 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_limit_evict()
1530 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_limit_evict()
1545 status = pt_iscache_set_limit(&cfix->iscache, in lru_limit_evict()
1550 ptu_ptr(cfix->iscache.lru); in lru_limit_evict()
1551 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_limit_evict()
1552 ptu_null(cfix->iscache.lru->next); in lru_limit_evict()
1553 ptu_uint_eq(cfix->iscache.used, cfix->section[1]->size); in lru_limit_evict()
1562 cfix->iscache.limit = cfix->section[0]->size; in lru_clear()
1563 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_clear()
1564 ptu_null(cfix->iscache.lru); in lru_clear()
1566 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_clear()
1575 status = pt_iscache_clear(&cfix->iscache); in lru_clear()
1578 ptu_null(cfix->iscache.lru); in lru_clear()
1579 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_clear()
1604 isid = pt_iscache_add(&cfix->iscache, in worker_add()
1609 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add()
1660 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file()
1665 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file()
1742 errcode = pt_iscache_set_limit(&cfix->iscache, limit); in worker_map_limit()
1803 isid = pt_iscache_add(&cfix->iscache, section, laddr); in worker_add_map()
1836 isid = pt_iscache_add(&cfix->iscache, section, laddr); in worker_add_clear()
1840 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_clear()
1866 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file_map()
1871 errcode = pt_iscache_lookup(&cfix->iscache, §ion, in worker_add_file_map()
1908 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file_clear()
1916 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_file_clear()