The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] hres_timers_resume must block interrupts
@ 2007-08-13 23:26 Joe Korty
  2007-08-14  5:36 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Korty @ 2007-08-13 23:26 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Ingo Molnar, linux-kernel

Retrigger_next_event() must be called with interrupts disabled.

All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
But the version exported to other files, hres_timers_resume(), does not
do the IRQ blocking, nor does the (single) external caller of it.

Rather than require that users of hres_timers_resume() do the IRQ blocking,
this patch makes the blocking part of the hres_timers_resume() functionality.

(Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

Signed-off-by: Joe Korty (joe.korty@ccur.com)

Index: 2.6.23-rc3/kernel/hrtimer.c
===================================================================
--- 2.6.23-rc3.orig/kernel/hrtimer.c	2007-08-13 18:30:09.000000000 -0400
+++ 2.6.23-rc3/kernel/hrtimer.c	2007-08-13 18:38:48.000000000 -0400
@@ -463,10 +463,11 @@
  */
 void hres_timers_resume(void)
 {
-	WARN_ON_ONCE(num_online_cpus() > 1);
+	unsigned long flags;
 
-	/* Retrigger the CPU local events: */
+	local_irq_save(flags);
 	retrigger_next_event(NULL);
+	local_irq_restore(flags);
 }
 
 /*


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-14  6:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 23:26 [PATCH] hres_timers_resume must block interrupts Joe Korty
2007-08-14  5:36 ` Thomas Gleixner
2007-08-14  6:27   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox