Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2010 03:06:09 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r211257 - projects/ofed/head/sys/ofed/include/rdma
Message-ID:  <201008130306.o7D369Bo074755@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Fri Aug 13 03:06:09 2010
New Revision: 211257
URL: http://svn.freebsd.org/changeset/base/211257

Log:
   - Always assume umem is compiled in if infiniband is.
   - Add another parameter to the umem structure for freebsd.  We want
     to know the starting vaddr to undo the mlock().
  
  Sponsored by:	Isilon Systems, iX Systems, and Panasas.

Modified:
  projects/ofed/head/sys/ofed/include/rdma/ib_umem.h

Modified: projects/ofed/head/sys/ofed/include/rdma/ib_umem.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/rdma/ib_umem.h	Fri Aug 13 03:05:26 2010	(r211256)
+++ projects/ofed/head/sys/ofed/include/rdma/ib_umem.h	Fri Aug 13 03:06:09 2010	(r211257)
@@ -48,8 +48,12 @@ struct ib_umem {
 	int                     writable;
 	int                     hugetlb;
 	struct list_head	chunk_list;
+#ifdef __linux__
 	struct work_struct	work;
 	struct mm_struct       *mm;
+#else
+	unsigned long		start;
+#endif
 	unsigned long		diff;
 };
 
@@ -61,25 +65,9 @@ struct ib_umem_chunk {
 	struct scatterlist      page_list[0];
 };
 
-#ifdef CONFIG_INFINIBAND_USER_MEM
-
 struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
 			    size_t size, int access, int dmasync);
 void ib_umem_release(struct ib_umem *umem);
 int ib_umem_page_count(struct ib_umem *umem);
 
-#else /* CONFIG_INFINIBAND_USER_MEM */
-
-#include <linux/err.h>
-
-static inline struct ib_umem *ib_umem_get(struct ib_ucontext *context,
-					  unsigned long addr, size_t size,
-					  int access, int dmasync) {
-	return ERR_PTR(-EINVAL);
-}
-static inline void ib_umem_release(struct ib_umem *umem) { }
-static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
-
-#endif /* CONFIG_INFINIBAND_USER_MEM */
-
 #endif /* IB_UMEM_H */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008130306.o7D369Bo074755>