/linux/arch/x86/kvm/mmu/ |
H A D | tdp_iter.c | 12 static void tdp_iter_refresh_sptep(struct tdp_iter *iter) in tdp_iter_refresh_sptep() argument 14 iter->sptep = iter->pt_path[iter->level - 1] + in tdp_iter_refresh_sptep() 15 SPTE_INDEX(iter->gfn << PAGE_SHIFT, iter->level); in tdp_iter_refresh_sptep() 16 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in tdp_iter_refresh_sptep() 23 void tdp_iter_restart(struct tdp_iter *iter) in tdp_iter_restart() argument 25 iter->yielded = false; in tdp_iter_restart() 26 iter->yielded_gfn = iter->next_last_level_gfn; in tdp_iter_restart() 27 iter->level = iter->root_level; in tdp_iter_restart() 29 iter->gfn = gfn_round_for_level(iter->next_last_level_gfn, iter->level); in tdp_iter_restart() 30 tdp_iter_refresh_sptep(iter); in tdp_iter_restart() [all …]
|
H A D | tdp_mmu.c | 213 struct tdp_iter *iter) in tdp_mmu_init_child_sp() argument 218 parent_sp = sptep_to_sp(rcu_dereference(iter->sptep)); in tdp_mmu_init_child_sp() 223 tdp_mmu_init_sp(child_sp, iter->sptep, iter->gfn, role); in tdp_mmu_init_child_sp() 525 static inline int __must_check __tdp_mmu_set_spte_atomic(struct tdp_iter *iter, in __tdp_mmu_set_spte_atomic() argument 528 u64 *sptep = rcu_dereference(iter->sptep); in __tdp_mmu_set_spte_atomic() 536 WARN_ON_ONCE(iter->yielded || is_frozen_spte(iter->old_spte)); in __tdp_mmu_set_spte_atomic() 545 if (!try_cmpxchg64(sptep, &iter->old_spte, new_spte)) in __tdp_mmu_set_spte_atomic() 569 struct tdp_iter *iter, in tdp_mmu_set_spte_atomic() argument 576 ret = __tdp_mmu_set_spte_atomic(iter, new_spte); in tdp_mmu_set_spte_atomic() 580 handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte, in tdp_mmu_set_spte_atomic() [all …]
|
/linux/lib/ |
H A D | interval_tree.c | 43 void interval_tree_span_iter_first(struct interval_tree_span_iter *iter, in interval_tree_span_iter_first() argument 48 iter->first_index = first_index; in interval_tree_span_iter_first() 49 iter->last_index = last_index; in interval_tree_span_iter_first() 50 iter->nodes[0] = NULL; in interval_tree_span_iter_first() 51 iter->nodes[1] = in interval_tree_span_iter_first() 53 if (!iter->nodes[1]) { in interval_tree_span_iter_first() 55 iter->start_hole = first_index; in interval_tree_span_iter_first() 56 iter->last_hole = last_index; in interval_tree_span_iter_first() 57 iter->is_hole = 1; in interval_tree_span_iter_first() 60 if (iter->nodes[1]->start > first_index) { in interval_tree_span_iter_first() [all …]
|
/linux/arch/arm64/kvm/vgic/ |
H A D | vgic-debug.c | 35 static void iter_next(struct kvm *kvm, struct vgic_state_iter *iter) in iter_next() argument 39 if (iter->dist_id == 0) { in iter_next() 40 iter->dist_id++; in iter_next() 48 if (iter->intid >= (iter->nr_spis + VGIC_NR_PRIVATE_IRQS - 1) && in iter_next() 49 iter->nr_lpis) { in iter_next() 50 if (iter->lpi_idx < iter->nr_lpis) in iter_next() 51 xa_find_after(&dist->lpi_xa, &iter->intid, in iter_next() 54 iter->lpi_idx++; in iter_next() 58 iter->intid++; in iter_next() 59 if (iter->intid == VGIC_NR_PRIVATE_IRQS && in iter_next() [all …]
|
/linux/drivers/gpu/drm/ |
H A D | drm_displayid.c | 76 struct displayid_iter *iter) in displayid_iter_edid_begin() argument 78 memset(iter, 0, sizeof(*iter)); in displayid_iter_edid_begin() 80 iter->drm_edid = drm_edid; in displayid_iter_edid_begin() 84 displayid_iter_block(const struct displayid_iter *iter) in displayid_iter_block() argument 88 if (!iter->section) in displayid_iter_block() 91 block = (const struct displayid_block *)&iter->section[iter->idx]; in displayid_iter_block() 93 if (iter->idx + sizeof(*block) <= iter->length && in displayid_iter_block() 94 iter->idx + sizeof(*block) + block->num_bytes <= iter->length) in displayid_iter_block() 101 __displayid_iter_next(struct displayid_iter *iter) in __displayid_iter_next() argument 105 if (!iter->drm_edid) in __displayid_iter_next() [all …]
|
H A D | drm_vma_manager.c | 145 struct rb_node *iter; in drm_vma_offset_lookup_locked() local 148 iter = mgr->vm_addr_space_mm.interval_tree.rb_root.rb_node; in drm_vma_offset_lookup_locked() 151 while (likely(iter)) { in drm_vma_offset_lookup_locked() 152 node = rb_entry(iter, struct drm_mm_node, rb); in drm_vma_offset_lookup_locked() 155 iter = iter->rb_right; in drm_vma_offset_lookup_locked() 160 iter = iter->rb_left; in drm_vma_offset_lookup_locked() 246 struct rb_node **iter; in vma_node_allow() local 259 iter = &node->vm_files.rb_node; in vma_node_allow() 261 while (likely(*iter)) { in vma_node_allow() 262 parent = *iter; in vma_node_allow() [all …]
|
/linux/net/netlabel/ |
H A D | netlabel_addrlist.c | 49 struct netlbl_af4list *iter; in netlbl_af4list_search() local 51 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search() 52 if (iter->valid && (addr & iter->mask) == iter->addr) in netlbl_af4list_search() 53 return iter; in netlbl_af4list_search() 74 struct netlbl_af4list *iter; in netlbl_af4list_search_exact() local 76 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search_exact() 77 if (iter->valid && iter->addr == addr && iter->mask == mask) in netlbl_af4list_search_exact() 78 return iter; in netlbl_af4list_search_exact() 99 struct netlbl_af6list *iter; in netlbl_af6list_search() local 101 list_for_each_entry_rcu(iter, head, list) in netlbl_af6list_search() [all …]
|
/linux/include/linux/ |
H A D | iov_iter.h | 24 size_t iterate_ubuf(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_ubuf() argument 27 void __user *base = iter->ubuf; in iterate_ubuf() 30 remain = step(base + iter->iov_offset, 0, len, priv, priv2); in iterate_ubuf() 32 iter->iov_offset += progress; in iterate_ubuf() 33 iter->count -= progress; in iterate_ubuf() 41 size_t iterate_iovec(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_iovec() argument 44 const struct iovec *p = iter->__iov; in iterate_iovec() 45 size_t progress = 0, skip = iter->iov_offset; in iterate_iovec() 64 iter->nr_segs -= p - iter->__iov; in iterate_iovec() 65 iter->__iov = p; in iterate_iovec() [all …]
|
H A D | bvec.h | 98 #define __bvec_iter_bvec(bvec, iter) (&(bvec)[(iter).bi_idx]) argument 101 #define mp_bvec_iter_page(bvec, iter) \ argument 102 (__bvec_iter_bvec((bvec), (iter))->bv_page) 104 #define mp_bvec_iter_len(bvec, iter) \ argument 105 min((iter).bi_size, \ 106 __bvec_iter_bvec((bvec), (iter))->bv_len - (iter).bi_bvec_done) 108 #define mp_bvec_iter_offset(bvec, iter) \ argument 109 (__bvec_iter_bvec((bvec), (iter))->bv_offset + (iter).bi_bvec_done) 111 #define mp_bvec_iter_page_idx(bvec, iter) \ argument 112 (mp_bvec_iter_offset((bvec), (iter)) / PAGE_SIZE) [all …]
|
H A D | radix-tree.h | 233 struct radix_tree_iter *iter, void __rcu **slot); 249 const struct radix_tree_iter *iter, unsigned int tag); 264 struct radix_tree_iter *iter, gfp_t gfp, 281 radix_tree_iter_init(struct radix_tree_iter *iter, unsigned long start) in radix_tree_iter_init() argument 291 iter->index = 0; in radix_tree_iter_init() 292 iter->next_index = start; in radix_tree_iter_init() 310 struct radix_tree_iter *iter, unsigned flags); 324 struct radix_tree_iter *iter, unsigned long index) in radix_tree_iter_lookup() argument 326 radix_tree_iter_init(iter, index); in radix_tree_iter_lookup() 327 return radix_tree_next_chunk(root, iter, RADIX_TREE_ITER_CONTIG); in radix_tree_iter_lookup() [all …]
|
/linux/kernel/ |
H A D | kallsyms.c | 576 static int get_ksymbol_mod(struct kallsym_iter *iter) in get_ksymbol_mod() argument 578 int ret = module_get_kallsym(iter->pos - kallsyms_num_syms, in get_ksymbol_mod() 579 &iter->value, &iter->type, in get_ksymbol_mod() 580 iter->name, iter->module_name, in get_ksymbol_mod() 581 &iter->exported); in get_ksymbol_mod() 583 iter->pos_mod_end = iter->pos; in get_ksymbol_mod() 595 static int get_ksymbol_ftrace_mod(struct kallsym_iter *iter) in get_ksymbol_ftrace_mod() argument 597 int ret = ftrace_mod_get_kallsym(iter->pos - iter->pos_mod_end, in get_ksymbol_ftrace_mod() 598 &iter->value, &iter->type, in get_ksymbol_ftrace_mod() 599 iter->name, iter->module_name, in get_ksymbol_ftrace_mod() [all …]
|
H A D | ucount.c | 232 struct ucounts *ucounts, *iter, *bad; in inc_ucount() local 235 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount() 237 tns = iter->ns; in inc_ucount() 239 if (!atomic_long_inc_below(&iter->ucount[type], max)) in inc_ucount() 244 bad = iter; in inc_ucount() 245 for (iter = ucounts; iter != bad; iter in inc_ucount() 254 struct ucounts *iter; dec_ucount() local 264 struct ucounts *iter; inc_rlimit_ucounts() local 281 struct ucounts *iter; dec_rlimit_ucounts() local 295 struct ucounts *iter, *next; do_dec_rlimit_put_ucounts() local 314 struct ucounts *iter; inc_rlimit_get_ucounts() local 345 struct ucounts *iter; is_rlimit_overlimit() local [all...] |
/linux/fs/bcachefs/ |
H A D | btree_journal_iter.c | 118 static void journal_iter_verify(struct journal_iter *iter) in journal_iter_verify() argument 120 struct journal_keys *keys = iter->keys; in journal_iter_verify() 123 BUG_ON(iter->idx >= keys->gap && in journal_iter_verify() 124 iter->idx < keys->gap + gap_size); in journal_iter_verify() 126 if (iter->idx < keys->size) { in journal_iter_verify() 127 struct journal_key *k = keys->data + iter->idx; in journal_iter_verify() 129 int cmp = cmp_int(k->btree_id, iter->btree_id) ?: in journal_iter_verify() 130 cmp_int(k->level, iter->level); in journal_iter_verify() 141 struct journal_iter *iter; in journal_iters_fix() local 149 list_for_each_entry(iter, &c->journal_iters, list) { in journal_iters_fix() [all …]
|
H A D | btree_iter.c | 28 static inline unsigned long btree_iter_ip_allocated(struct btree_iter *iter) in btree_iter_ip_allocated() argument 31 return iter->ip_allocated; in btree_iter_ip_allocated() 61 static inline struct bpos bkey_successor(struct btree_iter *iter, struct bpos p) in bkey_successor() argument 64 if (iter->flags & BTREE_ITER_all_snapshots) { in bkey_successor() 68 p.snapshot = iter->snapshot; in bkey_successor() 74 static inline struct bpos bkey_predecessor(struct btree_iter *iter, struct bpos p) in bkey_predecessor() argument 77 if (iter->flags & BTREE_ITER_all_snapshots) { in bkey_predecessor() 81 p.snapshot = iter->snapshot; in bkey_predecessor() 87 static inline struct bpos btree_iter_search_key(struct btree_iter *iter) in btree_iter_search_key() argument 89 struct bpos pos = iter->pos; in btree_iter_search_key() [all …]
|
/linux/block/ |
H A D | t10-pi.c | 37 static void t10_pi_generate(struct blk_integrity_iter *iter, in t10_pi_generate() argument 43 for (i = 0 ; i < iter->data_size ; i += iter->interval) { in t10_pi_generate() 44 struct t10_pi_tuple *pi = iter->prot_buf + offset; in t10_pi_generate() 46 pi->guard_tag = t10_pi_csum(0, iter->data_buf, iter->interval, in t10_pi_generate() 50 iter->prot_buf, offset, bi->csum_type); in t10_pi_generate() 54 pi->ref_tag = cpu_to_be32(lower_32_bits(iter->seed)); in t10_pi_generate() 58 iter->data_buf += iter->interval; in t10_pi_generate() 59 iter->prot_buf += bi->tuple_size; in t10_pi_generate() 60 iter->seed++; in t10_pi_generate() 64 static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter, in t10_pi_verify() argument [all …]
|
/linux/kernel/trace/ |
H A D | trace_output.c | 25 enum print_line_t trace_print_bputs_msg_only(struct trace_iterator *iter) in trace_print_bputs_msg_only() argument 27 struct trace_seq *s = &iter->seq; in trace_print_bputs_msg_only() 28 struct trace_entry *entry = iter->ent; in trace_print_bputs_msg_only() 38 enum print_line_t trace_print_bprintk_msg_only(struct trace_iterator *iter) in trace_print_bprintk_msg_only() argument 40 struct trace_seq *s = &iter->seq; in trace_print_bprintk_msg_only() 41 struct trace_entry *entry = iter->ent; in trace_print_bprintk_msg_only() 51 enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter) in trace_print_printk_msg_only() argument 53 struct trace_seq *s = &iter->seq; in trace_print_printk_msg_only() 54 struct trace_entry *entry = iter->ent; in trace_print_printk_msg_only() 295 int trace_raw_output_prep(struct trace_iterator *iter, in trace_raw_output_prep() argument [all …]
|
/linux/drivers/gpu/drm/etnaviv/ |
H A D | etnaviv_dump.c | 67 static void etnaviv_core_dump_header(struct core_dump_iterator *iter, in etnaviv_core_dump_header() argument 70 struct etnaviv_dump_object_header *hdr = iter->hdr; in etnaviv_core_dump_header() 74 hdr->file_offset = cpu_to_le32(iter->data - iter->start); in etnaviv_core_dump_header() 75 hdr->file_size = cpu_to_le32(data_end - iter->data); in etnaviv_core_dump_header() 77 iter->hdr++; in etnaviv_core_dump_header() 78 iter->data += le32_to_cpu(hdr->file_size); in etnaviv_core_dump_header() 81 static void etnaviv_core_dump_registers(struct core_dump_iterator *iter, in etnaviv_core_dump_registers() argument 84 struct etnaviv_dump_registers *reg = iter->data; in etnaviv_core_dump_registers() 97 etnaviv_core_dump_header(iter, ETDUMP_BUF_REG, reg); in etnaviv_core_dump_registers() 100 static void etnaviv_core_dump_mmu(struct core_dump_iterator *iter, in etnaviv_core_dump_mmu() argument [all …]
|
/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_dump.c | 61 static void panfrost_core_dump_header(struct panfrost_dump_iterator *iter, in panfrost_core_dump_header() argument 64 struct panfrost_dump_object_header *hdr = iter->hdr; in panfrost_core_dump_header() 68 hdr->file_offset = iter->data - iter->start; in panfrost_core_dump_header() 69 hdr->file_size = data_end - iter->data; in panfrost_core_dump_header() 71 iter->hdr++; in panfrost_core_dump_header() 72 iter->data += hdr->file_size; in panfrost_core_dump_header() 76 panfrost_core_dump_registers(struct panfrost_dump_iterator *iter, in panfrost_core_dump_registers() argument 80 struct panfrost_dump_registers *dumpreg = iter->data; in panfrost_core_dump_registers() 100 panfrost_core_dump_header(iter, PANFROSTDUMP_BUF_REG, dumpreg); in panfrost_core_dump_registers() 106 struct panfrost_dump_iterator iter; in panfrost_core_dump() local [all …]
|
/linux/fs/iomap/ |
H A D | seek.c | 13 static loff_t iomap_seek_hole_iter(const struct iomap_iter *iter, in iomap_seek_hole_iter() argument 16 loff_t length = iomap_length(iter); in iomap_seek_hole_iter() 18 switch (iter->iomap.type) { in iomap_seek_hole_iter() 20 *hole_pos = mapping_seek_hole_data(iter->inode->i_mapping, in iomap_seek_hole_iter() 21 iter->pos, iter->pos + length, SEEK_HOLE); in iomap_seek_hole_iter() 22 if (*hole_pos == iter->pos + length) in iomap_seek_hole_iter() 26 *hole_pos = iter->pos; in iomap_seek_hole_iter() 37 struct iomap_iter iter = { in iomap_seek_hole() local 48 iter.len = size - pos; in iomap_seek_hole() 49 while ((ret = iomap_iter(&iter, ops)) > 0) in iomap_seek_hole() [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | iters_state_safety.c | 36 struct bpf_iter_num iter; in create_and_destroy() local 40 "r1 = %[iter];" in create_and_destroy() 45 "r1 = %[iter];" in create_and_destroy() 48 : __imm_ptr(iter), ITER_HELPERS in create_and_destroy() 59 struct bpf_iter_num iter; in create_and_forget_to_destroy_fail() local 63 "r1 = %[iter];" in create_and_forget_to_destroy_fail() 68 : __imm_ptr(iter), ITER_HELPERS in create_and_forget_to_destroy_fail() 80 struct bpf_iter_num iter; in destroy_without_creating_fail() local 83 "r1 = %[iter];" in destroy_without_creating_fail() 86 : __imm_ptr(iter), ITER_HELPER in destroy_without_creating_fail() 97 struct bpf_iter_num iter; compromise_iter_w_direct_write_fail() local 124 struct bpf_iter_num iter; compromise_iter_w_direct_write_and_skip_destroy_fail() local 149 struct bpf_iter_num iter; compromise_iter_w_helper_write_fail() local 178 struct bpf_iter_num iter; subprog_with_iter() local 202 struct bpf_iter_num iter; valid_stack_reuse() local 236 struct bpf_iter_num iter; double_create_fail() local 264 struct bpf_iter_num iter; double_destroy_fail() local 290 struct bpf_iter_num iter; next_without_new_fail() local 311 struct bpf_iter_num iter; next_after_destroy_fail() local 375 struct bpf_iter_num iter; __flag() local [all...] |
H A D | bpf_iter_ksym.c | 28 SEC("iter/ksym") 32 struct kallsym_iter *iter = ctx->ksym; in dump_ksym() local 37 if (!iter) in dump_ksym() 45 BPF_SEQ_PRINTF(seq, "0x%x\n", iter->value - last_sym_value); in dump_ksym() 49 value = iter->show_value ? iter->value : 0; in dump_ksym() 53 type = iter->type; in dump_ksym() 55 if (iter->module_name[0]) { in dump_ksym() 56 type = iter->exported ? to_upper(type) : to_lower(type); in dump_ksym() 58 value, type, iter in dump_ksym() [all...] |
/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | icm.h | 97 struct mlx4_icm_iter *iter) in mlx4_icm_first() argument 99 iter->icm = icm; in mlx4_icm_first() 100 iter->chunk = list_empty(&icm->chunk_list) ? in mlx4_icm_first() 103 iter->page_idx = 0; in mlx4_icm_first() 106 static inline int mlx4_icm_last(struct mlx4_icm_iter *iter) in mlx4_icm_last() argument 108 return !iter->chunk; in mlx4_icm_last() 111 static inline void mlx4_icm_next(struct mlx4_icm_iter *iter) in mlx4_icm_next() argument 113 if (++iter->page_idx >= iter->chunk->nsg) { in mlx4_icm_next() 114 if (iter->chunk->list.next == &iter->icm->chunk_list) { in mlx4_icm_next() 115 iter->chunk = NULL; in mlx4_icm_next() [all …]
|
/linux/drivers/net/can/spi/mcp251xfd/ |
H A D | mcp251xfd-dump.c | 44 static void mcp251xfd_dump_header(struct mcp251xfd_dump_iter *iter, in mcp251xfd_dump_header() argument 48 struct mcp251xfd_dump_object_header *hdr = iter->hdr; in mcp251xfd_dump_header() 51 len = data_end - iter->data; in mcp251xfd_dump_header() 57 hdr->offset = cpu_to_le32(iter->data - iter->start); in mcp251xfd_dump_header() 60 iter->hdr++; in mcp251xfd_dump_header() 61 iter->data += len; in mcp251xfd_dump_header() 65 struct mcp251xfd_dump_iter *iter) in mcp251xfd_dump_registers() argument 68 struct mcp251xfd_dump_object_reg *reg = iter->data; in mcp251xfd_dump_registers() 98 mcp251xfd_dump_header(iter, MCP251XFD_DUMP_OBJECT_TYPE_REG, reg); in mcp251xfd_dump_registers() 101 static void mcp251xfd_dump_ring(struct mcp251xfd_dump_iter *iter, in mcp251xfd_dump_ring() argument [all …]
|
/linux/include/linux/mtd/ |
H A D | nand.h | 924 struct nand_io_iter *iter) in nanddev_io_page_iter_init() argument 928 iter->req.type = reqtype; in nanddev_io_page_iter_init() 929 iter->req.mode = req->mode; in nanddev_io_page_iter_init() 930 iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos); in nanddev_io_page_iter_init() 931 iter->req.ooboffs = req->ooboffs; in nanddev_io_page_iter_init() 932 iter->oobbytes_per_page = mtd_oobavail(mtd, req); in nanddev_io_page_iter_init() 933 iter->dataleft = req->len; in nanddev_io_page_iter_init() 934 iter->oobleft = req->ooblen; in nanddev_io_page_iter_init() 935 iter->req.databuf.in = req->datbuf; in nanddev_io_page_iter_init() 936 iter->req.datalen = min_t(unsigned int, in nanddev_io_page_iter_init() [all …]
|
/linux/fs/udf/ |
H A D | namei.c | 53 struct udf_fileident_iter *iter) in udf_fiiter_find_entry() argument 66 for (ret = udf_fiiter_init(iter, dir, 0); in udf_fiiter_find_entry() 67 !ret && iter->pos < dir->i_size; in udf_fiiter_find_entry() 68 ret = udf_fiiter_advance(iter)) { in udf_fiiter_find_entry() 69 if (iter->fi.fileCharacteristics & FID_FILE_CHAR_DELETED) { in udf_fiiter_find_entry() 74 if (iter->fi.fileCharacteristics & FID_FILE_CHAR_HIDDEN) { in udf_fiiter_find_entry() 79 if ((iter->fi.fileCharacteristics & FID_FILE_CHAR_PARENT) && in udf_fiiter_find_entry() 83 if (!iter->fi.lengthFileIdent) in udf_fiiter_find_entry() 86 flen = udf_get_filename(sb, iter->name, in udf_fiiter_find_entry() 87 iter->fi.lengthFileIdent, fname, UDF_NAME_LEN); in udf_fiiter_find_entry() [all …]
|