Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Florian Fainelli <ffainelli@freebox.fr>
Cc: loody <miloody@gmail.com>,
	Linux MIPS Mailing List <linux-mips@linux-mips.org>
Subject: Re: some questions about mips timer
Date: Tue, 6 Mar 2012 21:27:12 +0100	[thread overview]
Message-ID: <20120306202712.GM4519@linux-mips.org> (raw)
In-Reply-To: <160192556.459513.1331042510355.JavaMail.root@zmc>

On Tue, Mar 06, 2012 at 03:01:50PM +0100, Florian Fainelli wrote:

> > hi all:
> > I have some questions about mips_hpt_frequency:
> > 1. is mips_hpt_frequency == mips cpu frequency?
> 
> No, it is usually cpu frequency / 2.

The architecture specification leaves the counter clock rate up up to the
implementation and only says the clock rate is a function of the pipeline
clock.  In all reality this means the counter is running at the full or
half frequency.  Just don't build on it,

  clock := pipeline_clock * next_weeks_lottery_number % 42

would by compliant ;-)

On some CPUs the frequency can even be selected through a configuration
bitstream at reset time so you can't always count on a fixed relation
between CPU clock and count rate.

Some older CPU manuals contain a confusing wording saying the counter
increments at half (or full) instruction issue rate.  That just means the
pipeline clock, no reason to be confused.

  Ralf

  reply	other threads:[~2012-03-06 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 13:48 some questions about mips timer loody
2012-03-06 14:01 ` Florian Fainelli
2012-03-06 20:27   ` Ralf Baechle [this message]
2012-03-06 20:33     ` David Daney

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=20120306202712.GM4519@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=ffainelli@freebox.fr \
    --cc=linux-mips@linux-mips.org \
    --cc=miloody@gmail.com \
    /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