From owner-svn-src-projects@FreeBSD.ORG Fri Aug 13 03:06:10 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 232701065697; Fri, 13 Aug 2010 03:06:10 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12D898FC18; Fri, 13 Aug 2010 03:06:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7D369fS074757; Fri, 13 Aug 2010 03:06:09 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7D369Bo074755; Fri, 13 Aug 2010 03:06:09 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008130306.o7D369Bo074755@svn.freebsd.org> From: Jeff Roberson Date: Fri, 13 Aug 2010 03:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211257 - projects/ofed/head/sys/ofed/include/rdma X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 03:06:10 -0000 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 - -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 */