linux/drivers/cxl/core
Dan Williams 8f401ec1c8 cxl/region: Recycle region ids
At region creation time the next region-id is atomically cached so that
there is predictability of region device names. If that region is
destroyed and then a new one is created the region id increments. That
ends up looking like a memory leak, or is otherwise surprising that
identifiers roll forward even after destroying all previously created
regions.

Try to reuse rather than free old region ids at region release time.

While this fixes a cosmetic issue, the needlessly advancing memory
region-id gives the appearance of a memory leak, hence the "Fixes" tag,
but no "Cc: stable" tag.

Cc: Ben Widawsky <bwidawsk@kernel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Fixes: 779dd20cfb ("cxl/region: Add region creation support")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/166752186062.947915.13200195701224993317.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-11-04 16:03:43 -07:00
..
core.h cxl/region: Introduce cxl_pmem_region objects 2022-07-26 12:23:01 -07:00
hdm.c cxl/hdm: Fix skip allocations vs multiple pmem allocations 2022-08-05 16:11:38 -07:00
Makefile cxl/region: Add region creation support 2022-07-21 17:19:25 -07:00
mbox.c cxl/mbox: Add a check on input payload size 2022-10-20 16:28:53 -07:00
memdev.c cxl/mem: Convert partition-info to resources 2022-07-09 19:43:30 -07:00
pci.c cxl/port: Read CDAT table 2022-07-19 15:38:05 -07:00
pmem.c cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak 2022-11-04 15:58:35 -07:00
port.c cxl/region: Fix 'distance' calculation with passthrough ports 2022-11-04 16:01:24 -07:00
region.c cxl/region: Recycle region ids 2022-11-04 16:03:43 -07:00
regs.c cxl/regs: Fix size of CXL Capability Header Register 2022-02-08 23:15:33 -08:00
suspend.c PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00