ia64/xen-unstable

changeset 19241:9af46734ce70

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>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Mar 01 14:30:35 2009 +0000 (2009-03-01)
parents 9cad48ba52b0
children edd7f612ebe0
files xen/arch/x86/time.c
line diff
     1.1 --- a/xen/arch/x86/time.c	Sun Mar 01 14:17:08 2009 +0000
     1.2 +++ b/xen/arch/x86/time.c	Sun Mar 01 14:30:35 2009 +0000
     1.3 @@ -607,13 +607,14 @@ static void platform_time_calibration(vo
     1.4  {
     1.5      u64 count;
     1.6      s_time_t stamp;
     1.7 +    unsigned long flags;
     1.8  
     1.9 -    spin_lock_irq(&platform_timer_lock);
    1.10 +    spin_lock_irqsave(&platform_timer_lock, flags);
    1.11      count = plt_stamp64 + ((plt_src.read_counter() - plt_stamp) & plt_mask);
    1.12      stamp = __read_platform_stime(count);
    1.13      stime_platform_stamp = stamp;
    1.14      platform_timer_stamp = count;
    1.15 -    spin_unlock_irq(&platform_timer_lock);
    1.16 +    spin_unlock_irqrestore(&platform_timer_lock, flags);
    1.17  }
    1.18  
    1.19  static void resume_platform_timer(void)