]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ehca/ehca_uverbs.c
IB/ehca: Use consistent types for ehca_plpar_hcall9()
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ehca / ehca_uverbs.c
index 5234d6c15c49668555430789fb300d7d42819ad0..3cb688d2913135821902c16e9f850abe26cc1cb2 100644 (file)
@@ -40,8 +40,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <asm/current.h>
-
 #include "ehca_classes.h"
 #include "ehca_iverbs.h"
 #include "ehca_mrmw.h"
@@ -116,7 +114,7 @@ static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas,
 
        physical = galpas->user.fw_handle;
        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-       ehca_gen_dbg("vsize=%lx physical=%lx", vsize, physical);
+       ehca_gen_dbg("vsize=%llx physical=%llx", vsize, physical);
        /* VM_IO | VM_RESERVED are set by remap_pfn_range() */
        ret = remap_4k_pfn(vma, vma->vm_start, physical >> EHCA_PAGESHIFT,
                           vma->vm_page_prot);
@@ -213,8 +211,7 @@ static int ehca_mmap_qp(struct vm_area_struct *vma, struct ehca_qp *qp,
                break;
 
        case 1: /* qp rqueue_addr */
-               ehca_dbg(qp->ib_qp.device, "qp_num=%x rqueue",
-                        qp->ib_qp.qp_num);
+               ehca_dbg(qp->ib_qp.device, "qp_num=%x rq", qp->ib_qp.qp_num);
                ret = ehca_mmap_queue(vma, &qp->ipz_rqueue,
                                      &qp->mm_count_rqueue);
                if (unlikely(ret)) {
@@ -226,8 +223,7 @@ static int ehca_mmap_qp(struct vm_area_struct *vma, struct ehca_qp *qp,
                break;
 
        case 2: /* qp squeue_addr */
-               ehca_dbg(qp->ib_qp.device, "qp_num=%x squeue",
-                        qp->ib_qp.qp_num);
+               ehca_dbg(qp->ib_qp.device, "qp_num=%x sq", qp->ib_qp.qp_num);
                ret = ehca_mmap_queue(vma, &qp->ipz_squeue,
                                      &qp->mm_count_squeue);
                if (unlikely(ret)) {
@@ -253,11 +249,9 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
        u32 idr_handle = fileoffset & 0x1FFFFFF;
        u32 q_type = (fileoffset >> 27) & 0x1;    /* CQ, QP,...        */
        u32 rsrc_type = (fileoffset >> 25) & 0x3; /* sq,rq,cmnd_window */
-       u32 cur_pid = current->tgid;
        u32 ret;
        struct ehca_cq *cq;
        struct ehca_qp *qp;
-       struct ehca_pd *pd;
        struct ib_uobject *uobject;
 
        switch (q_type) {
@@ -270,13 +264,6 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
                if (!cq)
                        return -EINVAL;
 
-               if (cq->ownpid != cur_pid) {
-                       ehca_err(cq->ib_cq.device,
-                                "Invalid caller pid=%x ownpid=%x",
-                                cur_pid, cq->ownpid);
-                       return -ENOMEM;
-               }
-
                if (!cq->ib_cq.uobject || cq->ib_cq.uobject->context != context)
                        return -EINVAL;
 
@@ -298,14 +285,6 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
                if (!qp)
                        return -EINVAL;
 
-               pd = container_of(qp->ib_qp.pd, struct ehca_pd, ib_pd);
-               if (pd->ownpid != cur_pid) {
-                       ehca_err(qp->ib_qp.device,
-                                "Invalid caller pid=%x ownpid=%x",
-                                cur_pid, pd->ownpid);
-                       return -ENOMEM;
-               }
-
                uobject = IS_SRQ(qp) ? qp->ib_srq.uobject : qp->ib_qp.uobject;
                if (!uobject || uobject->context != context)
                        return -EINVAL;