* some questions about mips timer
@ 2012-03-06 13:48 loody
2012-03-06 14:01 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: loody @ 2012-03-06 13:48 UTC (permalink / raw)
To: Linux MIPS Mailing List
hi all:
I have some questions about mips_hpt_frequency:
1. is mips_hpt_frequency == mips cpu frequency?
2. what does "hpt" mean?
--
Appreciate your help,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about mips timer
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
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2012-03-06 14:01 UTC (permalink / raw)
To: loody; +Cc: Linux MIPS Mailing List
Hi,
----- Mail original -----
> 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.
> 2. what does "hpt" mean?
High-precision timer.
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about mips timer
2012-03-06 14:01 ` Florian Fainelli
@ 2012-03-06 20:27 ` Ralf Baechle
2012-03-06 20:33 ` David Daney
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2012-03-06 20:27 UTC (permalink / raw)
To: Florian Fainelli; +Cc: loody, Linux MIPS Mailing List
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about mips timer
2012-03-06 20:27 ` Ralf Baechle
@ 2012-03-06 20:33 ` David Daney
0 siblings, 0 replies; 4+ messages in thread
From: David Daney @ 2012-03-06 20:33 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Florian Fainelli, loody, Linux MIPS Mailing List
On 03/06/2012 12:27 PM, Ralf Baechle wrote:
> 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.
>
If you have a v2 or later ISA, you can use 'rdhwr x, $3' to find the
ratio between the clock rate and the increment rate of the timer.
David Daney
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-06 20:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-06 20:33 ` David Daney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.