Works for me.
Since this disables speedstep late in the init, wouldn't it be nice to
free est_fqlist before disabling (not enabling) speedstep?
Im running this diff for one week now, on amd64.
Index: est.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/est.c,v
retrieving revision 1.31
diff -u -p -r1.31 est.c
--- est.c 10 May 2014 18:59:29 -0000 1.31
+++ est.c 22 May 2014 14:08:00 -0000
@@ -418,12 +418,12 @@ est_init(struct cpu_info *ci)
return;
if (est_fqlist->n < 2)
- return;
+ goto nospeedstep;
low = est_fqlist->table[est_fqlist->n - 1].mhz;
high = est_fqlist->table[0].mhz;
if (low == high)
- return;
+ goto nospeedstep;
perflevel = (cpuspeed - low) * 100 / (high - low);
@@ -439,6 +439,12 @@ est_init(struct cpu_info *ci)
cpu_setperf = est_setperf;
setperf_prio = 3;
+
+ return;
+
+nospeedstep:
+ free(est_fqlist->table, M_DEVBUF);
+ free(est_fqlist, M_DEVBUF);
}
void
Index: est.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/est.c,v
retrieving revision 1.41
diff -u -p -r1.41 est.c
--- est.c 10 May 2014 18:59:29 -0000 1.41
+++ est.c 22 May 2014 14:13:32 -0000
@@ -1177,12 +1177,12 @@ est_init(struct cpu_info *ci, int vendor
return;
if (est_fqlist->n < 2)
- return;
+ goto nospeedstep;
low = est_fqlist->table[est_fqlist->n - 1].mhz;
high = est_fqlist->table[0].mhz;
if (low == high)
- return;
+ goto nospeedstep;
perflevel = (cpuspeed - low) * 100 / (high - low);
@@ -1198,6 +1198,12 @@ est_init(struct cpu_info *ci, int vendor
cpu_setperf = est_setperf;
setperf_prio = 3;
+
+ return;
+
+nospeedstep:
+ free(est_fqlist->table, M_DEVBUF);
+ free(est_fqlist, M_DEVBUF);
}
void
On 05/10/14 21:02, Philip Guenther wrote:
On Sat, May 10, 2014 at 4:06 AM, Benjamin Baier <program...@netzbasis.de>wrote:
After setting cpu clock to the minimum value in my BIOS, SpeedStep paniced
on me.
dmesg before and after patching at
http://netzbasis.de/openbsd/speedstep/
The patch below works for me, tested on amd64.
low == high == 800
cpuspeed == 798 (!)
Thanks for the report!
kettenis@ noted that there's no point in enabling speedstep if there
nothing to range over, so I've committed a slightly different diff to do
that instead.
Philip Guenther