Skip to content

Commit 55a89d9

Browse files
djbwdavejiang
authored andcommitted
cxl/decoder: Drop pointless locking
cxl_dpa_rwsem coordinates changes to dpa allocation settings for a given decoder. cxl_decoder_reset() has no need for a consistent snapshot of the dpa settings since it is merely clearing out whatever was there previously. Otherwise, cxl_region_rwsem protects against 'reset' racing 'setup'. In preparation for converting to rw_semaphore_acquire semantics, drop this locking. Cc: Davidlohr Bueso <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Alison Schofield <[email protected]> Cc: Vishal Verma <[email protected]> Cc: Ira Weiny <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Reviewed-by: Davidlohr Bueso <[email protected]> Signed-off-by: Dan Williams <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 7cb3b42 commit 55a89d9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/cxl/core/hdm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,6 @@ static void cxl_decoder_reset(struct cxl_decoder *cxld)
914914
"%s: out of order reset, expected decoder%d.%d\n",
915915
dev_name(&cxld->dev), port->id, port->commit_end);
916916

917-
down_read(&cxl_dpa_rwsem);
918917
ctrl = readl(hdm + CXL_HDM_DECODER0_CTRL_OFFSET(id));
919918
ctrl &= ~CXL_HDM_DECODER0_CTRL_COMMIT;
920919
writel(ctrl, hdm + CXL_HDM_DECODER0_CTRL_OFFSET(id));
@@ -923,7 +922,6 @@ static void cxl_decoder_reset(struct cxl_decoder *cxld)
923922
writel(0, hdm + CXL_HDM_DECODER0_SIZE_LOW_OFFSET(id));
924923
writel(0, hdm + CXL_HDM_DECODER0_BASE_HIGH_OFFSET(id));
925924
writel(0, hdm + CXL_HDM_DECODER0_BASE_LOW_OFFSET(id));
926-
up_read(&cxl_dpa_rwsem);
927925

928926
cxld->flags &= ~CXL_DECODER_F_ENABLE;
929927

0 commit comments

Comments
 (0)