summaryrefslogtreecommitdiff
path: root/drivers/misc/cxl/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/cxl/main.c')
-rw-r--r--drivers/misc/cxl/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c
index 62e0dfb5f15b..2a6bf1d0a3a4 100644
--- a/drivers/misc/cxl/main.c
+++ b/drivers/misc/cxl/main.c
@@ -268,7 +268,8 @@ struct cxl_afu *cxl_alloc_afu(struct cxl *adapter, int slice)
idr_init(&afu->contexts_idr);
mutex_init(&afu->contexts_lock);
spin_lock_init(&afu->afu_cntl_lock);
-
+ init_rwsem(&afu->configured_rwsem);
+ down_write(&afu->configured_rwsem);
afu->prefault_mode = CXL_PREFAULT_NONE;
afu->irqs_max = afu->adapter->user_irqs;