summaryrefslogtreecommitdiff
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 05:21:03 -0600
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)
start_cpu_itimer(); /* get CPU 0 started */
- if(pdc_tod_read(&tod_data) == 0) {
- write_seqlock_irq(&xtime_lock);
+ if (pdc_tod_read(&tod_data) == 0) {
+ unsigned long flags;
+
+ write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = tod_data.tod_sec;
xtime.tv_nsec = tod_data.tod_usec * 1000;
set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);
- write_sequnlock_irq(&xtime_lock);
+ write_sequnlock_irqrestore(&xtime_lock, flags);
} else {
printk(KERN_ERR "Error reading tod clock\n");
xtime.tv_sec = 0;