From: Stephen Boyd <sboyd@codeaurora.org>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-clk@vger.kernel.org, mturquette@baylibre.com,
linux-omap@vger.kernel.org, tony@atomide.com
Subject: Re: [PATCH 04/27] clk: ti: clkctrl: use fallback udelay approach if timekeeping is suspended
Date: Mon, 6 Nov 2017 14:18:47 -0800 [thread overview]
Message-ID: <20171106221847.GB22441@codeaurora.org> (raw)
In-Reply-To: <3249933f-7f37-a6c9-ed0c-58d40f06578b@ti.com>
On 11/06, Tero Kristo wrote:
> On 03/11/17 17:43, Stephen Boyd wrote:
> >On 10/30, Tero Kristo wrote:
> >>@@ -90,7 +91,7 @@ static bool _omap4_is_ready(u32 val)
> >> static bool _omap4_is_timeout(union omap4_timeout *time, u32 timeout)
> >> {
> >>- if (unlikely(_early_timeout)) {
> >>+ if (unlikely(_early_timeout || timekeeping_suspended)) {
> >> if (time->cycles++ < timeout) {
> >
> >This would be the second user of timekeeping_suspended outside of
> >timekeeping core. Why don't we just udelay(1) every time we call
> >this function? The loop on ktime without any sort of delay in it
> >may actually spin faster, especially because we can't get
> >interrupted here (irqs are off). And irqs + preemption enabled is
> >typically where you would want to use ktime instead of counting
> >udelay() calls to see if you hit a timeout.
>
> It actually was originally just udelay() but I changed it to use the
> ktime_get() approach way back due to comments provided on some early
> revisions of this patch. See:
> https://patchwork.kernel.org/patch/7884371/
>
Ok, so we use ktime to spin faster on the bit than udelay() would
allow us to. That looks to be on purpose because udelay(1) is too
long between bit checks.
What is causing us to call this path after timekeeping has been
suspended? Please add some more specifics to the commit text so
we know exactly where it's happening. Also add a comment above
the if statement describing why we're checking the variable so it
isn't buried in commit text somewhere and Cc timekeeping
maintainers on the patch please.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-11-06 22:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 13:04 [PATCH 00/27] clk: ti: clkctrl fixes and support for additional SoCs Tero Kristo
2017-10-30 13:04 ` [PATCH 01/27] clk: ti: clkctrl: fix error messages to print out node name properly Tero Kristo
2017-10-30 20:45 ` Sebastian Reichel
2017-10-30 13:04 ` [PATCH 02/27] clk: ti: clkctrl: add support for clkdm init for clkctrl clocks Tero Kristo
2017-10-30 13:04 ` [PATCH 03/27] clk: ti: add support for clkctrl aliases Tero Kristo
2017-11-03 15:27 ` Stephen Boyd
2017-11-06 7:46 ` Tero Kristo
2017-11-06 22:07 ` Stephen Boyd
2017-10-30 13:04 ` [PATCH 04/27] clk: ti: clkctrl: use fallback udelay approach if timekeeping is suspended Tero Kristo
2017-11-03 15:43 ` Stephen Boyd
2017-11-06 7:33 ` Tero Kristo
2017-11-06 22:18 ` Stephen Boyd [this message]
2017-11-07 7:06 ` Tero Kristo
2017-10-30 13:04 ` [PATCH 05/27] clk: ti: clkctrl: add support for retrying failed init Tero Kristo
2017-11-03 17:04 ` Stephen Boyd
2017-11-06 7:42 ` Tero Kristo
2017-10-30 13:04 ` [PATCH 06/27] clk: ti: clkctrl: fix flags for mux and divider opt clocks Tero Kristo
2017-10-30 13:04 ` [PATCH 07/27] clk: ti: omap4: cleanup unnecessary clock aliases Tero Kristo
2017-10-30 13:04 ` [PATCH 08/27] clk: ti: dra7: drop " Tero Kristo
2017-10-30 13:04 ` [PATCH 09/27] clk: ti: omap5: cleanup " Tero Kristo
2017-10-30 13:04 ` [PATCH 10/27] clk: ti: dm814x: " Tero Kristo
2017-10-30 13:04 ` [PATCH 11/27] clk: ti: dm816x: " Tero Kristo
2017-10-30 13:04 ` [PATCH 12/27] clk: ti: am33xx: " Tero Kristo
2017-10-30 13:04 ` [PATCH 13/27] clk: ti: am43xx: " Tero Kristo
2017-10-30 13:04 ` [PATCH 14/27] clk: ti: omap3: " Tero Kristo
2017-10-30 13:04 ` [PATCH 15/27] dt-bindings: clk: add omap5 clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 16/27] clk: ti: omap5: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 17/27] dt-bindings: clk: add dra7 clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 18/27] clk: ti: dra7: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 19/27] dt-bindings: clk: add am33xx clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 20/27] clk: ti: am33xx: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 21/27] dt-bindings: clk: add am43xx clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 22/27] clk: ti: am43xx: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 23/27] dt-bindings: clk: add dm814 clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 24/27] clk: ti: dm814: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 25/27] dt-bindings: clk: add dm816 clkctrl definitions Tero Kristo
2017-10-30 13:04 ` [PATCH 26/27] clk: ti: dm816: add clkctrl clock data Tero Kristo
2017-10-30 13:04 ` [PATCH 27/27] clk: ti: omap4: clkctrl data fixes for opt-clocks Tero Kristo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171106221847.GB22441@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=t-kristo@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).