Lines Matching refs:NVME_CTRL_PAGE_SIZE
36 #define SGES_PER_PAGE (NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc))
375 unsigned max_bytes = (NVME_MAX_KB_SZ * 1024) + NVME_CTRL_PAGE_SIZE; in nvme_pci_npages_prp()
376 unsigned nprps = DIV_ROUND_UP(max_bytes, NVME_CTRL_PAGE_SIZE); in nvme_pci_npages_prp()
377 return DIV_ROUND_UP(8 * nprps, NVME_CTRL_PAGE_SIZE - 8); in nvme_pci_npages_prp()
387 NVME_CTRL_PAGE_SIZE); in nvme_pci_npages_sgl()
542 const int last_prp = NVME_CTRL_PAGE_SIZE / sizeof(__le64) - 1; in nvme_free_prps()
631 int offset = dma_addr & (NVME_CTRL_PAGE_SIZE - 1); in nvme_pci_setup_prps()
637 length -= (NVME_CTRL_PAGE_SIZE - offset); in nvme_pci_setup_prps()
643 dma_len -= (NVME_CTRL_PAGE_SIZE - offset); in nvme_pci_setup_prps()
645 dma_addr += (NVME_CTRL_PAGE_SIZE - offset); in nvme_pci_setup_prps()
652 if (length <= NVME_CTRL_PAGE_SIZE) { in nvme_pci_setup_prps()
657 nprps = DIV_ROUND_UP(length, NVME_CTRL_PAGE_SIZE); in nvme_pci_setup_prps()
676 if (i == NVME_CTRL_PAGE_SIZE >> 3) { in nvme_pci_setup_prps()
687 dma_len -= NVME_CTRL_PAGE_SIZE; in nvme_pci_setup_prps()
688 dma_addr += NVME_CTRL_PAGE_SIZE; in nvme_pci_setup_prps()
689 length -= NVME_CTRL_PAGE_SIZE; in nvme_pci_setup_prps()
730 sge->length = cpu_to_le32(NVME_CTRL_PAGE_SIZE); in nvme_pci_sgl_set_seg()
802 unsigned int offset = bv->bv_offset & (NVME_CTRL_PAGE_SIZE - 1); in nvme_setup_prp_simple()
803 unsigned int first_prp_len = NVME_CTRL_PAGE_SIZE - offset; in nvme_setup_prp_simple()
847 if (bv.bv_offset + bv.bv_len <= NVME_CTRL_PAGE_SIZE * 2) in nvme_map_data()
1455 NVME_CTRL_PAGE_SIZE); in nvme_cmb_qdepth()
1460 mem_per_q = round_down(mem_per_q, NVME_CTRL_PAGE_SIZE); in nvme_cmb_qdepth()
1919 size_t size = le32_to_cpu(desc->size) * NVME_CTRL_PAGE_SIZE; in nvme_free_host_mem()
1971 descs[i].size = cpu_to_le32(len / NVME_CTRL_PAGE_SIZE); in __nvme_alloc_host_mem()
1987 size_t size = le32_to_cpu(descs[i].size) * NVME_CTRL_PAGE_SIZE; in __nvme_alloc_host_mem()
2531 NVME_CTRL_PAGE_SIZE, in nvme_setup_prp_pools()
2532 NVME_CTRL_PAGE_SIZE, 0); in nvme_setup_prp_pools()
2640 dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1); in nvme_reset_work()