devr 1064 drivers/base/devres.c struct devres *devr = container_of(data, struct devres, data); devr 1066 drivers/base/devres.c return *(void **)devr->data == p; devr 128 drivers/infiniband/hw/mlx5/gsi.c if (port_num > ARRAY_SIZE(dev->devr.ports) || port_num < 1) { devr 155 drivers/infiniband/hw/mlx5/gsi.c mutex_lock(&dev->devr.mutex); devr 157 drivers/infiniband/hw/mlx5/gsi.c if (dev->devr.ports[port_num - 1].gsi) { devr 195 drivers/infiniband/hw/mlx5/gsi.c dev->devr.ports[init_attr->port_num - 1].gsi = gsi; devr 197 drivers/infiniband/hw/mlx5/gsi.c mutex_unlock(&dev->devr.mutex); devr 204 drivers/infiniband/hw/mlx5/gsi.c mutex_unlock(&dev->devr.mutex); devr 223 drivers/infiniband/hw/mlx5/gsi.c mutex_lock(&dev->devr.mutex); devr 228 drivers/infiniband/hw/mlx5/gsi.c mutex_unlock(&dev->devr.mutex); devr 231 drivers/infiniband/hw/mlx5/gsi.c dev->devr.ports[port_num - 1].gsi = NULL; devr 232 drivers/infiniband/hw/mlx5/gsi.c mutex_unlock(&dev->devr.mutex); devr 4462 drivers/infiniband/hw/mlx5/main.c mutex_lock(&ports->devr->mutex); devr 4464 drivers/infiniband/hw/mlx5/main.c mutex_unlock(&ports->devr->mutex); devr 4590 drivers/infiniband/hw/mlx5/main.c schedule_work(&ibdev->devr.ports[port - 1].pkey_change_work); devr 4927 drivers/infiniband/hw/mlx5/main.c static int create_dev_resources(struct mlx5_ib_resources *devr) devr 4936 drivers/infiniband/hw/mlx5/main.c dev = container_of(devr, struct mlx5_ib_dev, devr); devr 4939 drivers/infiniband/hw/mlx5/main.c mutex_init(&devr->mutex); devr 4941 drivers/infiniband/hw/mlx5/main.c devr->p0 = rdma_zalloc_drv_obj(ibdev, ib_pd); devr 4942 drivers/infiniband/hw/mlx5/main.c if (!devr->p0) devr 4945 drivers/infiniband/hw/mlx5/main.c devr->p0->device = ibdev; devr 4946 drivers/infiniband/hw/mlx5/main.c devr->p0->uobject = NULL; devr 4947 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->p0->usecnt, 0); devr 4949 drivers/infiniband/hw/mlx5/main.c ret = mlx5_ib_alloc_pd(devr->p0, NULL); devr 4953 drivers/infiniband/hw/mlx5/main.c devr->c0 = rdma_zalloc_drv_obj(ibdev, ib_cq); devr 4954 drivers/infiniband/hw/mlx5/main.c if (!devr->c0) { devr 4959 drivers/infiniband/hw/mlx5/main.c devr->c0->device = &dev->ib_dev; devr 4960 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->c0->usecnt, 0); devr 4962 drivers/infiniband/hw/mlx5/main.c ret = mlx5_ib_create_cq(devr->c0, &cq_attr, NULL); devr 4966 drivers/infiniband/hw/mlx5/main.c devr->x0 = mlx5_ib_alloc_xrcd(&dev->ib_dev, NULL); devr 4967 drivers/infiniband/hw/mlx5/main.c if (IS_ERR(devr->x0)) { devr 4968 drivers/infiniband/hw/mlx5/main.c ret = PTR_ERR(devr->x0); devr 4971 drivers/infiniband/hw/mlx5/main.c devr->x0->device = &dev->ib_dev; devr 4972 drivers/infiniband/hw/mlx5/main.c devr->x0->inode = NULL; devr 4973 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->x0->usecnt, 0); devr 4974 drivers/infiniband/hw/mlx5/main.c mutex_init(&devr->x0->tgt_qp_mutex); devr 4975 drivers/infiniband/hw/mlx5/main.c INIT_LIST_HEAD(&devr->x0->tgt_qp_list); devr 4977 drivers/infiniband/hw/mlx5/main.c devr->x1 = mlx5_ib_alloc_xrcd(&dev->ib_dev, NULL); devr 4978 drivers/infiniband/hw/mlx5/main.c if (IS_ERR(devr->x1)) { devr 4979 drivers/infiniband/hw/mlx5/main.c ret = PTR_ERR(devr->x1); devr 4982 drivers/infiniband/hw/mlx5/main.c devr->x1->device = &dev->ib_dev; devr 4983 drivers/infiniband/hw/mlx5/main.c devr->x1->inode = NULL; devr 4984 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->x1->usecnt, 0); devr 4985 drivers/infiniband/hw/mlx5/main.c mutex_init(&devr->x1->tgt_qp_mutex); devr 4986 drivers/infiniband/hw/mlx5/main.c INIT_LIST_HEAD(&devr->x1->tgt_qp_list); devr 4992 drivers/infiniband/hw/mlx5/main.c attr.ext.cq = devr->c0; devr 4993 drivers/infiniband/hw/mlx5/main.c attr.ext.xrc.xrcd = devr->x0; devr 4995 drivers/infiniband/hw/mlx5/main.c devr->s0 = rdma_zalloc_drv_obj(ibdev, ib_srq); devr 4996 drivers/infiniband/hw/mlx5/main.c if (!devr->s0) { devr 5001 drivers/infiniband/hw/mlx5/main.c devr->s0->device = &dev->ib_dev; devr 5002 drivers/infiniband/hw/mlx5/main.c devr->s0->pd = devr->p0; devr 5003 drivers/infiniband/hw/mlx5/main.c devr->s0->srq_type = IB_SRQT_XRC; devr 5004 drivers/infiniband/hw/mlx5/main.c devr->s0->ext.xrc.xrcd = devr->x0; devr 5005 drivers/infiniband/hw/mlx5/main.c devr->s0->ext.cq = devr->c0; devr 5006 drivers/infiniband/hw/mlx5/main.c ret = mlx5_ib_create_srq(devr->s0, &attr, NULL); devr 5010 drivers/infiniband/hw/mlx5/main.c atomic_inc(&devr->s0->ext.xrc.xrcd->usecnt); devr 5011 drivers/infiniband/hw/mlx5/main.c atomic_inc(&devr->s0->ext.cq->usecnt); devr 5012 drivers/infiniband/hw/mlx5/main.c atomic_inc(&devr->p0->usecnt); devr 5013 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->s0->usecnt, 0); devr 5019 drivers/infiniband/hw/mlx5/main.c devr->s1 = rdma_zalloc_drv_obj(ibdev, ib_srq); devr 5020 drivers/infiniband/hw/mlx5/main.c if (!devr->s1) { devr 5025 drivers/infiniband/hw/mlx5/main.c devr->s1->device = &dev->ib_dev; devr 5026 drivers/infiniband/hw/mlx5/main.c devr->s1->pd = devr->p0; devr 5027 drivers/infiniband/hw/mlx5/main.c devr->s1->srq_type = IB_SRQT_BASIC; devr 5028 drivers/infiniband/hw/mlx5/main.c devr->s1->ext.cq = devr->c0; devr 5030 drivers/infiniband/hw/mlx5/main.c ret = mlx5_ib_create_srq(devr->s1, &attr, NULL); devr 5034 drivers/infiniband/hw/mlx5/main.c atomic_inc(&devr->p0->usecnt); devr 5035 drivers/infiniband/hw/mlx5/main.c atomic_set(&devr->s1->usecnt, 0); devr 5037 drivers/infiniband/hw/mlx5/main.c for (port = 0; port < ARRAY_SIZE(devr->ports); ++port) { devr 5038 drivers/infiniband/hw/mlx5/main.c INIT_WORK(&devr->ports[port].pkey_change_work, devr 5040 drivers/infiniband/hw/mlx5/main.c devr->ports[port].devr = devr; devr 5046 drivers/infiniband/hw/mlx5/main.c kfree(devr->s1); devr 5048 drivers/infiniband/hw/mlx5/main.c mlx5_ib_destroy_srq(devr->s0, NULL); devr 5050 drivers/infiniband/hw/mlx5/main.c kfree(devr->s0); devr 5052 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_xrcd(devr->x1, NULL); devr 5054 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_xrcd(devr->x0, NULL); devr 5056 drivers/infiniband/hw/mlx5/main.c mlx5_ib_destroy_cq(devr->c0, NULL); devr 5058 drivers/infiniband/hw/mlx5/main.c kfree(devr->c0); devr 5060 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_pd(devr->p0, NULL); devr 5062 drivers/infiniband/hw/mlx5/main.c kfree(devr->p0); devr 5066 drivers/infiniband/hw/mlx5/main.c static void destroy_dev_resources(struct mlx5_ib_resources *devr) devr 5070 drivers/infiniband/hw/mlx5/main.c mlx5_ib_destroy_srq(devr->s1, NULL); devr 5071 drivers/infiniband/hw/mlx5/main.c kfree(devr->s1); devr 5072 drivers/infiniband/hw/mlx5/main.c mlx5_ib_destroy_srq(devr->s0, NULL); devr 5073 drivers/infiniband/hw/mlx5/main.c kfree(devr->s0); devr 5074 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_xrcd(devr->x0, NULL); devr 5075 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_xrcd(devr->x1, NULL); devr 5076 drivers/infiniband/hw/mlx5/main.c mlx5_ib_destroy_cq(devr->c0, NULL); devr 5077 drivers/infiniband/hw/mlx5/main.c kfree(devr->c0); devr 5078 drivers/infiniband/hw/mlx5/main.c mlx5_ib_dealloc_pd(devr->p0, NULL); devr 5079 drivers/infiniband/hw/mlx5/main.c kfree(devr->p0); devr 5082 drivers/infiniband/hw/mlx5/main.c for (port = 0; port < ARRAY_SIZE(devr->ports); ++port) devr 5083 drivers/infiniband/hw/mlx5/main.c cancel_work_sync(&devr->ports[port].pkey_change_work); devr 6548 drivers/infiniband/hw/mlx5/main.c return create_dev_resources(&dev->devr); devr 6553 drivers/infiniband/hw/mlx5/main.c destroy_dev_resources(&dev->devr); devr 702 drivers/infiniband/hw/mlx5/mlx5_ib.h struct mlx5_ib_resources *devr; devr 965 drivers/infiniband/hw/mlx5/mlx5_ib.h struct mlx5_ib_resources devr; devr 1949 drivers/infiniband/hw/mlx5/qp.c struct mlx5_ib_resources *devr = &dev->devr; devr 2177 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, pd, to_mpd(pd ? pd : devr->p0)->pdn); devr 2223 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(devr->c0)->mcq.cqn); devr 2224 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, cqn_snd, to_mcq(devr->c0)->mcq.cqn); devr 2225 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s0)->msrq.srqn); devr 2229 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(devr->c0)->mcq.cqn); devr 2230 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x1)->xrcdn); devr 2231 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s0)->msrq.srqn); devr 2235 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x0)->xrcdn); devr 2238 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x1)->xrcdn); devr 2239 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s1)->msrq.srqn); devr 3566 drivers/infiniband/hw/mlx5/qp.c context->flags_pd = cpu_to_be32(pd ? pd->pdn : to_mpd(dev->devr.p0)->pdn); devr 280 drivers/infiniband/hw/mlx5/srq.c in.xrcd = to_mxrcd(dev->devr.x0)->xrcdn; devr 297 drivers/infiniband/hw/mlx5/srq.c in.cqn = to_mcq(dev->devr.c0)->mcq.cqn;