mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
cxl/core/port: Fix / relax decoder target enumeration
If the decoder is not presently active the target_list may not be accurate. Perform a best effort mapping and assume that it will be fixed up when the decoder is enabled. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/164317464406.3438644.6609329492458460242.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
64cda3ae6b
commit
0909b4e528
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
static unsigned long cfmws_to_decoder_flags(int restrictions)
|
static unsigned long cfmws_to_decoder_flags(int restrictions)
|
||||||
{
|
{
|
||||||
unsigned long flags = 0;
|
unsigned long flags = CXL_DECODER_F_ENABLE;
|
||||||
|
|
||||||
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE2)
|
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE2)
|
||||||
flags |= CXL_DECODER_F_TYPE2;
|
flags |= CXL_DECODER_F_TYPE2;
|
||||||
|
@ -1307,8 +1307,11 @@ int cxl_decoder_add_locked(struct cxl_decoder *cxld, int *target_map)
|
|||||||
port = to_cxl_port(cxld->dev.parent);
|
port = to_cxl_port(cxld->dev.parent);
|
||||||
if (!is_endpoint_decoder(dev)) {
|
if (!is_endpoint_decoder(dev)) {
|
||||||
rc = decoder_populate_targets(cxld, port, target_map);
|
rc = decoder_populate_targets(cxld, port, target_map);
|
||||||
if (rc)
|
if (rc && (cxld->flags & CXL_DECODER_F_ENABLE)) {
|
||||||
|
dev_err(&port->dev,
|
||||||
|
"Failed to populate active decoder targets\n");
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dev_set_name(dev, "decoder%d.%d", port->id, cxld->id);
|
rc = dev_set_name(dev, "decoder%d.%d", port->id, cxld->id);
|
||||||
|
Loading…
Reference in New Issue
Block a user