[ewg] [PATCH] ib_core: save process's virtual address in struct ib_umem

Eli Cohen eli at mellanox.co.il
Sun Jan 25 01:45:06 PST 2009


add "address" field to struct ib_umem so low level drivers will have this
information which may be needed in order to correctly calculate the number of
huge pages.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 drivers/infiniband/core/umem.c |    1 +
 include/rdma/ib_umem.h         |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 6f7c096..4c076c4 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -102,6 +102,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
 	umem->context   = context;
 	umem->length    = size;
 	umem->offset    = addr & ~PAGE_MASK;
+	umem->address	= addr;
 	umem->page_size = PAGE_SIZE;
 	/*
 	 * We ask for writable memory if any access flags other than
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index 9ee0d2e..c385bb6 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -43,6 +43,7 @@ struct ib_umem {
 	struct ib_ucontext     *context;
 	size_t			length;
 	int			offset;
+	unsigned long		address;
 	int			page_size;
 	int                     writable;
 	int                     hugetlb;
-- 
1.6.1




More information about the ewg mailing list