Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#579091: cpufrequtils: Update loadcpufreq to latest upstream version from Ubuntu?

27 views
Skip to first unread message

Petter Reinholdtsen

unread,
Apr 25, 2010, 5:30:02 AM4/25/10
to

Package: cpufrequtils
Version: 006-2
Tags: patch

I had a look at the powernowd-1.00/debian/cpufreq-detect.sh file in
Ubuntu powernowd package version 1.00-1ubuntu5, which the loadcpufreq
init.d script is based on, to see if there had been any updates. This
is the relevant patch. Apparently Ubuntu now loads the
speedstep-centrino module for Intel CPUs with the est flag, and only
load the e_powersaver module on VIA CPUs with the est flag (perhaps
this is the solution for #566214?).

diff -ur cpufrequtils-006/debian/cpufrequtils.loadcpufreq.init cpufrequtils-006-pere/debian/cpufrequtils.loadcpufreq.init
--- cpufrequtils-006/debian/cpufrequtils.loadcpufreq.init 2010-04-24 23:50:23.000000000 +0200
+++ cpufrequtils-006-pere/debian/cpufrequtils.loadcpufreq.init 2010-04-25 10:59:05.000000000 +0200
@@ -48,7 +48,6 @@
fi

MODEL_NAME=$(grep '^model name' "$CPUINFO" | head -1 | sed -e 's/^.*: //;')
- MODEL_ID=$(grep -E '^model[[:space:]]+:' "$CPUINFO" | head -1 | sed -e 's/^.*: //;')
CPU=$(grep -E '^cpud[^:]+:' "$CPUINFO" | head -1 | sed -e 's/^.*: //;')
VENDOR_ID=$(grep -E '^vendor_id[^:]+:' "$CPUINFO" | head -1 | sed -e 's/^.*: //;')
CPU_FAMILY=$(sed -e '/^cpu family/ {s/.*: //;p;Q};d' $CPUINFO)
@@ -68,9 +67,9 @@
case "$VENDOR_ID" in
GenuineIntel*)
# If the CPU has the est flag, it supports enhanced
- # speedstep and should use the acpi-cpufreq driver
+ # speedstep and should use the speedstep-centrino driver
if [ "$(grep est $CPUINFO)" ]; then
- MODULE=acpi-cpufreq
+ MODULE=speedstep-centrino;
elif [ $CPU_FAMILY = 15 ]; then
# Right. Check if it's a P4 without est.
# Could be speedstep-ich, or could be p4-clockmod.
@@ -125,15 +124,12 @@
;;
CentaurHauls*)
# VIA
- if [ $CPU_FAMILY = 6 ]; then
- case $MODEL_ID in
- 10) # VIA C7 VIA Esther
- MODULE=e_powersaver
- ;;
- *)
- MODULE=longhaul
- ;;
- esac
+ # If the CPU has the est flag, it supports enhanced
+ # powersaver and should use the e_powersaver driver
+ if [ "$(grep est $CPUINFO)" ]; then
+ MODULE=e_powersaver;
+ elif [ $CPU_FAMILY = 6 ]; then
+ MODULE=longhaul;
fi
;;
GenuineTMx86*)

The changes might be kernel version dependent, but as far as I know
Ubuntu use the same kernel version as Debian for their next release.

Happy hacking,
--
Petter Reinholdtsen

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Mattia Dongili

unread,
Apr 25, 2010, 6:20:02 AM4/25/10
to
On Sun, Apr 25, 2010 at 11:16:44AM +0200, Petter Reinholdtsen wrote:
>
> Package: cpufrequtils
> Version: 006-2
> Tags: patch
>
> I had a look at the powernowd-1.00/debian/cpufreq-detect.sh file in
> Ubuntu powernowd package version 1.00-1ubuntu5, which the loadcpufreq
> init.d script is based on, to see if there had been any updates. This
> is the relevant patch. Apparently Ubuntu now loads the
> speedstep-centrino module for Intel CPUs with the est flag, and only

odd, we never loaded speedstep-centrino on any est capable machine only
based on the kernel version since (almost) forever, see:
http://git.kamineko.org/cgi-bin/gitweb.cgi?p=cpufrequtils.git;a=commitdiff;h=8c4880e717bf3fec4034ec2cfed346550eb1a213
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502431
To be honest I think it should be the Ubuntu package that should get
code from Debian.

> load the e_powersaver module on VIA CPUs with the est flag (perhaps
> this is the solution for #566214?).

e_powersaver won't load anyway on non-est capable cpus, from
e_powersaver.c:
if (!cpu_has(c, X86_FEATURE_EST))
return -ENODEV;

and really, looking at the help text from the kernel sources it looks
like acpi_cpufreq should be used instead:

help
This adds the CPUFreq driver for VIA C7 processors. However, this driver
does not have any safeguards to prevent operating the CPU out of spec
and is thus considered dangerous. Please use the regular ACPI cpufreq
driver, enabled by CONFIG_X86_ACPI_CPUFREQ.

I would rather do that at this point.
--
mattia
:wq!

0 new messages