Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dad847b7 authored by Deepak Kumar Singh's avatar Deepak Kumar Singh
Browse files

rpmsg: glink: Use IRQF_NO_SUSPEND and pm_system_wakeup() for glink irq



Glink irq should be wakeup capable, to achieve this irq is marked
with enable_irq_wake().

There are some use cases where glink communication is required in system
suspend path and glink interrupt handler needs to be run immediately.
But wakeup cpabale interrupts even if received during suspend will not
run immediately, this will be marked pending and run when system resumes
from suspend. In such scenario there can be a potential deadock in suspend
path due to any irq thread which is waiting for glink interrupt completion
while glink interrupt cannot be handled immediately.

One such use case is usb plugin interrupt received during suspend, which
calls regulator api to communicate with rpm over glink and waits for rpm
ack. RPM ack cannot be processed because glink interrupt received from rpm
goes in pending state. Suspend path is blocked because regulator irq thread
is still waiting.

So there is requirement to run glink interrupt handler in suspend path at
the same time making it wakeup capable. IRQ frameworks forbids usage of
both IRQF_NO_SUSPEND and enable_irq_wake() together. This patch adds
IRQF_NO_SUSPEND and pm_system_wakeup() for glink irq to implement this
requirement.

Change-Id: I1da199c9e10c640bb84d00e569c4fafc5c104d24
Signed-off-by: default avatarDeepak Kumar Singh <deesin@codeaurora.org>
parent 7141e265
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment