linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: clockdomain: disabling unused clks
Date: Thu, 8 Nov 2012 17:17:38 -0800	[thread overview]
Message-ID: <20121109011738.17381.88199@nucleus> (raw)
In-Reply-To: <alpine.DEB.2.00.1211090052100.20703@utopia.booyaka.com>

Quoting Paul Walmsley (2012-11-08 16:58:21)
> On Thu, 8 Nov 2012, Mike Turquette wrote:
> 
> > The OMAP port to the common clk framework[1] resulted in spurious WARNs
> > while disable unused clocks.  This is due to _clkdm_clk_hwmod_disable
> > catching clkdm->usecount's with a value of zero.  Even less desirable it
> > would not allow the clkdm_clk_disable function pointer to get called due
> > to an early return of -ERANGE.
> > 
> > This patch adds a check for such a corner case by skipping the WARN and
> > early return in the event that clkdm->usecount and clk->enable_usecount
> > are both zero.  Presumably this could only happen during the check for
> > unused clocks at boot-time.
> > 
> > [1] http://article.gmane.org/gmane.linux.ports.arm.omap/88824
> > 
> > Signed-off-by: Mike Turquette <mturquette@ti.com>
> 
> I don't think this is going to work, as it currently stands.  The code 
> will just bypass the warning and the error return.  The clockdomain 
> usecount still will be decremented, which is going to cause problems since 
> the usecount will be inaccurate.
> 

You're right.  In my rush I glossed over the clkdm decrement part.  In
light of the suspend/resume issues I'm not sure this approach is really
valid.  I think getting to the bottom of those issues will give the
final word.

Regards,
Mike

> 
> - Paul

  reply	other threads:[~2012-11-09  1:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1352337181-29427-1-git-send-email-mturquette@ti.com>
2012-11-08  1:31 ` [PATCH v2 00/26] Move OMAP2+ over to common clk framework Mike Turquette
2012-11-08  1:42   ` Tony Lindgren
2012-11-08  1:54     ` Mike Turquette
2012-11-08  2:50       ` Paul Walmsley
     [not found] ` <1352337181-29427-15-git-send-email-mturquette@ti.com>
2012-11-08 18:08   ` [PATCH 14/26] ARM: OMAP3: clock: Add 3xxx data using common struct clk Paul Walmsley
2012-11-08 21:52     ` Mike Turquette
2012-11-08 22:01     ` Paul Walmsley
2012-11-09  0:11       ` Paul Walmsley
2012-11-09  0:33         ` Paul Walmsley
2012-11-09  0:49           ` Paul Walmsley
2012-11-09  0:57         ` Mike Turquette
2012-11-08 23:31     ` [PATCH] ARM: OMAP2+: clockdomain: disabling unused clks Mike Turquette
2012-11-09  0:58       ` Paul Walmsley
2012-11-09  1:17         ` Mike Turquette [this message]
2012-11-09 19:06           ` Paul Walmsley
2012-11-09 19:08             ` Paul Walmsley
2012-11-09 19:40               ` Mike Turquette
2012-11-09 19:52                 ` Paul Walmsley
2012-11-09 20:53                   ` Paul Walmsley
2012-11-09 21:12 ` [PATCH v2 00/26] Move OMAP2+ over to common clk framework Paul Walmsley
2012-11-09 22:09   ` Tony Lindgren
2012-11-09 22:18   ` Mike Turquette
2012-11-09 23:47     ` Paul Walmsley
2012-11-12 21:50 ` [PATCH] ARM: OMAP3+: DPLL: drop !CONFIG_COMMON_CLK sections Paul Walmsley
2012-11-12 22:30   ` Mike Turquette
     [not found] ` <1352337181-29427-16-git-send-email-mturquette@ti.com>
     [not found]   ` <alpine.DEB.2.00.1211081532210.20703@utopia.booyaka.com>
2012-11-09 20:32     ` [PATCH 15/26] ARM: omap2: clock: Add 24xx data using common struct clk Paul Walmsley
2012-11-09 21:05       ` Mike Turquette
2012-11-09 21:22         ` Paul Walmsley
2012-11-09 22:21           ` Mike Turquette
2012-11-12 22:13   ` Paul Walmsley
     [not found] ` <1352337181-29427-3-git-send-email-mturquette@ti.com>
2012-11-12 22:15   ` [PATCH 02/26] ARM: OMAP: hwmod: Fix up hwmod based clkdm accesses Paul Walmsley
     [not found] ` <1352337181-29427-8-git-send-email-mturquette@ti.com>
2012-11-12 23:00   ` [PATCH 07/26] ARM: OMAP: clock: list all clk_hw_omap clks to enable/disable autoidle Paul Walmsley
     [not found] ` <1352337181-29427-9-git-send-email-mturquette@ti.com>
2012-11-12 23:01   ` [PATCH 08/26] ARM: OMAP: clock: Define a function to enable clocks at init Paul Walmsley
     [not found] ` <1352337181-29427-13-git-send-email-mturquette@ti.com>
2012-11-13  1:37   ` [PATCH 12/26] ARM: OMAP4: clock: Add 44xx data using common struct clk Paul Walmsley
2012-11-13  2:16     ` Paul Walmsley
     [not found] ` <1352337181-29427-4-git-send-email-mturquette@ti.com>
2012-11-13  2:17   ` [PATCH 03/26] ARM: OMAP4: clock: Convert to common clk Paul Walmsley

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=20121109011738.17381.88199@nucleus \
    --to=mturquette@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).