svn commit: r211260 - projects/ofed/head/sys/ofed/include/linux/mlx4

Jeff Roberson jeff at FreeBSD.org
Fri Aug 13 03:10:49 UTC 2010


Author: jeff
Date: Fri Aug 13 03:10:48 2010
New Revision: 211260
URL: http://svn.freebsd.org/changeset/base/211260

Log:
   - Just check the direct buf pointer against NULL rather than assuming it
     will be set for 64bit systems.  This works in more cases.  On BSD
     we may not allocate a direct map for a large non-contiguous region to
     avoid the vm address space allocator expense.
  
  Sponsored by:	Isilon Systems, iX Systems, and Panasas.

Modified:
  projects/ofed/head/sys/ofed/include/linux/mlx4/device.h

Modified: projects/ofed/head/sys/ofed/include/linux/mlx4/device.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/mlx4/device.h	Fri Aug 13 03:09:08 2010	(r211259)
+++ projects/ofed/head/sys/ofed/include/linux/mlx4/device.h	Fri Aug 13 03:10:48 2010	(r211260)
@@ -497,7 +497,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev,
 void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
 static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset)
 {
-	if (BITS_PER_LONG == 64 || buf->nbufs == 1)
+	if (buf->direct.buf != NULL)
 		return buf->direct.buf + offset;
 	else
 		return buf->page_list[offset >> PAGE_SHIFT].buf +


More information about the svn-src-projects mailing list