Re: [PATCH 1/2] HWMON: coretemp, suspend fix

Rafael J. Wysocki
2007-12-04T19:41:26Z

On Tuesday, 4 of December 2007, Len Brown wrote:
> Applied to suspend branch.

Thanks!

BTW, the 4 topmost non-merge commits from the suspend branch are supposed to go
to Linus ASAP. Any chance to push them upstream?

Rafael

> On Monday 03 December 2007 12:01, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > It's not permitted to unregister a device after devices have been suspended.
> > It causes deadlocks to appear on systems with coretemp hwmon loaded.  To avoid
> > this, we can make coretemp_cpu_callback() do nothing if the _FROZEN bit is set
> > in action.
> >
> > Also, in other cases it's generally too late to unregister the coretemp device
> > if the CPU is already dead, so it should be unregistered on CPU_DOWN_PREPARE.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
> > Cc: Jiri Slaby <jirislaby@gmail.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > drivers/hwmon/coretemp.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > Index: linux-2.6/drivers/hwmon/coretemp.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/hwmon/coretemp.c
> > +++ linux-2.6/drivers/hwmon/coretemp.c
> > @@ -337,11 +337,10 @@ static int coretemp_cpu_callback(struct
> >
> > switch (action) {
> > case CPU_ONLINE:
> > - case CPU_ONLINE_FROZEN:
> > + case CPU_DOWN_FAILED:
> > coretemp_device_add(cpu);
> > break;
> > - case CPU_DEAD:
> > - case CPU_DEAD_FROZEN:
> > + case CPU_DOWN_PREPARE:
> > coretemp_device_remove(cpu);
> > break;
> > }
> >
> >
>
>

--
"Premature optimization is the root of all evil." - Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html