IB/rdmavt: Alloc and dealloc ucontexts
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Wed, 6 Jan 2016 17:55:39 +0000 (09:55 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:07 +0000 (20:37 -0500)
Add the stubs to allocate and deallocate user contexts. This will be
handled completely by rvt.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/vt.c

index e95f19752b46e8df7554472fa3703213d14ec0d7..cd194298bdc8b8987f69d477843ed0a184abf182 100644 (file)
@@ -178,6 +178,26 @@ static int rvt_query_gid(struct ib_device *ibdev, u8 port,
        return -EOPNOTSUPP;
 }
 
+/**
+ * rvt_alloc_ucontext - Allocate a user context
+ * @ibdev: Vers IB dev
+ * @data: User data allocated
+ */
+static struct ib_ucontext *rvt_alloc_ucontext(struct ib_device *ibdev,
+                                             struct ib_udata *udata)
+{
+       return ERR_PTR(-EOPNOTSUPP);
+}
+
+/**
+ *rvt_dealloc_ucontext - Free a user context
+ *@context - Free this
+ */
+static int rvt_dealloc_ucontext(struct ib_ucontext *context)
+{
+       return -EOPNOTSUPP;
+}
+
 /*
  * Check driver override. If driver passes a value use it, otherwise we use our
  * own value.
@@ -197,6 +217,8 @@ int rvt_register_device(struct rvt_dev_info *rdi)
        CHECK_DRIVER_OVERRIDE(rdi, modify_port);
        CHECK_DRIVER_OVERRIDE(rdi, query_pkey);
        CHECK_DRIVER_OVERRIDE(rdi, query_gid);
+       CHECK_DRIVER_OVERRIDE(rdi, alloc_ucontext);
+       CHECK_DRIVER_OVERRIDE(rdi, dealloc_ucontext);
 
        /* DMA Operations */
        rdi->ibdev.dma_ops =