From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <18195.63500.188527.311716@cargo.ozlabs.ibm.com> Date: Tue, 16 Oct 2007 09:30:20 +1000 From: Paul Mackerras To: "Rune Torgersen" Subject: RE: Override timer interrupt In-Reply-To: References: <20071012213041.GB22894@mag.az.mvista.com> <1192229894.22054.29.camel@pasglop> Cc: linuxppc-embedded@ozlabs.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Rune Torgersen writes: > 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. That shouldn't be a problem any more with the CONFIG_GENERIC_TIME stuff. What happens is that update_wall_time will accumulate clock->xtime_interval to xtime for every clock->cycle_interval timebase ticks. The clock->xtime_interval is in units of 2^-22 nanoseconds, so it is very accurate. It is computed from clock->cycle_interval and clock->mult in clocksource_calculate_interval() (in include/linux/clocksource.h). Paul.