linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-kernel@lists.codethink.co.uk,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] power: clock_ops.c: fixup clk prepare/unprepare count
Date: Mon, 13 Jan 2014 06:28:23 +0000	[thread overview]
Message-ID: <52D38787.5030505@codethink.co.uk> (raw)
In-Reply-To: <2133074.4EFCIDJZXE@avalon>

On 12/01/14 22:04, Laurent Pinchart wrote:
> Hi Ben,
>
> Thank you for the patch.
>
> On Saturday 11 January 2014 13:05:38 Ben Dooks wrote:
>> The drivers/base/power/clock_ops.c file is causing warnings from
>> the clock driver (as shown below) due to failing to do a clk_prepare()
>> call before enabling a clock. It also fails to check the balance of
>> prepare/unprepare as __pm_clk_remove() do clk_disable_unprepare() call.
>>
>> This bug has probably been in since commit b2476490e ("clk: introduce
>> the common clock framework") as the warning was part of the original
>> commit. It is strange that it has not been noticed (although this has
>> also been coupled with a failure for certain SH builds to not build the
>> necessary glue to use this method of controlling the clocks).
>>
>> In summary, this is probably needed in several stable branches but need
>> advice on which ones.
>>
>> On the Renesas Lager board, this causes numerous warnings of the following
>> and even worse the clock system will not enable clocks, causing drivers
>> that are in development to fail to work:
>>
>> WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:883 __clk_enable+0x2c/0xa0()
>
> I've never noticed this on Lager, probably because Lager multiplatform doesn't
> make use of clock_ops.c as drivers/sh/pm_runtime.c (which you addressed in
> another patch that I've also replied to). I'm thus not sure we need to apply
> this as a fix and backport it to stable branches.

Yes, it seems that a lot of the lager drivers assume that this support
is there, and the work seems to have been sponsored by Renesas.

I think there must be people still building the old style of kernel
as there is still work going on for board-lager.c which leads me to
being a bit surprised that no-one had noticed this (as it isn't as
if it produces a pile of warnings on the console output).

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  reply	other threads:[~2014-01-13  6:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11 13:05 [PATCH 1/3] power: clock_ops.c: fixup clk prepare/unprepare count Ben Dooks
2014-01-11 13:05 ` [PATCH 2/3] power: clock_ops.c: check return of clk_enable() in pm_clk_resume() Ben Dooks
2014-01-13 19:55   ` Rafael J. Wysocki
2014-01-14 12:02     ` Ben Dooks
2014-01-11 13:05 ` [PATCH 3/3] power: clock_ops.c: report clock errors from clk_enable() Ben Dooks
2014-01-12 22:04 ` [PATCH 1/3] power: clock_ops.c: fixup clk prepare/unprepare count Laurent Pinchart
2014-01-13  6:28   ` Ben Dooks [this message]
2014-01-13  8:50     ` Geert Uytterhoeven
2014-01-13  9:21       ` Ben Dooks
     [not found] <1389702222-17260-1-git-send-email-ben.dooks@codethink.co.uk>
2014-01-14 12:23 ` Ben Dooks
2014-01-16  1:08   ` Rafael J. Wysocki

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=52D38787.5030505@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    /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).