From cdffe59f087dafab9ff12f6c8c2be4e67e848342 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 17 Mar 2010 09:18:34 +0000 Subject: [PATCH] Fix a race condition for cpufreq dbs timer while S3 resuming The cpufreq_dbs_timer_suspend/resume may race with dbs_timer_init while s3 resuming before this patch. This patch along with cset 21030 fix the bug 1586 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1586. Signed-off-by: Yu Ke Signed-off-by: Wei Gang --- xen/drivers/cpufreq/cpufreq_ondemand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/cpufreq/cpufreq_ondemand.c b/xen/drivers/cpufreq/cpufreq_ondemand.c index e85bcdf45d..d4d43f4a34 100644 --- a/xen/drivers/cpufreq/cpufreq_ondemand.c +++ b/xen/drivers/cpufreq/cpufreq_ondemand.c @@ -211,6 +211,7 @@ static void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) static void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) { dbs_info->enable = 0; + dbs_info->stoppable = 0; stop_timer(&dbs_timer[dbs_info->cpu]); } -- 2.39.5