Home
last modified time | relevance | path

Searched refs:nent (Results 1 – 25 of 48) sorted by relevance

12

/Linux-v4.19/arch/x86/kvm/
Dcpuid.c202 if (cpuid->nent > KVM_MAX_CPUID_ENTRIES) in kvm_vcpu_ioctl_set_cpuid()
205 if (cpuid->nent) { in kvm_vcpu_ioctl_set_cpuid()
208 cpuid->nent)); in kvm_vcpu_ioctl_set_cpuid()
213 cpuid->nent * sizeof(struct kvm_cpuid_entry))) in kvm_vcpu_ioctl_set_cpuid()
216 for (i = 0; i < cpuid->nent; i++) { in kvm_vcpu_ioctl_set_cpuid()
228 vcpu->arch.cpuid_nent = cpuid->nent; in kvm_vcpu_ioctl_set_cpuid()
246 if (cpuid->nent > KVM_MAX_CPUID_ENTRIES) in kvm_vcpu_ioctl_set_cpuid2()
250 cpuid->nent * sizeof(struct kvm_cpuid_entry2))) in kvm_vcpu_ioctl_set_cpuid2()
252 vcpu->arch.cpuid_nent = cpuid->nent; in kvm_vcpu_ioctl_set_cpuid2()
267 if (cpuid->nent < vcpu->arch.cpuid_nent) in kvm_vcpu_ioctl_get_cpuid2()
[all …]
/Linux-v4.19/drivers/gpu/drm/nouveau/nvkm/engine/gr/
Dgk20a.c42 int nent; in gk20a_gr_av_to_init() local
50 nent = (fuc.size / sizeof(struct gk20a_fw_av)); in gk20a_gr_av_to_init()
51 pack = vzalloc((sizeof(*pack) * 2) + (sizeof(*init) * (nent + 1))); in gk20a_gr_av_to_init()
60 for (i = 0; i < nent; i++) { in gk20a_gr_av_to_init()
91 int nent; in gk20a_gr_aiv_to_init() local
99 nent = (fuc.size / sizeof(struct gk20a_fw_aiv)); in gk20a_gr_aiv_to_init()
100 pack = vzalloc((sizeof(*pack) * 2) + (sizeof(*init) * (nent + 1))); in gk20a_gr_aiv_to_init()
109 for (i = 0; i < nent; i++) { in gk20a_gr_aiv_to_init()
136 int nent; in gk20a_gr_av_to_method() local
144 nent = (fuc.size / sizeof(struct gk20a_fw_av)); in gk20a_gr_av_to_method()
[all …]
/Linux-v4.19/scripts/
Dconmakehash.c85 int i, nuni, nent; in main() local
275 nent = 0; in main()
278 while ( nent >= unicount[fp0] ) in main()
281 nent = 0; in main()
283 printf("0x%04x", unitable[fp0][nent++]); in main()
/Linux-v4.19/drivers/infiniband/hw/qib/
Dqib_pcie.c211 int qib_pcie_params(struct qib_devdata *dd, u32 minw, u32 *nent) in qib_pcie_params() argument
229 maxvec = (nent && *nent) ? *nent : 1; in qib_pcie_params()
239 if (nent) in qib_pcie_params()
240 *nent = !dd->pcidev->msix_enabled ? 0 : nvec; in qib_pcie_params()
/Linux-v4.19/drivers/infiniband/hw/mthca/
Dmthca_eq.c184 mthca_write64(MTHCA_EQ_DB_SET_CI | eq->eqn, ci & (eq->nent - 1), in tavor_set_eq_ci()
230 unsigned long off = (entry & (eq->nent - 1)) * MTHCA_EQ_ENTRY_SIZE; in get_eqe()
466 int nent, in mthca_create_eq() argument
479 eq->nent = roundup_pow_of_two(max(nent, 2)); in mthca_create_eq()
480 npages = ALIGN(eq->nent * MTHCA_EQ_ENTRY_SIZE, PAGE_SIZE) / PAGE_SIZE; in mthca_create_eq()
511 for (i = 0; i < eq->nent; ++i) in mthca_create_eq()
535 eq_context->logsize_usrpage = cpu_to_be32((ffs(eq->nent) - 1) << 24); in mthca_create_eq()
560 eq->eqn, eq->nent); in mthca_create_eq()
593 int npages = (eq->nent * MTHCA_EQ_ENTRY_SIZE + PAGE_SIZE - 1) / in mthca_free_eq()
Dmthca_allocator.c160 int mthca_array_init(struct mthca_array *array, int nent) in mthca_array_init() argument
162 int npage = (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; in mthca_array_init()
178 void mthca_array_cleanup(struct mthca_array *array, int nent) in mthca_array_cleanup() argument
182 for (i = 0; i < (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; ++i) in mthca_array_cleanup()
Dmthca_cq.c353 int mthca_alloc_cq_buf(struct mthca_dev *dev, struct mthca_cq_buf *buf, int nent) in mthca_alloc_cq_buf() argument
358 ret = mthca_buf_alloc(dev, nent * MTHCA_CQ_ENTRY_SIZE, in mthca_alloc_cq_buf()
365 for (i = 0; i < nent; ++i) in mthca_alloc_cq_buf()
773 int mthca_init_cq(struct mthca_dev *dev, int nent, in mthca_init_cq() argument
781 cq->ibcq.cqe = nent - 1; in mthca_init_cq()
817 err = mthca_alloc_cq_buf(dev, &cq->buf, nent); in mthca_init_cq()
831 cq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24); in mthca_init_cq()
Dmthca_dev.h422 int mthca_array_init(struct mthca_array *array, int nent);
423 void mthca_array_cleanup(struct mthca_array *array, int nent);
498 int mthca_init_cq(struct mthca_dev *dev, int nent,
509 int mthca_alloc_cq_buf(struct mthca_dev *dev, struct mthca_cq_buf *buf, int nent);
Dmthca_cmd.c670 int nent = 0; in mthca_map_cmd() local
700 pages[nent * 2] = cpu_to_be64(virt); in mthca_map_cmd()
704 pages[nent * 2 + 1] = in mthca_map_cmd()
710 if (++nent == MTHCA_MAILBOX_SIZE / 16) { in mthca_map_cmd()
711 err = mthca_cmd(dev, mailbox->dma, nent, 0, op, in mthca_map_cmd()
715 nent = 0; in mthca_map_cmd()
720 if (nent) in mthca_map_cmd()
721 err = mthca_cmd(dev, mailbox->dma, nent, 0, op, in mthca_map_cmd()
Dmthca_provider.h113 int nent; member
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx4/
Deq.c110 unsigned long offset = (entry & (eq->nent - 1)) * eqe_size; in get_eqe()
124 return !!(eqe->owner & 0x80) ^ !!(eq->cons_index & eq->nent) ? NULL : eqe; in next_eqe_sw()
781 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
784 !!(eq->cons_index & eq->nent) ? "HW" : "SW"); in mlx4_eq_int()
806 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
808 !!(eq->cons_index & eq->nent) ? "HW" : "SW"); in mlx4_eq_int()
818 eq->cons_index, eqe->owner, eq->nent, in mlx4_eq_int()
821 !!(eq->cons_index & eq->nent) ? "HW" : "SW"); in mlx4_eq_int()
968 static int mlx4_create_eq(struct mlx4_dev *dev, int nent, in mlx4_create_eq() argument
982 eq->nent = roundup_pow_of_two(max(nent, 2)); in mlx4_create_eq()
[all …]
Dcq.c290 int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, in mlx4_cq_alloc() argument
329 cpu_to_be32((ilog2(nent) << 24) | in mlx4_cq_alloc()
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/
Deq.c109 struct mlx5_eqe *eqe = get_eqe(eq, eq->cons_index & (eq->nent - 1)); in next_eqe_sw()
111 return ((eqe->owner & 1) ^ !!(eq->cons_index & eq->nent)) ? NULL : eqe; in next_eqe_sw()
640 for (i = 0; i < eq->nent; i++) { in init_eq_buf()
647 int nent, u64 mask, const char *name, in mlx5_create_map_eq() argument
666 eq->nent = roundup_pow_of_two(nent + MLX5_NUM_SPARE_EQE); in mlx5_create_map_eq()
668 err = mlx5_buf_alloc(dev, eq->nent * MLX5_EQE_SIZE, &eq->buf); in mlx5_create_map_eq()
697 MLX5_SET(eqc, eqc, log_eq_size, ilog2(eq->nent)); in mlx5_create_map_eq()
/Linux-v4.19/drivers/infiniband/hw/hns/
Dhns_roce_cq.c83 static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent, in hns_roce_cq_alloc() argument
148 nent, vector); in hns_roce_cq_alloc()
266 struct hns_roce_cq_buf *buf, u32 nent) in hns_roce_ib_alloc_cq_buf() argument
271 ret = hns_roce_buf_alloc(hr_dev, nent * hr_dev->caps.cq_entry_sz, in hns_roce_ib_alloc_cq_buf()
297 hns_roce_buf_free(hr_dev, nent * hr_dev->caps.cq_entry_sz, in hns_roce_ib_alloc_cq_buf()
/Linux-v4.19/lib/
Dscatterlist.c484 unsigned int nent, nalloc; in sgl_alloc_order() local
487 nent = round_up(length, PAGE_SIZE << order) >> (PAGE_SHIFT + order); in sgl_alloc_order()
489 if (length > (nent << (PAGE_SHIFT + order))) in sgl_alloc_order()
491 nalloc = nent; in sgl_alloc_order()
519 *nent_p = nent; in sgl_alloc_order()
/Linux-v4.19/drivers/iommu/
Domap-iommu.c721 int nent = 1; in iopgtable_clear_entry_core() local
735 nent *= 16; in iopgtable_clear_entry_core()
739 bytes *= nent; in iopgtable_clear_entry_core()
740 memset(iopte, 0, nent * sizeof(*iopte)); in iopgtable_clear_entry_core()
742 flush_iopte_range(obj->dev, pt_dma, pt_offset, nent); in iopgtable_clear_entry_core()
753 nent = 1; /* for the next L1 entry */ in iopgtable_clear_entry_core()
757 nent *= 16; in iopgtable_clear_entry_core()
761 bytes *= nent; in iopgtable_clear_entry_core()
763 memset(iopgd, 0, nent * sizeof(*iopgd)); in iopgtable_clear_entry_core()
764 flush_iopte_range(obj->dev, obj->pd_dma, pd_offset, nent); in iopgtable_clear_entry_core()
/Linux-v4.19/drivers/tty/serial/
Dpch_uart.c237 int nent; member
786 for (i = 0; i < priv->nent; i++, sg++) { in pch_dma_tx_complete()
792 dma_unmap_sg(port->dev, sg, priv->nent, DMA_TO_DEVICE); in pch_dma_tx_complete()
794 priv->nent = 0; in pch_dma_tx_complete()
934 int nent; in dma_handle_tx() local
1013 nent = dma_map_sg(port->dev, sg, num, DMA_TO_DEVICE); in dma_handle_tx()
1014 if (!nent) { in dma_handle_tx()
1018 priv->nent = nent; in dma_handle_tx()
1020 for (i = 0; i < nent; i++, sg++) { in dma_handle_tx()
1025 if (i == (nent - 1)) in dma_handle_tx()
[all …]
/Linux-v4.19/drivers/infiniband/hw/mlx5/
Dcq.c72 static u8 sw_ownership_bit(int n, int nent) in sw_ownership_bit() argument
74 return (n & nent) ? 1 : 0; in sw_ownership_bit()
728 int nent, in alloc_cq_frag_buf() argument
742 nent * cqe_size, in alloc_cq_frag_buf()
749 buf->nent = nent; in alloc_cq_frag_buf()
906 for (i = 0; i < buf->nent; i++) { in init_cq_frag_buf()
1302 (i + 1) & cq->resize_buf->nent); in copy_resize_cqes()
1304 sw_own = sw_ownership_bit(i + 1, cq->resize_buf->nent); in copy_resize_cqes()
/Linux-v4.19/arch/x86/include/uapi/asm/
Dkvm.h207 __u32 nent; member
229 __u32 nent; member
/Linux-v4.19/tools/arch/x86/include/uapi/asm/
Dkvm.h207 __u32 nent; member
229 __u32 nent; member
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dpci.c1236 int nent = 0; in mlxsw_pci_fw_area_init() local
1258 mlxsw_cmd_mbox_map_fa_pa_set(mbox, nent, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1259 mlxsw_cmd_mbox_map_fa_log2size_set(mbox, nent, 0); /* 1 page */ in mlxsw_pci_fw_area_init()
1260 if (++nent == MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX) { in mlxsw_pci_fw_area_init()
1261 err = mlxsw_cmd_map_fa(mlxsw_pci->core, mbox, nent); in mlxsw_pci_fw_area_init()
1264 nent = 0; in mlxsw_pci_fw_area_init()
1269 if (nent) { in mlxsw_pci_fw_area_init()
1270 err = mlxsw_cmd_map_fa(mlxsw_pci->core, mbox, nent); in mlxsw_pci_fw_area_init()
/Linux-v4.19/tools/testing/selftests/kvm/lib/
Dkvm_util.c468 int nent = 100; in allocate_kvm_cpuid2() local
472 size += nent * sizeof(struct kvm_cpuid_entry2); in allocate_kvm_cpuid2()
479 cpuid->nent = nent; in allocate_kvm_cpuid2()
534 for (i = 0; i < cpuid->nent; i++) { in kvm_get_supported_cpuid_index()
/Linux-v4.19/drivers/mailbox/
Dbcm-pdc-mailbox.c1216 int nent; in pdc_send_data() local
1225 nent = dma_map_sg(dev, mssg->spu.src, src_nent, DMA_TO_DEVICE); in pdc_send_data()
1226 if (unlikely(nent == 0)) in pdc_send_data()
1232 nent = dma_map_sg(dev, mssg->spu.dst, dst_nent, in pdc_send_data()
1234 if (unlikely(nent == 0)) { in pdc_send_data()
/Linux-v4.19/arch/x86/xen/
Defi.c87 efi_systab_xen.nr_tables = info->cfg.nent; in xen_efi_probe()
/Linux-v4.19/arch/alpha/kernel/
Dpci_iommu.c126 long i, p, nent; in iommu_arena_find_pages() local
141 nent = arena->size >> PAGE_SHIFT; in iommu_arena_find_pages()
146 while (i < n && p+i < nent) { in iommu_arena_find_pages()

12