linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@baylibre.com (Michael Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PM / OPP: fix debugfs files for 64-bit
Date: Tue, 20 Oct 2015 03:22:55 -0700	[thread overview]
Message-ID: <20151020102255.20687.72485@quantum> (raw)
In-Reply-To: <20151019155310.GO32532@n2100.arm.linux.org.uk>

Quoting Russell King - ARM Linux (2015-10-19 08:53:11)
> On Mon, Oct 19, 2015 at 08:40:09AM -0700, Michael Turquette wrote:
> > Quoting Viresh Kumar (2015-10-08 00:48:28)
> > > On 07-10-15, 21:12, Arnd Bergmann wrote:
> > > > I think it clearly makes sense to have a fixed length for each of these
> > > > members:
> > > >
> > > > either 32 bit is enough to represent all possible values, then
> > > > there is no need to make them 'long' on 64-bit architectures, or 32 bit
> > > > is not enough and then the code is broken on 32-bit architectures today
> > > > and should be fixed.
> > > 
> > > I agree.
> > > 
> > > But I am not 100% sure why it was done this way to start with.
> > > Probably this is the logic behind that:
> > > - Max clock rate supported by a u32 is ~ 4.295 GHz
> 
> The limit is actually half that when you consider clk_round_rate()
> returns a long, because clk_round_rate() needs to be able to return
> errors.
> 
> The use of long and unsigned long was done in the knowledge that it'd
> restrict to 2GHz the upper limit, partially because 64-bit math on
> 32-bit systems is inefficient and expensive, and I initially wanted
> people to use the thing, so it had to be lean and fast.  (If I'd
> started out with something as complex as the CCF, it would've been
> laughed out as being "far too complex" and "we don't need this").
> 
> It also started out as a way to convey clock information to drivers
> for peripherals, which commonly don't need clocks up in the GHz range,
> indeed, it was rare at that time the API was designed for peripheral
> clocks to be much above 100MHz.

And this is still very true today. We've had a few instances where
platforms hit the 2GHz limit on a PLL feeding a divider to a CPU, but
the current state of things is working for the common case.

The big question is whether to change it in anticipation of higher clock
rates (somebody has to drive those THz transceivers and photonic
interconnects!) or just wait until enough people start screaming.

Regards,
Mike

> 
> -- 
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.

  reply	other threads:[~2015-10-20 10:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07  7:35 [PATCH] PM / OPP: fix debugfs files for 64-bit Arnd Bergmann
2015-10-07 10:59 ` Viresh Kumar
2015-10-07 11:03   ` Viresh Kumar
2015-10-07 11:07     ` Greg Kroah-Hartman
2015-10-07 11:21       ` Viresh Kumar
2015-10-07 12:57         ` Greg Kroah-Hartman
2015-10-07 13:03           ` Viresh Kumar
2015-10-07 17:19             ` Greg Kroah-Hartman
2015-10-07 17:27               ` Viresh Kumar
2015-10-07 17:39                 ` Greg Kroah-Hartman
2015-10-07 18:00                   ` Viresh Kumar
2015-10-07 19:12             ` Arnd Bergmann
2015-10-08  7:48               ` Viresh Kumar
2015-10-08 14:25                 ` Alan Stern
2015-10-19 15:40                 ` Michael Turquette
2015-10-19 15:53                   ` Russell King - ARM Linux
2015-10-20 10:22                     ` Michael Turquette [this message]
2015-10-07 16:33         ` Russell King - ARM Linux
2015-10-07 16:36           ` Viresh Kumar

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=20151020102255.20687.72485@quantum \
    --to=mturquette@baylibre.com \
    --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).