Skip to content

Commit

Permalink
HSD #14014535834: firmware: stratix10-svc: stop kernel thread once
Browse files Browse the repository at this point in the history
service is completed

Stop the service layer's kernel thread to save the CPU resources, whenever
the service layer's client completes its service.

Signed-off-by: Richard Gong <[email protected]>
  • Loading branch information
rgongatintel committed Jul 21, 2021
1 parent f97d69c commit 9dddce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/firmware/stratix10-svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,8 @@ EXPORT_SYMBOL_GPL(stratix10_svc_send);
*/
void stratix10_svc_done(struct stratix10_svc_chan *chan)
{
/* stop thread when thread is running AND only one active client */
if (chan->ctrl->task && chan->ctrl->num_active_client <= 1) {
/* stop thread when thread is running */
if (chan->ctrl->task) {
pr_debug("svc_smc_hvc_shm_thread is stopped\n");
kthread_stop(chan->ctrl->task);
chan->ctrl->task = NULL;
Expand Down

0 comments on commit 9dddce1

Please sign in to comment.