* [PATCH] clk: aggregate return codes of notify chains
@ 2017-03-21 10:16 Peter De Schrijver
2017-04-07 19:47 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Peter De Schrijver @ 2017-03-21 10:16 UTC (permalink / raw)
To: Peter De Schrijver, Michael Turquette, Stephen Boyd, linux-clk,
linux-kernel
In case there are multiple notify chains for the same clocks (because they
were registered by different users), we need to propagate potential failure
of any single one of them to the caller. Otherwise we eg risk violating the
V/f curve when a notifier is used for DVFS.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
drivers/clk/clk.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 67201f6..f5f2bcd 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -966,6 +966,8 @@ static int __clk_notify(struct clk_core *core, unsigned long msg,
cnd.clk = cn->clk;
ret = srcu_notifier_call_chain(&cn->notifier_head, msg,
&cnd);
+ if (ret & NOTIFY_STOP_MASK)
+ return ret;
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: aggregate return codes of notify chains
2017-03-21 10:16 [PATCH] clk: aggregate return codes of notify chains Peter De Schrijver
@ 2017-04-07 19:47 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2017-04-07 19:47 UTC (permalink / raw)
To: Peter De Schrijver; +Cc: Michael Turquette, linux-clk, linux-kernel
On 03/21, Peter De Schrijver wrote:
> In case there are multiple notify chains for the same clocks (because they
> were registered by different users), we need to propagate potential failure
> of any single one of them to the caller. Otherwise we eg risk violating the
> V/f curve when a notifier is used for DVFS.
>
> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> ---
Applied to clk-next. Let's see if anything blows up.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-07 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21 10:16 [PATCH] clk: aggregate return codes of notify chains Peter De Schrijver
2017-04-07 19:47 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).