]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl: Add Get Supported Features command for kernel usage
authorDave Jiang <dave.jiang@intel.com>
Thu, 20 Feb 2025 19:42:40 +0000 (12:42 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 26 Feb 2025 15:51:27 +0000 (08:51 -0700)
commitf0e6a2329bf9d44138be2163370ae9537cbdaf74
treebe2818d4ffd7442a8a5bc17778f2a31a2008fe7c
parentcbbca60a1efc1e8920be13d6bdaf3345ff49132f
cxl: Add Get Supported Features command for kernel usage

CXL spec r3.2 8.2.9.6.1 Get Supported Features (Opcode 0500h)
The command retrieve the list of supported device-specific features
(identified by UUID) and general information about each Feature.

The driver will retrieve the Feature entries in order to make checks and
provide information for the Get Feature and Set Feature command. One of
the main piece of information retrieved are the effects a Set Feature
command would have for a particular feature. The retrieved Feature
entries are stored in the cxl_mailbox context.

The setup of Features is initiated via devm_cxl_setup_features() during the
pci probe function before the cxl_memdev is enumerated.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Tested-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://patch.msgid.link/20250220194438.2281088-3-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/Kconfig
drivers/cxl/core/Makefile
drivers/cxl/core/features.c [new file with mode: 0644]
drivers/cxl/cxlmem.h
drivers/cxl/pci.c
include/cxl/features.h
tools/testing/cxl/Kbuild
tools/testing/cxl/test/mem.c