From owner-cvs-src@FreeBSD.ORG Mon Mar 26 18:03:30 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FAD116A401; Mon, 26 Mar 2007 18:03:30 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6F38B13C45D; Mon, 26 Mar 2007 18:03:30 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l2QI3UVX013508; Mon, 26 Mar 2007 18:03:30 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l2QI3Ui8013507; Mon, 26 Mar 2007 18:03:30 GMT (envelope-from njl) Message-Id: <200703261803.l2QI3Ui8013507@repoman.freebsd.org> From: Nate Lawson Date: Mon, 26 Mar 2007 18:03:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys cpu.h eventhandler.h src/sys/kern kern_cpu.c src/sys/i386/i386 identcpu.c tsc.c src/sys/i386/isa prof_machdep.c src/sys/amd64/amd64 identcpu.c prof_machdep.c tsc.c src/sys/contrib/altq/altq altq_subr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2007 18:03:30 -0000 njl 2007-03-26 18:03:30 UTC FreeBSD src repository Modified files: sys/sys eventhandler.h cpu.h sys/kern kern_cpu.c sys/i386/i386 tsc.c identcpu.c sys/i386/isa prof_machdep.c sys/amd64/amd64 tsc.c identcpu.c prof_machdep.c sys/contrib/altq/altq altq_subr.c Log: Add an interface for drivers to be notified of changes to CPU frequency. cpufreq_pre_change is called before the change, giving each driver a chance to revoke the change. cpufreq_post_change provides the results of the change (success or failure). cpufreq_levels_changed gives the unit number of the cpufreq device whose number of available levels has changed. Hook in all the drivers I could find that needed it. * TSC: update TSC frequency value. When the available levels change, take the highest possible level and notify the timecounter set_cputicker() of that freq. This gets rid of the "calcru: runtime went backwards" messages. * identcpu: updates the sysctl hw.clockrate value * Profiling: if profiling is active when the clock changes, let the user know the results may be inaccurate. Reviewed by: bde, phk MFC after: 1 month Revision Changes Path 1.153 +17 -0 src/sys/amd64/amd64/identcpu.c 1.29 +38 -2 src/sys/amd64/amd64/prof_machdep.c 1.207 +94 -3 src/sys/amd64/amd64/tsc.c 1.9 +19 -0 src/sys/contrib/altq/altq/altq_subr.c 1.175 +17 -0 src/sys/i386/i386/identcpu.c 1.207 +94 -3 src/sys/i386/i386/tsc.c 1.30 +43 -13 src/sys/i386/isa/prof_machdep.c 1.24 +40 -26 src/sys/kern/kern_cpu.c 1.4 +33 -1 src/sys/sys/cpu.h 1.36 +11 -0 src/sys/sys/eventhandler.h