linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: Warning at kernel/mutex.c
Date: Wed, 19 Oct 2011 08:46:03 +0200	[thread overview]
Message-ID: <20111019064603.GP18141@pengutronix.de> (raw)
In-Reply-To: <CAOMZO5CayjCM7FkdfHxbnyhC9d+7QTODqmNr7_xFPwkLRo8rmw@mail.gmail.com>

On Tue, Oct 18, 2011 at 04:45:51PM -0200, Fabio Estevam wrote:
> 2011/10/18 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>:
> 
> >> ?static LIST_HEAD(clocks);
> >> ?static DEFINE_MUTEX(clocks_mutex);
> >> +static DEFINE_SPINLOCK(clock_lock);
> > If clocks_mutex is unused now, please remove it. If it's not unused you
> > probably introduced a problem with your patch.
> 
> clocks_mutex is still used in clk_set_rate and clk_set_parent.
> 
> Should it be converted to spinlocks too?
>

The mutex currently used protects two things: The clock tree and the
clock registers. If we use a mutex for the parent/rate functions and
a spinlock for enable/disable we must make sure that both function sets
do not access the same registers. I *think* this is the case on all
i.MX, but I haven't really checked this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2011-10-19  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 16:43 Warning at kernel/mutex.c Fabio Estevam
2011-10-18 17:37 ` Russell King - ARM Linux
2011-10-18 18:17   ` Uwe Kleine-König
2011-10-18 18:33   ` Fabio Estevam
2011-10-18 18:40     ` Uwe Kleine-König
2011-10-18 18:45       ` Fabio Estevam
2011-10-19  6:46         ` Sascha Hauer [this message]
2011-10-19  6:54           ` Uwe Kleine-König

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=20111019064603.GP18141@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).