2 * linux/kernel/time/tick-broadcast.c
4 * This file contains functions which emulate a local clock-event
5 * device via a broadcast event source.
7 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de>
8 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar
9 * Copyright(C) 2006-2007, Timesys Corp., Thomas Gleixner
11 * This code is licenced under the GPL version 2. For details see
12 * kernel-base/COPYING.
14 #include <linux/cpu.h>
15 #include <linux/err.h>
16 #include <linux/hrtimer.h>
17 #include <linux/interrupt.h>
18 #include <linux/percpu.h>
19 #include <linux/profile.h>
20 #include <linux/sched.h>
21 #include <linux/smp.h>
22 #include <linux/module.h>
24 #include "tick-internal.h"
27 * Broadcast support for broken x86 hardware, where the local apic
28 * timer stops in C3 state.
31 static struct tick_device tick_broadcast_device;
32 static cpumask_var_t tick_broadcast_mask;
33 static cpumask_var_t tick_broadcast_on;
34 static cpumask_var_t tmpmask;
35 static DEFINE_RAW_SPINLOCK(tick_broadcast_lock);
36 static int tick_broadcast_force;
38 #ifdef CONFIG_TICK_ONESHOT
39 static void tick_broadcast_clear_oneshot(int cpu);
41 static inline void tick_broadcast_clear_oneshot(int cpu) { }
45 * Debugging: see timer_list.c
47 struct tick_device *tick_get_broadcast_device(void)
49 return &tick_broadcast_device;
52 struct cpumask *tick_get_broadcast_mask(void)
54 return tick_broadcast_mask;
58 * Start the device in periodic mode
60 static void tick_broadcast_start_periodic(struct clock_event_device *bc)
63 tick_setup_periodic(bc, 1);
67 * Check, if the device can be utilized as broadcast device:
69 static bool tick_check_broadcast_device(struct clock_event_device *curdev,
70 struct clock_event_device *newdev)
72 if ((newdev->features & CLOCK_EVT_FEAT_DUMMY) ||
73 (newdev->features & CLOCK_EVT_FEAT_C3STOP))
76 if (tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT &&
77 !(newdev->features & CLOCK_EVT_FEAT_ONESHOT))
80 return !curdev || newdev->rating > curdev->rating;
84 * Conditionally install/replace broadcast device
86 void tick_install_broadcast_device(struct clock_event_device *dev)
88 struct clock_event_device *cur = tick_broadcast_device.evtdev;
90 if (!tick_check_broadcast_device(cur, dev))
93 if (!try_module_get(dev->owner))
96 clockevents_exchange_device(cur, dev);
98 cur->event_handler = clockevents_handle_noop;
99 tick_broadcast_device.evtdev = dev;
100 if (!cpumask_empty(tick_broadcast_mask))
101 tick_broadcast_start_periodic(dev);
103 * Inform all cpus about this. We might be in a situation
104 * where we did not switch to oneshot mode because the per cpu
105 * devices are affected by CLOCK_EVT_FEAT_C3STOP and the lack
106 * of a oneshot capable broadcast device. Without that
107 * notification the systems stays stuck in periodic mode
110 if (dev->features & CLOCK_EVT_FEAT_ONESHOT)
115 * Check, if the device is the broadcast device
117 int tick_is_broadcast_device(struct clock_event_device *dev)
119 return (dev && tick_broadcast_device.evtdev == dev);
122 static void err_broadcast(const struct cpumask *mask)
124 pr_crit_once("Failed to broadcast timer tick. Some CPUs may be unresponsive.\n");
127 static void tick_device_setup_broadcast_func(struct clock_event_device *dev)
130 dev->broadcast = tick_broadcast;
131 if (!dev->broadcast) {
132 pr_warn_once("%s depends on broadcast, but no broadcast function available\n",
134 dev->broadcast = err_broadcast;
139 * Check, if the device is disfunctional and a place holder, which
140 * needs to be handled by the broadcast device.
142 int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
144 struct clock_event_device *bc = tick_broadcast_device.evtdev;
148 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
151 * Devices might be registered with both periodic and oneshot
152 * mode disabled. This signals, that the device needs to be
153 * operated from the broadcast device and is a placeholder for
154 * the cpu local device.
156 if (!tick_device_is_functional(dev)) {
157 dev->event_handler = tick_handle_periodic;
158 tick_device_setup_broadcast_func(dev);
159 cpumask_set_cpu(cpu, tick_broadcast_mask);
160 tick_broadcast_start_periodic(bc);
164 * Clear the broadcast bit for this cpu if the
165 * device is not power state affected.
167 if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
168 cpumask_clear_cpu(cpu, tick_broadcast_mask);
170 tick_device_setup_broadcast_func(dev);
173 * Clear the broadcast bit if the CPU is not in
174 * periodic broadcast on state.
176 if (!cpumask_test_cpu(cpu, tick_broadcast_on))
177 cpumask_clear_cpu(cpu, tick_broadcast_mask);
179 switch (tick_broadcast_device.mode) {
180 case TICKDEV_MODE_ONESHOT:
182 * If the system is in oneshot mode we can
183 * unconditionally clear the oneshot mask bit,
184 * because the CPU is running and therefore
185 * not in an idle state which causes the power
186 * state affected device to stop. Let the
187 * caller initialize the device.
189 tick_broadcast_clear_oneshot(cpu);
193 case TICKDEV_MODE_PERIODIC:
195 * If the system is in periodic mode, check
196 * whether the broadcast device can be
199 if (cpumask_empty(tick_broadcast_mask) && bc)
200 clockevents_shutdown(bc);
202 * If we kept the cpu in the broadcast mask,
203 * tell the caller to leave the per cpu device
204 * in shutdown state. The periodic interrupt
205 * is delivered by the broadcast device.
207 ret = cpumask_test_cpu(cpu, tick_broadcast_mask);
215 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
219 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
220 int tick_receive_broadcast(void)
222 struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
223 struct clock_event_device *evt = td->evtdev;
228 if (!evt->event_handler)
231 evt->event_handler(evt);
237 * Broadcast the event to the cpus, which are set in the mask (mangled).
239 static void tick_do_broadcast(struct cpumask *mask)
241 int cpu = smp_processor_id();
242 struct tick_device *td;
245 * Check, if the current cpu is in the mask
247 if (cpumask_test_cpu(cpu, mask)) {
248 cpumask_clear_cpu(cpu, mask);
249 td = &per_cpu(tick_cpu_device, cpu);
250 td->evtdev->event_handler(td->evtdev);
253 if (!cpumask_empty(mask)) {
255 * It might be necessary to actually check whether the devices
256 * have different broadcast functions. For now, just use the
257 * one of the first device. This works as long as we have this
258 * misfeature only on x86 (lapic)
260 td = &per_cpu(tick_cpu_device, cpumask_first(mask));
261 td->evtdev->broadcast(mask);
266 * Periodic broadcast:
267 * - invoke the broadcast handlers
269 static void tick_do_periodic_broadcast(void)
271 raw_spin_lock(&tick_broadcast_lock);
273 cpumask_and(tmpmask, cpu_online_mask, tick_broadcast_mask);
274 tick_do_broadcast(tmpmask);
276 raw_spin_unlock(&tick_broadcast_lock);
280 * Event handler for periodic broadcast ticks
282 static void tick_handle_periodic_broadcast(struct clock_event_device *dev)
286 tick_do_periodic_broadcast();
289 * The device is in periodic mode. No reprogramming necessary:
291 if (dev->mode == CLOCK_EVT_MODE_PERIODIC)
295 * Setup the next period for devices, which do not have
296 * periodic mode. We read dev->next_event first and add to it
297 * when the event already expired. clockevents_program_event()
298 * sets dev->next_event only when the event is really
299 * programmed to the device.
301 for (next = dev->next_event; ;) {
302 next = ktime_add(next, tick_period);
304 if (!clockevents_program_event(dev, next, false))
306 tick_do_periodic_broadcast();
311 * Powerstate information: The system enters/leaves a state, where
312 * affected devices might stop
314 static void tick_do_broadcast_on_off(unsigned long *reason)
316 struct clock_event_device *bc, *dev;
317 struct tick_device *td;
321 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
323 cpu = smp_processor_id();
324 td = &per_cpu(tick_cpu_device, cpu);
326 bc = tick_broadcast_device.evtdev;
329 * Is the device not affected by the powerstate ?
331 if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP))
334 if (!tick_device_is_functional(dev))
337 bc_stopped = cpumask_empty(tick_broadcast_mask);
340 case CLOCK_EVT_NOTIFY_BROADCAST_ON:
341 case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
342 cpumask_set_cpu(cpu, tick_broadcast_on);
343 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) {
344 if (tick_broadcast_device.mode ==
345 TICKDEV_MODE_PERIODIC)
346 clockevents_shutdown(dev);
348 if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
349 tick_broadcast_force = 1;
351 case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
352 if (tick_broadcast_force)
354 cpumask_clear_cpu(cpu, tick_broadcast_on);
355 if (!tick_device_is_functional(dev))
357 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_mask)) {
358 if (tick_broadcast_device.mode ==
359 TICKDEV_MODE_PERIODIC)
360 tick_setup_periodic(dev, 0);
365 if (cpumask_empty(tick_broadcast_mask)) {
367 clockevents_shutdown(bc);
368 } else if (bc_stopped) {
369 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
370 tick_broadcast_start_periodic(bc);
372 tick_broadcast_setup_oneshot(bc);
375 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
379 * Powerstate information: The system enters/leaves a state, where
380 * affected devices might stop.
382 void tick_broadcast_on_off(unsigned long reason, int *oncpu)
384 if (!cpumask_test_cpu(*oncpu, cpu_online_mask))
385 printk(KERN_ERR "tick-broadcast: ignoring broadcast for "
386 "offline CPU #%d\n", *oncpu);
388 tick_do_broadcast_on_off(&reason);
392 * Set the periodic handler depending on broadcast on/off
394 void tick_set_periodic_handler(struct clock_event_device *dev, int broadcast)
397 dev->event_handler = tick_handle_periodic;
399 dev->event_handler = tick_handle_periodic_broadcast;
403 * Remove a CPU from broadcasting
405 void tick_shutdown_broadcast(unsigned int *cpup)
407 struct clock_event_device *bc;
409 unsigned int cpu = *cpup;
411 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
413 bc = tick_broadcast_device.evtdev;
414 cpumask_clear_cpu(cpu, tick_broadcast_mask);
415 cpumask_clear_cpu(cpu, tick_broadcast_on);
417 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) {
418 if (bc && cpumask_empty(tick_broadcast_mask))
419 clockevents_shutdown(bc);
422 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
425 void tick_suspend_broadcast(void)
427 struct clock_event_device *bc;
430 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
432 bc = tick_broadcast_device.evtdev;
434 clockevents_shutdown(bc);
436 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
439 int tick_resume_broadcast(void)
441 struct clock_event_device *bc;
445 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
447 bc = tick_broadcast_device.evtdev;
450 clockevents_set_mode(bc, CLOCK_EVT_MODE_RESUME);
452 switch (tick_broadcast_device.mode) {
453 case TICKDEV_MODE_PERIODIC:
454 if (!cpumask_empty(tick_broadcast_mask))
455 tick_broadcast_start_periodic(bc);
456 broadcast = cpumask_test_cpu(smp_processor_id(),
457 tick_broadcast_mask);
459 case TICKDEV_MODE_ONESHOT:
460 if (!cpumask_empty(tick_broadcast_mask))
461 broadcast = tick_resume_broadcast_oneshot(bc);
465 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
471 #ifdef CONFIG_TICK_ONESHOT
473 static cpumask_var_t tick_broadcast_oneshot_mask;
474 static cpumask_var_t tick_broadcast_pending_mask;
475 static cpumask_var_t tick_broadcast_force_mask;
478 * Exposed for debugging: see timer_list.c
480 struct cpumask *tick_get_broadcast_oneshot_mask(void)
482 return tick_broadcast_oneshot_mask;
486 * Called before going idle with interrupts disabled. Checks whether a
487 * broadcast event from the other core is about to happen. We detected
488 * that in tick_broadcast_oneshot_control(). The callsite can use this
489 * to avoid a deep idle transition as we are about to get the
490 * broadcast IPI right away.
492 int tick_check_broadcast_expired(void)
494 return cpumask_test_cpu(smp_processor_id(), tick_broadcast_force_mask);
498 * Set broadcast interrupt affinity
500 static void tick_broadcast_set_affinity(struct clock_event_device *bc,
501 const struct cpumask *cpumask)
503 if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
506 if (cpumask_equal(bc->cpumask, cpumask))
509 bc->cpumask = cpumask;
510 irq_set_affinity(bc->irq, bc->cpumask);
513 static int tick_broadcast_set_event(struct clock_event_device *bc, int cpu,
514 ktime_t expires, int force)
518 if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
519 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
521 ret = clockevents_program_event(bc, expires, force);
523 tick_broadcast_set_affinity(bc, cpumask_of(cpu));
527 int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
529 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
534 * Called from irq_enter() when idle was interrupted to reenable the
537 void tick_check_oneshot_broadcast(int cpu)
539 if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) {
540 struct tick_device *td = &per_cpu(tick_cpu_device, cpu);
543 * We might be in the middle of switching over from
544 * periodic to oneshot. If the CPU has not yet
545 * switched over, leave the device alone.
547 if (td->mode == TICKDEV_MODE_ONESHOT) {
548 clockevents_set_mode(td->evtdev,
549 CLOCK_EVT_MODE_ONESHOT);
555 * Handle oneshot mode broadcasting
557 static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
559 struct tick_device *td;
560 ktime_t now, next_event;
561 int cpu, next_cpu = 0;
563 raw_spin_lock(&tick_broadcast_lock);
565 dev->next_event.tv64 = KTIME_MAX;
566 next_event.tv64 = KTIME_MAX;
567 cpumask_clear(tmpmask);
569 /* Find all expired events */
570 for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
571 td = &per_cpu(tick_cpu_device, cpu);
572 if (td->evtdev->next_event.tv64 <= now.tv64) {
573 cpumask_set_cpu(cpu, tmpmask);
575 * Mark the remote cpu in the pending mask, so
576 * it can avoid reprogramming the cpu local
577 * timer in tick_broadcast_oneshot_control().
579 cpumask_set_cpu(cpu, tick_broadcast_pending_mask);
580 } else if (td->evtdev->next_event.tv64 < next_event.tv64) {
581 next_event.tv64 = td->evtdev->next_event.tv64;
587 * Remove the current cpu from the pending mask. The event is
588 * delivered immediately in tick_do_broadcast() !
590 cpumask_clear_cpu(smp_processor_id(), tick_broadcast_pending_mask);
592 /* Take care of enforced broadcast requests */
593 cpumask_or(tmpmask, tmpmask, tick_broadcast_force_mask);
594 cpumask_clear(tick_broadcast_force_mask);
597 * Wakeup the cpus which have an expired event.
599 tick_do_broadcast(tmpmask);
602 * Two reasons for reprogram:
604 * - The global event did not expire any CPU local
605 * events. This happens in dyntick mode, as the maximum PIT
606 * delta is quite small.
608 * - There are pending events on sleeping CPUs which were not
611 if (next_event.tv64 != KTIME_MAX) {
613 * Rearm the broadcast device. If event expired,
616 if (tick_broadcast_set_event(dev, next_cpu, next_event, 0))
619 raw_spin_unlock(&tick_broadcast_lock);
623 * Powerstate information: The system enters/leaves a state, where
624 * affected devices might stop
626 void tick_broadcast_oneshot_control(unsigned long reason)
628 struct clock_event_device *bc, *dev;
629 struct tick_device *td;
635 * Periodic mode does not care about the enter/exit of power
638 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
642 * We are called with preemtion disabled from the depth of the
643 * idle code, so we can't be moved away.
645 cpu = smp_processor_id();
646 td = &per_cpu(tick_cpu_device, cpu);
649 if (!(dev->features & CLOCK_EVT_FEAT_C3STOP))
652 bc = tick_broadcast_device.evtdev;
654 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
655 if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) {
656 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {
657 WARN_ON_ONCE(cpumask_test_cpu(cpu, tick_broadcast_pending_mask));
658 clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
660 * We only reprogram the broadcast timer if we
661 * did not mark ourself in the force mask and
662 * if the cpu local event is earlier than the
663 * broadcast event. If the current CPU is in
664 * the force mask, then we are going to be
665 * woken by the IPI right away.
667 if (!cpumask_test_cpu(cpu, tick_broadcast_force_mask) &&
668 dev->next_event.tv64 < bc->next_event.tv64)
669 tick_broadcast_set_event(bc, cpu, dev->next_event, 1);
672 if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {
673 clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
675 * The cpu which was handling the broadcast
676 * timer marked this cpu in the broadcast
677 * pending mask and fired the broadcast
678 * IPI. So we are going to handle the expired
679 * event anyway via the broadcast IPI
680 * handler. No need to reprogram the timer
681 * with an already expired event.
683 if (cpumask_test_and_clear_cpu(cpu,
684 tick_broadcast_pending_mask))
688 * Bail out if there is no next event.
690 if (dev->next_event.tv64 == KTIME_MAX)
693 * If the pending bit is not set, then we are
694 * either the CPU handling the broadcast
695 * interrupt or we got woken by something else.
697 * We are not longer in the broadcast mask, so
698 * if the cpu local expiry time is already
699 * reached, we would reprogram the cpu local
700 * timer with an already expired event.
702 * This can lead to a ping-pong when we return
703 * to idle and therefor rearm the broadcast
704 * timer before the cpu local timer was able
705 * to fire. This happens because the forced
706 * reprogramming makes sure that the event
707 * will happen in the future and depending on
708 * the min_delta setting this might be far
709 * enough out that the ping-pong starts.
711 * If the cpu local next_event has expired
712 * then we know that the broadcast timer
713 * next_event has expired as well and
714 * broadcast is about to be handled. So we
715 * avoid reprogramming and enforce that the
716 * broadcast handler, which did not run yet,
717 * will invoke the cpu local handler.
719 * We cannot call the handler directly from
720 * here, because we might be in a NOHZ phase
721 * and we did not go through the irq_enter()
725 if (dev->next_event.tv64 <= now.tv64) {
726 cpumask_set_cpu(cpu, tick_broadcast_force_mask);
730 * We got woken by something else. Reprogram
731 * the cpu local timer device.
733 tick_program_event(dev->next_event, 1);
737 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
741 * Reset the one shot broadcast for a cpu
743 * Called with tick_broadcast_lock held
745 static void tick_broadcast_clear_oneshot(int cpu)
747 cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);
748 cpumask_clear_cpu(cpu, tick_broadcast_pending_mask);
751 static void tick_broadcast_init_next_event(struct cpumask *mask,
754 struct tick_device *td;
757 for_each_cpu(cpu, mask) {
758 td = &per_cpu(tick_cpu_device, cpu);
760 td->evtdev->next_event = expires;
765 * tick_broadcast_setup_oneshot - setup the broadcast device
767 void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
769 int cpu = smp_processor_id();
771 /* Set it up only once ! */
772 if (bc->event_handler != tick_handle_oneshot_broadcast) {
773 int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC;
775 bc->event_handler = tick_handle_oneshot_broadcast;
778 * We must be careful here. There might be other CPUs
779 * waiting for periodic broadcast. We need to set the
780 * oneshot_mask bits for those and program the
781 * broadcast device to fire.
783 cpumask_copy(tmpmask, tick_broadcast_mask);
784 cpumask_clear_cpu(cpu, tmpmask);
785 cpumask_or(tick_broadcast_oneshot_mask,
786 tick_broadcast_oneshot_mask, tmpmask);
788 if (was_periodic && !cpumask_empty(tmpmask)) {
789 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
790 tick_broadcast_init_next_event(tmpmask,
792 tick_broadcast_set_event(bc, cpu, tick_next_period, 1);
794 bc->next_event.tv64 = KTIME_MAX;
797 * The first cpu which switches to oneshot mode sets
798 * the bit for all other cpus which are in the general
799 * (periodic) broadcast mask. So the bit is set and
800 * would prevent the first broadcast enter after this
801 * to program the bc device.
803 tick_broadcast_clear_oneshot(cpu);
808 * Select oneshot operating mode for the broadcast device
810 void tick_broadcast_switch_to_oneshot(void)
812 struct clock_event_device *bc;
815 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
817 tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;
818 bc = tick_broadcast_device.evtdev;
820 tick_broadcast_setup_oneshot(bc);
822 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
827 * Remove a dead CPU from broadcasting
829 void tick_shutdown_broadcast_oneshot(unsigned int *cpup)
832 unsigned int cpu = *cpup;
834 raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
837 * Clear the broadcast mask flag for the dead cpu, but do not
838 * stop the broadcast device!
840 cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);
842 raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
846 * Check, whether the broadcast device is in one shot mode
848 int tick_broadcast_oneshot_active(void)
850 return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT;
854 * Check whether the broadcast device supports oneshot.
856 bool tick_broadcast_oneshot_available(void)
858 struct clock_event_device *bc = tick_broadcast_device.evtdev;
860 return bc ? bc->features & CLOCK_EVT_FEAT_ONESHOT : false;
865 void __init tick_broadcast_init(void)
867 zalloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT);
868 zalloc_cpumask_var(&tick_broadcast_on, GFP_NOWAIT);
869 zalloc_cpumask_var(&tmpmask, GFP_NOWAIT);
870 #ifdef CONFIG_TICK_ONESHOT
871 zalloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT);
872 zalloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT);
873 zalloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT);