Skip to content

Commit 54e8dd5

Browse files
yhuang-inteldavejiang
authored andcommitted
cxl/hdm: Add debug message for invalid interleave granularity
There's no debug message for invalid interleave granularity. This makes it hard to debug related bugs. So, this is added in this patch. Signed-off-by: Huang, Ying <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 3381586 commit 54e8dd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/cxl/core/hdm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,12 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
888888
}
889889
rc = eig_to_granularity(FIELD_GET(CXL_HDM_DECODER0_CTRL_IG_MASK, ctrl),
890890
&cxld->interleave_granularity);
891-
if (rc)
891+
if (rc) {
892+
dev_warn(&port->dev,
893+
"decoder%d.%d: Invalid interleave granularity (ctrl: %#x)\n",
894+
port->id, cxld->id, ctrl);
892895
return rc;
896+
}
893897

894898
dev_dbg(&port->dev, "decoder%d.%d: range: %#llx-%#llx iw: %d ig: %d\n",
895899
port->id, cxld->id, cxld->hpa_range.start, cxld->hpa_range.end,

0 commit comments

Comments
 (0)