linux/drivers/cxl/core
Dave Jiang 1acba6e920 cxl/pci: Break out range register decoding from cxl_hdm_decode_init()
There are 2 scenarios that requires additional handling. 1. A device that
has active ranges in DVSEC range registers (RR) but no HDM decoder register
block. 2. A device that has both RR active and HDM, but the HDM decoders
are not programmed. The goal is to create emulated decoder software structs
based on the RR.

Move the CXL DVSEC range register decoding code block from
cxl_hdm_decode_init() to its own function. Refactor code in preparation for
the HDM decoder emulation.  There is no functionality change to the code.
Name the new function to cxl_dvsec_rr_decode().

The only change is to set range->start and range->end to CXL_RESOURCE_NONE
and skipping the reading of base registers if the range size is 0, which
equates to range not active.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/167640366839.935665.11816388524993234329.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2023-02-14 15:45:21 -08:00
..
core.h cxl/mem: Move devm_cxl_add_endpoint() from cxl_core to cxl_mem 2022-12-05 10:32:26 -08:00
hdm.c cxl: update names for interleave ways conversion macros 2022-12-05 18:17:16 -08:00
Makefile cxl/region: Add region creation support 2022-07-21 17:19:25 -07:00
mbox.c cxl/security: Drop security command ioctl uapi 2022-12-06 14:36:02 -08:00
memdev.c cxl/pci: Add (hopeful) error handling support 2022-12-03 13:40:17 -08:00
pci.c cxl/pci: Break out range register decoding from cxl_hdm_decode_init() 2023-02-14 15:45:21 -08:00
pmem.c cxl/pmem: Fix nvdimm unregistration when cxl_pmem driver is absent 2023-01-25 15:35:26 -08:00
port.c Merge branch 'for-6.2/cxl-xor' into for-6.2/cxl 2022-12-05 12:32:11 -08:00
region.c cxl/region: Fix memdev reuse check 2022-12-08 13:03:47 -08:00
regs.c cxl/regs: Fix sparse warning 2022-12-05 12:33:20 -08:00
suspend.c PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00