diff options
Diffstat (limited to 'arch/parisc/kernel/time.c')
-rw-r--r-- | arch/parisc/kernel/time.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index b44839203e69..8c9b8a7ef244 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -319,13 +319,15 @@ void __init time_init(void) | |||
319 | 319 | ||
320 | start_cpu_itimer(); /* get CPU 0 started */ | 320 | start_cpu_itimer(); /* get CPU 0 started */ |
321 | 321 | ||
322 | if(pdc_tod_read(&tod_data) == 0) { | 322 | if (pdc_tod_read(&tod_data) == 0) { |
323 | write_seqlock_irq(&xtime_lock); | 323 | unsigned long flags; |
324 | |||
325 | write_seqlock_irqsave(&xtime_lock, flags); | ||
324 | xtime.tv_sec = tod_data.tod_sec; | 326 | xtime.tv_sec = tod_data.tod_sec; |
325 | xtime.tv_nsec = tod_data.tod_usec * 1000; | 327 | xtime.tv_nsec = tod_data.tod_usec * 1000; |
326 | set_normalized_timespec(&wall_to_monotonic, | 328 | set_normalized_timespec(&wall_to_monotonic, |
327 | -xtime.tv_sec, -xtime.tv_nsec); | 329 | -xtime.tv_sec, -xtime.tv_nsec); |
328 | write_sequnlock_irq(&xtime_lock); | 330 | write_sequnlock_irqrestore(&xtime_lock, flags); |
329 | } else { | 331 | } else { |
330 | printk(KERN_ERR "Error reading tod clock\n"); | 332 | printk(KERN_ERR "Error reading tod clock\n"); |
331 | xtime.tv_sec = 0; | 333 | xtime.tv_sec = 0; |