Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'cxl-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Dan Williams:
"Two fixups for CXL (Compute Express Link) in presence of passthrough
decoders.

This primarily helps developers using the QEMU CXL emulation, but with
the impending arrival of CXL switches these types of topologies will
be of interest to end users.

- Fix a crash when shutting down regions in the presence of
passthrough decoders

- Fix region creation to understand passthrough decoders instead of
the narrower definition of passthrough ports"

* tag 'cxl-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
cxl/region: Fix passthrough-decoder detection
cxl/region: Fix null pointer dereference for resetting decoder

+7 -5
+7 -5
drivers/cxl/core/region.c
··· 131 131 struct cxl_memdev *cxlmd = cxled_to_memdev(cxled); 132 132 struct cxl_port *iter = cxled_to_port(cxled); 133 133 struct cxl_ep *ep; 134 - int rc; 134 + int rc = 0; 135 135 136 136 while (!is_cxl_root(to_cxl_port(iter->dev.parent))) 137 137 iter = to_cxl_port(iter->dev.parent); ··· 143 143 144 144 cxl_rr = cxl_rr_load(iter, cxlr); 145 145 cxld = cxl_rr->decoder; 146 - rc = cxld->reset(cxld); 146 + if (cxld->reset) 147 + rc = cxld->reset(cxld); 147 148 if (rc) 148 149 return rc; 149 150 } ··· 187 186 iter = ep->next, ep = cxl_ep_load(iter, cxlmd)) { 188 187 cxl_rr = cxl_rr_load(iter, cxlr); 189 188 cxld = cxl_rr->decoder; 190 - cxld->reset(cxld); 189 + if (cxld->reset) 190 + cxld->reset(cxld); 191 191 } 192 192 193 193 cxled->cxld.reset(&cxled->cxld); ··· 993 991 int i, distance; 994 992 995 993 /* 996 - * Passthrough ports impose no distance requirements between 994 + * Passthrough decoders impose no distance requirements between 997 995 * peers 998 996 */ 999 - if (port->nr_dports == 1) 997 + if (cxl_rr->nr_targets == 1) 1000 998 distance = 0; 1001 999 else 1002 1000 distance = p->nr_targets / cxl_rr->nr_targets;