]> Git Repo - linux.git/commitdiff
Merge branch 'for-6.3/cxl-ram-region' into cxl/next
authorDan Williams <[email protected]>
Tue, 14 Feb 2023 22:58:26 +0000 (14:58 -0800)
committerDan Williams <[email protected]>
Tue, 14 Feb 2023 22:58:26 +0000 (14:58 -0800)
Pick up some fixes from exposure of for-6.3/cxl-ram-region in
linux-next.

1  2 
drivers/cxl/core/region.c

index fe1d8392870e4b9fcb429e39edf780fa1ecf03bd,8ba71ca4135c6a6605fcc428b972e93be5b11151..f29028148806baa2982eaf5b3a9e92840f8bff92
@@@ -135,7 -135,7 +135,7 @@@ static int cxl_region_decode_reset(stru
                struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
                struct cxl_port *iter = cxled_to_port(cxled);
                struct cxl_ep *ep;
 -              int rc;
 +              int rc = 0;
  
                while (!is_cxl_root(to_cxl_port(iter->dev.parent)))
                        iter = to_cxl_port(iter->dev.parent);
  
                        cxl_rr = cxl_rr_load(iter, cxlr);
                        cxld = cxl_rr->decoder;
 -                      rc = cxld->reset(cxld);
 +                      if (cxld->reset)
 +                              rc = cxld->reset(cxld);
                        if (rc)
                                return rc;
                }
@@@ -206,8 -205,7 +206,8 @@@ static int cxl_region_decode_commit(str
                             iter = ep->next, ep = cxl_ep_load(iter, cxlmd)) {
                                cxl_rr = cxl_rr_load(iter, cxlr);
                                cxld = cxl_rr->decoder;
 -                              cxld->reset(cxld);
 +                              if (cxld->reset)
 +                                      cxld->reset(cxld);
                        }
  
                        cxled->cxld.reset(&cxled->cxld);
@@@ -424,7 -422,7 +424,7 @@@ static ssize_t interleave_granularity_s
         * When the host-bridge is interleaved, disallow region granularity !=
         * root granularity. Regions with a granularity less than the root
         * interleave result in needing multiple endpoints to support a single
 -       * slot in the interleave (possible to suport in the future). Regions
 +       * slot in the interleave (possible to support in the future). Regions
         * with a granularity greater than the root interleave result in invalid
         * DPA translations (invalid to support).
         */
@@@ -1031,10 -1029,10 +1031,10 @@@ static int cxl_port_setup_targets(struc
                int i, distance;
  
                /*
 -               * Passthrough ports impose no distance requirements between
 +               * Passthrough decoders impose no distance requirements between
                 * peers
                 */
 -              if (port->nr_dports == 1)
 +              if (cxl_rr->nr_targets == 1)
                        distance = 0;
                else
                        distance = p->nr_targets / cxl_rr->nr_targets;
@@@ -2625,10 -2623,9 +2625,9 @@@ int cxl_add_to_region(struct cxl_port *
                cxlr = to_cxl_region(region_dev);
        mutex_unlock(&cxlrd->range_lock);
  
-       if (IS_ERR(cxlr)) {
-               rc = PTR_ERR(cxlr);
+       rc = PTR_ERR_OR_ZERO(cxlr);
+       if (rc)
                goto out;
-       }
  
        attach_target(cxlr, cxled, -1, TASK_UNINTERRUPTIBLE);
  
This page took 0.066139 seconds and 4 git commands to generate.