aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_mrmw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_mrmw.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_mrmw.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index 5e99c45493c1..f26997fc00f8 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -40,8 +40,6 @@
40 * POSSIBILITY OF SUCH DAMAGE. 40 * POSSIBILITY OF SUCH DAMAGE.
41 */ 41 */
42 42
43#include <asm/current.h>
44
45#include <rdma/ib_umem.h> 43#include <rdma/ib_umem.h>
46 44
47#include "ehca_iverbs.h" 45#include "ehca_iverbs.h"
@@ -419,7 +417,6 @@ int ehca_rereg_phys_mr(struct ib_mr *mr,
419 struct ehca_shca *shca = 417 struct ehca_shca *shca =
420 container_of(mr->device, struct ehca_shca, ib_device); 418 container_of(mr->device, struct ehca_shca, ib_device);
421 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); 419 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr);
422 struct ehca_pd *my_pd = container_of(mr->pd, struct ehca_pd, ib_pd);
423 u64 new_size; 420 u64 new_size;
424 u64 *new_start; 421 u64 *new_start;
425 u32 new_acl; 422 u32 new_acl;
@@ -429,15 +426,6 @@ int ehca_rereg_phys_mr(struct ib_mr *mr,
429 u32 num_kpages = 0; 426 u32 num_kpages = 0;
430 u32 num_hwpages = 0; 427 u32 num_hwpages = 0;
431 struct ehca_mr_pginfo pginfo; 428 struct ehca_mr_pginfo pginfo;
432 u32 cur_pid = current->tgid;
433
434 if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
435 (my_pd->ownpid != cur_pid)) {
436 ehca_err(mr->device, "Invalid caller pid=%x ownpid=%x",
437 cur_pid, my_pd->ownpid);
438 ret = -EINVAL;
439 goto rereg_phys_mr_exit0;
440 }
441 429
442 if (!(mr_rereg_mask & IB_MR_REREG_TRANS)) { 430 if (!(mr_rereg_mask & IB_MR_REREG_TRANS)) {
443 /* TODO not supported, because PHYP rereg hCall needs pages */ 431 /* TODO not supported, because PHYP rereg hCall needs pages */
@@ -577,19 +565,9 @@ int ehca_query_mr(struct ib_mr *mr, struct ib_mr_attr *mr_attr)
577 struct ehca_shca *shca = 565 struct ehca_shca *shca =
578 container_of(mr->device, struct ehca_shca, ib_device); 566 container_of(mr->device, struct ehca_shca, ib_device);
579 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); 567 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr);
580 struct ehca_pd *my_pd = container_of(mr->pd, struct ehca_pd, ib_pd);
581 u32 cur_pid = current->tgid;
582 unsigned long sl_flags; 568 unsigned long sl_flags;
583 struct ehca_mr_hipzout_parms hipzout; 569 struct ehca_mr_hipzout_parms hipzout;
584 570
585 if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
586 (my_pd->ownpid != cur_pid)) {
587 ehca_err(mr->device, "Invalid caller pid=%x ownpid=%x",
588 cur_pid, my_pd->ownpid);
589 ret = -EINVAL;
590 goto query_mr_exit0;
591 }
592
593 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) { 571 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) {
594 ehca_err(mr->device, "not supported for FMR, mr=%p e_mr=%p " 572 ehca_err(mr->device, "not supported for FMR, mr=%p e_mr=%p "
595 "e_mr->flags=%x", mr, e_mr, e_mr->flags); 573 "e_mr->flags=%x", mr, e_mr, e_mr->flags);
@@ -634,16 +612,6 @@ int ehca_dereg_mr(struct ib_mr *mr)
634 struct ehca_shca *shca = 612 struct ehca_shca *shca =
635 container_of(mr->device, struct ehca_shca, ib_device); 613 container_of(mr->device, struct ehca_shca, ib_device);
636 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); 614 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr);
637 struct ehca_pd *my_pd = container_of(mr->pd, struct ehca_pd, ib_pd);
638 u32 cur_pid = current->tgid;
639
640 if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
641 (my_pd->ownpid != cur_pid)) {
642 ehca_err(mr->device, "Invalid caller pid=%x ownpid=%x",
643 cur_pid, my_pd->ownpid);
644 ret = -EINVAL;
645 goto dereg_mr_exit0;
646 }
647 615
648 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) { 616 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) {
649 ehca_err(mr->device, "not supported for FMR, mr=%p e_mr=%p " 617 ehca_err(mr->device, "not supported for FMR, mr=%p e_mr=%p "