| /linux/tools/lib/subcmd/ |
| H A D | help.c | 17 void add_cmdname(struct cmdnames *cmds, const char *name, size_t len) in add_cmdname() argument 27 ALLOC_GROW(cmds->names, cmds->cnt + 1, cmds->alloc); in add_cmdname() 28 cmds->names[cmds->cnt++] = ent; in add_cmdname() 31 void clean_cmdnames(struct cmdnames *cmds) in clean_cmdnames() argument 35 for (i = 0; i < cmds->cnt; ++i) in clean_cmdnames() 36 zfree(&cmds->names[i]); in clean_cmdnames() 37 zfree(&cmds->names); in clean_cmdnames() 38 cmds->cnt = 0; in clean_cmdnames() 39 cmds->alloc = 0; in clean_cmdnames() 49 void uniq(struct cmdnames *cmds) in uniq() argument [all …]
|
| H A D | help.h | 26 void add_cmdname(struct cmdnames *cmds, const char *name, size_t len); 27 void clean_cmdnames(struct cmdnames *cmds); 29 void uniq(struct cmdnames *cmds); 31 void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
|
| /linux/tools/perf/tests/ |
| H A D | subcmd-help.c | 9 struct cmdnames cmds = {}; in test__load_cmdnames() local 11 add_cmdname(&cmds, "aaa", 3); in test__load_cmdnames() 12 add_cmdname(&cmds, "foo", 3); in test__load_cmdnames() 13 add_cmdname(&cmds, "xyz", 3); in test__load_cmdnames() 15 TEST_ASSERT_VAL("cannot find cmd", is_in_cmdlist(&cmds, "aaa") == 1); in test__load_cmdnames() 16 TEST_ASSERT_VAL("wrong cmd", is_in_cmdlist(&cmds, "bar") == 0); in test__load_cmdnames() 17 TEST_ASSERT_VAL("case sensitive", is_in_cmdlist(&cmds, "XYZ") == 0); in test__load_cmdnames() 19 clean_cmdnames(&cmds); in test__load_cmdnames() 26 struct cmdnames cmds = {}; in test__uniq_cmdnames() local 29 add_cmdname(&cmds, "aaa", 3); in test__uniq_cmdnames() [all …]
|
| /linux/drivers/infiniband/core/ |
| H A D | roce_gid_mgmt.c | 69 struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ]; member 647 for (i = 0; i < ARRAY_SIZE(work->cmds) && work->cmds[i].cb; i++) { in netdevice_event_work_handler() 648 ib_enum_all_roce_netdevs(work->cmds[i].filter, in netdevice_event_work_handler() 649 work->cmds[i].filter_ndev, in netdevice_event_work_handler() 650 work->cmds[i].cb, in netdevice_event_work_handler() 651 work->cmds[i].ndev); in netdevice_event_work_handler() 652 dev_put(work->cmds[i].ndev); in netdevice_event_work_handler() 653 dev_put(work->cmds[i].filter_ndev); in netdevice_event_work_handler() 659 static int netdevice_queue_work(struct netdev_event_work_cmd *cmds, in netdevice_queue_work() argument 668 memcpy(ndev_work->cmds, cmds, sizeof(ndev_work->cmds)); in netdevice_queue_work() [all …]
|
| /linux/drivers/media/pci/saa7164/ |
| H A D | saa7164-cmd.c | 18 if (dev->cmds[i].inuse == 0) { in saa7164_cmd_alloc_seqno() 19 dev->cmds[i].inuse = 1; in saa7164_cmd_alloc_seqno() 20 dev->cmds[i].signalled = 0; in saa7164_cmd_alloc_seqno() 21 dev->cmds[i].timeout = 0; in saa7164_cmd_alloc_seqno() 22 ret = dev->cmds[i].seqno; in saa7164_cmd_alloc_seqno() 34 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_free_seqno() 35 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_free_seqno() 36 dev->cmds[seqno].inuse = 0; in saa7164_cmd_free_seqno() 37 dev->cmds[seqno].signalled = 0; in saa7164_cmd_free_seqno() 38 dev->cmds[seqno].timeout = 0; in saa7164_cmd_free_seqno() [all …]
|
| /linux/tools/perf/util/ |
| H A D | help-unknown-cmd.c | 32 static int add_cmd_list(struct cmdnames *cmds, struct cmdnames *old) in add_cmd_list() argument 34 unsigned int i, nr = cmds->cnt + old->cnt; in add_cmd_list() 37 if (nr > cmds->alloc) { in add_cmd_list() 39 if (alloc_nr(cmds->alloc) < nr) in add_cmd_list() 40 cmds->alloc = nr; in add_cmd_list() 42 cmds->alloc = alloc_nr(cmds->alloc); in add_cmd_list() 43 tmp = realloc(cmds->names, cmds->alloc * sizeof(*cmds->names)); in add_cmd_list() 46 cmds->names = tmp; in add_cmd_list() 49 cmds->names[cmds->cnt++] = old->names[i]; in add_cmd_list()
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | gen7_renderclear.c | 383 struct batch_chunk cmds, state; in emit_batch() local 387 batch_init(&cmds, vma, start, 0, bv->state_start); in emit_batch() 397 gen7_emit_pipeline_flush(&cmds); in emit_batch() 398 gen7_emit_pipeline_invalidate(&cmds); in emit_batch() 399 batch_add(&cmds, MI_LOAD_REGISTER_IMM(2)); in emit_batch() 400 batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_0_GEN7)); in emit_batch() 401 batch_add(&cmds, 0xffff0000 | in emit_batch() 406 batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_1)); in emit_batch() 407 batch_add(&cmds, 0xffff0000 | PIXEL_SUBSPAN_COLLECT_OPT_DISABLE); in emit_batch() 408 gen7_emit_pipeline_invalidate(&cmds); in emit_batch() [all …]
|
| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_overlay.c | 105 } *cmds; in vmw_overlay_send_put() local 117 fifo_size = sizeof(*cmds) + sizeof(*flush) + sizeof(*items) * num_items; in vmw_overlay_send_put() 119 cmds = VMW_CMD_RESERVE(dev_priv, fifo_size); in vmw_overlay_send_put() 121 if (!cmds) in vmw_overlay_send_put() 124 items = (typeof(items))&cmds[1]; in vmw_overlay_send_put() 128 fill_escape(&cmds->escape, sizeof(*items) * (num_items + 1)); in vmw_overlay_send_put() 130 cmds->header.cmdType = SVGA_ESCAPE_VMWARE_VIDEO_SET_REGS; in vmw_overlay_send_put() 131 cmds->header.streamId = arg->stream_id; in vmw_overlay_send_put() 185 } *cmds; in vmw_overlay_send_stop() local 189 cmds = VMW_CMD_RESERVE(dev_priv, sizeof(*cmds)); in vmw_overlay_send_stop() [all …]
|
| /linux/tools/usb/usbip/src/ |
| H A D | usbip.c | 41 static const struct command cmds[] = { variable 100 for (i = 0; cmds[i].name != NULL; i++) in usbip_help() 101 if (!strcmp(cmds[i].name, argv[0]) && cmds[i].usage) { in usbip_help() 102 cmds[i].usage(); in usbip_help() 110 for (cmd = cmds; cmd->name != NULL; cmd++) in usbip_help() 177 for (i = 0; cmds[i].name != NULL; i++) in main() 178 if (!strcmp(cmds[i].name, cmd)) { in main() 182 rc = run_command(&cmds[i], argc, argv); in main()
|
| /linux/tools/testing/selftests/tc-testing/plugin-lib/ |
| H A D | nsPlugin.py | 163 cmds = [] 167 cmds.append(self._replace_keywords('netns add {}'.format(ns))) 168 cmds.append(self._replace_keywords('link add $DEV1 type veth peer name $DEV0')) 169 cmds.append(self._replace_keywords('link set $DEV1 netns {}'.format(ns))) 170 cmds.append(self._replace_keywords('link add $DUMMY type dummy'.format(ns))) 171 cmds.append(self._replace_keywords('link set $DUMMY netns {}'.format(ns))) 172 cmds.append(self._replace_keywords('netns exec {} $IP link set $DEV1 up'.format(ns))) 173 cmds.append(self._replace_keywords('netns exec {} $IP link set $DUMMY up'.format(ns))) 174 cmds.append(self._replace_keywords('link set $DEV0 up'.format(ns))) 177 cmds.append(self._replace_keywords('link set $DEV2 netns {}'.format(ns))) [all …]
|
| /linux/tools/net/ynl/ynltool/ |
| H A D | main.c | 80 int cmd_select(const struct cmd *cmds, int argc, char **argv, in cmd_select() argument 89 if (argc < 1 && cmds[0].func) in cmd_select() 90 return cmds[0].func(argc, argv); in cmd_select() 92 for (i = 0; cmds[i].cmd; i++) { in cmd_select() 93 if (is_prefix(*argv, cmds[i].cmd)) { in cmd_select() 94 if (!cmds[i].func) { in cmd_select() 95 p_err("command '%s' is not available", cmds[i].cmd); in cmd_select() 98 return cmds[i].func(argc - 1, argv + 1); in cmd_select()
|
| /linux/drivers/net/wireless/intel/iwlwifi/fw/ |
| H A D | notif-wait.c | 47 if (w->cmds[i] == rec_id || in iwl_notification_wait() 48 (!iwl_cmd_groupid(w->cmds[i]) && in iwl_notification_wait() 49 DEF_ID(w->cmds[i]) == rec_id)) { in iwl_notification_wait() 85 const u16 *cmds, int n_cmds, in iwl_init_notification_wait() argument 96 memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(u16)); in iwl_init_notification_wait()
|
| /linux/drivers/iommu/arm/arm-smmu-v3/ |
| H A D | arm-smmu-v3-iommufd.c | 359 struct arm_vsmmu_invalidation_cmd *cmds; in arm_vsmmu_cache_invalidate() local 364 cmds = kzalloc_objs(*cmds, array->entry_num); in arm_vsmmu_cache_invalidate() 365 if (!cmds) in arm_vsmmu_cache_invalidate() 367 cur = cmds; in arm_vsmmu_cache_invalidate() 368 end = cmds + array->entry_num; in arm_vsmmu_cache_invalidate() 370 static_assert(sizeof(*cmds) == 2 * sizeof(u64)); in arm_vsmmu_cache_invalidate() 372 cmds, sizeof(*cmds), array, in arm_vsmmu_cache_invalidate() 377 last = cmds; in arm_vsmmu_cache_invalidate() 398 array->entry_num = cur - cmds; in arm_vsmmu_cache_invalidate() 399 kfree(cmds); in arm_vsmmu_cache_invalidate()
|
| /linux/drivers/gpu/drm/i915/gt/uc/ |
| H A D | intel_guc_ct.c | 176 u32 *cmds, u32 size_in_bytes, u32 resv_space) in guc_ct_buffer_init() argument 181 ctb->cmds = cmds; in guc_ct_buffer_init() 266 u32 *cmds; in intel_guc_ct_init() local 283 cmds = blob + 2 * CTB_DESC_SIZE; in intel_guc_ct_init() 287 ptrdiff(desc, blob), ptrdiff(cmds, blob), cmds_size, in intel_guc_ct_init() 290 guc_ct_buffer_init(&ct->ctbs.send, desc, cmds, cmds_size, resv_space); in intel_guc_ct_init() 294 cmds = blob + 2 * CTB_DESC_SIZE + CTB_H2G_BUFFER_SIZE; in intel_guc_ct_init() 298 ptrdiff(desc, blob), ptrdiff(cmds, blob), cmds_size, in intel_guc_ct_init() 301 guc_ct_buffer_init(&ct->ctbs.recv, desc, cmds, cmds_size, resv_space); in intel_guc_ct_init() 331 u32 base, desc, cmds, size; in intel_guc_ct_enable() local [all …]
|
| /linux/drivers/gpu/host1x/ |
| H A D | job.c | 66 job->cmds = num_cmdbufs ? mem : NULL; in host1x_job_alloc() 116 struct host1x_job_gather *gather = &job->cmds[job->num_cmds].gather; in host1x_job_add_gather() 129 struct host1x_job_cmd *cmd = &job->cmds[job->num_cmds]; in host1x_job_add_wait() 220 if (job->cmds[i].is_wait) in pin_job() 223 g = &job->cmds[i].gather; in pin_job() 541 if (job->cmds[i].is_wait) in copy_gathers() 544 g = &job->cmds[i].gather; in copy_gathers() 570 if (job->cmds[i].is_wait) in copy_gathers() 572 g = &job->cmds[i].gather; in copy_gathers() 619 if (job->cmds[i].is_wait) in host1x_job_pin() [all …]
|
| /linux/drivers/dma/ |
| H A D | bcm-sba-raid.c | 115 struct brcm_sba_command cmds[]; member 556 struct brcm_sba_command *cmds, in sba_fillup_interrupt_msg() argument 562 struct brcm_sba_command *cmdsp = cmds; in sba_fillup_interrupt_msg() 608 msg->sba.cmds = cmds; in sba_fillup_interrupt_msg() 609 msg->sba.cmds_count = cmdsp - cmds; in sba_fillup_interrupt_msg() 632 sba_fillup_interrupt_msg(req, req->cmds, &req->msg); in sba_prep_dma_interrupt() 642 struct brcm_sba_command *cmds, in sba_fillup_memcpy_msg() argument 650 struct brcm_sba_command *cmdsp = cmds; in sba_fillup_memcpy_msg() 696 msg->sba.cmds = cmds; in sba_fillup_memcpy_msg() 697 msg->sba.cmds_count = cmdsp - cmds; in sba_fillup_memcpy_msg() [all …]
|
| /linux/drivers/vdpa/mlx5/core/ |
| H A D | mr.c | 213 struct mlx5_vdpa_async_cmd *cmds; in create_direct_keys() local 218 cmds = kvzalloc_objs(*cmds, mr->num_directs); in create_direct_keys() 219 if (!cmds) in create_direct_keys() 234 cmds[i].out = cmd_mem->out; in create_direct_keys() 235 cmds[i].outlen = sizeof(cmd_mem->out); in create_direct_keys() 236 cmds[i].in = cmd_mem->in; in create_direct_keys() 237 cmds[i].inlen = struct_size(cmd_mem, mtt, mttcount); in create_direct_keys() 244 err = mlx5_vdpa_exec_async_cmds(mvdev, cmds, mr->num_directs); in create_direct_keys() 253 struct mlx5_vdpa_async_cmd *cmd = &cmds[i++]; in create_direct_keys() 271 cmd_mem = container_of(cmds[i].out, struct mlx5_create_mkey_mem, out); in create_direct_keys() [all …]
|
| /linux/drivers/crypto/ccp/ |
| H A D | ccp-crypto-main.c | 57 struct list_head cmds; member 106 list_for_each_entry_continue(tmp, &req_queue.cmds, entry) { in ccp_crypto_cmd_complete() 117 if (req_queue.backlog != &req_queue.cmds) { in ccp_crypto_cmd_complete() 228 list_for_each_entry(tmp, &req_queue.cmds, entry) { in ccp_crypto_enqueue_cmd() 244 if (req_queue.backlog == &req_queue.cmds) in ccp_crypto_enqueue_cmd() 250 list_add_tail(&crypto_cmd->entry, &req_queue.cmds); in ccp_crypto_enqueue_cmd() 409 INIT_LIST_HEAD(&req_queue.cmds); in ccp_crypto_init() 410 req_queue.backlog = &req_queue.cmds; in ccp_crypto_init()
|
| /linux/tools/perf/ |
| H A D | perf-completion.sh | 131 cmds_=$($cmd $1 --list-cmds) 159 cmds=$($cmd --list-opts) 161 cmds=$($cmd --list-cmds) 163 __perfcomp "$cmds" "$cur" 220 subcmds=$($cmd $prev_skip_opts --list-cmds)
|
| /linux/tools/bpf/bpftool/ |
| H A D | main.c | 191 int cmd_select(const struct cmd *cmds, int argc, char **argv, in cmd_select() argument 200 if (argc < 1 && cmds[0].func) in cmd_select() 201 return cmds[0].func(argc, argv); in cmd_select() 203 for (i = 0; cmds[i].cmd; i++) { in cmd_select() 204 if (is_prefix(*argv, cmds[i].cmd)) { in cmd_select() 205 if (!cmds[i].func) { in cmd_select() 207 cmds[i].cmd); in cmd_select() 210 return cmds[i].func(argc - 1, argv + 1); in cmd_select()
|
| /linux/drivers/accel/ethosu/ |
| H A D | ethosu_gem.c | 374 u32 cmds[2]; in ethosu_gem_cmdstream_copy_and_validate() local 377 if (get_user(cmds[0], ucmds++)) in ethosu_gem_cmdstream_copy_and_validate() 380 bocmds[i] = cmds[0]; in ethosu_gem_cmdstream_copy_and_validate() 382 cmd = cmds[0]; in ethosu_gem_cmdstream_copy_and_validate() 383 param = cmds[0] >> 16; in ethosu_gem_cmdstream_copy_and_validate() 386 if (get_user(cmds[1], ucmds++)) in ethosu_gem_cmdstream_copy_and_validate() 390 bocmds[i] = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() 391 addr = cmd_to_addr(cmds); in ethosu_gem_cmdstream_copy_and_validate() 578 st.weight[0].length = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() 584 st.scale[0].length = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() [all …]
|
| /linux/tools/testing/kunit/ |
| H A D | kunit-completion.sh | 14 local cmds=$(${script} --list-cmds 2>/dev/null) 15 COMPREPLY=($(compgen -W "${cmds}" -- "$cur"))
|
| /linux/fs/smb/client/ |
| H A D | smb2inode.c | 178 int *cmds, int num_cmds, struct cifsFileInfo *cfile, in smb2_compound_op() argument 277 if (num_cmds > 0 && cmds[0] == SMB2_OP_OPEN_QUERY) in smb2_compound_op() 282 switch (cmds[i]) { in smb2_compound_op() 678 if (rc == 0 && num_cmds > 0 && cmds[0] == SMB2_OP_OPEN_QUERY) { in smb2_compound_op() 707 switch (cmds[i]) { in smb2_compound_op() 921 static bool ea_unsupported(int *cmds, int num_cmds, in ea_unsupported() argument 926 if (cmds[num_cmds - 1] != SMB2_OP_QUERY_WSL_EA) in ea_unsupported() 964 int cmds[3]; in smb2_query_path_info() local 998 cmds[num_cmds++] = SMB2_OP_QUERY_INFO; in smb2_query_path_info() 1000 cmds[num_cmds++] = SMB2_OP_POSIX_QUERY_INFO; in smb2_query_path_info() [all …]
|
| /linux/drivers/iio/adc/ |
| H A D | ti-adc108s102.c | 116 unsigned int bit, cmds; in adc108s102_update_scan_mode() local 122 cmds = 0; in adc108s102_update_scan_mode() 124 st->tx_buf[cmds++] = cpu_to_be16(ADC108S102_CMD(bit)); in adc108s102_update_scan_mode() 127 st->tx_buf[cmds++] = 0x00; in adc108s102_update_scan_mode() 132 st->ring_xfer.len = cmds * sizeof(st->tx_buf[0]); in adc108s102_update_scan_mode()
|
| /linux/drivers/interconnect/qcom/ |
| H A D | bcm-voter.c | 281 struct tcs_cmd cmds[MAX_BCMS]; in qcom_icc_bcm_voter_commit() local 309 tcs_list_gen(voter, QCOM_ICC_BUCKET_AMC, cmds, commit_idx); in qcom_icc_bcm_voter_commit() 316 cmds, commit_idx); in qcom_icc_bcm_voter_commit() 345 tcs_list_gen(voter, QCOM_ICC_BUCKET_WAKE, cmds, commit_idx); in qcom_icc_bcm_voter_commit() 347 ret = rpmh_write_batch(voter->dev, RPMH_WAKE_ONLY_STATE, cmds, commit_idx); in qcom_icc_bcm_voter_commit() 353 tcs_list_gen(voter, QCOM_ICC_BUCKET_SLEEP, cmds, commit_idx); in qcom_icc_bcm_voter_commit() 355 ret = rpmh_write_batch(voter->dev, RPMH_SLEEP_STATE, cmds, commit_idx); in qcom_icc_bcm_voter_commit()
|