/linux/tools/lib/subcmd/ |
H A D | help.c | 16 void add_cmdname(struct cmdnames *cmds, const char *name, size_t len) in add_cmdname() argument 26 ALLOC_GROW(cmds->names, cmds->cnt + 1, cmds->alloc); in add_cmdname() 27 cmds->names[cmds->cnt++] = ent; in add_cmdname() 30 void clean_cmdnames(struct cmdnames *cmds) in clean_cmdnames() argument 34 for (i = 0; i < cmds->cnt; ++i) in clean_cmdnames() 35 zfree(&cmds->names[i]); in clean_cmdnames() 36 zfree(&cmds->names); in clean_cmdnames() 37 cmds->cnt = 0; in clean_cmdnames() 38 cmds->alloc = 0; in clean_cmdnames() 48 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/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 in add_cmd_list() [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/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/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/drivers/iommu/arm/arm-smmu-v3/ |
H A D | arm-smmu-v3-iommufd.c | 293 struct arm_vsmmu_invalidation_cmd *cmds; in arm_vsmmu_cache_invalidate() local 298 cmds = kcalloc(array->entry_num, sizeof(*cmds), GFP_KERNEL); in arm_vsmmu_cache_invalidate() 299 if (!cmds) in arm_vsmmu_cache_invalidate() 301 cur = cmds; in arm_vsmmu_cache_invalidate() 302 end = cmds + array->entry_num; in arm_vsmmu_cache_invalidate() 304 static_assert(sizeof(*cmds) == 2 * sizeof(u64)); in arm_vsmmu_cache_invalidate() 306 cmds, sizeof(*cmds), array, in arm_vsmmu_cache_invalidate() 311 last = cmds; in arm_vsmmu_cache_invalidate() 332 array->entry_num = cur - cmds; in arm_vsmmu_cache_invalidate() 333 kfree(cmds); in arm_vsmmu_cache_invalidate()
|
H A D | arm-smmu-v3.c | 757 static void arm_smmu_cmdq_write_entries(struct arm_smmu_cmdq *cmdq, u64 *cmds, in arm_smmu_cmdq_write_entries() argument 767 u64 *cmd = &cmds[i * CMDQ_ENT_DWORDS]; in arm_smmu_cmdq_write_entries() 791 struct arm_smmu_cmdq *cmdq, u64 *cmds, int n, in arm_smmu_cmdq_issue_cmdlist() argument 834 arm_smmu_cmdq_write_entries(cmdq, cmds, llq.prod, n); in arm_smmu_cmdq_issue_cmdlist() 939 struct arm_smmu_cmdq_batch *cmds, in arm_smmu_cmdq_batch_init() argument 942 cmds->num = 0; in arm_smmu_cmdq_batch_init() 943 cmds->cmdq = arm_smmu_get_cmdq(smmu, ent); in arm_smmu_cmdq_batch_init() 947 struct arm_smmu_cmdq_batch *cmds, in arm_smmu_cmdq_batch_add() argument 950 bool unsupported_cmd = !arm_smmu_cmdq_supports_cmd(cmds->cmdq, cmd); in arm_smmu_cmdq_batch_add() 951 bool force_sync = (cmds->num == CMDQ_BATCH_ENTRIES - 1) && in arm_smmu_cmdq_batch_add() [all …]
|
/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()
|
H A D | notif-wait.h | 53 u16 cmds[MAX_NOTIF_CMDS]; member 83 const u16 *cmds, int n_cmds,
|
/linux/drivers/gpu/drm/i915/gt/uc/ |
H A D | intel_guc_ct.c | 175 u32 *cmds, u32 size_in_bytes, u32 resv_space) in guc_ct_buffer_init() argument 180 ctb->cmds = cmds; in guc_ct_buffer_init() 265 u32 *cmds; in intel_guc_ct_init() local 286 cmds = blob + 2 * CTB_DESC_SIZE; in intel_guc_ct_init() 290 ptrdiff(desc, blob), ptrdiff(cmds, blob), cmds_size, in intel_guc_ct_init() 293 guc_ct_buffer_init(&ct->ctbs.send, desc, cmds, cmds_size, resv_space); in intel_guc_ct_init() 297 cmds = blob + 2 * CTB_DESC_SIZE + CTB_H2G_BUFFER_SIZE; in intel_guc_ct_init() 301 ptrdiff(desc, blob), ptrdiff(cmds, blob), cmds_size, in intel_guc_ct_init() 304 guc_ct_buffer_init(&ct->ctbs.recv, desc, cmds, cmds_size, resv_space); in intel_guc_ct_init() 333 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/crypto/ccp/ |
H A D | ccp-crypto-main.c | 54 struct list_head cmds; member 103 list_for_each_entry_continue(tmp, &req_queue.cmds, entry) { in ccp_crypto_cmd_complete() 114 if (req_queue.backlog != &req_queue.cmds) { in ccp_crypto_cmd_complete() 225 list_for_each_entry(tmp, &req_queue.cmds, entry) { in ccp_crypto_enqueue_cmd() 241 if (req_queue.backlog == &req_queue.cmds) in ccp_crypto_enqueue_cmd() 247 list_add_tail(&crypto_cmd->entry, &req_queue.cmds); in ccp_crypto_enqueue_cmd() 406 INIT_LIST_HEAD(&req_queue.cmds); in ccp_crypto_init() 407 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 | 187 int cmd_select(const struct cmd *cmds, int argc, char **argv, in cmd_select() argument 196 if (argc < 1 && cmds[0].func) in cmd_select() 197 return cmds[0].func(argc, argv); in cmd_select() 199 for (i = 0; cmds[i].cmd; i++) { in cmd_select() 200 if (is_prefix(*argv, cmds[i].cmd)) { in cmd_select() 201 if (!cmds[i].func) { in cmd_select() 203 cmds[i].cmd); in cmd_select() 206 return cmds[i].func(argc - 1, argv + 1); in cmd_select()
|
/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()
|
/linux/drivers/media/platform/renesas/vsp1/ |
H A D | vsp1_dl.c | 160 struct vsp1_dl_ext_cmd *cmds; member 439 pool->cmds = kcalloc(num_cmds, sizeof(*pool->cmds), GFP_KERNEL); in vsp1_dl_cmd_pool_create() 440 if (!pool->cmds) { in vsp1_dl_cmd_pool_create() 453 kfree(pool->cmds); in vsp1_dl_cmd_pool_create() 459 struct vsp1_dl_ext_cmd *cmd = &pool->cmds[i]; in vsp1_dl_cmd_pool_create() 473 cmd->cmds = pool->mem + cmd_offset; in vsp1_dl_cmd_pool_create() 528 kfree(pool->cmds); in vsp1_dl_ext_cmd_pool_destroy() 745 cmd->cmds[0].opcode = cmd->opcode; in vsp1_dl_ext_cmd_fill_header() 746 cmd->cmds[0].flags = cmd->flags; in vsp1_dl_ext_cmd_fill_header() 747 cmd->cmds[0].address_set = cmd->data_dma; in vsp1_dl_ext_cmd_fill_header() [all …]
|
/linux/sound/ppc/ |
H A D | pmac.c | 60 rec->cmds = (void __iomem *)DBDMA_ALIGN(rec->space); in snd_pmac_dbdma_alloc() 61 rec->addr = rec->dma_base + (unsigned long)((char *)rec->cmds - (char *)rec->space); in snd_pmac_dbdma_alloc() 211 chip->extra_dma.cmds->command = cpu_to_le16(DBDMA_STOP); in snd_pmac_pcm_prepare() 221 for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) { in snd_pmac_pcm_prepare() 259 for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) in snd_pmac_pcm_trigger() 273 for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) in snd_pmac_pcm_trigger() 297 volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period]; in snd_pmac_pcm_pointer() 391 memcpy((void *)emergency_dbdma.cmds, (void *)cp, in snd_pmac_pcm_dead_xfer() 396 cp = emergency_dbdma.cmds; in snd_pmac_pcm_dead_xfer() 438 cp = emergency_dbdma.cmds; in snd_pmac_pcm_update() [all …]
|
/linux/fs/smb/client/ |
H A D | smb2inode.c | 175 int *cmds, int num_cmds, struct cifsFileInfo *cfile, in smb2_compound_op() argument 270 switch (cmds[i]) { in smb2_compound_op() 650 switch (cmds[i]) { in smb2_compound_op() 876 static bool ea_unsupported(int *cmds, int num_cmds, in ea_unsupported() argument 881 if (cmds[num_cmds - 1] != SMB2_OP_QUERY_WSL_EA) in ea_unsupported() 919 int cmds[3]; in smb2_query_path_info() local 953 cmds[num_cmds++] = SMB2_OP_QUERY_INFO; in smb2_query_path_info() 955 cmds[num_cmds++] = SMB2_OP_POSIX_QUERY_INFO; in smb2_query_path_info() 967 &oparms, in_iov, cmds, num_cmds, in smb2_query_path_info() 995 cmds[num_cmds++] = SMB2_OP_GET_REPARSE; in smb2_query_path_info() [all …]
|
/linux/drivers/nvme/target/ |
H A D | rdma.c | 104 struct nvmet_rdma_cmd *cmds; member 129 struct nvmet_rdma_cmd *cmds; member 367 struct nvmet_rdma_cmd *cmds; in nvmet_rdma_alloc_cmds() local 370 cmds = kcalloc(nr_cmds, sizeof(struct nvmet_rdma_cmd), GFP_KERNEL); in nvmet_rdma_alloc_cmds() 371 if (!cmds) in nvmet_rdma_alloc_cmds() 375 ret = nvmet_rdma_alloc_cmd(ndev, cmds + i, admin); in nvmet_rdma_alloc_cmds() 380 return cmds; in nvmet_rdma_alloc_cmds() 384 nvmet_rdma_free_cmd(ndev, cmds + i, admin); in nvmet_rdma_alloc_cmds() 385 kfree(cmds); in nvmet_rdma_alloc_cmds() 391 struct nvmet_rdma_cmd *cmds, int nr_cmds, bool admin) in nvmet_rdma_free_cmds() argument [all …]
|
/linux/drivers/vdpa/mlx5/core/ |
H A D | resources.c | 332 struct mlx5_vdpa_async_cmd *cmds, in issue_async_cmd() argument 337 struct mlx5_vdpa_async_cmd *cmd = &cmds[issued]; in issue_async_cmd() 349 wait_for_completion(&cmds[*completed].cmd_done); in issue_async_cmd() 367 struct mlx5_vdpa_async_cmd *cmds, in mlx5_vdpa_exec_async_cmds() argument 375 init_completion(&cmds[i].cmd_done); in mlx5_vdpa_exec_async_cmds() 379 err = issue_async_cmd(mvdev, cmds, issued, &completed); in mlx5_vdpa_exec_async_cmds() 390 wait_for_completion(&cmds[completed++].cmd_done); in mlx5_vdpa_exec_async_cmds()
|
/linux/drivers/mailbox/ |
H A D | bcm-flexrm-mailbox.c | 709 if (!msg->sba.cmds || !msg->sba.cmds_count) in flexrm_sba_sanity_check() 713 if (((msg->sba.cmds[i].flags & BRCM_SBA_CMD_TYPE_B) || in flexrm_sba_sanity_check() 714 (msg->sba.cmds[i].flags & BRCM_SBA_CMD_TYPE_C)) && in flexrm_sba_sanity_check() 715 (msg->sba.cmds[i].flags & BRCM_SBA_CMD_HAS_OUTPUT)) in flexrm_sba_sanity_check() 717 if ((msg->sba.cmds[i].flags & BRCM_SBA_CMD_TYPE_B) && in flexrm_sba_sanity_check() 718 (msg->sba.cmds[i].data_len > SRCT_LENGTH_MASK)) in flexrm_sba_sanity_check() 720 if ((msg->sba.cmds[i].flags & BRCM_SBA_CMD_TYPE_C) && in flexrm_sba_sanity_check() 721 (msg->sba.cmds[i].data_len > SRCT_LENGTH_MASK)) in flexrm_sba_sanity_check() 723 if ((msg->sba.cmds[i].flags & BRCM_SBA_CMD_HAS_RESP) && in flexrm_sba_sanity_check() 724 (msg->sba.cmds[i].resp_len > DSTT_LENGTH_MASK)) in flexrm_sba_sanity_check() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | fs_core.c | 574 err = root->cmds->destroy_flow_table(root, ft); in del_hw_flow_table() 608 err = root->cmds->update_fte(root, ft, fg, fte->act_dests.modify_mask, fte); in modify_fte() 736 err = root->cmds->update_fte(root, ft, fg, in del_hw_fte() 744 err = root->cmds->delete_fte(root, ft, fte); in del_hw_fte() 786 if (fg->node.active && root->cmds->destroy_flow_group(root, ft, fg)) in del_hw_flow_group() 1077 err = root->cmds->modify_flow_table(root, iter, ft); in connect_fts_in_prio() 1158 err = root->cmds->update_root_ft(root, ft, qpn, false); in update_root_ft_create() 1162 err = root->cmds->update_root_ft(root, ft, in update_root_ft_create() 1226 err = root->cmds->update_fte(root, ft, fg, in _mlx5_modify_rule_destination() 1382 err = root->cmds->create_flow_table(root, ft, ft_attr, next_ft); in __mlx5_create_flow_table() [all …]
|