linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 4/5] clk: per-user clock accounting for debug
Date: Fri, 27 Jun 2014 16:51:31 -0600	[thread overview]
Message-ID: <53ADF573.8000609@wwwdotorg.org> (raw)
In-Reply-To: <53ADF3C8.2060702@wwwdotorg.org>

On 06/27/2014 04:44 PM, Stephen Warren wrote:
> On 06/27/2014 01:57 AM, Tomeu Vizoso wrote:
>> From: Rabin Vincent <rabin.vincent@stericsson.com>
>>
>> When a clock has multiple users, the WARNING on imbalance of
>> enable/disable may not show the guilty party since although they may
>> have commited the error earlier, the warning is emitted later when some
>> other user, presumably innocent, disables the clock.
>>
>> Provide per-user clock enable/disable accounting and disabler tracking
>> in order to help debug these problems.

>> diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
>> index 91659b2..9657fc8 100644
>> --- a/include/linux/clk-private.h
>> +++ b/include/linux/clk-private.h
>> @@ -56,7 +56,11 @@ struct clk_core {
>>  };
>>  
>>  struct clk {
>> -	struct clk_core clk;
>> +	struct clk_core	*core;
>> +	unsigned int	enable_count;
>> +	const char	*dev_id;
>> +	const char	*con_id;
> 
> Why not just store the "struct device *" there instead of pulling the
> name out of it, so ...

Oh, perhaps I'm confused here. These are the names that are used to look
up the clock, not the name of the device that looked it up.

It might still be nice to store the "struct device *" as well as the
clock name parameters.

  reply	other threads:[~2014-06-27 22:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27  7:57 [RFC 0/5] Per-user clock constraints Tomeu Vizoso
2014-06-27  7:57 ` [RFC 1/5] clk: Add temporary mapping to the existing API Tomeu Vizoso
2014-06-27  7:57 ` [RFC 3/5] clk: use struct clk only for external API Tomeu Vizoso
2014-06-27 22:37   ` Stephen Warren
2014-06-30 19:43     ` Rabin Vincent
2014-06-27  7:57 ` [RFC 4/5] clk: per-user clock accounting for debug Tomeu Vizoso
2014-06-27 22:44   ` Stephen Warren
2014-06-27 22:51     ` Stephen Warren [this message]
2014-06-30 19:49     ` Rabin Vincent
2014-06-27  7:57 ` [RFC 5/5] clk: Add floor and ceiling constraints to clock rates Tomeu Vizoso
2014-06-27 22:57   ` Stephen Warren
2014-06-27 23:10     ` Thierry Reding
2014-07-03 14:02     ` Tomeu Vizoso
2014-06-27 22:30 ` [RFC 0/5] Per-user clock constraints Stephen Warren

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=53ADF573.8000609@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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).