aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-09-29 09:47:42 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-09-29 11:09:14 -0400
commitccc7dadf736639da86f3e0c86832c11a66fc8221 (patch)
tree3f1c0df0a291fec4a10d72cc1ab278ad81e697c5 /include/linux/hrtimer.h
parentb00c1a99e7758f794923c61e5cd55268d61c9469 (diff)
hrtimer: prevent migration of per CPU hrtimers
Impact: per CPU hrtimers can be migrated from a dead CPU The hrtimer code has no knowledge about per CPU timers, but we need to prevent the migration of such timers and warn when such a timer is active at migration time. Explicitely mark the timers as per CPU and use a more understandable mode descriptor for the interrupts safe unlocked callback mode, which is used by hrtimer_sleeper and the scheduler code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index bdd88df1b4e5..2f245fe63bda 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -47,14 +47,22 @@ enum hrtimer_restart {
47 * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context 47 * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context
48 * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and 48 * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and
49 * does not restart the timer 49 * does not restart the timer
50 * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in hardirq context 50 * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context
51 * Special mode for tick emultation 51 * Special mode for tick emulation and
52 * scheduler timer. Such timers are per
53 * cpu and not allowed to be migrated on
54 * cpu unplug.
55 * HRTIMER_CB_IRQSAFE_UNLOCKED: Callback should run in hardirq context
56 * with timer->base lock unlocked
57 * used for timers which call wakeup to
58 * avoid lock order problems with rq->lock
52 */ 59 */
53enum hrtimer_cb_mode { 60enum hrtimer_cb_mode {
54 HRTIMER_CB_SOFTIRQ, 61 HRTIMER_CB_SOFTIRQ,
55 HRTIMER_CB_IRQSAFE, 62 HRTIMER_CB_IRQSAFE,
56 HRTIMER_CB_IRQSAFE_NO_RESTART, 63 HRTIMER_CB_IRQSAFE_NO_RESTART,
57 HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, 64 HRTIMER_CB_IRQSAFE_PERCPU,
65 HRTIMER_CB_IRQSAFE_UNLOCKED,
58}; 66};
59 67
60/* 68/*