Lines Matching defs:umem
63 /* Returns the offset of the umem start relative to the first page. */
64 static inline int ib_umem_offset(struct ib_umem *umem)
66 return umem->address & ((unsigned long)umem->page_size - 1);
69 /* Returns the first page of an ODP umem. */
70 static inline unsigned long ib_umem_start(struct ib_umem *umem)
72 return umem->address - ib_umem_offset(umem);
75 /* Returns the address of the page after the last one of an ODP umem. */
76 static inline unsigned long ib_umem_end(struct ib_umem *umem)
78 return PAGE_ALIGN(umem->address + umem->length);
81 static inline size_t ib_umem_num_pages(struct ib_umem *umem)
83 return (ib_umem_end(umem) - ib_umem_start(umem)) >> PAGE_SHIFT;
90 void ib_umem_release(struct ib_umem *umem);
91 int ib_umem_page_count(struct ib_umem *umem);
92 int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,
104 static inline void ib_umem_release(struct ib_umem *umem) { }
105 static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
106 static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,