Annoyances with passive thermal code (acpi_thermal)

Hajimu UMEMOTO ume at freebsd.org
Tue Aug 16 20:11:25 GMT 2005


Hi,

>>>>> On Tue, 16 Aug 2005 10:59:43 -0700
>>>>> Nate Lawson <nate at root.org> said:

> No, I need to save a cpu level only when raising prio to PRIO_KERN
> from lower prio.  But, I realized that my privious patch was
> insufficient.  If dev.cpu.0.freq was not set by sysctl(8), cpu level
> was never saved.
> 
> Index: sys/kern/kern_cpu.c
> diff -u -p sys/kern/kern_cpu.c.orig sys/kern/kern_cpu.c
> --- sys/kern/kern_cpu.c.orig	Mon Apr 11 04:11:23 2005
> +++ sys/kern/kern_cpu.c	Tue Aug 16 14:22:10 2005
> @@ -336,7 +336,7 @@ cf_set_method(device_t dev, const struct
>  	 */
>  	if (sc->curr_level.total_set.freq != CPUFREQ_VAL_UNKNOWN &&
>  	    sc->saved_level.total_set.freq == CPUFREQ_VAL_UNKNOWN &&
> -	    priority > sc->curr_priority) {
> +	    priority > CPUFREQ_PRIO_USER && priority > sc->curr_priority) {
>  		CF_DEBUG("saving level, freq %d prio %d\n",
>  		    sc->curr_level.total_set.freq, sc->curr_priority);
>  		sc->saved_level = sc->curr_level;

nate> I'm ok with you committing this.

Thanks!  I've just committed it.

> In anyway, we should make this as stack some day.

nate> That would be nice for the future.

Okay, I'll implement this when I have a time.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume at mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/


More information about the freebsd-acpi mailing list