File 19240-ioapic-s3-suspend-fix.patch of Package xen

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1236003425 0
# Node ID b0ca8fd79d44e8b9c250309bd55e33af1f452704
# Parent  81f832c74e8507c3f3d37da01d307cb47baff72f
x86, time: 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@intel.com>
xen-unstable changeset:   19240:9af46734ce70fcc7e89f3af1ace876652ec9478f
xen-unstable date:        Sun Mar 01 14:30:35 2009 +0000

Index: xen-3.3.1-testing/xen/arch/x86/time.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/time.c
+++ xen-3.3.1-testing/xen/arch/x86/time.c
@@ -590,13 +590,14 @@ static void platform_time_calibration(vo
 {
     u64 count;
     s_time_t stamp;
+    unsigned long flags;
 
-    spin_lock_irq(&platform_timer_lock);
+    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)
openSUSE Build Service is sponsored by