]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'v6.15' into rdma.git for-next
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 26 May 2025 18:32:29 +0000 (15:32 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 26 May 2025 18:33:52 +0000 (15:33 -0300)
Following patches need the RDMA rc branch since we are past the RC cycle
now.

Merge conflicts resolved based on Linux-next:

- For RXE odp changes keep for-next version and fixup new places that
  need to call is_odp_mr()
  https://lore.kernel.org/r/20250422143019.500201bd@canb.auug.org.au
  https://lore.kernel.org/r/20250514122455.3593b083@canb.auug.org.au

- irdma is keeping the while/kfree bugfix from -rc and the pf/cdev_info
  change from for-next
  https://lore.kernel.org/r/20250513130630.280ee6c5@canb.auug.org.au

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
14 files changed:
1  2 
MAINTAINERS
drivers/infiniband/core/cma.c
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/irdma/main.c
drivers/infiniband/hw/mlx5/fs.c
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/iommu/dma-iommu.c
drivers/iommu/iommu.c
include/linux/dma-mapping.h
include/linux/iommu.h
include/rdma/ib_verbs.h
kernel/dma/mapping.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index abb532bc8ce4dfc9f637224b5bfa951bc2e84bda,7599e31b574369058573e8f6cf9ce9d5b07e6ffd..1e840bbd619d2e33c83bcc02a7338b62b3cc8939
@@@ -221,8 -221,8 +221,8 @@@ static int irdma_init_interrupts(struc
                        break;
  
        if (i < IRDMA_MIN_MSIX) {
-               for (; i > 0; i--)
+               while (--i >= 0)
 -                      ice_free_rdma_qvector(pf, &rf->msix_entries[i]);
 +                      ice_free_rdma_qvector(cdev, &rf->msix_entries[i]);
  
                kfree(rf->msix_entries);
                return -ENOMEM;
@@@ -245,40 -245,35 +245,42 @@@ static void irdma_deinit_interrupts(str
  
  static void irdma_remove(struct auxiliary_device *aux_dev)
  {
 -      struct iidc_auxiliary_dev *iidc_adev = container_of(aux_dev,
 -                                                          struct iidc_auxiliary_dev,
 -                                                          adev);
 -      struct ice_pf *pf = iidc_adev->pf;
        struct irdma_device *iwdev = auxiliary_get_drvdata(aux_dev);
 +      struct iidc_rdma_core_auxiliary_dev *iidc_adev;
 +      struct iidc_rdma_core_dev_info *cdev_info;
 +
 +      iidc_adev = container_of(aux_dev, struct iidc_rdma_core_auxiliary_dev, adev);
 +      cdev_info = iidc_adev->cdev_info;
  
 +      ice_rdma_update_vsi_filter(cdev_info, iwdev->vsi_num, false);
        irdma_ib_unregister_device(iwdev);
 -      ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, false);
 -      irdma_deinit_interrupts(iwdev->rf, pf);
 +      irdma_deinit_interrupts(iwdev->rf, cdev_info);
  
 -      pr_debug("INIT: Gen2 PF[%d] device remove success\n", PCI_FUNC(pf->pdev->devfn));
+       kfree(iwdev->rf);
 +      pr_debug("INIT: Gen2 PF[%d] device remove success\n", PCI_FUNC(cdev_info->pdev->devfn));
  }
  
 -static void irdma_fill_device_info(struct irdma_device *iwdev, struct ice_pf *pf,
 -                                 struct ice_vsi *vsi)
 +static void irdma_fill_device_info(struct irdma_device *iwdev,
 +                                 struct iidc_rdma_core_dev_info *cdev_info)
  {
 +      struct iidc_rdma_priv_dev_info *iidc_priv = cdev_info->iidc_priv;
        struct irdma_pci_f *rf = iwdev->rf;
  
 -      rf->cdev = pf;
 +      rf->sc_dev.hw = &rf->hw;
 +      rf->iwdev = iwdev;
 +      rf->cdev = cdev_info;
 +      rf->hw.hw_addr = iidc_priv->hw_addr;
 +      rf->pcidev = cdev_info->pdev;
 +      rf->hw.device = &rf->pcidev->dev;
 +      rf->pf_id = iidc_priv->pf_id;
        rf->gen_ops.register_qset = irdma_lan_register_qset;
        rf->gen_ops.unregister_qset = irdma_lan_unregister_qset;
 -      rf->hw.hw_addr = pf->hw.hw_addr;
 -      rf->pcidev = pf->pdev;
 -      rf->pf_id = pf->hw.pf_id;
 -      rf->default_vsi.vsi_idx = vsi->vsi_num;
 -      rf->protocol_used = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ?
 -                          IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
 +
 +      rf->default_vsi.vsi_idx = iidc_priv->vport_id;
 +      rf->protocol_used =
 +              cdev_info->rdma_protocol == IIDC_RDMA_PROTOCOL_ROCEV2 ?
 +              IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
        rf->rdma_ver = IRDMA_GEN_2;
        rf->rsrc_profile = IRDMA_HMC_PROFILE_DEFAULT;
        rf->rst_to = IRDMA_RST_TIMEOUT_HZ;
Simple merge
Simple merge
index c4936d63e26a2d14cccf9be6d280beb05eccecb7,432d864c3ce9c716dd2b88f526043ba1339f968a..bcb97b3ea58ac75822895fb06fc53854cb9a95f2
@@@ -458,28 -468,6 +458,28 @@@ static int rxe_mr_flush_pmem_iova(struc
        return 0;
  }
  
-       if (mr->umem->is_odp)
 +int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 start, unsigned int length)
 +{
 +      int err;
 +
 +      /* mr must be valid even if length is zero */
 +      if (WARN_ON(!mr))
 +              return -EINVAL;
 +
 +      if (length == 0)
 +              return 0;
 +
 +      if (mr->ibmr.type == IB_MR_TYPE_DMA)
 +              return -EFAULT;
 +
++      if (is_odp_mr(mr))
 +              err = rxe_odp_flush_pmem_iova(mr, start, length);
 +      else
 +              err = rxe_mr_flush_pmem_iova(mr, start, length);
 +
 +      return err;
 +}
 +
  /* Guarantee atomicity of atomic operations at the machine level. */
  DEFINE_SPINLOCK(atomic_ops_lock);
  
index fd7bac5bce1809e6527caa19ae79c29b1f8a0227,5d9174e408db445a862a774d05452d56971e4e0c..711f73e0bbb1c3263993be5ead22f9d0f3a3f388
@@@ -749,16 -753,7 +749,16 @@@ static enum resp_states atomic_write_re
        value = *(u64 *)payload_addr(pkt);
        iova = qp->resp.va + qp->resp.offset;
  
 -      err = rxe_mr_do_atomic_write(mr, iova, value);
 +      /* See IBA oA19-28 */
 +      if (unlikely(mr->state != RXE_MR_STATE_VALID)) {
 +              rxe_dbg_mr(mr, "mr not in valid state\n");
 +              return RESPST_ERR_RKEY_VIOLATION;
 +      }
 +
-       if (mr->umem->is_odp)
++      if (is_odp_mr(mr))
 +              err = rxe_odp_do_atomic_write(mr, iova, value);
 +      else
 +              err = rxe_mr_do_atomic_write(mr, iova, value);
        if (err)
                return err;
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge