Skip to content

Commit 4afaed9

Browse files
AlisonSchofielddavejiang
authored andcommitted
cxl/hdm: dev_warn() on unsupported mixed mode decoder
A mixed mode decoder is programmed with device physical addresses that span both ram and pmem partitions of a memdev. Linux does not support mixed mode decoders. The driver rejects sysfs writes that try to set decoder mode to mixed, and if a resource bieng allocated is not wholly contained in either the pmem or ram partition of a memdev, it is also rejected. Basically, the CXL region driver is not going to create regions with mixed mode decoders, but the BIOS could. If the kernel driver sees the mixed mode decoder, it will fail to enable the region, and emit a dev_dbg() message. A dev_dbg() is not noisy enough in this case. Change the message to be a dev_warn() that explicitly says mixed mode is not supported. Suggested-by: Dan Williams <[email protected]> Signed-off-by: Alison Schofield <[email protected]> Reviewed-by: Vishal Verma <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 364ee9f commit 4afaed9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cxl/core/hdm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
319319
else if (resource_contains(&cxlds->ram_res, res))
320320
cxled->mode = CXL_DECODER_RAM;
321321
else {
322-
dev_dbg(dev, "decoder%d.%d: %pr mixed\n", port->id,
323-
cxled->cxld.id, cxled->dpa_res);
322+
dev_warn(dev, "decoder%d.%d: %pr mixed mode not supported\n",
323+
port->id, cxled->cxld.id, cxled->dpa_res);
324324
cxled->mode = CXL_DECODER_MIXED;
325325
}
326326

0 commit comments

Comments
 (0)