irq_work: Flush work on CPU_DYING
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 15 Nov 2012 16:34:21 +0000 (11:34 -0500)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 17 Nov 2012 18:31:03 +0000 (19:31 +0100)
commitc0e980a4bd7fc5c9b748f2f0209d2a48c0fdf0ab
tree39eda738087b5bda53b0cb06c9549656266a03c2
parent00b42959106a9ca1c2899e591ae4e9a83ad6af05
irq_work: Flush work on CPU_DYING

In order not to offline a CPU with pending irq works, flush the
queue from CPU_DYING. The notifier is called by stop_machine on
the CPU that is going down. The code will not be called from irq context
(so things like get_irq_regs() wont work) but I'm not sure what the
requirements are for irq_work in that regard (Peter?). But irqs are
disabled and the CPU is about to go offline. Might as well flush the work.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
kernel/irq_work.c