cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry
authorRobert Richter <rrichter@amd.com>
Mon, 5 Dec 2022 20:21:40 +0000 (12:21 -0800)
committerDan Williams <dan.j.williams@intel.com>
Mon, 5 Dec 2022 23:37:09 +0000 (15:37 -0800)
After parsing for a CHBCR in cxl_get_chbcr() the case of (ctx.chbcr ==
CXL_RESOURCE_NONE) is a slighly different error reason than the
!ctx.chbcr case. In the first case the CHBS was found but the CHBCR
was invalid or something else failed to determine it, while in the
latter case no CHBS entry exists at all.

Update the warning message to reflect this. The log messages for both
cases can be differentiated now and the reason for a failure can be
determined better.

Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/167027170051.3542509.10494781536638424397.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/acpi.c

index 420e322..f495f3c 100644 (file)
@@ -455,7 +455,8 @@ static int add_host_bridge_dport(struct device *match, void *arg)
                dev_dbg(match, "RCRB found for UID %lld: %pa\n", uid, &ctx.rcrb);
 
        if (ctx.chbcr == CXL_RESOURCE_NONE) {
-               dev_warn(match, "No CHBS found for Host Bridge (UID %lld)\n", uid);
+               dev_warn(match, "CHBCR invalid for Host Bridge (UID %lld)\n",
+                        uid);
                return 0;
        }