| /linux/fs/ntfs3/ |
| H A D | run.c | 22 CLST vcn; /* Virtual cluster number. */ member 35 static bool run_lookup(const struct runs_tree *run, CLST vcn, size_t *index) in run_lookup() argument 50 if (vcn < r->vcn) { in run_lookup() 55 if (vcn < r->vcn + r->len) { in run_lookup() 61 if (vcn >= r->vcn + r->len) { in run_lookup() 66 if (vcn >= r->vcn) { in run_lookup() 75 if (vcn < r->vcn) { in run_lookup() 79 } else if (vcn >= r->vcn + r->len) { in run_lookup() 105 CLST end = r->vcn + r->len; in run_consolidate() 109 if (n->vcn > end) in run_consolidate() [all …]
|
| H A D | attrib.c | 61 struct runs_tree *run, const CLST *vcn) in attr_load_runs() argument 72 if (vcn && (evcn < *vcn || *vcn < svcn)) in attr_load_runs() 82 vcn ? *vcn : svcn, Add2Ptr(attr, run_off), in attr_load_runs() 94 CLST vcn, CLST len, CLST *done, bool trim, in run_deallocate_ex() argument 98 CLST vcn_next, vcn0 = vcn, lcn, clen, dn = 0; in run_deallocate_ex() 104 if (!run_lookup_entry(run, vcn, &lcn, &clen, &idx)) { in run_deallocate_ex() 127 if (!run_remove_range(run_da, vcn, clen, in run_deallocate_ex() 142 vcn_next = vcn + clen; in run_deallocate_ex() 143 if (!run_get_entry(run, ++idx, &vcn, &lcn, &clen) || in run_deallocate_ex() 144 vcn != vcn_next) { in run_deallocate_ex() [all …]
|
| H A D | attrlist.c | 200 u8 name_len, const CLST *vcn) in al_find_ex() argument 220 le_vcn = le64_to_cpu(le->vcn); in al_find_ex() 235 if (!vcn) in al_find_ex() 238 if (*vcn == le_vcn) in al_find_ex() 241 if (*vcn < le_vcn) in al_find_ex() 258 u8 name_len, CLST vcn) in al_find_le_to_insert() argument 274 if (!le->vcn) { in al_find_le_to_insert() 288 if (le64_to_cpu(le->vcn) >= vcn) in al_find_le_to_insert() 349 le->vcn = cpu_to_le64(svcn); in al_add_le()
|
| H A D | ntfs_fs.h | 461 struct runs_tree *run_da, CLST vcn, CLST lcn, 481 int attr_data_get_block(struct ntfs_inode *ni, CLST vcn, CLST clen, CLST *lcn, 484 int attr_data_get_block_locked(struct ntfs_inode *ni, CLST vcn, CLST clen, 490 CLST vcn); 519 u8 name_len, const CLST *vcn); 581 u8 name_len, const CLST *vcn, 884 bool run_lookup_entry(const struct runs_tree *run, CLST vcn, CLST *lcn, 887 const struct runs_tree *run_da, CLST vcn, CLST *lcn, 889 void run_truncate(struct runs_tree *run, CLST vcn); 890 void run_truncate_head(struct runs_tree *run, CLST vcn); [all …]
|
| H A D | fsntfs.c | 844 CLST lcn, vcn, len; in ntfs_refresh_zone() local 853 vcn = bytes_to_cluster(sbi, in ntfs_refresh_zone() 856 if (!run_lookup_entry(&ni->file.run, vcn - 1, &lcn, &len, NULL)) in ntfs_refresh_zone() 1132 CLST lcn, clen, vcn = vbo >> cluster_bits, vcn_next; in ntfs_sb_write_run() local 1136 if (!run_lookup_entry(run, vcn, &lcn, &clen, &idx)) in ntfs_sb_write_run() 1156 vcn_next = vcn + clen; in ntfs_sb_write_run() 1157 if (!run_get_entry(run, ++idx, &vcn, &lcn, &clen) || in ntfs_sb_write_run() 1158 vcn != vcn_next) in ntfs_sb_write_run() 1201 CLST vcn_next, vcn = vbo >> cluster_bits; in ntfs_read_run_nb_ra() local 1217 } else if (!run_lookup_entry(run, vcn, &lcn, &clen, &idx)) { in ntfs_read_run_nb_ra() [all …]
|
| /linux/fs/ntfs/ |
| H A D | runlist.c | 162 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable() 250 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append() 254 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append() 294 disc = (src[0].vcn > 0); in ntfs_rl_insert() 304 disc = (src[0].vcn > dst[loc - 1].vcn + merged_length); in ntfs_rl_insert() 335 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert() 339 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert() 344 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert() 345 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_insert() 347 dst[loc].vcn = 0; in ntfs_rl_insert() [all …]
|
| H A D | index.c | 90 static s64 ntfs_ib_vcn_to_pos(struct ntfs_index_context *icx, s64 vcn) in ntfs_ib_vcn_to_pos() argument 92 return vcn << icx->vcn_size_bits; in ntfs_ib_vcn_to_pos() 102 s64 ret, vcn = le64_to_cpu(ib->index_block_vcn); in ntfs_ib_write() local 104 ntfs_debug("vcn: %lld\n", vcn); in ntfs_ib_write() 111 ntfs_ib_vcn_to_pos(icx, vcn), icx->block_size, in ntfs_ib_write() 119 vcn, (unsigned long long)icx->idx_ni->mft_no); in ntfs_ib_write() 446 static void ntfs_ie_set_vcn(struct index_entry *ie, s64 vcn) in ntfs_ie_set_vcn() argument 448 *ntfs_ie_get_vcn_addr(ie) = cpu_to_le64(vcn); in ntfs_ie_set_vcn() 516 u32 block_size, s64 vcn, __le32 cr, in ntfs_index_block_inconsistent() argument 527 vcn, (unsigned long long)inum); in ntfs_index_block_inconsistent() [all …]
|
| H A D | logfile.c | 642 s64 vcn, end_vcn; in ntfs_empty_logfile() local 666 vcn = 0; in ntfs_empty_logfile() 674 if (unlikely(!rl || vcn < rl->vcn || !rl->length)) { in ntfs_empty_logfile() 676 err = ntfs_map_runlist_nolock(log_ni, vcn, NULL); in ntfs_empty_logfile() 684 while (rl->length && vcn >= rl[1].vcn) in ntfs_empty_logfile() 710 vcn = rl->vcn; in ntfs_empty_logfile() 725 if (rl[1].vcn > end_vcn) in ntfs_empty_logfile() 726 len = end_vcn - rl->vcn; in ntfs_empty_logfile() 756 } while ((++rl)->vcn < end_vcn); in ntfs_empty_logfile()
|
| H A D | attrib.h | 60 int ntfs_map_runlist_nolock(struct ntfs_inode *ni, s64 vcn, 62 int ntfs_map_runlist(struct ntfs_inode *ni, s64 vcn); 63 s64 ntfs_attr_vcn_to_lcn_nolock(struct ntfs_inode *ni, const s64 vcn, 66 const s64 vcn, struct ntfs_attr_search_ctx *ctx); 68 const s64 vcn); 145 struct runlist_element *ntfs_attr_vcn_to_rl(struct ntfs_inode *ni, s64 vcn, s64 *lcn);
|
| H A D | attrib.c | 86 int ntfs_map_runlist_nolock(struct ntfs_inode *ni, s64 vcn, struct ntfs_attr_search_ctx *ctx) in ntfs_map_runlist_nolock() argument 101 (unsigned long long)vcn); in ntfs_map_runlist_nolock() 139 if (vcn >= allocated_size_vcn || (a->type == ni->type && in ntfs_map_runlist_nolock() 144 <= vcn && end_vcn >= vcn)) in ntfs_map_runlist_nolock() 172 CASE_SENSITIVE, vcn, NULL, 0, ctx); in ntfs_map_runlist_nolock() 191 if (unlikely(vcn && vcn >= end_vcn)) { in ntfs_map_runlist_nolock() 304 int ntfs_map_runlist(struct ntfs_inode *ni, s64 vcn) in ntfs_map_runlist() argument 310 if (likely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) <= in ntfs_map_runlist() 312 err = ntfs_map_runlist_nolock(ni, vcn, NULL); in ntfs_map_runlist() 317 struct runlist_element *ntfs_attr_vcn_to_rl(struct ntfs_inode *ni, s64 vcn, s64 *lcn) in ntfs_attr_vcn_to_rl() argument [all …]
|
| H A D | wof.c | 156 s64 vcn; in ntfs_bdev_read_from_rl() local 165 vcn = start_sector >> sec_per_clu_bits; in ntfs_bdev_read_from_rl() 175 rl = __ntfs_attr_find_vcn_nolock(runlist, vcn); in ntfs_bdev_read_from_rl() 186 if (rl->length <= 0 || vcn < rl->vcn) { in ntfs_bdev_read_from_rl() 191 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_bdev_read_from_rl() 197 if (check_add_overflow(rl->vcn, rl->length, &rl_end) || in ntfs_bdev_read_from_rl() 198 rl_end <= vcn || in ntfs_bdev_read_from_rl() 199 (u64)(rl_end - vcn) > (U64_MAX >> sec_per_clu_bits)) { in ntfs_bdev_read_from_rl() 203 available = (u64)(rl_end - vcn) << sec_per_clu_bits; in ntfs_bdev_read_from_rl() 236 vcn = rl->vcn; in ntfs_bdev_read_from_rl()
|
| H A D | lcnalloc.c | 432 rl[rlpos].vcn = rl[rlpos - 1].vcn + in ntfs_cluster_alloc() 436 rl[rlpos].vcn = start_vcn; in ntfs_cluster_alloc() 725 rl[rlpos].vcn = rl[rlpos - 1].vcn + rl[rlpos - 1].length; in ntfs_cluster_alloc() 901 delta = start_vcn - rl->vcn; in __ntfs_cluster_free() 935 s64 vcn; in __ntfs_cluster_free() local 938 vcn = rl->vcn; in __ntfs_cluster_free() 939 rl = ntfs_attr_find_vcn_nolock(ni, vcn, ctx); in __ntfs_cluster_free() 995 rl_off = start_vcn - rl->vcn; in __ntfs_cluster_free()
|
| H A D | mft.c | 1254 rl[1].vcn++; in ntfs_mft_bitmap_extend_allocation_nolock() 1263 rl2 = ntfs_cluster_alloc(vol, rl[1].vcn, 1, lcn, DATA_ZONE, in ntfs_mft_bitmap_extend_allocation_nolock() 1308 mftbmp_ni->name_len, CASE_SENSITIVE, rl[1].vcn, NULL, in ntfs_mft_bitmap_extend_allocation_nolock() 1321 if (ll >= rl2->vcn) in ntfs_mft_bitmap_extend_allocation_nolock() 1324 WARN_ON(ll < rl2->vcn); in ntfs_mft_bitmap_extend_allocation_nolock() 1325 WARN_ON(ll >= rl2->vcn + rl2->length); in ntfs_mft_bitmap_extend_allocation_nolock() 1359 a->data.non_resident.highest_vcn = cpu_to_le64(rl[1].vcn - 1); in ntfs_mft_bitmap_extend_allocation_nolock() 1399 mftbmp_ni->name_len, CASE_SENSITIVE, rl[1].vcn, NULL, in ntfs_mft_bitmap_extend_allocation_nolock() 1417 a->data.non_resident.highest_vcn = cpu_to_le64(rl[1].vcn - 2); in ntfs_mft_bitmap_extend_allocation_nolock() 1422 rl[1].vcn--; in ntfs_mft_bitmap_extend_allocation_nolock() [all …]
|
| H A D | compress.c | 478 s64 vcn; in ntfs_read_compressed_block() local 600 for (vcn = start_vcn, start_vcn += cb_clusters; vcn < start_vcn; in ntfs_read_compressed_block() 601 vcn++) { in ntfs_read_compressed_block() 611 while (rl->length && rl[1].vcn <= vcn) in ntfs_read_compressed_block() 613 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_read_compressed_block() 617 (unsigned long long)vcn, in ntfs_read_compressed_block() 636 if (!ntfs_map_runlist(ni, vcn)) in ntfs_read_compressed_block() 683 if (vcn == start_vcn - cb_clusters) { in ntfs_read_compressed_block() 718 } else if (vcn == start_vcn) { in ntfs_read_compressed_block()
|
| H A D | dir.c | 88 s64 vcn, old_vcn; in ntfs_lookup_inode_by_name() local 291 vcn = le64_to_cpup((__le64 *)((u8 *)ie + le16_to_cpu(ie->length) - 8)); in ntfs_lookup_inode_by_name() 315 folio = read_mapping_folio(ia_mapping, vcn << in ntfs_lookup_inode_by_name() 339 ia = (struct index_block *)(kaddr + ((vcn << in ntfs_lookup_inode_by_name() 352 vcn, dir_ni->mft_no); in ntfs_lookup_inode_by_name() 357 vcn, COLLATION_FILE_NAME, in ntfs_lookup_inode_by_name() 521 old_vcn = vcn; in ntfs_lookup_inode_by_name() 522 vcn = le64_to_cpup((__le64 *)((u8 *)ie + in ntfs_lookup_inode_by_name() 524 if (vcn >= 0) { in ntfs_lookup_inode_by_name() 530 ntfs_cluster_to_pidx(vol, vcn)) in ntfs_lookup_inode_by_name()
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | vcn_v5_0_1.c | 101 adev->vcn.disable_kq = false; in vcn_v5_0_1_early_init() 102 adev->vcn.disable_uq = true; in vcn_v5_0_1_early_init() 105 adev->vcn.disable_kq = true; in vcn_v5_0_1_early_init() 106 adev->vcn.disable_uq = true; in vcn_v5_0_1_early_init() 110 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) in vcn_v5_0_1_early_init() 112 adev->vcn.inst[i].num_enc_rings = 1; in vcn_v5_0_1_early_init() 118 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { in vcn_v5_0_1_early_init() 119 adev->vcn.inst[i].set_pg_state = vcn_v5_0_1_set_pg_state; in vcn_v5_0_1_early_init() 133 adev->vcn.supported_reset = in vcn_v5_0_1_late_init() 134 amdgpu_get_soft_full_reset_mask(&adev->vcn.inst[0].ring_enc[0]); in vcn_v5_0_1_late_init() [all …]
|
| H A D | vcn_v2_0.c | 116 adev->vcn.inst[0].num_enc_rings = 1; in vcn_v2_0_early_init() 118 adev->vcn.inst[0].num_enc_rings = 2; in vcn_v2_0_early_init() 120 adev->vcn.inst->set_pg_state = vcn_v2_0_set_pg_state; in vcn_v2_0_early_init() 145 &adev->vcn.inst->irq); in vcn_v2_0_sw_init() 150 for (i = 0; i < adev->vcn.inst[0].num_enc_rings; ++i) { in vcn_v2_0_sw_init() 153 &adev->vcn.inst->irq); in vcn_v2_0_sw_init() 168 ring = &adev->vcn.inst->ring_dec; in vcn_v2_0_sw_init() 171 ring->doorbell_index = adev->doorbell_index.vcn.vcn_ring0_1 << 1; in vcn_v2_0_sw_init() 175 r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0, in vcn_v2_0_sw_init() 180 adev->vcn.inst[0].internal.context_id = mmUVD_CONTEXT_ID_INTERNAL_OFFSET; in vcn_v2_0_sw_init() [all …]
|
| H A D | vcn_v3_0.c | 132 adev->vcn.num_vcn_inst = VCN_INSTANCES_SIENNA_CICHLID; in vcn_v3_0_early_init() 133 adev->vcn.harvest_config = 0; in vcn_v3_0_early_init() 134 for (i = 0; i < adev->vcn.num_vcn_inst; i++) in vcn_v3_0_early_init() 135 adev->vcn.inst[i].num_enc_rings = 1; in vcn_v3_0_early_init() 138 if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 | in vcn_v3_0_early_init() 143 for (i = 0; i < adev->vcn.num_vcn_inst; i++) { in vcn_v3_0_early_init() 146 adev->vcn.inst[i].num_enc_rings = 0; in vcn_v3_0_early_init() 148 adev->vcn.inst[i].num_enc_rings = 2; in vcn_v3_0_early_init() 156 for (i = 0; i < adev->vcn.num_vcn_inst; i++) { in vcn_v3_0_early_init() 157 adev->vcn.inst[i].set_pg_state = vcn_v3_0_set_pg_state; in vcn_v3_0_early_init() [all …]
|
| H A D | vcn_v5_0_0.c | 100 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) in vcn_v5_0_0_early_init() 102 adev->vcn.inst[i].num_enc_rings = 1; in vcn_v5_0_0_early_init() 107 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { in vcn_v5_0_0_early_init() 108 adev->vcn.inst[i].set_pg_state = vcn_v5_0_0_set_pg_state; in vcn_v5_0_0_early_init() 131 for (i = 0; i < adev->vcn.num_vcn_inst; i++) { in vcn_v5_0_0_sw_init() 134 if (adev->vcn.harvest_config & (1 << i)) in vcn_v5_0_0_sw_init() 147 atomic_set(&adev->vcn.inst[i].sched_score, 0); in vcn_v5_0_0_sw_init() 151 VCN_5_0__SRCID__UVD_ENC_GENERAL_PURPOSE, &adev->vcn.inst[i].irq); in vcn_v5_0_0_sw_init() 157 VCN_5_0__SRCID_UVD_POISON, &adev->vcn.inst[i].irq); in vcn_v5_0_0_sw_init() 161 ring = &adev->vcn.inst[i].ring_enc[0]; in vcn_v5_0_0_sw_init() [all …]
|
| H A D | vcn_v4_0_3.c | 103 return (adev->vcn.caps & AMDGPU_VCN_CAPS(RRMT_ENABLED)) == 0; in vcn_v4_0_3_normalizn_reqd() 122 adev->vcn.disable_kq = false; in vcn_v4_0_3_early_init() 123 adev->vcn.disable_uq = true; in vcn_v4_0_3_early_init() 126 adev->vcn.disable_kq = true; in vcn_v4_0_3_early_init() 127 adev->vcn.disable_uq = true; in vcn_v4_0_3_early_init() 131 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) in vcn_v4_0_3_early_init() 133 adev->vcn.inst[i].num_enc_rings = 1; in vcn_v4_0_3_early_init() 139 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { in vcn_v4_0_3_early_init() 140 adev->vcn.inst[i].set_pg_state = vcn_v4_0_3_set_pg_state; in vcn_v4_0_3_early_init() 169 adev->vcn.supported_reset = in vcn_v4_0_3_late_init() [all …]
|
| H A D | vcn_v4_0.c | 121 adev->vcn.harvest_config = VCN_HARVEST_MMSCH; in vcn_v4_0_early_init() 122 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { in vcn_v4_0_early_init() 124 adev->vcn.harvest_config |= 1 << i; in vcn_v4_0_early_init() 130 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) in vcn_v4_0_early_init() 132 adev->vcn.inst[i].num_enc_rings = 1; in vcn_v4_0_early_init() 138 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { in vcn_v4_0_early_init() 139 adev->vcn.inst[i].set_pg_state = vcn_v4_0_set_pg_state; in vcn_v4_0_early_init() 153 fw_shared = adev->vcn.inst[inst_idx].fw_shared.cpu_addr; in vcn_v4_0_fw_shared_init() 169 amdgpu_vcn_fwlog_init(&adev->vcn.inst[inst_idx]); in vcn_v4_0_fw_shared_init() 187 for (i = 0; i < adev->vcn.num_vcn_inst; i++) { in vcn_v4_0_sw_init() [all …]
|
| H A D | vega10_reg_init.c | 83 adev->doorbell_index.vcn.vcn_ring0_1 = AMDGPU_DOORBELL64_VCN0_1; in vega10_doorbell_index_init() 84 adev->doorbell_index.vcn.vcn_ring2_3 = AMDGPU_DOORBELL64_VCN2_3; in vega10_doorbell_index_init() 85 adev->doorbell_index.vcn.vcn_ring4_5 = AMDGPU_DOORBELL64_VCN4_5; in vega10_doorbell_index_init() 86 adev->doorbell_index.vcn.vcn_ring6_7 = AMDGPU_DOORBELL64_VCN6_7; in vega10_doorbell_index_init()
|
| H A D | vega20_reg_init.c | 89 adev->doorbell_index.vcn.vcn_ring0_1 = AMDGPU_VEGA20_DOORBELL64_VCN0_1; in vega20_doorbell_index_init() 90 adev->doorbell_index.vcn.vcn_ring2_3 = AMDGPU_VEGA20_DOORBELL64_VCN2_3; in vega20_doorbell_index_init() 91 adev->doorbell_index.vcn.vcn_ring4_5 = AMDGPU_VEGA20_DOORBELL64_VCN4_5; in vega20_doorbell_index_init() 92 adev->doorbell_index.vcn.vcn_ring6_7 = AMDGPU_VEGA20_DOORBELL64_VCN6_7; in vega20_doorbell_index_init()
|
| H A D | soc24.c | 77 if (adev->vcn.num_vcn_inst == hweight8(adev->vcn.harvest_config)) in soc24_query_video_codecs() 291 adev->doorbell_index.vcn.vcn_ring0_1 = AMDGPU_NAVI10_DOORBELL64_VCN0_1; in soc24_init_doorbell_index() 292 adev->doorbell_index.vcn.vcn_ring2_3 = AMDGPU_NAVI10_DOORBELL64_VCN2_3; in soc24_init_doorbell_index() 293 adev->doorbell_index.vcn.vcn_ring4_5 = AMDGPU_NAVI10_DOORBELL64_VCN4_5; in soc24_init_doorbell_index() 294 adev->doorbell_index.vcn.vcn_ring6_7 = AMDGPU_NAVI10_DOORBELL64_VCN6_7; in soc24_init_doorbell_index()
|
| H A D | soc21.c | 173 if (adev->vcn.num_vcn_inst == hweight8(adev->vcn.harvest_config)) in soc21_query_video_codecs() 182 if ((adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0) || in soc21_query_video_codecs() 195 if ((adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0)) { in soc21_query_video_codecs() 508 adev->doorbell_index.vcn.vcn_ring0_1 = AMDGPU_NAVI10_DOORBELL64_VCN0_1; in soc21_init_doorbell_index() 509 adev->doorbell_index.vcn.vcn_ring2_3 = AMDGPU_NAVI10_DOORBELL64_VCN2_3; in soc21_init_doorbell_index() 510 adev->doorbell_index.vcn.vcn_ring4_5 = AMDGPU_NAVI10_DOORBELL64_VCN4_5; in soc21_init_doorbell_index() 511 adev->doorbell_index.vcn.vcn_ring6_7 = AMDGPU_NAVI10_DOORBELL64_VCN6_7; in soc21_init_doorbell_index() 922 if ((adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0) || in soc21_common_late_init()
|