Re: [PATCH v4 5/6] cxl/test: Add a topology to test mixed-granularity regions

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.linux-cxl
Message-ID <20260821230759.209cd190@jic23-huawei>
On Thu, 20 Aug 2026 16:31:23 -0700
Alison Schofield <[email protected]> wrote:

> Add a cxl_test topology for mixed-granularity region testing.
> 
> modprobe cxl_test mixed_gran_regions=1 creates three host bridges,
> each with a passthrough host-bridge port above two switch levels
> and four endpoints, for twelve endpoints total.

Why the pass through HB? 
I queried the 2 levels of switches in the docs patch - maybe
you already answered that (I haven't checked just yet)

The spec examples that do multi level interleave are all cross-HB, HB and
then switch.

> 
> Two CFMWS windows are added:
> 1) A 2-way window at 4K gran over two host bridges, that hosts 8-way
> regions at 1K.
> 2) A 3-way window at 512 gran over three host bridges, that hosts
> 6-way regions at 256.
> 
> Both windows also host the same-granularity regions their ways allow.
> 
> Register every mock device through cxl_mock_platform_device_add() so
> the mock array is populated before platform_device_add(), matching the
> ordering the rest of cxl_test relies on to avoid the endpoint-probe
> race in commit d90f236f8b9e ("cxl/test: Update mock dev array before
> calling platform_device_add()").
> 
> NULL-check the legacy topology arrays, which are left empty when
> mixed_gran_regions=1 selects the new topology.
> 
> The default and existing special module params are unaffected.
> 
> Signed-off-by: Alison Schofield <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.