summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-11-13 14:45:38 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-27 09:20:39 +0100
commitda4e52ac3e0af04ab75ed979f44db35557028f50 (patch)
treecff29522efb5b46d75097b77217db0c6fb515207 /drivers
parentadd496c0ba9c5b894f9a5e797a654488ba9822dd (diff)
downloadlinux-da4e52ac3e0af04ab75ed979f44db35557028f50.tar.bz2
staging: ccree: document spinlock usage
Document spinlock usage to protect against concurrent access to HW register which must occur a single request at a time. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/ccree/ssi_request_mgr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c
index 65c4d9f3f262..1d9c0381059b 100644
--- a/drivers/staging/ccree/ssi_request_mgr.c
+++ b/drivers/staging/ccree/ssi_request_mgr.c
@@ -43,6 +43,9 @@ struct ssi_request_mgr_handle {
u32 req_queue_tail;
u32 axi_completed;
u32 q_free_slots;
+ /* This lock protects access to HW register
+ * that must be single request at a time
+ */
spinlock_t hw_lock;
struct cc_hw_desc compl_desc;
u8 *dummy_comp_buff;