summaryrefslogtreecommitdiffstats
path: root/drivers/cxl/core/hdm.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2023-10-31 19:00:08 +0100
committerDan Williams <dan.j.williams@intel.com>2023-10-31 19:00:08 +0100
commitb3cfdbf6a062bcfb431153f92d6bc1ad20bfc687 (patch)
tree9e1b81e6288393bc194308ec3e9aa28e7b9d1c2a /drivers/cxl/core/hdm.c
parentMerge branch 'for-6.7/cxl' into cxl/next (diff)
parentcxl: Add decoders_committed sysfs attribute to cxl_port (diff)
downloadlinux-b3cfdbf6a062bcfb431153f92d6bc1ad20bfc687.tar.xz
linux-b3cfdbf6a062bcfb431153f92d6bc1ad20bfc687.zip
Merge branch 'for-6.7/cxl-commited' into cxl/next
Add the committed decoder sysfs attribute for v6.7.
Diffstat (limited to 'drivers/cxl/core/hdm.c')
-rw-r--r--drivers/cxl/core/hdm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index d3d338509d96..bc8ad4a8afca 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -633,10 +633,11 @@ static int cxl_decoder_commit(struct cxl_decoder *cxld)
if (cxld->flags & CXL_DECODER_F_ENABLE)
return 0;
- if (port->commit_end + 1 != id) {
+ if (cxl_num_decoders_committed(port) != id) {
dev_dbg(&port->dev,
"%s: out of order commit, expected decoder%d.%d\n",
- dev_name(&cxld->dev), port->id, port->commit_end + 1);
+ dev_name(&cxld->dev), port->id,
+ cxl_num_decoders_committed(port));
return -EBUSY;
}
@@ -853,7 +854,7 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
cxld->target_type = CXL_DECODER_HOSTONLYMEM;
else
cxld->target_type = CXL_DECODER_DEVMEM;
- if (cxld->id != port->commit_end + 1) {
+ if (cxld->id != cxl_num_decoders_committed(port)) {
dev_warn(&port->dev,
"decoder%d.%d: Committed out of order\n",
port->id, cxld->id);