]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/bus: Populate the target list at decoder create
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 16:07:39 +0000 (09:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:31 +0000 (12:08 -0700)
commit574d46ed53b5276c539182088a6ab44ee241ea7a
treed1874f3db57c50300465c5e94382c7c5d4805c37
parentbafcdfbaea5a95bcf119c633e1527597ae91c8f0
cxl/bus: Populate the target list at decoder create

As found by cxl_test, the implementation populated the target_list for
the single dport exceptional case, it missed populating the target_list
for the typical multi-dport case.

Walk the hosting port's dport list and populate based on the passed in
map.

Move devm_cxl_add_passthrough_decoder() out of line now that it does the
work of generating a target_map.

Before:
$ cat /sys/bus/cxl/devices/root2/decoder*/target_list
0

0

After:
$ cat /sys/bus/cxl/devices/root2/decoder*/target_list
0
0,1,2,3
0
0,1,2,3

Where root2 is a CXL topology root object generated by 'cxl_test'.

Acked-by: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/162982125942.1124374.13787583357587804107.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/acpi.c
drivers/cxl/core/bus.c
drivers/cxl/cxl.h