From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominik Brodowski Subject: Re: [PATCH 5/8] p4_clockmod: detect speed without relying on cpu_khz or user input Date: Fri, 21 Nov 2003 10:56:30 +0100 Sender: cpufreq-bounces@www.linux.org.uk Message-ID: <20031121095630.GA4148@brodo.de> References: <20031119183228.GF20576@brodo.de> <20031119190946.GB5653@redhat.com> <20031120183335.GB4425@brodo.de> <20031121022613.GA15356@redhat.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20031121022613.GA15356@redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cpufreq-bounces@www.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dave Jones Cc: cpufreq@www.linux.org.uk On Fri, Nov 21, 2003 at 02:26:13AM +0000, Dave Jones wrote: > On Thu, Nov 20, 2003 at 07:33:35PM +0100, Dominik Brodowski wrote: > > On Wed, Nov 19, 2003 at 07:09:46PM +0000, Dave Jones wrote: > > > > > > patch 4/8 introduced what seems to be the exact same code in the speedstep-lib. > > > Perhaps it belongs in an fsb.o instead that they can both share ? > > > I don't mind duplicating it twice in object code, but having two copies > > > in the source seems a bit silly. > > > > Usually, I agree to this topic. However, I don't want to create just another > > file for just this function, and it doesn't belong to speedstep-lib either > > as a plain p4 isn't a valid processor for speedstep-lib. So I'd prefer to > > have this source code duplication as an exception here. > > Your call. I'm just concerned with the maintainence effort as this > routine grows. > > As a sidenote, this could be useful outside of cpufreq at some point too. > Alan tried adding 'overclocking detection' using these registers a while > back. It is very difficult to get correct however, so it never came to > anything. If we took the "perfect is the enemy of 'good enough'" approach > and just did these checks for cpus we knew we do it correctly on, this > would become feasable to pull off for 2.7. Well, for Intel P3s and P4s the MSRs are eithre documented or reverse- engineered quite well, so it should be something good to do in 2.7.[*] Dominik [*] which will hopefully be soon!