NVME_CTRL_PAGE_SIZE
NVME_CTRL_PAGE_SIZE,
NVME_CTRL_PAGE_SIZE, 0);
NVME_MAX_KB_SZ + NVME_CTRL_PAGE_SIZE, NVME_CTRL_PAGE_SIZE);
const int last_prp = NVME_CTRL_PAGE_SIZE / sizeof(__le64) - 1;
int offset = dma_addr & (NVME_CTRL_PAGE_SIZE - 1);
length -= (NVME_CTRL_PAGE_SIZE - offset);
dma_len -= (NVME_CTRL_PAGE_SIZE - offset);
dma_addr += (NVME_CTRL_PAGE_SIZE - offset);
if (length <= NVME_CTRL_PAGE_SIZE) {
nprps = DIV_ROUND_UP(length, NVME_CTRL_PAGE_SIZE);
if (i == NVME_CTRL_PAGE_SIZE >> 3) {
dma_len -= NVME_CTRL_PAGE_SIZE;
dma_addr += NVME_CTRL_PAGE_SIZE;
length -= NVME_CTRL_PAGE_SIZE;
unsigned int offset = bv->bv_offset & (NVME_CTRL_PAGE_SIZE - 1);
unsigned int first_prp_len = NVME_CTRL_PAGE_SIZE - offset;
if (bv.bv_offset + bv.bv_len <= NVME_CTRL_PAGE_SIZE * 2)
return ctrl->max_hw_sectors / (NVME_CTRL_PAGE_SIZE >> SECTOR_SHIFT) + 1;
return NVME_CTRL_PAGE_SIZE - 1;
prp_len = min(length, NVME_CTRL_PAGE_SIZE -
(iter->addr & (NVME_CTRL_PAGE_SIZE - 1)));
if (length <= NVME_CTRL_PAGE_SIZE) {
if (DIV_ROUND_UP(length, NVME_CTRL_PAGE_SIZE) <=
prp_len = min(length, NVME_CTRL_PAGE_SIZE);
if (i == NVME_CTRL_PAGE_SIZE >> 3) {
unsigned int prp1_offset = bv.bv_offset & (NVME_CTRL_PAGE_SIZE - 1);
bool prp_possible = prp1_offset + bv.bv_len <= NVME_CTRL_PAGE_SIZE * 2;
unsigned int first_prp_len = NVME_CTRL_PAGE_SIZE - prp1_offset;
NVME_CTRL_PAGE_SIZE);
mem_per_q = round_down(mem_per_q, NVME_CTRL_PAGE_SIZE);
size_t size = le32_to_cpu(desc->size) * NVME_CTRL_PAGE_SIZE;
dev->host_mem_descs[0].size = cpu_to_le32(size / NVME_CTRL_PAGE_SIZE);
descs[i].size = cpu_to_le32(len / NVME_CTRL_PAGE_SIZE);
return NVME_CTRL_PAGE_SIZE - 1;
dma_set_min_align_mask(&pdev->dev, NVME_CTRL_PAGE_SIZE - 1);
(NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc))
NVME_CTRL_PAGE_SIZE, NVME_CTRL_PAGE_SIZE, 0, numa_node);
(((NVME_CTRL_PAGE_SIZE / sizeof(__le64))) - 1)
(NVME_MAX_BYTES + 2 * (NVME_CTRL_PAGE_SIZE - 1))
static_assert(MAX_PRP_RANGE / NVME_CTRL_PAGE_SIZE <=
if (req_phys_gap_mask(req) & (NVME_CTRL_PAGE_SIZE - 1) ||
const int last_prp = NVME_CTRL_PAGE_SIZE / sizeof(__le64) - 1;