linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC,PATCH 1/7] arm: add a common struct clk
Date: Fri, 8 Jan 2010 12:59:34 +0000	[thread overview]
Message-ID: <20100108125934.GA27567@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1262951103.585.40.camel@pasglop>

On Fri, Jan 08, 2010 at 10:45:03PM +1100, Benjamin Herrenschmidt wrote:
> I don't think Jeremy (again he will have to confirm) is aiming toward a
> common implementation of the entire clock subsystem. The idea is that
> the struct clk is a clock object. You can have many struct clk, they can
> have many different capabilities and features.

Taking the two machine types that are most likely to want to use this:

On PXA, there are 67 struct clk's, each of which has a single pointer
to an operations structure.  Each operations structure is three pointers
and there are 11 such structures.  That's 67 * 4 + 11 * 12 = 400 bytes.
PXA is simple enough that these operations structures can be swallowed
up into this struct clk.  So, switching PXA to this will mean 67 * 32 =
2144 bytes.  That's an increase in overhead of 5x.

On OMAP, there are 16 clkops structures of 16 bytes each, and each
struct clk has a pointer to this structure.  Due to the way OMAP works,
these can't be directly called from the proposed generic version
because of the additional clock domain/power domain code, so we can
discount these.

There are two function pointers in the struct clk which would be
identical to the versions proposed in this generic struct clk.
There's a total of 219 clk structures in OMAP3.  So, 219 * (4 + 8)
= 2628.  Switching OMAP means 219 * (4 + 32) = 7884, which is an
increase in overhead of 3x.

This is the problem - you can have "generic" versions of stuff provided
you're willing to put up with the additional overhead that comes with
it.

  reply	other threads:[~2010-01-08 12:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 23:44 [RFC,PATCH 1/7] arm: add a common struct clk Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 3/7] arm/versatile: use generic " Jeremy Kerr
2010-01-07 23:44 ` [RFC, PATCH 6/7] arm/icst307: use common struct clk, unify realview and versatile clocks Jeremy Kerr
2010-01-08  1:11   ` H Hartley Sweeten
2010-01-08  1:35     ` Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 4/7] arm/versatile: remove oscoff from clk_versatile Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 2/7] arm: generic support for fixed-rate clocks Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 7/7] arm/icst307: remove icst307_ps_to_vco Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 5/7] arm/realview: use generic struct clk Jeremy Kerr
2010-01-08  0:30 ` [RFC,PATCH 1/7] arm: add a common " H Hartley Sweeten
2010-01-08  1:20   ` Jeremy Kerr
2010-01-08  3:26     ` Jeremy Kerr
2010-01-08  9:42       ` Russell King - ARM Linux
2010-01-08 10:01         ` Benjamin Herrenschmidt
2010-01-08 11:18           ` Russell King - ARM Linux
2010-01-08 11:45             ` Benjamin Herrenschmidt
2010-01-08 12:59               ` Russell King - ARM Linux [this message]
2010-01-08 19:45                 ` Benjamin Herrenschmidt
2010-01-11  3:37         ` Jeremy Kerr
2010-01-12  8:00           ` Francesco VIRLINZI
2010-01-12  8:50             ` Benjamin Herrenschmidt
2010-01-08 16:25       ` H Hartley Sweeten
2010-01-08 19:33         ` Benjamin Herrenschmidt
2010-01-08  1:17 ` Benjamin Herrenschmidt
2010-01-08  1:38   ` Jeremy Kerr
2010-01-11  5:38     ` Jeremy Kerr
2010-01-11 10:46       ` Mark Brown
2010-01-11 19:48         ` Benjamin Herrenschmidt

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=20100108125934.GA27567@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).