-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-11-11 13:16:47 -0500, Nicholas McKenzie wrote:
> But wouldn't this just disable frequency scaling and the whole
> point of powerd?
No. acpi_throttle (and p4tcc) controls T-state. "Frequency scaling"
should be done by changing P-state.
> On Mon, Nov 11, 2013 at 1:46 AM, Stefan Esser <[email protected]>
> wrote:
>>
>> Am 10.11.2013 22:46, schrieb Nicholas Stewart McKenzie:
>>> My computer crashes if I enable powerd. I can't get cpu freq
>>> scaling to work with my cpu:(P.S. I sent this to both drivers
>>> and amd64 mailing list...
>>
>> Hi,
>>
>> you may want to try booting with the following line added to
>> /boot/loader.conf (or entered at the boot menu prompt after
>> breaking out of automatic boot):
>>
>> hint.acpi_throttle.0.disabled="1"
>>
>> There have been a number of reports of throttling causing
>> crashes. This setting does not prevent powerd from adjusting
>> your CPU's clock, it just disables some arcane feature which
>> pre-dates the modern power management methods.
I rewrote acpi_throttle.c at some point to fix the problem but never
committed it because nobody was really interested in testing the
patch. Also, it is really an arcane and archaic feature:
http://software.intel.com/en-us/blogs/2013/10/15/c-states-p-states-where-the-heck-are-those-t-states
Now I think we should disable the feature by default because it is
causing too much hassle for us (attached). Any objection?
Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)
iQEcBAEBAgAGBQJSgTdPAAoJEHyflib82/FGZaEIAJPt2/qPu7CxFAHBwizG+o+Y
Mmn0rqXREynXT83ds5cD998cO44GHFGhSaDYZ6wuL6CXoSE2bzTo5aAjVq/vY6io
4ItmvZPVNKK/UxeTK+ccDeuMKBXHBmOoUUUADGRy1d9S+GGtie0DVSpWZhEvSFrY
l/y1Dt3yd53qjlV96GcKqGYO6EyzlDq1tlO7jog28x8oDfz6W6KyXRL3evpqn/Mb
Y1B3anULsxbOMPN1hXcgBIA11SOdCCIe5zifldeAn1CCq3hMVxmIyH04dpVq9eBp
p7QpA+4KDLGwoXMYDL1dlL8kK0bCIWUB5FIFcJrBfcPYhv0FduX736NzufRvncc=
=ZSMa
-----END PGP SIGNATURE-----
Index: sys/dev/acpica/acpi_throttle.c
===================================================================
--- sys/dev/acpica/acpi_throttle.c (revision 258002)
+++ sys/dev/acpica/acpi_throttle.c (working copy)
@@ -167,7 +167,7 @@ static int
acpi_throttle_probe(device_t dev)
{
- if (resource_disabled("acpi_throttle", 0))
+ if (!resource_enabled("acpi_throttle", 0))
return (ENXIO);
/*
@@ -177,7 +177,7 @@ acpi_throttle_probe(device_t dev)
* we disable acpi_throttle when p4tcc is also present.
*/
if (device_find_child(device_get_parent(dev), "p4tcc", -1) &&
- !resource_disabled("p4tcc", 0))
+ resource_ensabled("p4tcc", 0))
return (ENXIO);
device_set_desc(dev, "ACPI CPU Throttling");
Index: sys/kern/subr_hints.c
===================================================================
--- sys/kern/subr_hints.c (revision 258002)
+++ sys/kern/subr_hints.c (working copy)
@@ -449,15 +449,29 @@ resource_find_dev(int *anchor, const char *name, i
}
/*
- * Check to see if a device is disabled via a disabled hint.
+ * Check to see if a device is disabled or enabled via a hint.
*/
-int
-resource_disabled(const char *name, int unit)
+static __inline int
+resource_find_hint(const char *name, int unit, const char *hint)
{
int error, value;
- error = resource_int_value(name, unit, "disabled", &value);
+ error = resource_int_value(name, unit, hint, &value);
if (error)
return (0);
return (value);
}
+
+int
+resource_disabled(const char *name, int unit)
+{
+
+ return (resource_find_hint(name, unit, "disabled"));
+}
+
+int
+resource_enabled(const char *name, int unit)
+{
+
+ return (resource_find_hint(name, unit, "enabled"));
+}
Index: sys/sys/bus.h
===================================================================
--- sys/sys/bus.h (revision 258002)
+++ sys/sys/bus.h (working copy)
@@ -503,6 +503,7 @@ int resource_long_value(const char *name, int unit
int resource_string_value(const char *name, int unit, const char *resname,
const char **result);
int resource_disabled(const char *name, int unit);
+int resource_enabled(const char *name, int unit);
int resource_find_match(int *anchor, const char **name, int *unit,
const char *resname, const char *value);
int resource_find_dev(int *anchor, const char *name, int *unit,
Index: sys/x86/cpufreq/p4tcc.c
===================================================================
--- sys/x86/cpufreq/p4tcc.c (revision 258002)
+++ sys/x86/cpufreq/p4tcc.c (working copy)
@@ -142,7 +142,7 @@ static int
p4tcc_probe(device_t dev)
{
- if (resource_disabled("p4tcc", 0))
+ if (!resource_enabled("p4tcc", 0))
return (ENXIO);
device_set_desc(dev, "CPU Frequency Thermal Control");
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "[email protected]"