From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id D7437DDE33 for ; Sun, 20 May 2007 13:04:03 +1000 (EST) Subject: Re: [PATCH 2.6.21-rt2] PowerPC: decrementer clockevent driver From: Benjamin Herrenschmidt To: Daniel Walker In-Reply-To: <1179628991.20925.2.camel@imap.mvista.com> References: <200705172142.26739.sshtylyov@ru.mvista.com> <8E44DB06-767D-4864-8D2C-6132E4D4370B@kernel.crashing.org> <464C99FF.8080404@ru.mvista.com> <135307ED-7125-4859-8594-4B5B900D92D6@kernel.crashing.org> <1179500217.20519.53.camel@imap.mvista.com> <464DC0DC.7050809@ru.mvista.com> <1179502773.20519.56.camel@imap.mvista.com> <17998.28659.702653.237011@cargo.ozlabs.ibm.com> <1179628991.20925.2.camel@imap.mvista.com> Content-Type: text/plain Date: Sun, 20 May 2007 13:03:10 +1000 Message-Id: <1179630190.32247.534.camel@localhost.localdomain> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, tglx@linutronix.de, Paul Mackerras , mingo@elte.hu, linux-kernel@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2007-05-19 at 19:43 -0700, Daniel Walker wrote: > In terms of clocksources, gettimeofday() would have to switch to another > clocksource if the decrementer started to act that way .. That's why it > is possible to register more than one clocksource, to allow for the > switching. The decrementer frequency doesn't change even with cpufreq? It's more than just gettimeofday. The linux ppc kernel port has strong assumptions all over the place that the timbase and decrementer (which always tick at the same rate) have a constant frequency. It might be possible to "fix" those assumptions but right now, that is the case. For example, nowadays, udelay() also uses the timebase. Not only gettimeofday() & friends. The scheduler ticking too. The precise process accounting as well, etc... In fact, while it's never worded explicitely in the spec, it's always been strongly in the "spirit" of the architecture that the timebase and decrementer have a constant frequency. This is why processors like the 970 allow for an external sourcing for when they are used in setups where the various clocks are slewed for power management. Ben.