From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC,PATCH 1/2] Add a common struct clk
Date: Wed, 16 Jun 2010 22:16:45 +0100 [thread overview]
Message-ID: <20100616211645.GC30005@fluff.org.uk> (raw)
In-Reply-To: <20100614094310.GE12159@pengutronix.de>
On Mon, Jun 14, 2010 at 11:43:10AM +0200, Uwe Kleine-K?nig wrote:
> On Mon, Jun 14, 2010 at 11:30:08AM +0200, Lothar Wa?mann wrote:
> > Benjamin Herrenschmidt writes:
> > > On Mon, 2010-06-14 at 08:39 +0200, Lothar Wa?mann wrote:
> > > > All implementations so far use spin_lock_irq_save()!
> > >
> > > Nothing prevents your implementation to be a tad smarter.
> > >
> > I vote for consistency, so that device drivers can be kept arch
> > independent instead of having to care about implentation details of
> > each arch.
> Back when I implemented clock support for ns9xxx (unfortunately not in
> mainline) I tried with a spinlock first and later switched to a mutex.
> IIRC the reason was that on ns9215 enabling the rtc clock took long
> (don't remember a number) and successfull enabling was signaled by an
> irq. So I would have had to implement irq polling in the clock code.
Ok, you could have implemented a lock ot update the state, then had
some form of wake-queue to wake up the task once it did.
> I think you can find different examples that make both possiblities bad.
> All in all I think that a sleeping clock implementation is preferable as
> it improves (general) latencies.
It may be that we need to do a bit of work on some of the drivers to
ensure that they don't fully re-set their clocks until they are able
to sleep.
--
Ben (ben at fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben-linux@fluff.org>
To: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Lothar Wa?mann <LW@KARO-electronics.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jeremy Kerr <jeremy.kerr@canonical.com>,
Ben Dooks <ben-linux@fluff.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC,PATCH 1/2] Add a common struct clk
Date: Wed, 16 Jun 2010 22:16:45 +0100 [thread overview]
Message-ID: <20100616211645.GC30005@fluff.org.uk> (raw)
In-Reply-To: <20100614094310.GE12159@pengutronix.de>
On Mon, Jun 14, 2010 at 11:43:10AM +0200, Uwe Kleine-K?nig wrote:
> On Mon, Jun 14, 2010 at 11:30:08AM +0200, Lothar Wa?mann wrote:
> > Benjamin Herrenschmidt writes:
> > > On Mon, 2010-06-14 at 08:39 +0200, Lothar Wa?mann wrote:
> > > > All implementations so far use spin_lock_irq_save()!
> > >
> > > Nothing prevents your implementation to be a tad smarter.
> > >
> > I vote for consistency, so that device drivers can be kept arch
> > independent instead of having to care about implentation details of
> > each arch.
> Back when I implemented clock support for ns9xxx (unfortunately not in
> mainline) I tried with a spinlock first and later switched to a mutex.
> IIRC the reason was that on ns9215 enabling the rtc clock took long
> (don't remember a number) and successfull enabling was signaled by an
> irq. So I would have had to implement irq polling in the clock code.
Ok, you could have implemented a lock ot update the state, then had
some form of wake-queue to wake up the task once it did.
> I think you can find different examples that make both possiblities bad.
> All in all I think that a sleeping clock implementation is preferable as
> it improves (general) latencies.
It may be that we need to do a bit of work on some of the drivers to
ensure that they don't fully re-set their clocks until they are able
to sleep.
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
next prev parent reply other threads:[~2010-06-16 21:16 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 7:30 [RFC,PATCH 0/2] Common struct clk implementation, v4 Jeremy Kerr
2010-06-04 7:30 ` Jeremy Kerr
2010-06-04 7:30 ` [RFC,PATCH 1/2] Add a common struct clk Jeremy Kerr
2010-06-04 7:30 ` Jeremy Kerr
2010-06-11 4:20 ` Ben Dooks
2010-06-11 4:20 ` Ben Dooks
2010-06-11 6:50 ` Benjamin Herrenschmidt
2010-06-11 6:50 ` Benjamin Herrenschmidt
2010-06-11 7:57 ` Jeremy Kerr
2010-06-11 7:57 ` Jeremy Kerr
2010-06-11 8:14 ` Lothar Waßmann
2010-06-11 8:14 ` Lothar Waßmann
2010-06-11 9:18 ` Jeremy Kerr
2010-06-11 9:18 ` Jeremy Kerr
2010-06-11 9:23 ` Lothar Waßmann
2010-06-11 9:23 ` Lothar Waßmann
2010-06-11 9:58 ` Uwe Kleine-König
2010-06-11 9:58 ` Uwe Kleine-König
2010-06-11 10:08 ` Lothar Waßmann
2010-06-11 10:08 ` Lothar Waßmann
2010-06-11 10:50 ` Jeremy Kerr
2010-06-11 10:50 ` Jeremy Kerr
2010-06-12 5:14 ` Benjamin Herrenschmidt
2010-06-12 5:14 ` Benjamin Herrenschmidt
2010-06-14 6:39 ` Lothar Waßmann
2010-06-14 6:39 ` Lothar Waßmann
2010-06-14 6:40 ` Uwe Kleine-König
2010-06-14 6:40 ` Uwe Kleine-König
2010-06-14 6:52 ` Lothar Waßmann
2010-06-14 6:52 ` Lothar Waßmann
2010-06-14 9:34 ` Uwe Kleine-König
2010-06-14 9:34 ` Uwe Kleine-König
2010-06-16 21:14 ` Ben Dooks
2010-06-16 21:14 ` Ben Dooks
2010-06-16 21:13 ` Ben Dooks
2010-06-16 21:13 ` Ben Dooks
2010-06-14 9:22 ` Benjamin Herrenschmidt
2010-06-14 9:22 ` Benjamin Herrenschmidt
2010-06-14 9:30 ` Lothar Waßmann
2010-06-14 9:30 ` Lothar Waßmann
2010-06-14 9:43 ` Uwe Kleine-König
2010-06-14 9:43 ` Uwe Kleine-König
2010-06-16 21:16 ` Ben Dooks [this message]
2010-06-16 21:16 ` Ben Dooks
2010-06-16 23:33 ` Benjamin Herrenschmidt
2010-06-16 23:33 ` Benjamin Herrenschmidt
2010-06-13 22:27 ` Ben Dooks
2010-06-13 22:27 ` Ben Dooks
2010-06-11 14:11 ` Uwe Kleine-König
2010-06-11 14:11 ` Uwe Kleine-König
2010-06-12 5:12 ` Benjamin Herrenschmidt
2010-06-12 5:12 ` Benjamin Herrenschmidt
2010-06-12 5:10 ` Benjamin Herrenschmidt
2010-06-12 5:10 ` Benjamin Herrenschmidt
2010-06-13 22:25 ` Ben Dooks
2010-06-13 22:25 ` Ben Dooks
2010-06-13 22:23 ` Ben Dooks
2010-06-13 22:23 ` Ben Dooks
2010-06-14 3:10 ` Jeremy Kerr
2010-06-14 3:10 ` Jeremy Kerr
2010-09-10 2:10 ` Jeremy Kerr
2010-09-10 2:10 ` Jeremy Kerr
2010-06-14 10:18 ` Jeremy Kerr
2010-06-14 10:18 ` Jeremy Kerr
2010-06-04 7:30 ` [RFC,PATCH 2/2] clk: Generic support for fixed-rate clocks Jeremy Kerr
2010-06-04 7:30 ` Jeremy Kerr
-- strict thread matches above, loose matches on Subject: below --
2010-06-02 11:56 [RFC,PATCH 0/2] Common struct clk implementation, v3 Jeremy Kerr
2010-06-02 11:56 ` [RFC,PATCH 1/2] Add a common struct clk Jeremy Kerr
2010-06-02 11:56 ` Jeremy Kerr
2010-06-02 12:03 ` Ben Dooks
2010-06-02 12:03 ` Ben Dooks
2010-06-03 3:21 ` Jeremy Kerr
2010-06-03 3:21 ` Jeremy Kerr
2010-06-03 8:13 ` Ben Dooks
2010-06-03 8:13 ` Ben Dooks
2010-06-03 10:24 ` Jeremy Kerr
2010-06-03 10:24 ` Jeremy Kerr
2010-06-03 11:05 ` Russell King - ARM Linux
2010-06-03 11:05 ` Russell King - ARM Linux
2010-06-04 0:06 ` Ben Dooks
2010-06-04 0:06 ` Ben Dooks
2010-06-04 1:43 ` Jeremy Kerr
2010-06-04 1:43 ` Jeremy Kerr
2010-06-04 1:40 ` Jeremy Kerr
2010-06-04 1:40 ` Jeremy Kerr
2010-06-03 21:09 ` Ryan Mallon
2010-06-03 21:09 ` Ryan Mallon
2010-06-03 23:45 ` Ben Dooks
2010-06-03 23:45 ` Ben Dooks
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=20100616211645.GC30005@fluff.org.uk \
--to=ben-linux@fluff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.