Clean up imported rdma headers to compile mlx4
authorXiao Jia <stfairy@gmail.com>
Thu, 17 Sep 2015 00:09:01 +0000 (17:09 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 23 Sep 2015 20:46:27 +0000 (16:46 -0400)
kern/include/linux/rdma/ib_mad.h
kern/include/linux/rdma/ib_smi.h
kern/include/linux/rdma/ib_verbs.h

index ebd8f22..ac91964 100644 (file)
 #if !defined(IB_MAD_H)
 #define IB_MAD_H
 
-#include <linux/list.h>
-
-#include <rdma/ib_verbs.h>
-#include <uapi/rdma/ib_user_mad.h>
+#include <linux/rdma/ib_verbs.h>
 
 /* Management base version */
 #define IB_MGMT_BASE_VERSION                   1
index 14825cf..f8889a7 100644 (file)
@@ -37,7 +37,7 @@
 #if !defined(IB_SMI_H)
 #define IB_SMI_H
 
-#include <rdma/ib_mad.h>
+#include <linux/rdma/ib_mad.h>
 
 #define IB_SMP_DATA_SIZE                       64
 #define IB_SMP_MAX_PATH_HOPS                   64
index 0d1b5a4..a54a1d8 100644 (file)
 #if !defined(IB_VERBS_H)
 #define IB_VERBS_H
 
-#include <linux/types.h>
-#include <linux/device.h>
-#include <linux/mm.h>
-#include <linux/dma-mapping.h>
-#include <linux/kref.h>
-#include <linux/list.h>
-#include <linux/rwsem.h>
-#include <linux/scatterlist.h>
-#include <linux/workqueue.h>
-#include <uapi/linux/if_ether.h>
-
-#include <linux/atomic.h>
-#include <linux/mmu_notifier.h>
-#include <asm/uaccess.h>
+#include <arch/types.h>
 
 extern struct workqueue_struct *ib_wq;
 
@@ -1181,7 +1168,6 @@ struct ib_uobject {
        struct list_head        list;           /* link to context's list */
        int                     id;             /* index into kernel idr */
        struct kref             ref;
-       struct rw_semaphore     mutex;          /* protects .live */
        int                     live;
 };
 
@@ -1344,7 +1330,7 @@ struct ib_flow_spec_eth {
 
 struct ib_flow_ib_filter {
        __be16 dlid;
-       __u8   sl;
+       uint8_t   sl;
 };
 
 struct ib_flow_spec_ib {
@@ -2190,24 +2176,6 @@ static inline void ib_dma_unmap_single(struct ib_device *dev,
                dma_unmap_single(dev->dma_device, addr, size, direction);
 }
 
-static inline uint64_t ib_dma_map_single_attrs(struct ib_device *dev,
-                                         void *cpu_addr, size_t size,
-                                         enum dma_data_direction direction,
-                                         struct dma_attrs *attrs)
-{
-       return dma_map_single_attrs(dev->dma_device, cpu_addr, size,
-                                   direction, attrs);
-}
-
-static inline void ib_dma_unmap_single_attrs(struct ib_device *dev,
-                                            uint64_t addr, size_t size,
-                                            enum dma_data_direction direction,
-                                            struct dma_attrs *attrs)
-{
-       return dma_unmap_single_attrs(dev->dma_device, addr, size,
-                                     direction, attrs);
-}
-
 /**
  * ib_dma_map_page - Map a physical page to DMA address
  * @dev: The device for which the dma_addr is to be created