Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2006 10:14:44 -0800
From:      Nate Lawson <nate@root.org>
To:        Dag-Erling Smorgrav <des@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/powerd powerd.c
Message-ID:  <43F76414.4070306@root.org>
In-Reply-To: <20060218113528.0A38416A45B@hub.freebsd.org>
References:  <20060218113528.0A38416A45B@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote:
> des         2006-02-18 11:35:12 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.sbin/powerd      powerd.c 
>   Log:
>   Load cpufreq at startup if it isn't there already.
>   
>   Revision  Changes    Path
>   1.18      +4 -0      src/usr.sbin/powerd/powerd.c
> 
> 
> Index: src/usr.sbin/powerd/powerd.c
> diff -u src/usr.sbin/powerd/powerd.c:1.17 src/usr.sbin/powerd/powerd.c:1.18
> --- src/usr.sbin/powerd/powerd.c:1.17	Tue Jan  3 21:32:02 2006
> +++ src/usr.sbin/powerd/powerd.c	Sat Feb 18 11:35:12 2006
> @@ -433,6 +433,10 @@
>  
>  	mode = mode_none;
>  
> +	/* Make sure the cpufreq module is loaded */
> +	if (!kld_isloaded("cpu/p4tcc") && kld_load("cpufreq") == -1)
> +		err(1, "failed to load cpufreq module");
> +
>  	/* Poll interval is in units of ms. */
>  	poll_ival *= 1000;

This commit is wrong and should be backed out.

1. On some systems, cpufreq doesn't work when loaded after boot
2. cpufreq is not required for powerd.  acpi_perf (part of acpi.ko) is a 
cpufreq driver and the generic framework is compiled into the kernel.

Of course, I would have told you this if you'd emailed me first.

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43F76414.4070306>