cxl: Add callback to parse the DSMAS subtables from CDAT
authorDave Jiang <dave.jiang@intel.com>
Thu, 21 Dec 2023 22:03:13 +0000 (15:03 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Dec 2023 22:33:10 +0000 (14:33 -0800)
commitad6f04c0269b0b7908f09621d3b3c90def39a297
tree367e7ed27fe305969f147bb530e83ec09a6cb146
parentca53543d8e340070fb37fde93f36ed9012c76b90
cxl: Add callback to parse the DSMAS subtables from CDAT

Provide a callback function to the CDAT parser in order to parse the
Device Scoped Memory Affinity Structure (DSMAS). Each DSMAS structure
contains the DPA range and its associated attributes in each entry. See
the CDAT specification for details. The device handle and the DPA range
is saved and to be associated with the DSLBIS locality data when the
DSLBIS entries are parsed. The xarray is a local variable. When the
total path performance data is calculated and storred this xarray can be
discarded.

Coherent Device Attribute Table 1.03 2.1 Device Scoped memory Affinity
Structure (DSMAS)

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/170319619355.2212653.2675953129671561293.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/Kconfig
drivers/cxl/core/Makefile
drivers/cxl/core/cdat.c [new file with mode: 0644]
drivers/cxl/cxl.h
drivers/cxl/port.c
tools/testing/cxl/Kbuild