All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Remove possible recursion from thermal driver
@ 2007-05-15  5:54 Alexey Starikovskiy
  2007-05-15 20:26 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Starikovskiy @ 2007-05-15  5:54 UTC (permalink / raw)
  To: Len Brown, ACPI Devel Maling List

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]

Hi,

This patch helps to fight infinite recursion on some ACER laptops, see
bugzilla #8385.

Thanks,
Alex.

[-- Attachment #2: remove_thermal_check_from_change_thermal_points.patch --]
[-- Type: text/x-diff, Size: 749 bytes --]

Thermal check may result in thermal points to be moved down. Don't do thermal check again in this case.

From: Alexey Starikovskiy <aystarik@gmail.com>

Signed-off-by: Alexey Starikovskiy <aystarik@gmail.com>
---

 drivers/acpi/thermal.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1ada017..7aa5f11 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1106,7 +1106,6 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
 		break;
 	case ACPI_THERMAL_NOTIFY_THRESHOLDS:
 		acpi_thermal_get_trip_points(tz);
-		acpi_thermal_check(tz);
 		acpi_bus_generate_event(device, event, 0);
 		break;
 	case ACPI_THERMAL_NOTIFY_DEVICES:

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI: Remove possible recursion from thermal driver
  2007-05-15  5:54 [PATCH] ACPI: Remove possible recursion from thermal driver Alexey Starikovskiy
@ 2007-05-15 20:26 ` Len Brown
  2007-05-16  2:19   ` Alexey Starikovskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Len Brown @ 2007-05-15 20:26 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: ACPI Devel Maling List


> --- a/drivers/acpi/thermal.c
> +++ b/drivers/acpi/thermal.c
> @@ -1106,7 +1106,6 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
> 		break;
> 	case ACPI_THERMAL_NOTIFY_THRESHOLDS:
> 		acpi_thermal_get_trip_points(tz);
>-		acpi_thermal_check(tz);
> 		acpi_bus_generate_event(device, event, 0);
> 		break;
> 	case ACPI_THERMAL_NOTIFY_DEVICES:

I don't think we can do this.
When the thresholds change, there must be a check to compare the temperature
with the thresholds -- otherwise what good was it to change the thresholds?

-Len

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI: Remove possible recursion from thermal driver
  2007-05-15 20:26 ` Len Brown
@ 2007-05-16  2:19   ` Alexey Starikovskiy
  2007-05-17 18:23     ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Starikovskiy @ 2007-05-16  2:19 UTC (permalink / raw)
  To: Len Brown; +Cc: ACPI Devel Maling List

Please read the spec 11.1.2 and 11.1.2.3. Trip points change _only_ to
create a hysteresis loop, not by themselves. This means that we will
get 0x81 type _only_ in response to us changing active state, the
moment then we have temperature and just decided to move away from
this trip point, not closer to it.
If the temperature change, we get another event, 0x80, and _then_ we
do thermal_check()...

Regards,
Alex.


On 5/16/07, Len Brown <lenb@kernel.org> wrote:
>
> > --- a/drivers/acpi/thermal.c
> > +++ b/drivers/acpi/thermal.c
> > @@ -1106,7 +1106,6 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
> >               break;
> >       case ACPI_THERMAL_NOTIFY_THRESHOLDS:
> >               acpi_thermal_get_trip_points(tz);
> >-              acpi_thermal_check(tz);
> >               acpi_bus_generate_event(device, event, 0);
> >               break;
> >       case ACPI_THERMAL_NOTIFY_DEVICES:
>
> I don't think we can do this.
> When the thresholds change, there must be a check to compare the temperature
> with the thresholds -- otherwise what good was it to change the thresholds?
>
> -Len
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI: Remove possible recursion from thermal driver
  2007-05-16  2:19   ` Alexey Starikovskiy
@ 2007-05-17 18:23     ` Len Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Len Brown @ 2007-05-17 18:23 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: ACPI Devel Maling List

On Tuesday 15 May 2007 22:19, Alexey Starikovskiy wrote:
> Please read the spec 11.1.2 and 11.1.2.3. Trip points change _only_ to
> create a hysteresis loop, not by themselves. This means that we will
> get 0x81 type _only_ in response to us changing active state, the
> moment then we have temperature and just decided to move away from
> this trip point, not closer to it.
> If the temperature change, we get another event, 0x80, and _then_ we
> do thermal_check()...
> 

Hmm, this sounds promising.
Bob and I discussed this a few weeks ago and for some reason
we were convinced that we needed to get the temperature and
compare it to the new trip points.  Maybe we were wrong.

-Len

> 
> On 5/16/07, Len Brown <lenb@kernel.org> wrote:
> >
> > > --- a/drivers/acpi/thermal.c
> > > +++ b/drivers/acpi/thermal.c
> > > @@ -1106,7 +1106,6 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
> > >               break;
> > >       case ACPI_THERMAL_NOTIFY_THRESHOLDS:
> > >               acpi_thermal_get_trip_points(tz);
> > >-              acpi_thermal_check(tz);
> > >               acpi_bus_generate_event(device, event, 0);
> > >               break;
> > >       case ACPI_THERMAL_NOTIFY_DEVICES:
> >
> > I don't think we can do this.
> > When the thresholds change, there must be a check to compare the temperature
> > with the thresholds -- otherwise what good was it to change the thresholds?
> >
> > -Len
> >
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-17 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15  5:54 [PATCH] ACPI: Remove possible recursion from thermal driver Alexey Starikovskiy
2007-05-15 20:26 ` Len Brown
2007-05-16  2:19   ` Alexey Starikovskiy
2007-05-17 18:23     ` Len Brown

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.