* thermal / x86: Fix init error code path in package temperature driver
@ 2013-07-20 20:48 Rafael J. Wysocki
2013-07-21 6:30 ` Srinivas Pandruvada
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-07-20 20:48 UTC (permalink / raw)
To: Zhang Rui; +Cc: LKML, Linux PM list, Srinivas Pandruvada
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The error code path of the x86 package temperature thermal driver's
initialization routine, pkg_temp_thermal_init(), makes an unbalanced
call to get_online_cpus(), which causes subsequent CPU offline
operations, and consequently system suspend, to permanently block
in cpu_hotplug_begin() on systems where get_core_online() returns
an error code.
Remove the extra get_online_cpus() to fix the problem (tested on
Toshiba Portege R500).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/thermal/x86_pkg_temp_thermal.c | 1 -
1 file changed, 1 deletion(-)
Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c
+++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
@@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init(
return 0;
err_ret:
- get_online_cpus();
for_each_online_cpu(i)
put_core_offline(i);
put_online_cpus();
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: thermal / x86: Fix init error code path in package temperature driver
2013-07-20 20:48 thermal / x86: Fix init error code path in package temperature driver Rafael J. Wysocki
@ 2013-07-21 6:30 ` Srinivas Pandruvada
2013-07-21 13:03 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Pandruvada @ 2013-07-21 6:30 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Zhang Rui, LKML, Linux PM list
Hi Rafael,
This is already fixed and currently merged to MM tree. So this should
make to rc2.
I don't know whether Rui will push or MM maintainer will push this change.
Thanks,
Srinivas
On 07/20/2013 01:48 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The error code path of the x86 package temperature thermal driver's
> initialization routine, pkg_temp_thermal_init(), makes an unbalanced
> call to get_online_cpus(), which causes subsequent CPU offline
> operations, and consequently system suspend, to permanently block
> in cpu_hotplug_begin() on systems where get_core_online() returns
> an error code.
>
> Remove the extra get_online_cpus() to fix the problem (tested on
> Toshiba Portege R500).
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/thermal/x86_pkg_temp_thermal.c | 1 -
> 1 file changed, 1 deletion(-)
>
> Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c
> +++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> @@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init(
> return 0;
>
> err_ret:
> - get_online_cpus();
> for_each_online_cpu(i)
> put_core_offline(i);
> put_online_cpus();
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: thermal / x86: Fix init error code path in package temperature driver
2013-07-21 6:30 ` Srinivas Pandruvada
@ 2013-07-21 13:03 ` Rafael J. Wysocki
2013-07-22 1:31 ` Zhang Rui
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-07-21 13:03 UTC (permalink / raw)
To: Srinivas Pandruvada; +Cc: Zhang Rui, LKML, Linux PM list
On Saturday, July 20, 2013 11:30:44 PM Srinivas Pandruvada wrote:
> Hi Rafael,
>
> This is already fixed and currently merged to MM tree. So this should
> make to rc2.
> I don't know whether Rui will push or MM maintainer will push this change.
Usually Andrew Morton (who maintains -mm) prefers maintainers to push things to
Linus.
Thanks,
Rafael
> On 07/20/2013 01:48 PM, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > The error code path of the x86 package temperature thermal driver's
> > initialization routine, pkg_temp_thermal_init(), makes an unbalanced
> > call to get_online_cpus(), which causes subsequent CPU offline
> > operations, and consequently system suspend, to permanently block
> > in cpu_hotplug_begin() on systems where get_core_online() returns
> > an error code.
> >
> > Remove the extra get_online_cpus() to fix the problem (tested on
> > Toshiba Portege R500).
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> > drivers/thermal/x86_pkg_temp_thermal.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> > ===================================================================
> > --- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c
> > +++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> > @@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init(
> > return 0;
> >
> > err_ret:
> > - get_online_cpus();
> > for_each_online_cpu(i)
> > put_core_offline(i);
> > put_online_cpus();
> >
> >
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: thermal / x86: Fix init error code path in package temperature driver
2013-07-21 13:03 ` Rafael J. Wysocki
@ 2013-07-22 1:31 ` Zhang Rui
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2013-07-22 1:31 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Srinivas Pandruvada, LKML, Linux PM list
On Sun, 2013-07-21 at 15:03 +0200, Rafael J. Wysocki wrote:
> On Saturday, July 20, 2013 11:30:44 PM Srinivas Pandruvada wrote:
> > Hi Rafael,
> >
> > This is already fixed and currently merged to MM tree. So this should
> > make to rc2.
> > I don't know whether Rui will push or MM maintainer will push this change.
>
> Usually Andrew Morton (who maintains -mm) prefers maintainers to push things to
> Linus.
>
I'll push it for rc2.
thanks,
rui
> Thanks,
> Rafael
>
>
> > On 07/20/2013 01:48 PM, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > The error code path of the x86 package temperature thermal driver's
> > > initialization routine, pkg_temp_thermal_init(), makes an unbalanced
> > > call to get_online_cpus(), which causes subsequent CPU offline
> > > operations, and consequently system suspend, to permanently block
> > > in cpu_hotplug_begin() on systems where get_core_online() returns
> > > an error code.
> > >
> > > Remove the extra get_online_cpus() to fix the problem (tested on
> > > Toshiba Portege R500).
> > >
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > ---
> > > drivers/thermal/x86_pkg_temp_thermal.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> > > ===================================================================
> > > --- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c
> > > +++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
> > > @@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init(
> > > return 0;
> > >
> > > err_ret:
> > > - get_online_cpus();
> > > for_each_online_cpu(i)
> > > put_core_offline(i);
> > > put_online_cpus();
> > >
> > >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-22 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-20 20:48 thermal / x86: Fix init error code path in package temperature driver Rafael J. Wysocki
2013-07-21 6:30 ` Srinivas Pandruvada
2013-07-21 13:03 ` Rafael J. Wysocki
2013-07-22 1:31 ` Zhang Rui
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.