We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a90accb commit 0d9e734Copy full SHA for 0d9e734
drivers/cxl/core/region.c
@@ -1557,8 +1557,19 @@ static struct cxl_region *to_cxl_region(struct device *dev)
1557
static void unregister_region(void *dev)
1558
{
1559
struct cxl_region *cxlr = to_cxl_region(dev);
1560
+ struct cxl_region_params *p = &cxlr->params;
1561
+ int i;
1562
1563
device_del(dev);
1564
+
1565
+ /*
1566
+ * Now that region sysfs is shutdown, the parameter block is now
1567
+ * read-only, so no need to hold the region rwsem to access the
1568
+ * region parameters.
1569
+ */
1570
+ for (i = 0; i < p->interleave_ways; i++)
1571
+ detach_target(cxlr, i);
1572
1573
cxl_region_iomem_release(cxlr);
1574
put_device(dev);
1575
}
0 commit comments