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
{
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)