Re: [PATCH] cxl/acpi: fix null dereference on probe for missing ACPI_COMPANION()

From: Davidlohr Bueso
Date: Thu Dec 15 2022 - 01:28:59 EST


On Wed, 14 Dec 2022, Luis Chamberlain wrote:

Groovy thanks. Progress, but still fails now on the cxl-xor-region.sh line 29

https://gist.github.com/mcgrof/aeac639365a651bd77f143cf38eb7493

Unrelated, but looking at this log I noticed that we should limit the amount
of noise "Bypassing cpu_cache_invalidate_memregion() for testing" emits.

Thanks,
Davidlohr

-----8<-------------------------------------
[PATCH] cxl/region: Only warn about cpu_cache_invalidate_memregion() once

No need for more than once per region.

Signed-off-by: Davidlohr Bueso <dave@xxxxxxxxxxxx>
---
drivers/cxl/core/region.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index b1281f528d7f..f367d1c10357 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -2006,8 +2006,7 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
if (!cpu_cache_has_invalidate_memregion()) {
if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TEST)) {
- dev_warn(
- &cxlr->dev,
+ dev_WARN_ONCE(&cxlr->dev, 1,
"Bypassing cpu_cache_invalidate_memregion() for testing!\n");
clear_bit(CXL_REGION_F_INCOHERENT, &cxlr->flags);
return 0;
--
2.38.1