aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-02-13 15:33:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-13 16:29:25 -0500
commitaa02cd2d9bd1e24a230bd66a0a741b984d03915a (patch)
tree06e341e095749048feabbe2ded236e5db38ee251 /arch/m68knommu/kernel
parent10270d4838bdc493781f5a1cf2e90e9c34c9142f (diff)
xtime_lock vs update_process_times
Commit d3d74453c34f8fd87674a8cf5b8a327c68f22e99 ("hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback") broke several archs, and since only Russell bothered to merge the fix, and Greg to ACK his arch, I'm sending this for merger. I have confirmation that the Alpha bit results in a booting kernel. That leaves: blackfin, frv, sh and sparc untested. The deadlock in question was found by Russell: IRQ handle -> timer_tick() - xtime seqlock held for write -> update_process_times() -> run_local_timers() -> hrtimer_run_queues() -> hrtimer_get_softirq_time() - tries to get a read lock Now, Thomas assures me the fix is trivial, only do_timer() needs to be done under the xtime_lock, and update_process_times() can savely be removed from under it. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Greg Ungerer <gerg@uclinux.org> CC: Richard Henderson <rth@twiddle.net> CC: Bryan Wu <bryan.wu@analog.com> CC: David Howells <dhowells@redhat.com> CC: Paul Mundt <lethal@linux-sh.org> CC: William Irwin <wli@holomorphy.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68knommu/kernel')
-rw-r--r--arch/m68knommu/kernel/time.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index 89cdbcaeb45f..0ccfb2ad6380 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -42,14 +42,12 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy)
42 /* last time the cmos clock got updated */ 42 /* last time the cmos clock got updated */
43 static long last_rtc_update=0; 43 static long last_rtc_update=0;
44 44
45 if (current->pid)
46 profile_tick(CPU_PROFILING);
47
45 write_seqlock(&xtime_lock); 48 write_seqlock(&xtime_lock);
46 49
47 do_timer(1); 50 do_timer(1);
48#ifndef CONFIG_SMP
49 update_process_times(user_mode(get_irq_regs()));
50#endif
51 if (current->pid)
52 profile_tick(CPU_PROFILING);
53 51
54 /* 52 /*
55 * If we have an externally synchronized Linux clock, then update 53 * If we have an externally synchronized Linux clock, then update
@@ -67,6 +65,10 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy)
67 } 65 }
68 66
69 write_sequnlock(&xtime_lock); 67 write_sequnlock(&xtime_lock);
68
69#ifndef CONFIG_SMP
70 update_process_times(user_mode(get_irq_regs()));
71#endif
70 return(IRQ_HANDLED); 72 return(IRQ_HANDLED);
71} 73}
72 74