[Top] [All Lists]

Re: [patch] Generic time trailing clean-ups

To: Jun Sun <>
Subject: Re: [patch] Generic time trailing clean-ups
From: "Maciej W. Rozycki" <>
Date: Sat, 16 Aug 2003 14:32:17 +0200 (MET DST)
Cc: Ralf Baechle <>,
In-reply-to: <>
Organization: Technical University of Gdansk
Original-recipient: rfc822;
On Thu, 14 Aug 2003, Jun Sun wrote:

> > > 1) get rid of calibrate_*() function
> > > 2) introduce a generic counter frequence calibration routine, which
> > >    is only invoked when mips_counter_frequency is 0.
> > > 3) If any board is not happy with this calibration, it is free to
> > >    do its calibration in board_timer_init(), which would set
> > >    mips_counter_frequency to be non-zero.
> > 
> >  So I am lost, too.  What I proposed with the patch is exactly what you
> > describe above.  So what's wrong with it?
> >
> Oh, really? :)
> 1) I don't see you " get rid of calibrate_*() function"

 The patch is for 2.4.  I won't cook a patch for 2.6 before applying this
one, sorry.  Feel free to do that yourself, based on my proposal.  If the
plan I've presented was unclear, then please tell me exactly, where. 

> 2) oh, why? because your "generic counter frequence" is not generic -
>    it requires board-specific routines.  I was referring to using
>    jiffies to calibrate frequency.

 The calibration routine is generic -- every backend can use it without
duplicating the code privately.  You cannot throw all platforms into a
single bag because of different timer IRQ sources.

 I have already written why jiffies cannot be used directly. 

> 3) I also don't see picky boards "do its calibration in board_timer_init()".

 If mips_hpt_frequency is non zero after calling board_time_init(), it's
not recalibrated -- have you actually read the code???

> Your proposal differs in every count. :)

 The details may differ a bit.  The principles are the same.


+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>