/* Returns the offset of the umem start relative to the first page. */ staticinlineint ib_umem_offset(struct ib_umem *umem)
{ return umem->address & ~PAGE_MASK;
}
/** * rdma_umem_for_each_dma_block - iterate over contiguous DMA blocks of the umem * @umem: umem to iterate over * @pgsz: Page size to split the list into * * pgsz must be <= PAGE_SIZE or computed by ib_umem_find_best_pgsz(). The * returned DMA blocks will be aligned to pgsz and span the range: * ALIGN_DOWN(umem->address, pgsz) to ALIGN(umem->address + umem->length, pgsz) * * Performs exactly ib_umem_num_dma_blocks() iterations.
*/ #define rdma_umem_for_each_dma_block(umem, biter, pgsz) \ for (__rdma_umem_block_iter_start(biter, umem, pgsz); \
__rdma_umem_block_iter_next(biter);)
/** * ib_umem_find_best_pgoff - Find best HW page size * * @umem: umem struct * @pgsz_bitmap bitmap of HW supported page sizes * @pgoff_bitmask: Mask of bits that can be represented with an offset * * This is very similar to ib_umem_find_best_pgsz() except instead of accepting * an IOVA it accepts a bitmask specifying what address bits can be represented * with a page offset. * * For instance if the HW has multiple page sizes, requires 64 byte alignemnt, * and can support aligned offsets up to 4032 then pgoff_bitmask would be * "111111000000". * * If the pgoff_bitmask requires either alignment in the low bit or an * unavailable page size for the high bits, this function returns 0.
*/ staticinlineunsignedlong ib_umem_find_best_pgoff(struct ib_umem *umem, unsignedlong pgsz_bitmap,
u64 pgoff_bitmask)
{
dma_addr_t dma_addr;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.