acpi(ca) mfc for 8.2

Jung-uk Kim jkim at FreeBSD.org
Wed Nov 17 22:42:07 UTC 2010


On Wednesday 17 November 2010 05:04 pm, Alexandre "Sunny" Kovalenko 
wrote:
> On Wed, 2010-11-17 at 20:43 +0200, Andriy Gapon wrote:
> > I want to do MFC of ACPICA imports to stable/8 before 8.2
> > release. This would obviously include commits that fix mismerges
> > or remove obsolete code. Plus some other small enhancements/fixes
> > in our ACPI code.
> >
> > This is what I currently have:
> > svn status:	http://people.freebsd.org/~avg/acpi-stable-8.txt
> > svn diff:	http://people.freebsd.org/~avg/acpi-stable-8.diff
> > svn log ...:	http://people.freebsd.org/~avg/acpi-stable-8.log
> >
> > Please note that the svn diff above can not be used with
> > patch(1), because of some svn peculiarities related to files in
> > vendor area.
> > Here's a plain diff that should be more useful:
> > http://people.freebsd.org/~avg/acpi-stable-8.plain.diff
> >
> > I will appreciate any testing and reviews.
> > Mobile users who track stable/8 would be the primary candidates,
> > I guess :-) Thanks a lot!
>
> On my system:
>
> FreeBSD RabbitsDen.RabbitsLawn.verizon.net 8.1-STABLE FreeBSD
> 8.1-STABLE #0 r215086: Wed Nov 10 11:07:30 EST 2010
> root at RabbitsDen.RabbitsLawn.verizon.net:/usr/obj/usr/src/sys/TPX60 
> i386
>
> running on ThinkPad X60, I get proliferation of
>
> "acpi_tz0: error fetching current temperature -- AE_NOT_FOUND"
>
> messages after applying the patch.
>
> Verbose dmesg from "before" and "after" cold boots are available
> at:
>
> http://members.verizon.net/~akovalenko/ACPI/dmesg.before.bz2
> http://members.verizon.net/~akovalenko/ACPI/dmesg.after.bz2
>
> respectively.
>
> Now, on this machine tz0 is not a real thermal zone but some kind
> of implement to initiate system shutdown for some case I never had
> enough time or inclination to track through ASL. Real thermal zone
> is tz1.
>
> hw.acpi.thermal.min_runtime: 0
> hw.acpi.thermal.polling_rate: 10
> hw.acpi.thermal.user_override: 1
> hw.acpi.thermal.tz0.temperature: 45.0C
> hw.acpi.thermal.tz0.active: -1
> hw.acpi.thermal.tz0.passive_cooling: 0
> hw.acpi.thermal.tz0.thermal_flags: 0
> hw.acpi.thermal.tz0._PSV: -1
> hw.acpi.thermal.tz0._HOT: -1
> hw.acpi.thermal.tz0._CRT: 127.0C
> hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.thermal.tz0._TC1: -1
> hw.acpi.thermal.tz0._TC2: -1
> hw.acpi.thermal.tz0._TSP: -1
> hw.acpi.thermal.tz1.temperature: 43.0C
> hw.acpi.thermal.tz1.active: -1
> hw.acpi.thermal.tz1.passive_cooling: 1
> hw.acpi.thermal.tz1.thermal_flags: 0
> hw.acpi.thermal.tz1._PSV: 75.0C
> hw.acpi.thermal.tz1._HOT: -1
> hw.acpi.thermal.tz1._CRT: 97.0C
> hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.thermal.tz1._TC1: 5
> hw.acpi.thermal.tz1._TC2: 4
> hw.acpi.thermal.tz1._TSP: 600
>
> If I can provide any additional information or test any patches,
> please, let me know.

Ouch...  Can you please try the attached patch?

Thanks,

Jung-uk Kim
-------------- next part --------------
Index: sys/dev/acpica/acpi_thermal.c
===================================================================
--- sys/dev/acpica/acpi_thermal.c	(revision 215429)
+++ sys/dev/acpica/acpi_thermal.c	(working copy)
@@ -181,14 +181,16 @@ static int			acpi_tz_cooling_unit = -1;
 static int
 acpi_tz_probe(device_t dev)
 {
-    int		result;
+	char *name;
 
-    if (acpi_get_type(dev) == ACPI_TYPE_THERMAL && !acpi_disabled("thermal")) {
-	device_set_desc(dev, "Thermal Zone");
-	result = -10;
-    } else
-	result = ENXIO;
-    return (result);
+	if (!acpi_disabled("thermal")) {
+		name = acpi_name(acpi_get_handle(dev));
+		if (name != NULL && strcmp(name, "\\_TZ_") == 0) {
+			device_set_desc(dev, "Thermal Zone");
+			return (-10);
+		}
+	}
+	return (ENXIO);
 }
 
 static int


More information about the freebsd-stable mailing list