|
@@ -3230,6 +3230,10 @@ read_async_job:
|
|
|
err = -EBADF;
|
|
|
goto bail;
|
|
|
}
|
|
|
+ if (fl->exit_async) {
|
|
|
+ err = -EFAULT;
|
|
|
+ goto bail;
|
|
|
+ }
|
|
|
VERIFY(err, 0 == (err = interrupted));
|
|
|
if (err)
|
|
|
goto bail;
|
|
@@ -3312,6 +3316,10 @@ read_notif_status:
|
|
|
err = -EBADF;
|
|
|
goto bail;
|
|
|
}
|
|
|
+ if (fl->exit_notif) {
|
|
|
+ err = -EFAULT;
|
|
|
+ goto bail;
|
|
|
+ }
|
|
|
VERIFY(err, 0 == (err = interrupted));
|
|
|
if (err)
|
|
|
goto bail;
|
|
@@ -5900,6 +5908,8 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
|
|
|
fl->dsp_process_state = PROCESS_CREATE_DEFAULT;
|
|
|
fl->is_unsigned_pd = false;
|
|
|
fl->is_compat = false;
|
|
|
+ fl->exit_notif = false;
|
|
|
+ fl->exit_async = false;
|
|
|
init_completion(&fl->work);
|
|
|
fl->file_close = FASTRPC_PROCESS_DEFAULT_STATE;
|
|
|
filp->private_data = fl;
|
|
@@ -6109,6 +6119,7 @@ int fastrpc_internal_control(struct fastrpc_file *fl,
|
|
|
struct fastrpc_apps *me = &gfa;
|
|
|
int sessionid = 0;
|
|
|
u32 silver_core_count = me->silvercores.corecount, ii = 0, cpu;
|
|
|
+ unsigned long flags = 0;
|
|
|
|
|
|
VERIFY(err, !IS_ERR_OR_NULL(fl) && !IS_ERR_OR_NULL(fl->apps));
|
|
|
if (err) {
|
|
@@ -6209,6 +6220,20 @@ int fastrpc_internal_control(struct fastrpc_file *fl,
|
|
|
case FASTRPC_CONTROL_SMMU:
|
|
|
fl->sharedcb = cp->smmu.sharedcb;
|
|
|
break;
|
|
|
+ case FASTRPC_CONTROL_ASYNC_WAKE:
|
|
|
+ fl->exit_async = true;
|
|
|
+ spin_lock_irqsave(&fl->aqlock, flags);
|
|
|
+ atomic_add(1, &fl->async_queue_job_count);
|
|
|
+ wake_up_interruptible(&fl->async_wait_queue);
|
|
|
+ spin_unlock_irqrestore(&fl->aqlock, flags);
|
|
|
+ break;
|
|
|
+ case FASTRPC_CONTROL_NOTIF_WAKE:
|
|
|
+ fl->exit_notif = true;
|
|
|
+ spin_lock_irqsave(&fl->proc_state_notif.nqlock, flags);
|
|
|
+ atomic_add(1, &fl->proc_state_notif.notif_queue_count);
|
|
|
+ wake_up_interruptible(&fl->proc_state_notif.notif_wait_queue);
|
|
|
+ spin_unlock_irqrestore(&fl->proc_state_notif.nqlock, flags);
|
|
|
+ break;
|
|
|
default:
|
|
|
err = -EBADRQC;
|
|
|
break;
|