Lines Matching refs:umem
61 /* Returns the offset of the umem start relative to the first page. */
62 static inline int ib_umem_offset(struct ib_umem *umem)
64 return umem->address & ((unsigned long)umem->page_size - 1);
67 /* Returns the first page of an ODP umem. */
68 static inline unsigned long ib_umem_start(struct ib_umem *umem)
70 return umem->address - ib_umem_offset(umem);
73 /* Returns the address of the page after the last one of an ODP umem. */
74 static inline unsigned long ib_umem_end(struct ib_umem *umem)
76 return PAGE_ALIGN(umem->address + umem->length);
79 static inline size_t ib_umem_num_pages(struct ib_umem *umem)
81 return (ib_umem_end(umem) - ib_umem_start(umem)) >> PAGE_SHIFT;
88 void ib_umem_release(struct ib_umem *umem);
89 int ib_umem_page_count(struct ib_umem *umem);
90 int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,
102 static inline void ib_umem_release(struct ib_umem *umem) { }
103 static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
104 static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,