public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	john stultz <johnstul@us.ibm.com>,
	Richard Henderson <rth@twiddle.net>,
	lkml <linux-kernel@vger.kernel.org>,
	Matt Turner <mattst88@gmail.com>
Subject: Re: [RFC][PATCH] Convert alpha to use clocksource
Date: Mon, 22 Mar 2010 17:41:37 +0100	[thread overview]
Message-ID: <20100322164137.GA12625@cmpxchg.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1003221521440.3147@localhost.localdomain>

On Mon, Mar 22, 2010 at 03:22:12PM +0100, Thomas Gleixner wrote:
> On Mon, 22 Mar 2010, Johannes Weiner wrote:
> > > Though, even after a glance over the clocksource code, I've not
> > > gotten yet to how one could estimate the "shift" value...
> > > Any hints?
> > 
> > I had the same problem with xtensa and added a comment about what I
> > did in there, maybe it helps:
> > 
> > 	arch/xtensa/kernel/time.c
> > 
> > I took the upper bound of the multiplicator (nsecs per counter unit)
> > and subtracted its logarithm from my available 32 bits.  The result
> > is the highest possible shift value that works for the clocksource.
> 
> clocks_calc_mult_shift() is what you are looking for.

Oh, thanks!  That was not yet around at the time.

	Hannes


      reply	other threads:[~2010-03-22 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  2:01 [RFC][PATCH] Convert alpha to use clocksource John Stultz
2010-03-18 14:32 ` Richard Henderson
2010-03-18 17:55   ` john stultz
2010-03-18 21:40     ` Ivan Kokshaysky
2010-03-18 22:19       ` john stultz
2010-03-19 10:07         ` Ivan Kokshaysky
2010-03-19 16:47         ` Matt Turner
2010-03-19 17:13           ` Richard Henderson
2010-03-22 11:17       ` Johannes Weiner
2010-03-22 14:22         ` Thomas Gleixner
2010-03-22 16:41           ` Johannes Weiner [this message]

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=20100322164137.GA12625@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    --cc=tglx@linutronix.de \
    /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