From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: RE: Override timer interrupt From: Benjamin Herrenschmidt To: Rune Torgersen In-Reply-To: References: <20071012213041.GB22894@mag.az.mvista.com> <1192229894.22054.29.camel@pasglop> Content-Type: text/plain Date: Tue, 16 Oct 2007 06:55:53 +1000 Message-Id: <1192481753.11795.25.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2007-10-15 at 11:49 -0500, Rune Torgersen wrote: > > The main couse is that our main bus frequency cannort be divided into > 1kHz evently by the decrementer. > Main bus freq = 99532800 Hz. > Decrementer then becomes 24883, which gives us 999991.9624485600nsec > per > jiffy. > That is not a number easilly converted into time without drift. > > Changing HZ to 100 fixes it, but is for varous reasons not an option > right now. > > What I did do is change the timer interrupt to be called by an > ecxternal > 1kHz interrupt source instead of the decrementer. > > The TB register is only ued for offsets from the last jiffie, not as a > continous offset, so then it works out pretty good. > There is a discontinuity in the sub ms resolution of the clock that I > can live with. msec and up are dead accurate. The date is derived from the absolute TB value though... Ben.