coresight: ultrasoc-smb: Fix sleep while close preempt in enable_smb
[platform/kernel/linux-starfive.git] / drivers / hwtracing / coresight / ultrasoc-smb.h
index d2e14e8..82a44c1 100644 (file)
@@ -8,7 +8,7 @@
 #define _ULTRASOC_SMB_H
 
 #include <linux/miscdevice.h>
-#include <linux/mutex.h>
+#include <linux/spinlock.h>
 
 /* Offset of SMB global registers */
 #define SMB_GLB_CFG_REG                0x00
@@ -105,7 +105,7 @@ struct smb_data_buffer {
  * @csdev:     Component vitals needed by the framework.
  * @sdb:       Data buffer for SMB.
  * @miscdev:   Specifics to handle "/dev/xyz.smb" entry.
- * @mutex:     Control data access to one at a time.
+ * @spinlock:  Control data access to one at a time.
  * @reading:   Synchronise user space access to SMB buffer.
  * @pid:       Process ID of the process being monitored by the
  *             session that is using this component.
@@ -116,7 +116,7 @@ struct smb_drv_data {
        struct coresight_device *csdev;
        struct smb_data_buffer sdb;
        struct miscdevice miscdev;
-       struct mutex mutex;
+       spinlock_t spinlock;
        bool reading;
        pid_t pid;
        enum cs_mode mode;