public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cxl: Adjust extended linear cache failure emission in cxl_acpi
@ 2025-10-03 18:55 Dave Jiang
  2025-10-28 16:05 ` Jonathan Cameron
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dave Jiang @ 2025-10-03 18:55 UTC (permalink / raw)
  To: linux-cxl
  Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
	ira.weiny, dan.j.williams

The cxl_acpi module spams "Extended linear cache calculation failed"
when the hmat memory target is not found for a node. This is normal
when the memory target does not contain extended linear cache
attributes. Adjust cxl_acpi_set_cache_size() to just return 0 if error
is returned from hmat_get_extended_linear_cache_size(). That is the
only error returned from hmat_get_extended_linear_cache_size() as
-ENOENT.

Also remove the check for -EOPNOTSUPP in cxl_setup_extended_linear_cache()
since that errno is never returned by cxl_acpi_set_cache_size().

Suggeted-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>

---
v2:
- Rename subject line to reflect new changes.
- Further analysis of the code and determined this is the correct
  change.
---
 drivers/cxl/acpi.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index d7a5539d07d4..cc4d7bf381d3 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -353,7 +353,7 @@ static int cxl_acpi_set_cache_size(struct cxl_root_decoder *cxlrd)
 
 	rc = hmat_get_extended_linear_cache_size(&res, nid, &cache_size);
 	if (rc)
-		return rc;
+		return 0;
 
 	/*
 	 * The cache range is expected to be within the CFMWS.
@@ -381,15 +381,13 @@ static void cxl_setup_extended_linear_cache(struct cxl_root_decoder *cxlrd)
 	if (!rc)
 		return;
 
-	if (rc != -EOPNOTSUPP) {
-		/*
-		 * Failing to support extended linear cache region resize does not
-		 * prevent the region from functioning. Only causes cxl list showing
-		 * incorrect region size.
-		 */
-		dev_warn(cxlrd->cxlsd.cxld.dev.parent,
-			 "Extended linear cache calculation failed rc:%d\n", rc);
-	}
+	/*
+	 * Failing to retrieve extended linear cache region resize does not
+	 * prevent the region from functioning. Only causes cxl list showing
+	 * incorrect region size.
+	 */
+	dev_warn(cxlrd->cxlsd.cxld.dev.parent,
+		 "Extended linear cache retrieval failed rc:%d\n", rc);
 
 	/* Ignoring return code */
 	cxlrd->cache_size = 0;

base-commit: 46037455cbb748c5e85071c95f2244e81986eb58
-- 
2.51.0


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

end of thread, other threads:[~2025-11-03 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 18:55 [PATCH v2] cxl: Adjust extended linear cache failure emission in cxl_acpi Dave Jiang
2025-10-28 16:05 ` Jonathan Cameron
2025-10-29  1:46 ` Alison Schofield
2025-11-03 23:48 ` Dave Jiang

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