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

Nate Lawson nate at root.org
Mon Mar 26 18:32:13 UTC 2007


Nate Lawson wrote:
> 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

Forgot to add that altq was also updated to use the new TSC frequency
after it changes.  I wasn't able to test the altq change, but compiled
it and it is relatively small.

I tested all the other changes on my laptop.

-- 
Nate


More information about the cvs-src mailing list