/linux/tools/perf/arch/x86/util/ |
H A D | machine.c | 25 static int add_extra_kernel_map(struct extra_kernel_map_info *mi, u64 start, in add_extra_kernel_map() argument 28 if (mi->cnt >= mi->max_cnt) { in add_extra_kernel_map() 32 mi->max_cnt = mi->max_cnt ? mi->max_cnt * 2 : 32; in add_extra_kernel_map() 33 sz = sizeof(struct extra_kernel_map) * mi->max_cnt; in add_extra_kernel_map() 34 buf = realloc(mi->maps, sz); in add_extra_kernel_map() 37 mi->maps = buf; in add_extra_kernel_map() 40 mi->maps[mi->cnt].start = start; in add_extra_kernel_map() 41 mi->maps[mi->cnt].end = end; in add_extra_kernel_map() 42 mi->maps[mi->cnt].pgoff = pgoff; in add_extra_kernel_map() 43 strlcpy(mi->maps[mi->cnt].name, name, KMAP_NAME_LEN); in add_extra_kernel_map() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | mapping.c | 45 struct mapping_item *mi; in mapping_add() local 52 hash_for_each_possible(ctx->ht, mi, node, hash_key) { in mapping_add() 53 if (!memcmp(data, mi->data, ctx->data_size)) in mapping_add() 57 mi = kzalloc(sizeof(*mi) + ctx->data_size, GFP_KERNEL); in mapping_add() 58 if (!mi) in mapping_add() 61 memcpy(mi->data, data, ctx->data_size); in mapping_add() 62 hash_add(ctx->ht, &mi->node, hash_key); in mapping_add() 64 err = xa_alloc(&ctx->xarray, &mi->id, mi, XA_LIMIT(1, ctx->max_id), in mapping_add() 69 ++mi->cnt; in mapping_add() 70 *id = mi->id; in mapping_add() [all …]
|
/linux/tools/perf/util/ |
H A D | mem-info.h | 18 struct mem_info *mem_info__clone(struct mem_info *mi); 19 struct mem_info *mem_info__get(struct mem_info *mi); 20 void mem_info__put(struct mem_info *mi); 22 static inline void __mem_info__zput(struct mem_info **mi) in __mem_info__zput() argument 24 mem_info__put(*mi); in __mem_info__zput() 25 *mi = NULL; in __mem_info__zput() 28 #define mem_info__zput(mi) __mem_info__zput(&mi) argument 30 static inline struct addr_map_symbol *mem_info__iaddr(struct mem_info *mi) in mem_info__iaddr() argument 32 return &RC_CHK_ACCESS(mi)->iaddr; in mem_info__iaddr() 35 static inline struct addr_map_symbol *mem_info__daddr(struct mem_info *mi) in mem_info__daddr() argument [all …]
|
H A D | mem-info.c | 5 struct mem_info *mem_info__get(struct mem_info *mi) in mem_info__get() argument 9 if (RC_CHK_GET(result, mi)) in mem_info__get() 10 refcount_inc(mem_info__refcnt(mi)); in mem_info__get() 15 void mem_info__put(struct mem_info *mi) in mem_info__put() argument 17 if (mi && refcount_dec_and_test(mem_info__refcnt(mi))) { in mem_info__put() 18 addr_map_symbol__exit(mem_info__iaddr(mi)); in mem_info__put() 19 addr_map_symbol__exit(mem_info__daddr(mi)); in mem_info__put() 20 RC_CHK_FREE(mi); in mem_info__put() 22 RC_CHK_PUT(mi); in mem_info__put() 29 RC_STRUCT(mem_info) *mi = zalloc(sizeof(*mi)); in mem_info__new() [all …]
|
/linux/net/mac80211/ |
H A D | rc80211_minstrel_ht_debugfs.c | 36 minstrel_ht_is_sample_rate(struct minstrel_ht_sta *mi, int idx) in minstrel_ht_is_sample_rate() argument 40 for (type = 0; type < ARRAY_SIZE(mi->sample); type++) in minstrel_ht_is_sample_rate() 42 if (mi->sample[type].cur_sample_rates[i] == idx) in minstrel_ht_is_sample_rate() 48 minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) in minstrel_ht_stats_dump() argument 56 if (!mi->supported[i]) in minstrel_ht_stats_dump() 70 struct minstrel_rate_stats *mrs = &mi->groups[i].rates[j]; in minstrel_ht_stats_dump() 74 if (!(mi->supported[i] & BIT(j))) in minstrel_ht_stats_dump() 94 *(p++) = (idx == mi->max_tp_rate[0]) ? 'A' : ' '; in minstrel_ht_stats_dump() 95 *(p++) = (idx == mi->max_tp_rate[1]) ? 'B' : ' '; in minstrel_ht_stats_dump() 96 *(p++) = (idx == mi->max_tp_rate[2]) ? 'C' : ' '; in minstrel_ht_stats_dump() [all …]
|
/linux/mm/ |
H A D | numa_memblks.c | 22 const struct numa_meminfo *mi) in numa_nodemask_from_meminfo() argument 26 for (i = 0; i < ARRAY_SIZE(mi->blk); i++) in numa_nodemask_from_meminfo() 27 if (mi->blk[i].start != mi->blk[i].end && in numa_nodemask_from_meminfo() 28 mi->blk[i].nid != NUMA_NO_NODE) in numa_nodemask_from_meminfo() 29 node_set(mi->blk[i].nid, *nodemask); in numa_nodemask_from_meminfo() 134 struct numa_meminfo *mi) in numa_add_memblk_to() argument 147 if (mi->nr_blks >= NR_NODE_MEMBLKS) { in numa_add_memblk_to() 152 mi->blk[mi->nr_blks].start = start; in numa_add_memblk_to() 153 mi->blk[mi->nr_blks].end = end; in numa_add_memblk_to() 154 mi->blk[mi->nr_blks].nid = nid; in numa_add_memblk_to() [all …]
|
/linux/fs/ntfs3/ |
H A D | record.c | 34 static __le16 mi_new_attt_id(struct mft_inode *mi) in mi_new_attt_id() argument 37 struct MFT_REC *rec = mi->mrec; in mi_new_attt_id() 55 attr = mi_enum_attr(mi, attr); in mi_new_attt_id() 58 mi->dirty = true; in mi_new_attt_id() 71 int mi_get(struct ntfs_sb_info *sbi, CLST rno, struct mft_inode **mi) in mi_get() argument 91 *mi = m; in mi_get() 95 void mi_put(struct mft_inode *mi) in mi_put() argument 97 mi_clear(mi); in mi_put() 98 kfree(mi); in mi_put() 101 int mi_init(struct mft_inode *mi, struct ntfs_sb_info *sbi, CLST rno) in mi_init() argument [all …]
|
H A D | frecord.c | 27 struct mft_inode *mi; in ni_ins_mi() local 30 mi = rb_entry(pr, struct mft_inode, node); in ni_ins_mi() 31 if (mi->rno > ino) in ni_ins_mi() 33 else if (mi->rno < ino) in ni_ins_mi() 36 return mi; in ni_ins_mi() 58 static void ni_add_mi(struct ntfs_inode *ni, struct mft_inode *mi) in ni_add_mi() argument 60 ni_ins_mi(ni, &ni->mi_tree, mi->rno, &mi->node); in ni_add_mi() 66 void ni_remove_mi(struct ntfs_inode *ni, struct mft_inode *mi) in ni_remove_mi() argument 68 rb_erase(&mi->node, &ni->mi_tree); in ni_remove_mi() 78 attr = mi_find_attr(&ni->mi, NULL, ATTR_STD, NULL, 0, NULL); in ni_std() [all …]
|
H A D | attrib.c | 81 err = run_unpack_ex(run, ni->mi.sbi, ni->mi.rno, svcn, evcn, in attr_load_runs() 227 struct ATTR_LIST_ENTRY *le, struct mft_inode *mi, in attr_make_nonresident() argument 245 sbi = mi->sbi; in attr_make_nonresident() 246 rec = mi->mrec; in attr_make_nonresident() 313 mi->dirty = true; in attr_make_nonresident() 340 mi->dirty = true; in attr_make_nonresident() 355 struct ATTR_LIST_ENTRY *le, struct mft_inode *mi, in attr_set_size_res() argument 359 struct ntfs_sb_info *sbi = mi->sbi; in attr_set_size_res() 360 struct MFT_REC *rec = mi->mrec; in attr_set_size_res() 373 return attr_make_nonresident(ni, attr, le, mi, new_size, in attr_set_size_res() [all …]
|
H A D | ntfs_fs.h | 352 struct mft_inode mi; // base record member 428 struct ATTR_LIST_ENTRY *le, struct mft_inode *mi, 518 void ni_remove_mi(struct ntfs_inode *ni, struct mft_inode *mi); 522 int ni_load_mi_ex(struct ntfs_inode *ni, CLST rno, struct mft_inode **mi); 524 struct mft_inode **mi); 529 struct mft_inode **mi); 532 struct mft_inode **mi); 537 bool ni_add_subrecord(struct ntfs_inode *ni, CLST rno, struct mft_inode **mi); 547 struct mft_inode **mi, struct ATTR_LIST_ENTRY **le); 550 struct ATTRIB **new_attr, struct mft_inode **mi, [all …]
|
/linux/fs/bcachefs/ |
H A D | sb-members.c | 42 static struct bch_member members_v2_get(struct bch_sb_field_members_v2 *mi, int i) in members_v2_get() argument 44 struct bch_member ret, *p = __bch2_members_v2_get_mut(mi, i); in members_v2_get() 46 memcpy(&ret, p, min_t(size_t, le16_to_cpu(mi->member_bytes), sizeof(ret))); in members_v2_get() 50 static struct bch_member *members_v1_get_mut(struct bch_sb_field_members_v1 *mi, int i) in members_v1_get_mut() argument 52 return (void *) mi->_members + (i * BCH_MEMBER_V1_BYTES); in members_v1_get_mut() 55 static struct bch_member members_v1_get(struct bch_sb_field_members_v1 *mi, int i) in members_v1_get() argument 57 struct bch_member ret, *p = members_v1_get_mut(mi, i); in members_v1_get() 74 struct bch_sb_field_members_v2 *mi = bch2_sb_field_get(c->disk_sb.sb, members_v2); in sb_members_v2_resize_entries() local 76 if (le16_to_cpu(mi->member_bytes) < sizeof(struct bch_member)) { in sb_members_v2_resize_entries() 77 unsigned u64s = DIV_ROUND_UP((sizeof(*mi) + sizeof(mi->_members[0]) * in sb_members_v2_resize_entries() [all …]
|
H A D | sb-members.h | 11 __bch2_members_v2_get_mut(struct bch_sb_field_members_v2 *mi, unsigned i) in __bch2_members_v2_get_mut() argument 13 return (void *) mi->_members + (i * le16_to_cpu(mi->member_bytes)); in __bch2_members_v2_get_mut() 29 ca->mi.state != BCH_MEMBER_STATE_failed; in bch2_dev_is_readable() 154 (!((1 << ca->mi.state) & state_mask) || in bch2_get_next_online_dev() 182 return b - ca->mi.first_bucket < ca->mi.nbuckets_minus_first; in bucket_valid() 281 (ca->mi.state == BCH_MEMBER_STATE_rw || in bch2_dev_get_ioref() 282 (ca->mi.state == BCH_MEMBER_STATE_ro && rw == READ))) in bch2_dev_get_ioref() 320 static inline struct bch_member_cpu bch2_mi_to_cpu(struct bch_member *mi) in bch2_mi_to_cpu() argument 323 .nbuckets = le64_to_cpu(mi->nbuckets), in bch2_mi_to_cpu() 324 .nbuckets_minus_first = le64_to_cpu(mi->nbuckets) - in bch2_mi_to_cpu() [all …]
|
/linux/arch/x86/boot/ |
H A D | video-mode.c | 55 struct mode_info *mi; in mode_defined() local 59 mi = card->modes; in mode_defined() 60 for (i = 0; i < card->nmodes; i++, mi++) { in mode_defined() 61 if (mi->mode == mode) in mode_defined() 74 struct mode_info *mi; in raw_set_mode() local 82 mi = card->modes; in raw_set_mode() 83 for (i = 0; i < card->nmodes; i++, mi++) { in raw_set_mode() 84 int visible = mi->x || mi->y; in raw_set_mode() 87 mode == mi->mode || in raw_set_mode() 88 mode == (mi->y << 8)+mi->x) { in raw_set_mode() [all …]
|
H A D | video-bios.c | 24 static int bios_set_mode(struct mode_info *mi) in bios_set_mode() argument 26 return set_bios_mode(mi->mode - VIDEO_FIRST_BIOS); in bios_set_mode() 70 struct mode_info *mi; in bios_probe() local 105 mi = GET_HEAP(struct mode_info, 1); in bios_probe() 106 mi->mode = VIDEO_FIRST_BIOS+mode; in bios_probe() 107 mi->depth = 0; /* text */ in bios_probe() 108 mi->x = rdfs16(0x44a); in bios_probe() 109 mi->y = rdfs8(0x484)+1; in bios_probe()
|
H A D | video.c | 140 struct mode_info *mi; in display_menu() local 162 mi = card->modes; in display_menu() 163 for (i = 0; i < card->nmodes; i++, mi++) { in display_menu() 165 int visible = mi->x && mi->y; in display_menu() 166 u16 mode_id = mi->mode ? mi->mode : in display_menu() 167 (mi->y << 8)+mi->x; in display_menu() 172 if (mi->depth) in display_menu() 173 sprintf(resbuf, "%dx%d", mi->y, mi->depth); in display_menu() 175 sprintf(resbuf, "%d", mi->y); in display_menu() 178 ch, mode_id, mi->x, resbuf, card->card_name); in display_menu()
|
H A D | video-vesa.c | 36 struct mode_info *mi; in vesa_probe() local 76 mi = GET_HEAP(struct mode_info, 1); in vesa_probe() 77 mi->mode = mode + VIDEO_FIRST_VESA; in vesa_probe() 78 mi->depth = 0; /* text */ in vesa_probe() 79 mi->x = vminfo.h_res; in vesa_probe() 80 mi->y = vminfo.v_res; in vesa_probe() 91 mi = GET_HEAP(struct mode_info, 1); in vesa_probe() 92 mi->mode = mode + VIDEO_FIRST_VESA; in vesa_probe() 93 mi->depth = vminfo.bpp; in vesa_probe() 94 mi->x = vminfo.h_res; in vesa_probe() [all …]
|
/linux/include/net/tc_act/ |
H A D | tc_ife.h | 44 int (*get)(struct sk_buff *skb, struct tcf_meta_info *mi); 53 int ife_get_meta_u32(struct sk_buff *skb, struct tcf_meta_info *mi); 54 int ife_get_meta_u16(struct sk_buff *skb, struct tcf_meta_info *mi); 55 int ife_alloc_meta_u32(struct tcf_meta_info *mi, void *metaval, gfp_t gfp); 56 int ife_alloc_meta_u16(struct tcf_meta_info *mi, void *metaval, gfp_t gfp); 57 int ife_check_meta_u32(u32 metaval, struct tcf_meta_info *mi); 58 int ife_check_meta_u16(u16 metaval, struct tcf_meta_info *mi); 59 int ife_encode_meta_u32(u32 metaval, void *skbdata, struct tcf_meta_info *mi); 62 int ife_encode_meta_u16(u16 metaval, void *skbdata, struct tcf_meta_info *mi); 63 void ife_release_meta_gen(struct tcf_meta_info *mi);
|
/linux/net/sched/ |
H A D | act_ife.c | 44 int ife_encode_meta_u16(u16 metaval, void *skbdata, struct tcf_meta_info *mi) in ife_encode_meta_u16() argument 48 if (mi->metaval) in ife_encode_meta_u16() 49 edata = *(u16 *)mi->metaval; in ife_encode_meta_u16() 57 return ife_tlv_meta_encode(skbdata, mi->metaid, 2, &edata); in ife_encode_meta_u16() 61 int ife_get_meta_u32(struct sk_buff *skb, struct tcf_meta_info *mi) in ife_get_meta_u32() argument 63 if (mi->metaval) in ife_get_meta_u32() 64 return nla_put_u32(skb, mi->metaid, *(u32 *)mi->metaval); in ife_get_meta_u32() 66 return nla_put(skb, mi->metaid, 0, NULL); in ife_get_meta_u32() 70 int ife_check_meta_u32(u32 metaval, struct tcf_meta_info *mi) in ife_check_meta_u32() argument 72 if (metaval || mi->metaval) in ife_check_meta_u32() [all …]
|
/linux/fs/nilfs2/ |
H A D | mdt.c | 461 struct nilfs_mdt_info *mi; in nilfs_mdt_init() local 463 mi = kzalloc(max(sizeof(*mi), objsz), GFP_NOFS); in nilfs_mdt_init() 464 if (!mi) in nilfs_mdt_init() 467 init_rwsem(&mi->mi_sem); in nilfs_mdt_init() 468 inode->i_private = mi; in nilfs_mdt_init() 516 struct nilfs_mdt_info *mi = NILFS_MDT(inode); in nilfs_mdt_set_entry_size() local 518 mi->mi_entry_size = entry_size; in nilfs_mdt_set_entry_size() 519 mi->mi_entries_per_block = i_blocksize(inode) / entry_size; in nilfs_mdt_set_entry_size() 520 mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size); in nilfs_mdt_set_entry_size() 531 struct nilfs_mdt_info *mi = NILFS_MDT(inode); in nilfs_mdt_setup_shadow_map() local [all …]
|
/linux/drivers/crypto/allwinner/sun4i-ss/ |
H A D | sun4i-ss-hash.c | 199 struct sg_mapping_iter mi; in sun4i_hash() local 272 sg_miter_start(&mi, areq->src, sg_nents(areq->src), in sun4i_hash() 274 sg_miter_next(&mi); in sun4i_hash() 283 if (op->len || (mi.length - in_i) < 4) { in sun4i_hash() 292 in_r = min_t(size_t, mi.length - in_i, in_r); in sun4i_hash() 293 memcpy(op->buf + op->len, mi.addr + in_i, in_r); in sun4i_hash() 297 if (in_i == mi.length) { in sun4i_hash() 298 sg_miter_next(&mi); in sun4i_hash() 310 if (mi.length - in_i > 3 && i < end) { in sun4i_hash() 312 in_r = min_t(size_t, mi.length - in_i, areq->nbytes - i); in sun4i_hash() [all …]
|
H A D | sun4i-ss-cipher.c | 35 struct sg_mapping_iter mi, mo; in sun4i_ss_opti_poll() local 80 sg_miter_start(&mi, areq->src, sg_nents(areq->src), in sun4i_ss_opti_poll() 83 sg_miter_skip(&mi, pi); in sun4i_ss_opti_poll() 84 miter_err = sg_miter_next(&mi); in sun4i_ss_opti_poll() 85 if (!miter_err || !mi.addr) { in sun4i_ss_opti_poll() 91 todo = min_t(size_t, todo, (mi.length - oi) / 4); in sun4i_ss_opti_poll() 94 writesl(ss->base + SS_RXFIFO, mi.addr + oi, todo); in sun4i_ss_opti_poll() 97 if (oi == mi.length) { in sun4i_ss_opti_poll() 98 pi += mi.length; in sun4i_ss_opti_poll() 101 sg_miter_stop(&mi); in sun4i_ss_opti_poll() [all …]
|
/linux/drivers/uio/ |
H A D | uio.c | 288 int mi, pi; in uio_dev_add_attributes() local 296 for (mi = 0; mi < MAX_UIO_MAPS; mi++) { in uio_dev_add_attributes() 297 mem = &idev->info->mem[mi]; in uio_dev_add_attributes() 317 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); in uio_dev_add_attributes() 367 mi--; in uio_dev_add_attributes() 369 for (; mi >= 0; mi--) { in uio_dev_add_attributes() 370 mem = &idev->info->mem[mi]; in uio_dev_add_attributes() 691 int mi; in uio_vma_fault() local 699 mi = uio_find_mem_index(vmf->vma); in uio_vma_fault() 700 if (mi < 0) { in uio_vma_fault() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dce/ |
H A D | dce_mem_input.c | 134 struct mem_input *mi, in dce_mi_program_pte_vm() argument 139 struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi); in dce_mi_program_pte_vm() 313 struct mem_input *mi, in dce_mi_program_display_marks() argument 320 struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi); in dce_mi_program_display_marks() 321 uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1; in dce_mi_program_display_marks() 340 struct mem_input *mi, in dce60_mi_program_display_marks() argument 347 struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi); in dce60_mi_program_display_marks() 348 uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1; in dce60_mi_program_display_marks() 366 static void dce112_mi_program_display_marks(struct mem_input *mi, in dce112_mi_program_display_marks() argument 373 struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi); in dce112_mi_program_display_marks() [all …]
|
/linux/drivers/firmware/arm_scmi/vendors/imx/ |
H A D | imx-sm-misc.c | 69 struct scmi_imx_misc_info *mi) in scmi_imx_misc_attributes_get() argument 84 mi->nr_dev_ctrl = GET_DEV_CTRLS_NR(attr->attributes); in scmi_imx_misc_attributes_get() 85 mi->nr_brd_ctrl = GET_BRD_CTRLS_NR(attr->attributes); in scmi_imx_misc_attributes_get() 86 mi->nr_reason = GET_REASONS_NR(attr->attributes); in scmi_imx_misc_attributes_get() 88 mi->nr_dev_ctrl, mi->nr_brd_ctrl, mi->nr_reason); in scmi_imx_misc_attributes_get() 99 struct scmi_imx_misc_info *mi = ph->get_priv(ph); in scmi_imx_misc_ctrl_validate_id() local 105 if (ctrl_id < BRD_CTRL_START_ID && ctrl_id > mi->nr_dev_ctrl) in scmi_imx_misc_ctrl_validate_id() 107 if (ctrl_id >= BRD_CTRL_START_ID + mi->nr_brd_ctrl) in scmi_imx_misc_ctrl_validate_id()
|
/linux/drivers/gpu/drm/amd/display/dc/dce60/ |
H A D | dce60_hw_sequencer.c | 273 struct mem_input *mi = pipe_ctx->plane_res.mi; in dce60_program_front_end_for_pipe() local 286 dce_enable_fe_clock(dc->hwseq, mi->inst, true); in dce60_program_front_end_for_pipe() 316 mi->funcs->mem_input_program_surface_config( in dce60_program_front_end_for_pipe() 317 mi, in dce60_program_front_end_for_pipe() 324 if (mi->funcs->set_blank) in dce60_program_front_end_for_pipe() 325 mi->funcs->set_blank(mi, pipe_ctx->plane_state->visible); in dce60_program_front_end_for_pipe() 328 mi->funcs->mem_input_program_pte_vm( in dce60_program_front_end_for_pipe() 329 pipe_ctx->plane_res.mi, in dce60_program_front_end_for_pipe() 402 pipe_ctx->plane_res.mi->funcs->allocate_mem_input( in dce60_apply_ctx_for_surface() 403 pipe_ctx->plane_res.mi, in dce60_apply_ctx_for_surface()
|