[PATCH] timer TSC check suspend notifier change
At suspend time, the TSC CPUFREQ_SUSPENDCHANGE notifier change might wrongly enable interrupt. cpufreq driver suspend/resume is in interrupt disabled environment. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
160bd18e5e
commit
6ba815ded3
|
@ -279,7 +279,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
|
||||||
{
|
{
|
||||||
struct cpufreq_freqs *freq = data;
|
struct cpufreq_freqs *freq = data;
|
||||||
|
|
||||||
if (val != CPUFREQ_RESUMECHANGE)
|
if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE)
|
||||||
write_seqlock_irq(&xtime_lock);
|
write_seqlock_irq(&xtime_lock);
|
||||||
if (!ref_freq) {
|
if (!ref_freq) {
|
||||||
if (!freq->old){
|
if (!freq->old){
|
||||||
|
@ -312,7 +312,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (val != CPUFREQ_RESUMECHANGE)
|
if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE)
|
||||||
write_sequnlock_irq(&xtime_lock);
|
write_sequnlock_irq(&xtime_lock);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue