Commit 09690b18 authored by Kyle McMartin's avatar Kyle McMartin Committed by Matthew Wilcox

[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: default avatarKyle McMartin <kyle@parisc-linux.org>
Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
parent ba0e427f
This diff is collapsed.
...@@ -319,13 +319,15 @@ void __init time_init(void) ...@@ -319,13 +319,15 @@ void __init time_init(void)
start_cpu_itimer(); /* get CPU 0 started */ start_cpu_itimer(); /* get CPU 0 started */
if(pdc_tod_read(&tod_data) == 0) { if (pdc_tod_read(&tod_data) == 0) {
write_seqlock_irq(&xtime_lock); unsigned long flags;
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = tod_data.tod_sec; xtime.tv_sec = tod_data.tod_sec;
xtime.tv_nsec = tod_data.tod_usec * 1000; xtime.tv_nsec = tod_data.tod_usec * 1000;
set_normalized_timespec(&wall_to_monotonic, set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec); -xtime.tv_sec, -xtime.tv_nsec);
write_sequnlock_irq(&xtime_lock); write_sequnlock_irqrestore(&xtime_lock, flags);
} else { } else {
printk(KERN_ERR "Error reading tod clock\n"); printk(KERN_ERR "Error reading tod clock\n");
xtime.tv_sec = 0; xtime.tv_sec = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment