<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/cxl/test/mock.h, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-11-17T18:05:47Z</updated>
<entry>
<title>Merge branch 'for-6.19/cxl-elc-test' into cxl-for-next</title>
<updated>2025-11-17T18:05:47Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2025-11-17T18:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ec9db66cc552f2f8a6779c16d01a2a01eccedde'/>
<id>urn:sha1:7ec9db66cc552f2f8a6779c16d01a2a01eccedde</id>
<content type='text'>
Extended linear cache unit testing support
  - Standardize CXL auto region size
  - Add cxl_test CFMWS support for extended linear cache
  - Add support for acpi extended linear cache
</content>
</entry>
<entry>
<title>cxl/test: Add support for acpi extended linear cache</title>
<updated>2025-11-17T16:46:44Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2025-11-17T14:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68f4a852e18329e84bb5d36168a45b0a52cdf236'/>
<id>urn:sha1:68f4a852e18329e84bb5d36168a45b0a52cdf236</id>
<content type='text'>
Add the mock wrappers for hmat_get_extended_linear_cache_size() in order
to emulate the ACPI helper function for the regions that are mock'd by
cxl_test.

Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Tested-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Fabio M. De Francesco &lt;fabio.m.de.francesco@linux.intel.com&gt;
Link: https://patch.msgid.link/20251117144611.903692-4-dave.jiang@intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/port: Remove devm_cxl_port_enumerate_dports()</title>
<updated>2025-11-03T16:16:02Z</updated>
<author>
<name>Li Ming</name>
</author>
<published>2025-09-27T10:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f5b8f7f34f6d8e63c02d177341e43ebee4c2d36'/>
<id>urn:sha1:3f5b8f7f34f6d8e63c02d177341e43ebee4c2d36</id>
<content type='text'>
devm_cxl_port_enumerate_dports() is not longer used after below commit
commit 4f06d81e7c6a ("cxl: Defer dport allocation for switch ports")

Delete it and the relevant interface implemented in cxl_test.

Signed-off-by: Li Ming &lt;ming.li@zohomail.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/test: Add mock version of devm_cxl_add_dport_by_dev()</title>
<updated>2025-09-18T16:55:23Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2025-08-29T18:09:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d96eb90d9ca6e4652c8a23d48c94364aa061fdc4'/>
<id>urn:sha1:d96eb90d9ca6e4652c8a23d48c94364aa061fdc4</id>
<content type='text'>
devm_cxl_add_dport_by_dev() outside of cxl_test is done through PCI
hierarchy. However with cxl_test, it needs to be done through the
platform device hierarchy. Add the mock function for
devm_cxl_add_dport_by_dev().

When cxl_core calls a cxl_core exported function and that function is
mocked by cxl_test, the call chain causes a circular dependency issue. Dan
provided a workaround to avoid this issue. Apply the method to changes from
the late dport allocation changes in order to enable cxl-test.

In cxl_core they are defined with "__" added in front of the function. A
macro is used to define the original function names for when non-test
version of the kernel is built. A bit of macros and typedefs are used to
allow mocking of those functions in cxl_test.

Co-developed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Reviewed-by: Li Ming &lt;ming.li@zohomail.com&gt;
Tested-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Tested-by: Robert Richter &lt;rrichter@amd.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/test: Refactor decoder setup to reduce cxl_test burden</title>
<updated>2025-09-18T16:54:50Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2025-08-29T18:09:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d5d9734c12fce20ad493fe24738ab2019108c0'/>
<id>urn:sha1:68d5d9734c12fce20ad493fe24738ab2019108c0</id>
<content type='text'>
Group the decoder setup code in switch and endpoint port probe into a
single function for each to reduce the number of functions to be mocked
in cxl_test. Introduce devm_cxl_switch_port_decoders_setup() and
devm_cxl_endpoint_decoders_setup(). These two functions will be mocked
instead with some functions optimized out since the mock version does
not do anything. Remove devm_cxl_setup_hdm(),
devm_cxl_add_passthrough_decoder(), and devm_cxl_enumerate_decoders() in
cxl_test mock code. In turn, mock_cxl_add_passthrough_decoder() can be
removed since cxl_test does not setup passthrough decoders.
__wrap_cxl_hdm_decode_init() and __wrap_cxl_dvsec_rr_decode() can be
removed as well since they only return 0 when called.

[dj: drop 'struct cxl_port' forward declaration (Robert)]

Suggested-by: Robert Richter &lt;rrichter@amd.com&gt;
Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@amd.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/test: Add support for qos_class checking</title>
<updated>2024-02-17T07:20:34Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2024-02-06T19:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=117132edc6900621337b77d29e953d0d01f32a5f'/>
<id>urn:sha1:117132edc6900621337b77d29e953d0d01f32a5f</id>
<content type='text'>
Set a fake qos_class to a unique value in order to do simple testing of
qos_class for root decoders and mem devs via user cxl_test. A mock
function is added to set the fake qos_class values for memory device
and overrides cxl_endpoint_parse_cdat() in cxl driver code.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/20240206190431.1810289-5-dave.jiang@intel.com
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/acpi: Probe RCRB later during RCH downstream port creation</title>
<updated>2023-06-25T18:35:20Z</updated>
<author>
<name>Robert Richter</name>
</author>
<published>2023-06-25T18:35:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb4663b07e13bc138aad9e2a93ee9893c7139f51'/>
<id>urn:sha1:eb4663b07e13bc138aad9e2a93ee9893c7139f51</id>
<content type='text'>
The RCRB is extracted already during ACPI CEDT table parsing while the
data of this is needed not earlier than dport creation. This
implementation comes with drawbacks: During ACPI table scan there is
already MMIO access including mapping and unmapping, but only ACPI
data should be collected here. The collected data must be transferred
through a couple of interfaces until it is finally consumed when
creating the dport. This causes complex data structures and function
interfaces. Additionally, RCRB parsing will be extended to also
extract AER data, it would be much easier do this at a later point
during port and dport creation when the data structures are available
to hold that data.

To simplify all that, probe the RCRB at a later point during RCH
downstream port creation. Change ACPI table parser to only extract the
base address of either the component registers or the RCRB. Parse and
extract the RCRB in devm_cxl_add_rch_dport().

This is in preparation to centralize all RCRB scanning.

Signed-off-by: Robert Richter &lt;rrichter@amd.com&gt;
Signed-off-by: Terry Bowman &lt;terry.bowman@amd.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/20230622205523.85375-2-terry.bowman@amd.com
Co-developed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Link: https://lore.kernel.org/r/20230622205523.85375-3-terry.bowman@amd.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;</content>
</entry>
<entry>
<title>cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders</title>
<updated>2023-02-14T23:45:21Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2023-02-14T19:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4474ce565ee4490fb4e6d8443b617a9d98ae10ff'/>
<id>urn:sha1:4474ce565ee4490fb4e6d8443b617a9d98ae10ff</id>
<content type='text'>
CXL rev3 spec 8.1.3

RCDs may not have HDM register blocks. Create a fake HDM with information
from the CXL PCIe DVSEC registers. The decoder count will be set to the
HDM count retrieved from the DVSEC cap register.

Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/167640368994.935665.15831225724059704620.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/hdm: Emulate HDM decoder from DVSEC range registers</title>
<updated>2023-02-14T23:45:21Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2023-02-14T19:41:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b777e9bec960a29374dc486d47784c73b7ac4cef'/>
<id>urn:sha1:b777e9bec960a29374dc486d47784c73b7ac4cef</id>
<content type='text'>
In the case where HDM decoder register block exists but is not programmed
and at the same time the DVSEC range register range is active, populate the
CXL decoder object 'cxl_decoder' with info from DVSEC range registers.

Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/167640368454.935665.13806415120298330717.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/acpi: Extract component registers of restricted hosts from RCRB</title>
<updated>2022-12-03T08:40:29Z</updated>
<author>
<name>Robert Richter</name>
</author>
<published>2022-12-03T08:40:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5b1a27143cb7f78030bb2b6812730992a930c47'/>
<id>urn:sha1:d5b1a27143cb7f78030bb2b6812730992a930c47</id>
<content type='text'>
A downstream port must be connected to a component register block.
For restricted hosts the base address is determined from the RCRB. The
RCRB is provided by the host's CEDT CHBS entry. Rework CEDT parser to
get the RCRB and add code to extract the component register block from
it.

RCRB's BAR[0..1] point to the component block containing CXL subsystem
component registers. MEMBAR extraction follows the PCI base spec here,
esp. 64 bit extraction and memory range alignment (6.0, 7.5.1.2.1). The
RCRB base address is cached in the cxl_dport per-host bridge so that the
upstream port component registers can be retrieved later by an RCD
(RCIEP) associated with the host bridge.

Note: Right now the component register block is used for HDM decoder
capability only which is optional for RCDs. If unsupported by the RCD,
the HDM init will fail. It is future work to bypass it in this case.

Co-developed-by: Terry Bowman &lt;terry.bowman@amd.com&gt;
Signed-off-by: Terry Bowman &lt;terry.bowman@amd.com&gt;
Signed-off-by: Robert Richter &lt;rrichter@amd.com&gt;
Link: https://lore.kernel.org/r/Y4dsGZ24aJlxSfI1@rric.localdomain
[djbw: introduce devm_cxl_add_rch_dport()]
Link: https://lore.kernel.org/r/166993044524.1882361.2539922887413208807.stgit@dwillia2-xfh.jf.intel.com
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
