rpms/cpuspeed/devel cpuspeed-1.2.1-make-gcc43-happy.patch, NONE, 1.1 cpuspeed-1.2.1-multicore-workaround.patch, NONE, 1.1 cpuspeed.spec, 1.61, 1.62
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Tue Feb 12 22:51:54 UTC 2008
Author: jwilson
Update of /cvs/pkgs/rpms/cpuspeed/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26698
Modified Files:
cpuspeed.spec
Added Files:
cpuspeed-1.2.1-make-gcc43-happy.patch
cpuspeed-1.2.1-multicore-workaround.patch
Log Message:
* Tue Feb 12 2008 Jarod Wilson <jwilson at redhat.com> 1.2.1-4
- Fix up for gcc 4.3
- Work around multi-core step detection problems (#392781)
cpuspeed-1.2.1-make-gcc43-happy.patch:
--- NEW FILE cpuspeed-1.2.1-make-gcc43-happy.patch ---
diff -Naurp cpuspeed-1.2.1.orig/cpuspeed.cc cpuspeed-1.2.1/cpuspeed.cc
--- cpuspeed-1.2.1.orig/cpuspeed.cc 2008-02-12 12:10:29.000000000 -0500
+++ cpuspeed-1.2.1/cpuspeed.cc 2008-02-12 12:40:59.000000000 -0500
@@ -568,7 +568,7 @@ dup_cpu_str(const char *s)
}
int
-main(unsigned argc, char * argv[])
+main(int argc, char * argv[])
{
const char * const NAME = basename(strdup(argv[0]));
@@ -584,7 +584,7 @@ main(unsigned argc, char * argv[])
#endif
// parse argv
- for(unsigned i = 1; i < argc; i++)
+ for(int i = 1; i < argc; i++)
{
if(!strcmp(argv[i], "-d"))
daemonize = true;
cpuspeed-1.2.1-multicore-workaround.patch:
--- NEW FILE cpuspeed-1.2.1-multicore-workaround.patch ---
diff -Naurp cpuspeed-1.2.1.orig/cpuspeed.cc cpuspeed-1.2.1/cpuspeed.cc
--- cpuspeed-1.2.1.orig/cpuspeed.cc 2008-02-12 13:00:20.000000000 -0500
+++ cpuspeed-1.2.1/cpuspeed.cc 2008-02-12 13:35:59.000000000 -0500
@@ -239,7 +239,7 @@ get_supported_speeds()
min = MAX(min, min_speed);
max = MIN(max, max_speed);
- unsigned step;
+ unsigned step, real, retries;
const unsigned MAX_STEP = MIN_STEP << 8;
for (step = MIN_STEP; step <= MAX_STEP; step *= 2)
{
@@ -259,9 +259,15 @@ get_supported_speeds()
current_speed = 0;
for (unsigned current = max - step; current > min - step; current -= step)
{
+ retries = 0;
current = MAX(current, min);
- set_speed(current);
- unsigned real = get_speed();
+ while (retries < 3) {
+ set_speed(current);
+ real = get_speed();
+ if (real == current || real == speeds[current_speed].khz)
+ break;
+ retries++;
+ }
if (real != speeds[current_speed].khz)
{
speeds[++current_speed].khz = real;
Index: cpuspeed.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cpuspeed/devel/cpuspeed.spec,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- cpuspeed.spec 29 Aug 2007 19:04:12 -0000 1.61
+++ cpuspeed.spec 12 Feb 2008 22:51:14 -0000 1.62
@@ -1,7 +1,7 @@
Summary: CPU frequency adjusting daemon
Name: cpuspeed
Version: 1.2.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 1
Group: System Environment/Base
License: GPL
@@ -23,6 +23,8 @@
Patch1: warning.diff
Patch2: idlenice.diff
Patch3: cpuspeed-1.2.1-make.patch
+Patch4: cpuspeed-1.2.1-make-gcc43-happy.patch
+Patch5: cpuspeed-1.2.1-multicore-workaround.patch
%description
cpuspeed is a daemon that dynamically changes the speed
@@ -42,6 +44,8 @@
%patch1 -p1 -b .warn
%patch2 -p1 -b .idle
%patch3 -p1 -b .make
+%patch4 -p1 -b .gcc43
+%patch5 -p1 -b .multicore
%build
rm -rf $RPM_BUILD_ROOT
@@ -85,6 +89,10 @@
exit 0
%changelog
+* Tue Feb 12 2008 Jarod Wilson <jwilson at redhat.com> 1.2.1-4
+- Fix up for gcc 4.3
+- Work around multi-core step detection problems (#392781)
+
* Wed Aug 29 2007 Jarod Wilson <jwilson at redhat.com> 1.2.1-3
- Bump and rebuild, due to busted ppc32
More information about the fedora-extras-commits
mailing list