| /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/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 | 167 cmds = [] 171 cmds.append(self._replace_keywords('netns add {}'.format(ns))) 172 cmds.append(self._replace_keywords('link add $DEV1 type veth peer name $DEV0')) 173 cmds.append(self._replace_keywords('link set $DEV1 netns {}'.format(ns))) 174 cmds.append(self._replace_keywords('link add $DUMMY type dummy'.format(ns))) 175 cmds.append(self._replace_keywords('link set $DUMMY netns {}'.format(ns))) 176 cmds.append(self._replace_keywords('link add $IFB type ifb')) 177 cmds.append(self._replace_keywords('link set $IFB netns {}'.format(ns))) 178 cmds.append(self._replace_keywords('netns exec {} $IP link set $DEV1 up'.format(ns))) 179 cmds [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/iommu/arm/arm-smmu-v3/ |
| H A D | arm-smmu-v3-iommufd.c | 376 struct arm_vsmmu_invalidation_cmd *cmds; in arm_vsmmu_cache_invalidate() local 381 cmds = kzalloc_objs(*cmds, array->entry_num); in arm_vsmmu_cache_invalidate() 382 if (!cmds) in arm_vsmmu_cache_invalidate() 384 cur = cmds; in arm_vsmmu_cache_invalidate() 385 end = cmds + array->entry_num; in arm_vsmmu_cache_invalidate() 387 static_assert(sizeof(*cmds) == 2 * sizeof(u64)); in arm_vsmmu_cache_invalidate() 389 cmds, sizeof(*cmds), array, in arm_vsmmu_cache_invalidate() 394 last = cmds; in arm_vsmmu_cache_invalidate() 415 array->entry_num = cur - cmds; in arm_vsmmu_cache_invalidate() 416 kfree(cmds); in arm_vsmmu_cache_invalidate()
|
| /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() 233 cmds[i].out = cmd_mem->out; in create_direct_keys() 234 cmds[i].outlen = sizeof(cmd_mem->out); in create_direct_keys() 235 cmds[i].in = cmd_mem->in; in create_direct_keys() 236 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 …]
|
| H A D | resources.c | 341 struct mlx5_vdpa_async_cmd *cmds, in issue_async_cmd() argument 346 struct mlx5_vdpa_async_cmd *cmd = &cmds[issued]; in issue_async_cmd() 358 wait_for_completion(&cmds[*completed].cmd_done); in issue_async_cmd() 376 struct mlx5_vdpa_async_cmd *cmds, in mlx5_vdpa_exec_async_cmds() argument 384 init_completion(&cmds[i].cmd_done); in mlx5_vdpa_exec_async_cmds() 388 err = issue_async_cmd(mvdev, cmds, issued, &completed); in mlx5_vdpa_exec_async_cmds() 399 wait_for_completion(&cmds[completed++].cmd_done); in mlx5_vdpa_exec_async_cmds()
|
| /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/drivers/iio/adc/ |
| H A D | ti-adc108s102.c | 115 unsigned int bit, cmds; in adc108s102_update_scan_mode() local 121 cmds = 0; in adc108s102_update_scan_mode() 123 st->tx_buf[cmds++] = cpu_to_be16(ADC108S102_CMD(bit)); in adc108s102_update_scan_mode() 126 st->tx_buf[cmds++] = 0x00; in adc108s102_update_scan_mode() 131 st->ring_xfer.len = cmds * sizeof(st->tx_buf[0]); in adc108s102_update_scan_mode()
|
| /linux/drivers/accel/ethosu/ |
| H A D | ethosu_gem.c | 407 u32 cmds[2]; in ethosu_gem_cmdstream_copy_and_validate() local 410 if (get_user(cmds[0], ucmds++)) in ethosu_gem_cmdstream_copy_and_validate() 413 bocmds[i] = cmds[0]; in ethosu_gem_cmdstream_copy_and_validate() 415 cmd = cmds[0]; in ethosu_gem_cmdstream_copy_and_validate() 416 param = cmds[0] >> 16; in ethosu_gem_cmdstream_copy_and_validate() 419 if (get_user(cmds[1], ucmds++)) in ethosu_gem_cmdstream_copy_and_validate() 425 bocmds[i] = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() 426 addr = cmd_to_addr(cmds); in ethosu_gem_cmdstream_copy_and_validate() 619 st.weight[0].length = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() 625 st.scale[0].length = cmds[1]; in ethosu_gem_cmdstream_copy_and_validate() [all …]
|
| /linux/drivers/i3c/master/ |
| H A D | amd-i3c-master.c | 153 struct xi3c_cmd cmds[] __counted_by(ncmds); 379 xfer = kzalloc_flex(*xfer, cmds, ncmds); in xi3c_master_alloc_xfer() 555 ret = xi3c_master_xfer(master, &xfer->cmds[i]); in xi3c_master_common_xfer() 592 daa_cmd = &xfer->cmds[0]; in xi3c_master_do_daa() 612 struct xi3c_cmd *cmd = &xfer->cmds[0]; in xi3c_master_do_daa() 745 cmd = &xfer->cmds[0]; in xi3c_master_send_bdcast_ccc_cmd() 775 cmd = &xfer->cmds[0]; in xi3c_master_send_direct_ccc_cmd() 785 cmd = &xfer->cmds[1]; in xi3c_master_send_direct_ccc_cmd() 805 ccc->err = xfer->cmds[0].err ? xfer->cmds[0].err : xfer->cmds[1].err; in xi3c_master_send_direct_ccc_cmd() 809 ccc->dests[0].payload.len = min(xfer->cmds[1].rx_actual, in xi3c_master_send_direct_ccc_cmd() [all …]
|
| /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/fs/smb/client/ |
| H A D | smb2inode.c | 217 int *cmds, int num_cmds, struct cifsFileInfo *cfile, in smb2_compound_op() argument 316 if (num_cmds > 0 && cmds[0] == SMB2_OP_OPEN_QUERY) in smb2_compound_op() 321 switch (cmds[i]) { in smb2_compound_op() 581 if (rc == 0 && num_cmds > 0 && cmds[0] == SMB2_OP_OPEN_QUERY) { in smb2_compound_op() 614 switch (cmds[i]) { in smb2_compound_op() 838 static bool ea_unsupported(int *cmds, int num_cmds, in ea_unsupported() argument 843 if (cmds[num_cmds - 1] != SMB2_OP_QUERY_WSL_EA) in ea_unsupported() 881 int cmds[3]; in smb2_query_path_info() local 915 cmds[num_cmds++] = SMB2_OP_QUERY_INFO; in smb2_query_path_info() 917 cmds[num_cmds++] = SMB2_OP_POSIX_QUERY_INFO; in smb2_query_path_info() [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/drivers/nvme/target/ |
| H A D | rdma.c | 104 struct nvmet_rdma_cmd *cmds; member 129 struct nvmet_rdma_cmd *cmds; member 368 struct nvmet_rdma_cmd *cmds; in nvmet_rdma_alloc_cmds() local 371 cmds = kvzalloc_objs(struct nvmet_rdma_cmd, nr_cmds); in nvmet_rdma_alloc_cmds() 372 if (!cmds) in nvmet_rdma_alloc_cmds() 376 ret = nvmet_rdma_alloc_cmd(ndev, cmds + i, admin); in nvmet_rdma_alloc_cmds() 381 return cmds; in nvmet_rdma_alloc_cmds() 385 nvmet_rdma_free_cmd(ndev, cmds + i, admin); in nvmet_rdma_alloc_cmds() 386 kvfree(cmds); in nvmet_rdma_alloc_cmds() 392 struct nvmet_rdma_cmd *cmds, int nr_cmds, bool admin) in nvmet_rdma_free_cmds() argument [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | token.c | 101 __u64 cmds; 127 err = set_delegate_mask(fs_fd, "delegate_cmds", opts->cmds, opts->cmds_str); in materialize_bpffs_fd() 1155 .cmds = 1ULL << BPF_BTF_LOAD, in test_token() 1171 .cmds = bit(BPF_MAP_CREATE), in test_token() 1179 .cmds = bit(BPF_PROG_LOAD), in test_token() 1188 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_PROG_LOAD) | bit(BPF_BTF_GET_FD_BY_ID), in test_token() 1196 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_PROG_LOAD) | bit(BPF_BTF_GET_FD_BY_ID), in test_token() 1205 .cmds = bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), 1216 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), 1227 .cmds 95 __u64 cmds; global() member [all...] |
| /linux/drivers/input/touchscreen/ |
| H A D | ads7846.c | 82 unsigned int cmds; member 769 for (cmd_idx = packet->last_cmd_idx; cmd_idx < packet->cmds - 1; cmd_idx++) { in ads7846_filter() 1103 packet->cmds = 5; /* x, y, z1, z2, pwdown */ in ads7846_halfd_spi_msg() 1105 packet->cmds = 3; /* x, y, pwdown */ in ads7846_halfd_spi_msg() 1107 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) { in ads7846_halfd_spi_msg() 1111 if (cmd_idx == packet->cmds - 1) { in ads7846_halfd_spi_msg() 1145 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) { in ads7846_halfd_spi_msg() 1153 if (cmd_idx == packet->cmds - 1) in ads7846_halfd_spi_msg() 1208 packet->cmds = 5; /* x, y, z1, z2, pwdown */ in ads7846_setup_spi_msg() 1210 packet->cmds = 3; /* x, y, pwdown */ in ads7846_setup_spi_msg() [all …]
|
| /linux/include/net/sctp/ |
| H A D | command.h | 190 struct sctp_cmd cmds[SCTP_MAX_NUM_COMMANDS]; member 202 seq->last_used_slot = seq->cmds + SCTP_MAX_NUM_COMMANDS; in sctp_init_cmd_seq() 218 BUG_ON(cmd < seq->cmds); in sctp_add_cmd_sf()
|