public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba•org>
To: Kumar Gala <galak@kernel•crashing.org>
Cc: paulus@samba•org, linuxppc-dev@lists•ozlabs.org, miltonm@bga•com,
	johnstul@us•ibm.com
Subject: Re: [PATCH 2/6] powerpc/time: Use clockevents_calc_mult_shift
Date: Mon, 28 Nov 2011 22:47:52 +1100	[thread overview]
Message-ID: <20111128224752.6694154b@kryten> (raw)
In-Reply-To: <B695AB74-08F7-46DE-A9E9-BC7475FA1F3F@kernel.crashing.org>


Hi Kumar,

> > static void register_decrementer_clockevent(int cpu)
> > {
> > 	struct clock_event_device *dec = &per_cpu(decrementers,
> > cpu).event; @@ -955,7 +928,8 @@ static void __init
> > init_decrementer_cloc {
> > 	int cpu = smp_processor_id();
> > 
> > -	setup_clockevent_multiplier(ppc_tb_freq);
> > +	clockevents_calc_mult_shift(&decrementer_clockevent,
> > ppc_tb_freq, 4); +
> 
> Where's this magic 4 come from?

No better reason than that's what most other users do. We weren't
placing any limits on the shift/multiply in the old loop I don't think
we need to, so we could probably just use 1 instead.

Anton

  reply	other threads:[~2011-11-28 11:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24  6:07 [PATCH 0/6] ppc time fixes Anton Blanchard
2011-11-24  6:07 ` [PATCH 1/6] powerpc/time: Handle wrapping of decrementer Anton Blanchard
2011-11-28 17:44   ` Scott Wood
2011-11-28 20:01     ` Benjamin Herrenschmidt
2011-11-24  6:07 ` [PATCH 2/6] powerpc/time: Use clockevents_calc_mult_shift Anton Blanchard
2011-11-24  6:25   ` Kumar Gala
2011-11-28 11:47     ` Anton Blanchard [this message]
2011-11-24  6:07 ` [PATCH 3/6] powerpc/time: Use clocksource_register_hz Anton Blanchard
2011-11-28 23:30   ` john stultz
2011-11-24  6:07 ` [PATCH 4/6] powerpc/time: Remove unnecessary sanity check of decrementer expiration Anton Blanchard
2011-11-24  6:07 ` [PATCH 5/6] powerpc/time: Fix some style issues Anton Blanchard
2011-11-24  6:07 ` [PATCH 6/6] powerpc/time: Optimise decrementer_check_overflow Anton Blanchard

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=20111128224752.6694154b@kryten \
    --to=anton@samba$(echo .)org \
    --cc=galak@kernel$(echo .)crashing.org \
    --cc=johnstul@us$(echo .)ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=miltonm@bga$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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