|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 2 of 3] fix S3 suspend error
# HG changeset patch
# User Guanqun Lu <guanqun.lu@xxxxxxxxx>
# Date 1235401621 -28800
# Node ID 0e17f070db2aa92bc74f29245cdb8528aa72bbe3
# Parent b713518a241b6f6e07edb10c3fc38143138f82ea
fix S3 suspend error
platform_time_calibration() is invoked in S3 when irq is disabled,
which causes ASSERT() error in spin_lock_irq(). spin_lock_irqsave()
saves us.
Signed-off-by: Guanqun Lu <guanqun.lu@xxxxxxxxx>
diff -r b713518a241b -r 0e17f070db2a xen/arch/x86/time.c
--- a/xen/arch/x86/time.c Mon Feb 23 23:06:32 2009 +0800
+++ b/xen/arch/x86/time.c Mon Feb 23 23:07:01 2009 +0800
@@ -607,13 +607,14 @@ static void platform_time_calibration(vo
{
u64 count;
s_time_t stamp;
-
- spin_lock_irq(&platform_timer_lock);
+ unsigned long flags;
+
+ spin_lock_irqsave(&platform_timer_lock, flags);
count = plt_stamp64 + ((plt_src.read_counter() - plt_stamp) & plt_mask);
stamp = __read_platform_stime(count);
stime_platform_stamp = stamp;
platform_timer_stamp = count;
- spin_unlock_irq(&platform_timer_lock);
+ spin_unlock_irqrestore(&platform_timer_lock, flags);
}
static void resume_platform_timer(void)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|