Author: kib
Date: Mon Mar 21 21:16:40 2011
New Revision: 219846
URL: http://svn.freebsd.org/changeset/base/219846

Log:
  Allow the ofed modules to be compiled on i386.
  
  Reviewed by:  jeff

Modified:
  head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
  head/sys/ofed/include/linux/gfp.h
  head/sys/ofed/include/linux/scatterlist.h
  head/sys/ofed/include/rdma/ib_addr.h

Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c      Mon Mar 21 
21:16:25 2011        (r219845)
+++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c      Mon Mar 21 
21:16:40 2011        (r219846)
@@ -1228,8 +1228,8 @@ static int __devinit mthca_init_one(stru
        }
 
        if (id->driver_data >= ARRAY_SIZE(mthca_hca_table)) {
-               printk(KERN_ERR PFX "%s has invalid driver data %lx\n",
-                      pci_name(pdev), id->driver_data);
+               printk(KERN_ERR PFX "%s has invalid driver data %jx\n",
+                      pci_name(pdev), (uintmax_t)id->driver_data);
                mutex_unlock(&mthca_device_mutex);
                return -ENODEV;
        }

Modified: head/sys/ofed/include/linux/gfp.h
==============================================================================
--- head/sys/ofed/include/linux/gfp.h   Mon Mar 21 21:16:25 2011        
(r219845)
+++ head/sys/ofed/include/linux/gfp.h   Mon Mar 21 21:16:40 2011        
(r219846)
@@ -56,7 +56,8 @@ page_address(struct page *page)
 
        if (page->object != kmem_object && page->object != kernel_object)
                return (NULL);
-       return (void *)(VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(page->pindex));
+       return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS +
+           IDX_TO_OFF(page->pindex)));
 }
 
 static inline unsigned long

Modified: head/sys/ofed/include/linux/scatterlist.h
==============================================================================
--- head/sys/ofed/include/linux/scatterlist.h   Mon Mar 21 21:16:25 2011        
(r219845)
+++ head/sys/ofed/include/linux/scatterlist.h   Mon Mar 21 21:16:40 2011        
(r219846)
@@ -36,7 +36,7 @@ struct scatterlist {
                struct page             *page;
                struct scatterlist      *sg;
        } sl_un;
-       unsigned long   address;
+       dma_addr_t      address;
        unsigned long   offset;
        uint32_t        length;
        uint32_t        flags;

Modified: head/sys/ofed/include/rdma/ib_addr.h
==============================================================================
--- head/sys/ofed/include/rdma/ib_addr.h        Mon Mar 21 21:16:25 2011        
(r219845)
+++ head/sys/ofed/include/rdma/ib_addr.h        Mon Mar 21 21:16:40 2011        
(r219846)
@@ -247,6 +247,7 @@ static inline int iboe_get_rate(struct n
 #else
 static inline int iboe_get_rate(struct net_device *dev)
 {
+#ifdef __amd64__
        if (dev->if_baudrate >= IF_Gbps(40ULL))
                return IB_RATE_40_GBPS;
        else if (dev->if_baudrate >= IF_Gbps(30ULL))
@@ -256,6 +257,7 @@ static inline int iboe_get_rate(struct n
        else if (dev->if_baudrate >= IF_Gbps(10ULL))
                return IB_RATE_10_GBPS;
        else
+#endif
                return IB_RATE_PORT_CURRENT;
 }
 #endif
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to