Linux CXL
 help / color / mirror / Atom feed
* [PATCH] cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry
@ 2022-12-05 20:21 Dan Williams
  2022-12-05 21:01 ` Dave Jiang
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2022-12-05 20:21 UTC (permalink / raw)
  To: linux-cxl; +Cc: Robert Richter

From: Robert Richter <rrichter@amd.com>

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>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/cxl/acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 420e322c85a1..f495f3ce45d1 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -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;
 	}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry
  2022-12-05 20:21 [PATCH] cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry Dan Williams
@ 2022-12-05 21:01 ` Dave Jiang
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2022-12-05 21:01 UTC (permalink / raw)
  To: Dan Williams, linux-cxl; +Cc: Robert Richter



On 12/5/2022 1:21 PM, Dan Williams wrote:
> From: Robert Richter <rrichter@amd.com>
> 
> 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>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/cxl/acpi.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 420e322c85a1..f495f3ce45d1 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -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;
>   	}
>   
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-05 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 20:21 [PATCH] cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry Dan Williams
2022-12-05 21:01 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox