All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: wally@theblackmoor.net
Cc: linux-kernel@vger.kernel.org, Jung-Ik  Lee <jilee@google.com>,
	linux-acpi@vger.kernel.org
Subject: Re: PROBLEM:  ACPI Thermal Zone for CPU0 does not update after    hibernation
Date: Mon, 9 Apr 2007 18:57:02 -0700	[thread overview]
Message-ID: <20070409185702.bbea2cb9.akpm@linux-foundation.org> (raw)
In-Reply-To: <33389.192.168.0.107.1176169658.squirrel@panacea.theblackmoor.net>

On Mon, 9 Apr 2007 21:47:38 -0400 (EDT) "Walter Francis" <wally@theblackmoor.net> wrote:

> > On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
> > "Walter Francis" <wally@theblackmoor.net> wrote:
> 
> >> After hibernating, the CPU0 thermal zone never updates.  It will stay at 59C
> >> forever for example.
> 
> > Yeah, John spotted a bug in there the other day.
> >
> > Does this fix it?
> >
> > --- a/drivers/acpi/thermal.c~acpi-thermal-fix-mod_timer-interval
> > +++ a/drivers/acpi/thermal.c
> > @@ -758,7 +758,8 @@ static void acpi_thermal_check(void *dat
> >  			del_timer(&(tz->timer));
> >  	} else {
> >  		if (timer_pending(&(tz->timer)))
> > -			mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
> > +			mod_timer(&(tz->timer),
> > +					jiffies + (HZ * sleep_time) / 1000);
> >  		else {
> >  			tz->timer.data = (unsigned long)tz;
> >  			tz->timer.function = acpi_thermal_run;
> 
> No joy, didn't help.
>
> Didn't apply clean to 21-pre6 (still latest I see on kernel.org), but here's
> the section that seemed right.
> 
>         /*
>          * Schedule Next Poll
>          * ------------------
>          */
>         if (!sleep_time) {
>                 if (timer_pending(&(tz->timer)))
>                         del_timer(&(tz->timer));
>         } else {
>                 if (timer_pending(&(tz->timer)))
>                         mod_timer(&(tz->timer),jiffies + (HZ * sleep_time) /
> 1000);
>                 else {
>                         tz->timer.data = (unsigned long)tz;
>                         tz->timer.function = acpi_thermal_run;
>                         tz->timer.expires = jiffies + (HZ * sleep_time) / 1000;
>                         add_timer(&(tz->timer));

Yes, the above looks like the correct change.

> Also, I think this is new with the line replaced..  Not sure exactly what's
> causing it, but when I restart the cpuspeed daemon:
> 
> Starting cpuspeed: Error: Not an integer:
> /proc/acpi/thermal_zone/TZS1/temperature

Strange.  Maybe a timing thing.

> # cat /proc/acpi/thermal_zone/TZS1/temperature
> temperature:             41 C
> 
> Looks normal to me?

Yes it does.  What happens of you stop and restart the daemon a second
time?

fwiw, /proc/acpi/thermal_zone/ATF0/temperature seems to do the right thing
here.


  reply	other threads:[~2007-04-10  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-06 20:13 PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation Walter Francis
2007-04-10  0:47 ` Andrew Morton
2007-04-10  0:47   ` Andrew Morton
2007-04-10  1:47   ` Walter Francis
2007-04-10  1:57     ` Andrew Morton [this message]
2007-04-10  2:18       ` Walter Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070409185702.bbea2cb9.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jilee@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wally@theblackmoor.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.