Skip to content

Commit

Permalink
qos: Disable irq notifier when qos request is removed
Browse files Browse the repository at this point in the history
When a qos request is added with IRQ affinity, irq notifier for that irq
is added and without disabling the irq notifier if the irq is free it
throws a warning. So disable irq notifier when the qos request is
removed.

Change-Id: I50faa4ecbe1b632c0f0f203ca52faf18753c33d4
Signed-off-by: Srinivas Rao L <[email protected]>
Signed-off-by: Lina Iyer <[email protected]>
[fix checkpatch issues]
Signed-off-by: celtare21 <[email protected]>
  • Loading branch information
Srinivas Rao L authored and celtare21 committed Dec 16, 2022
1 parent f21ab7f commit 0c01510
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kernel/power/qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,16 @@ void cpu_latency_qos_remove_request(struct pm_qos_request *req)
return;
}

#ifdef CONFIG_SMP
if (req->type == PM_QOS_REQ_AFFINE_IRQ) {
int ret = 0;
/* Get the current affinity */
ret = irq_set_affinity_notifier(req->irq, NULL);
if (ret)
WARN(1, "IRQ affinity notify set failed\n");
}
#endif

trace_pm_qos_remove_request(PM_QOS_DEFAULT_VALUE);

cpu_latency_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
Expand Down

0 comments on commit 0c01510

Please sign in to comment.