mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
misc: fastrpc: do not interrupt kernel calls
the DSP firmware requires some calls to be held until processing has completed: this is to guarantee that memory continues to be accessible. Nevertheless, the fastrpc driver chooses not support the case were requests need to be held for unbounded amounts of time. If such a use-case becomes necessary, this timeout will need to be revisited. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20191009144123.24583-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2d10d2d170
commit
55bcda3558
@ -959,8 +959,13 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
/* Wait for remote dsp to respond or time out */
|
||||
err = wait_for_completion_interruptible(&ctx->work);
|
||||
if (kernel) {
|
||||
if (!wait_for_completion_timeout(&ctx->work, 10 * HZ))
|
||||
err = -ETIMEDOUT;
|
||||
} else {
|
||||
err = wait_for_completion_interruptible(&ctx->work);
|
||||
}
|
||||
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user