RE: 2.6.16-rc5: known regressions [TP 600X S3, vanilla DSDT]

From: Yu, Luming
Date: Fri Mar 17 2006 - 21:00:12 EST

>> So, please try hack thermal.c by removing calls to _TMP.
>I did something like that before, by changing acpi_evaluate_integer()
>to return 3000 if it is asked for _TMP.
>--- a/utils.c 2006-03-15 01:42:34.000000000 -0500
>+++ b/utils.c 2006-03-14 23:36:59.000000000 -0500
>@@ -270,7 +270,15 @@ acpi_evaluate_integer(acpi_handle handle
> memset(element, 0, sizeof(union acpi_object));
> buffer.length = sizeof(union acpi_object);
> buffer.pointer = element;
>- status = acpi_evaluate_object(handle, pathname,
>arguments, &buffer);
>+ if (strcmp(pathname, "_TMP") != 0)
>+ status = acpi_evaluate_object(handle, pathname,
>arguments, &buffer);
>+ else {
>+ printk(KERN_INFO PREFIX "acpi_evaluate_integer:
>Faking _TMP\n");
>+ status = AE_OK;
>+ element->type = ACPI_TYPE_INTEGER;
>+ element->integer.value = 3000; /* 27 C, in deciKelvins */
>+ }
> if (ACPI_FAILURE(status)) {
> acpi_util_eval_error(handle, pathname, status);
> return_ACPI_STATUS(status);
>The alternative, obvious change in thermal.c (diff below) turns out
>not to be a minimal change. If acpi_thermal_get_temperature() returns
>with a failure, then most of the later methods in THM0 aren't
>executed, so one is actually commenting out much more than _TMP.
>Which is why I think the minimal change is the diff above to utils.c.
>With that change the system never hung.

Good, this is exactly what I wanted. How many times you tested with
hack without hang? If s3 hang really goes away , then probably you can
move on , and come up with a real patch that could go into the 2.6.16.
What do you think? :-)

The short-term proper way could be:
1. add a global variable: acpi_in_suspend.
2. in acpi_pm_prepare: acpi_os_wait_events_complete()
b.set acpi_in_suspend = YES.
in acpi_pm_finish :
set acpi_in_suspend = NO.
3. in acpi_thermal_run:
if (acpi_in_suspend == YES)
do nothing.

The long-term proper way should be:
1. ACPI subsystem should stop invoking BIOS before Suspend except
for several necessary AML methods that are required to put
the platform into S3 state. Otherwise, un-tested BIOS code path
could cause trouble to linux, because I assume such platform
should have been tested under windows.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at