aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/time.c
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mako.i.cabal.ca>2006-10-05 23:45:45 -0400
committerMatthew Wilcox <willy@parisc-linux.org>2006-10-07 07:21:03 -0400
commit09690b18b7b9696bb719b246e77c7af9952da12c (patch)
tree0efe3f79c9e9fd397d78fc17ee322915fd3a1905 /arch/parisc/kernel/time.c
parentba0e427f215b1c58881a737f46d30ae03b83178c (diff)
[PARISC] Make firmware calls irqsafe-ish...
There's no reason why we shouldn't be using _irqsave instead of _irq for any of these calls. fwiw, this fixes the "start_kernel(): bug: interrupts were enabled early" message displayed on bootup recently. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Diffstat (limited to 'arch/parisc/kernel/time.c')
-rw-r--r--arch/parisc/kernel/time.c8
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;