linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCHv1 09/12] unicore32 core architecture: timer and time
Date: Mon, 03 Jan 2011 11:58:53 -0800	[thread overview]
Message-ID: <1294084733.2571.54.camel@work-vm> (raw)
In-Reply-To: <00ef01cbab0a$66bfce60$343f6b20$@mprc.pku.edu.cn>

On Mon, 2011-01-03 at 13:52 +0800, Guan Xuetao wrote: 
> > When using clocksource_register_hz(&cksrc_puv3_oscr, CLOCK_TICK_RATE ),
> >  the shift value become 0, and mult value become 0x838a91a7, and the system will be broken
> > after printing "Switching to clocksource oscr".
> > 
> > When using clocksource_register_khz(&cksrc_puv3_oscr, CLOCK_TICK_RATE ),
> > the shift value become 0, and mult value become  0x4359611, and the system will run smoothly,
> > but timer interrupt seems too frequently. Perhaps it is 4 times faster.
> > 
> > For comparison, originally, when shift value is set to 0x12, the mult value become 1175e5e.
> > 
> 
> The error is the implementation of do_div() function.
> When replacing the arch-specific div64.h with asm-generic/div64.h, clocksource_rigister_hz() works.

Oh great! You had me worried I had a bug in the mult/shift calculation.

Great to hear all is working now! If you run into other clock/time
related troubles, please let me know.

thanks
-john

  reply	other threads:[~2011-01-03 19:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-25 18:54 [PATCHv1 09/12] unicore32 core architecture: timer and time Guan Xuetao
2010-12-27 21:27 ` john stultz
2011-01-02  9:47   ` Guan Xuetao
2011-01-03  5:52     ` Guan Xuetao
2011-01-03 19:58       ` john stultz [this message]
2011-01-03 19:58         ` john stultz

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=1294084733.2571.54.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=guanxuetao@mprc.pku.edu.cn \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).