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 <ying.huang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20240402061016.388408-1-ying.huang@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent 3381586 commit 54e8dd5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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)