diff options
| -rw-r--r-- | arch/arm/kernel/process.c | 11 | ||||
| -rw-r--r-- | arch/x86/kernel/process.c | 12 | ||||
| -rw-r--r-- | include/linux/clockchips.h | 12 | ||||
| -rw-r--r-- | init/main.c | 2 | ||||
| -rw-r--r-- | kernel/hrtimer.c | 6 | ||||
| -rw-r--r-- | kernel/time/tick-broadcast.c | 225 | ||||
| -rw-r--r-- | kernel/time/tick-common.c | 1 | ||||
| -rw-r--r-- | kernel/time/tick-internal.h | 3 | ||||
| -rw-r--r-- | kernel/time/tick-sched.c | 4 | 
9 files changed, 214 insertions, 62 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 047d3e40e47..db4ffd09ee2 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -199,7 +199,16 @@ void cpu_idle(void)  #ifdef CONFIG_PL310_ERRATA_769419  			wmb();  #endif -			if (hlt_counter) { +			/* +			 * In poll mode we reenable interrupts and spin. +			 * +			 * Also if we detected in the wakeup from idle +			 * path that the tick broadcast device expired +			 * for us, we don't want to go deep idle as we +			 * know that the IPI is going to arrive right +			 * away +			 */ +			if (hlt_counter || tick_check_broadcast_expired()) {  				local_irq_enable();  				cpu_relax();  			} else if (!need_resched()) { diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 14ae10031ff..aa524da03bb 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -336,6 +336,18 @@ void cpu_idle(void)  			local_touch_nmi();  			local_irq_disable(); +			/* +			 * We detected in the wakeup path that the +			 * tick broadcast device expired for us, but +			 * we raced with the other CPU and came back +			 * here before it was able to fire the IPI. +			 * No point in going idle. +			 */ +			if (tick_check_broadcast_expired()) { +				local_irq_enable(); +				continue; +			} +  			enter_idle();  			/* Don't trace irqs off for idle */ diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 66346521cb6..464e229e7d8 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -55,6 +55,11 @@ enum clock_event_nofitiers {  #define CLOCK_EVT_FEAT_C3STOP		0x000008  #define CLOCK_EVT_FEAT_DUMMY		0x000010 +/* + * Core shall set the interrupt affinity dynamically in broadcast mode + */ +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020 +  /**   * struct clock_event_device - clock event device descriptor   * @event_handler:	Assigned by the framework to be called by the low @@ -170,6 +175,12 @@ extern void tick_broadcast(const struct cpumask *mask);  extern int tick_receive_broadcast(void);  #endif +#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) +extern int tick_check_broadcast_expired(void); +#else +static inline int tick_check_broadcast_expired(void) { return 0; } +#endif +  #ifdef CONFIG_GENERIC_CLOCKEVENTS  extern void clockevents_notify(unsigned long reason, void *arg);  #else @@ -182,6 +193,7 @@ static inline void clockevents_suspend(void) {}  static inline void clockevents_resume(void) {}  #define clockevents_notify(reason, arg) do { } while (0) +static inline int tick_check_broadcast_expired(void) { return 0; }  #endif diff --git a/init/main.c b/init/main.c index 63534a141b4..b3e06142854 100644 --- a/init/main.c +++ b/init/main.c @@ -494,7 +494,6 @@ asmlinkage void __init start_kernel(void)   * Interrupts are still disabled. Do necessary setups, then   * enable them   */ -	tick_init();  	boot_cpu_init();  	page_address_init();  	printk(KERN_NOTICE "%s", linux_banner); @@ -551,6 +550,7 @@ asmlinkage void __init start_kernel(void)  	/* init some links before init_ISA_irqs() */  	early_irq_init();  	init_IRQ(); +	tick_init();  	init_timers();  	hrtimers_init();  	softirq_init(); diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 258720741d3..d6830d5ae73 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1022,7 +1022,8 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,   * @timer:	the timer to be added   * @tim:	expiry time   * @delta_ns:	"slack" range for the timer - * @mode:	expiry mode: absolute (HRTIMER_ABS) or relative (HRTIMER_REL) + * @mode:	expiry mode: absolute (HRTIMER_MODE_ABS) or + *		relative (HRTIMER_MODE_REL)   *   * Returns:   *  0 on success @@ -1039,7 +1040,8 @@ EXPORT_SYMBOL_GPL(hrtimer_start_range_ns);   * hrtimer_start - (re)start an hrtimer on the current CPU   * @timer:	the timer to be added   * @tim:	expiry time - * @mode:	expiry mode: absolute (HRTIMER_ABS) or relative (HRTIMER_REL) + * @mode:	expiry mode: absolute (HRTIMER_MODE_ABS) or + *		relative (HRTIMER_MODE_REL)   *   * Returns:   *  0 on success diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 2fb8cb88df8..d76d816afc5 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -28,9 +28,8 @@   */  static struct tick_device tick_broadcast_device; -/* FIXME: Use cpumask_var_t. */ -static DECLARE_BITMAP(tick_broadcast_mask, NR_CPUS); -static DECLARE_BITMAP(tmpmask, NR_CPUS); +static cpumask_var_t tick_broadcast_mask; +static cpumask_var_t tmpmask;  static DEFINE_RAW_SPINLOCK(tick_broadcast_lock);  static int tick_broadcast_force; @@ -50,7 +49,7 @@ struct tick_device *tick_get_broadcast_device(void)  struct cpumask *tick_get_broadcast_mask(void)  { -	return to_cpumask(tick_broadcast_mask); +	return tick_broadcast_mask;  }  /* @@ -74,7 +73,7 @@ int tick_check_broadcast_device(struct clock_event_device *dev)  	clockevents_exchange_device(tick_broadcast_device.evtdev, dev);  	tick_broadcast_device.evtdev = dev; -	if (!cpumask_empty(tick_get_broadcast_mask())) +	if (!cpumask_empty(tick_broadcast_mask))  		tick_broadcast_start_periodic(dev);  	return 1;  } @@ -123,7 +122,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)  	if (!tick_device_is_functional(dev)) {  		dev->event_handler = tick_handle_periodic;  		tick_device_setup_broadcast_func(dev); -		cpumask_set_cpu(cpu, tick_get_broadcast_mask()); +		cpumask_set_cpu(cpu, tick_broadcast_mask);  		tick_broadcast_start_periodic(tick_broadcast_device.evtdev);  		ret = 1;  	} else { @@ -134,7 +133,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)  		 */  		if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) {  			int cpu = smp_processor_id(); -			cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); +			cpumask_clear_cpu(cpu, tick_broadcast_mask);  			tick_broadcast_clear_oneshot(cpu);  		} else {  			tick_device_setup_broadcast_func(dev); @@ -198,9 +197,8 @@ static void tick_do_periodic_broadcast(void)  {  	raw_spin_lock(&tick_broadcast_lock); -	cpumask_and(to_cpumask(tmpmask), -		    cpu_online_mask, tick_get_broadcast_mask()); -	tick_do_broadcast(to_cpumask(tmpmask)); +	cpumask_and(tmpmask, cpu_online_mask, tick_broadcast_mask); +	tick_do_broadcast(tmpmask);  	raw_spin_unlock(&tick_broadcast_lock);  } @@ -263,13 +261,12 @@ static void tick_do_broadcast_on_off(unsigned long *reason)  	if (!tick_device_is_functional(dev))  		goto out; -	bc_stopped = cpumask_empty(tick_get_broadcast_mask()); +	bc_stopped = cpumask_empty(tick_broadcast_mask);  	switch (*reason) {  	case CLOCK_EVT_NOTIFY_BROADCAST_ON:  	case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: -		if (!cpumask_test_cpu(cpu, tick_get_broadcast_mask())) { -			cpumask_set_cpu(cpu, tick_get_broadcast_mask()); +		if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) {  			if (tick_broadcast_device.mode ==  			    TICKDEV_MODE_PERIODIC)  				clockevents_shutdown(dev); @@ -279,8 +276,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason)  		break;  	case CLOCK_EVT_NOTIFY_BROADCAST_OFF:  		if (!tick_broadcast_force && -		    cpumask_test_cpu(cpu, tick_get_broadcast_mask())) { -			cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); +		    cpumask_test_and_clear_cpu(cpu, tick_broadcast_mask)) {  			if (tick_broadcast_device.mode ==  			    TICKDEV_MODE_PERIODIC)  				tick_setup_periodic(dev, 0); @@ -288,7 +284,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason)  		break;  	} -	if (cpumask_empty(tick_get_broadcast_mask())) { +	if (cpumask_empty(tick_broadcast_mask)) {  		if (!bc_stopped)  			clockevents_shutdown(bc);  	} else if (bc_stopped) { @@ -337,10 +333,10 @@ void tick_shutdown_broadcast(unsigned int *cpup)  	raw_spin_lock_irqsave(&tick_broadcast_lock, flags);  	bc = tick_broadcast_device.evtdev; -	cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); +	cpumask_clear_cpu(cpu, tick_broadcast_mask);  	if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) { -		if (bc && cpumask_empty(tick_get_broadcast_mask())) +		if (bc && cpumask_empty(tick_broadcast_mask))  			clockevents_shutdown(bc);  	} @@ -376,13 +372,13 @@ int tick_resume_broadcast(void)  		switch (tick_broadcast_device.mode) {  		case TICKDEV_MODE_PERIODIC: -			if (!cpumask_empty(tick_get_broadcast_mask())) +			if (!cpumask_empty(tick_broadcast_mask))  				tick_broadcast_start_periodic(bc);  			broadcast = cpumask_test_cpu(smp_processor_id(), -						     tick_get_broadcast_mask()); +						     tick_broadcast_mask);  			break;  		case TICKDEV_MODE_ONESHOT: -			if (!cpumask_empty(tick_get_broadcast_mask())) +			if (!cpumask_empty(tick_broadcast_mask))  				broadcast = tick_resume_broadcast_oneshot(bc);  			break;  		} @@ -395,25 +391,58 @@ int tick_resume_broadcast(void)  #ifdef CONFIG_TICK_ONESHOT -/* FIXME: use cpumask_var_t. */ -static DECLARE_BITMAP(tick_broadcast_oneshot_mask, NR_CPUS); +static cpumask_var_t tick_broadcast_oneshot_mask; +static cpumask_var_t tick_broadcast_pending_mask; +static cpumask_var_t tick_broadcast_force_mask;  /*   * Exposed for debugging: see timer_list.c   */  struct cpumask *tick_get_broadcast_oneshot_mask(void)  { -	return to_cpumask(tick_broadcast_oneshot_mask); +	return tick_broadcast_oneshot_mask;  } -static int tick_broadcast_set_event(ktime_t expires, int force) +/* + * Called before going idle with interrupts disabled. Checks whether a + * broadcast event from the other core is about to happen. We detected + * that in tick_broadcast_oneshot_control(). The callsite can use this + * to avoid a deep idle transition as we are about to get the + * broadcast IPI right away. + */ +int tick_check_broadcast_expired(void)  { -	struct clock_event_device *bc = tick_broadcast_device.evtdev; +	return cpumask_test_cpu(smp_processor_id(), tick_broadcast_force_mask); +} + +/* + * Set broadcast interrupt affinity + */ +static void tick_broadcast_set_affinity(struct clock_event_device *bc, +					const struct cpumask *cpumask) +{ +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ)) +		return; + +	if (cpumask_equal(bc->cpumask, cpumask)) +		return; + +	bc->cpumask = cpumask; +	irq_set_affinity(bc->irq, bc->cpumask); +} + +static int tick_broadcast_set_event(struct clock_event_device *bc, int cpu, +				    ktime_t expires, int force) +{ +	int ret;  	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)  		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); -	return clockevents_program_event(bc, expires, force); +	ret = clockevents_program_event(bc, expires, force); +	if (!ret) +		tick_broadcast_set_affinity(bc, cpumask_of(cpu)); +	return ret;  }  int tick_resume_broadcast_oneshot(struct clock_event_device *bc) @@ -428,7 +457,7 @@ int tick_resume_broadcast_oneshot(struct clock_event_device *bc)   */  void tick_check_oneshot_broadcast(int cpu)  { -	if (cpumask_test_cpu(cpu, to_cpumask(tick_broadcast_oneshot_mask))) { +	if (cpumask_test_cpu(cpu, tick_broadcast_oneshot_mask)) {  		struct tick_device *td = &per_cpu(tick_cpu_device, cpu);  		clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_ONESHOT); @@ -442,27 +471,39 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)  {  	struct tick_device *td;  	ktime_t now, next_event; -	int cpu; +	int cpu, next_cpu = 0;  	raw_spin_lock(&tick_broadcast_lock);  again:  	dev->next_event.tv64 = KTIME_MAX;  	next_event.tv64 = KTIME_MAX; -	cpumask_clear(to_cpumask(tmpmask)); +	cpumask_clear(tmpmask);  	now = ktime_get();  	/* Find all expired events */ -	for_each_cpu(cpu, tick_get_broadcast_oneshot_mask()) { +	for_each_cpu(cpu, tick_broadcast_oneshot_mask) {  		td = &per_cpu(tick_cpu_device, cpu); -		if (td->evtdev->next_event.tv64 <= now.tv64) -			cpumask_set_cpu(cpu, to_cpumask(tmpmask)); -		else if (td->evtdev->next_event.tv64 < next_event.tv64) +		if (td->evtdev->next_event.tv64 <= now.tv64) { +			cpumask_set_cpu(cpu, tmpmask); +			/* +			 * Mark the remote cpu in the pending mask, so +			 * it can avoid reprogramming the cpu local +			 * timer in tick_broadcast_oneshot_control(). +			 */ +			cpumask_set_cpu(cpu, tick_broadcast_pending_mask); +		} else if (td->evtdev->next_event.tv64 < next_event.tv64) {  			next_event.tv64 = td->evtdev->next_event.tv64; +			next_cpu = cpu; +		}  	} +	/* Take care of enforced broadcast requests */ +	cpumask_or(tmpmask, tmpmask, tick_broadcast_force_mask); +	cpumask_clear(tick_broadcast_force_mask); +  	/*  	 * Wakeup the cpus which have an expired event.  	 */ -	tick_do_broadcast(to_cpumask(tmpmask)); +	tick_do_broadcast(tmpmask);  	/*  	 * Two reasons for reprogram: @@ -479,7 +520,7 @@ again:  		 * Rearm the broadcast device. If event expired,  		 * repeat the above  		 */ -		if (tick_broadcast_set_event(next_event, 0)) +		if (tick_broadcast_set_event(dev, next_cpu, next_event, 0))  			goto again;  	}  	raw_spin_unlock(&tick_broadcast_lock); @@ -494,6 +535,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)  	struct clock_event_device *bc, *dev;  	struct tick_device *td;  	unsigned long flags; +	ktime_t now;  	int cpu;  	/* @@ -518,21 +560,84 @@ void tick_broadcast_oneshot_control(unsigned long reason)  	raw_spin_lock_irqsave(&tick_broadcast_lock, flags);  	if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) { -		if (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) { -			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask()); +		WARN_ON_ONCE(cpumask_test_cpu(cpu, tick_broadcast_pending_mask)); +		if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {  			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN); -			if (dev->next_event.tv64 < bc->next_event.tv64) -				tick_broadcast_set_event(dev->next_event, 1); +			/* +			 * We only reprogram the broadcast timer if we +			 * did not mark ourself in the force mask and +			 * if the cpu local event is earlier than the +			 * broadcast event. If the current CPU is in +			 * the force mask, then we are going to be +			 * woken by the IPI right away. +			 */ +			if (!cpumask_test_cpu(cpu, tick_broadcast_force_mask) && +			    dev->next_event.tv64 < bc->next_event.tv64) +				tick_broadcast_set_event(bc, cpu, dev->next_event, 1);  		}  	} else { -		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) { -			cpumask_clear_cpu(cpu, -					  tick_get_broadcast_oneshot_mask()); +		if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {  			clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); -			if (dev->next_event.tv64 != KTIME_MAX) -				tick_program_event(dev->next_event, 1); +			if (dev->next_event.tv64 == KTIME_MAX) +				goto out; +			/* +			 * The cpu which was handling the broadcast +			 * timer marked this cpu in the broadcast +			 * pending mask and fired the broadcast +			 * IPI. So we are going to handle the expired +			 * event anyway via the broadcast IPI +			 * handler. No need to reprogram the timer +			 * with an already expired event. +			 */ +			if (cpumask_test_and_clear_cpu(cpu, +				       tick_broadcast_pending_mask)) +				goto out; + +			/* +			 * If the pending bit is not set, then we are +			 * either the CPU handling the broadcast +			 * interrupt or we got woken by something else. +			 * +			 * We are not longer in the broadcast mask, so +			 * if the cpu local expiry time is already +			 * reached, we would reprogram the cpu local +			 * timer with an already expired event. +			 * +			 * This can lead to a ping-pong when we return +			 * to idle and therefor rearm the broadcast +			 * timer before the cpu local timer was able +			 * to fire. This happens because the forced +			 * reprogramming makes sure that the event +			 * will happen in the future and depending on +			 * the min_delta setting this might be far +			 * enough out that the ping-pong starts. +			 * +			 * If the cpu local next_event has expired +			 * then we know that the broadcast timer +			 * next_event has expired as well and +			 * broadcast is about to be handled. So we +			 * avoid reprogramming and enforce that the +			 * broadcast handler, which did not run yet, +			 * will invoke the cpu local handler. +			 * +			 * We cannot call the handler directly from +			 * here, because we might be in a NOHZ phase +			 * and we did not go through the irq_enter() +			 * nohz fixups. +			 */ +			now = ktime_get(); +			if (dev->next_event.tv64 <= now.tv64) { +				cpumask_set_cpu(cpu, tick_broadcast_force_mask); +				goto out; +			} +			/* +			 * We got woken by something else. Reprogram +			 * the cpu local timer device. +			 */ +			tick_program_event(dev->next_event, 1);  		}  	} +out:  	raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);  } @@ -543,7 +648,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)   */  static void tick_broadcast_clear_oneshot(int cpu)  { -	cpumask_clear_cpu(cpu, tick_get_broadcast_oneshot_mask()); +	cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);  }  static void tick_broadcast_init_next_event(struct cpumask *mask, @@ -581,17 +686,16 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)  		 * oneshot_mask bits for those and program the  		 * broadcast device to fire.  		 */ -		cpumask_copy(to_cpumask(tmpmask), tick_get_broadcast_mask()); -		cpumask_clear_cpu(cpu, to_cpumask(tmpmask)); -		cpumask_or(tick_get_broadcast_oneshot_mask(), -			   tick_get_broadcast_oneshot_mask(), -			   to_cpumask(tmpmask)); +		cpumask_copy(tmpmask, tick_broadcast_mask); +		cpumask_clear_cpu(cpu, tmpmask); +		cpumask_or(tick_broadcast_oneshot_mask, +			   tick_broadcast_oneshot_mask, tmpmask); -		if (was_periodic && !cpumask_empty(to_cpumask(tmpmask))) { +		if (was_periodic && !cpumask_empty(tmpmask)) {  			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); -			tick_broadcast_init_next_event(to_cpumask(tmpmask), +			tick_broadcast_init_next_event(tmpmask,  						       tick_next_period); -			tick_broadcast_set_event(tick_next_period, 1); +			tick_broadcast_set_event(bc, cpu, tick_next_period, 1);  		} else  			bc->next_event.tv64 = KTIME_MAX;  	} else { @@ -639,7 +743,7 @@ void tick_shutdown_broadcast_oneshot(unsigned int *cpup)  	 * Clear the broadcast mask flag for the dead cpu, but do not  	 * stop the broadcast device!  	 */ -	cpumask_clear_cpu(cpu, tick_get_broadcast_oneshot_mask()); +	cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);  	raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);  } @@ -663,3 +767,14 @@ bool tick_broadcast_oneshot_available(void)  }  #endif + +void __init tick_broadcast_init(void) +{ +	alloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT); +	alloc_cpumask_var(&tmpmask, GFP_NOWAIT); +#ifdef CONFIG_TICK_ONESHOT +	alloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT); +	alloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT); +	alloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT); +#endif +} diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index b1600a6973f..74413e396ac 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -416,4 +416,5 @@ static struct notifier_block tick_notifier = {  void __init tick_init(void)  {  	clockevents_register_notifier(&tick_notifier); +	tick_broadcast_init();  } diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index f5c9207967c..f0299eae460 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -96,7 +96,7 @@ extern void tick_broadcast_on_off(unsigned long reason, int *oncpu);  extern void tick_shutdown_broadcast(unsigned int *cpup);  extern void tick_suspend_broadcast(void);  extern int tick_resume_broadcast(void); - +extern void tick_broadcast_init(void);  extern void  tick_set_periodic_handler(struct clock_event_device *dev, int broadcast); @@ -121,6 +121,7 @@ static inline void tick_broadcast_on_off(unsigned long reason, int *oncpu) { }  static inline void tick_shutdown_broadcast(unsigned int *cpup) { }  static inline void tick_suspend_broadcast(void) { }  static inline int tick_resume_broadcast(void) { return 0; } +static inline void tick_broadcast_init(void) { }  /*   * Set the periodic handler in non broadcast mode diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a19a39952c1..225f8bf1909 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -482,8 +482,8 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)  		if (ratelimit < 10 &&  		    (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) { -			printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n", -			       (unsigned int) local_softirq_pending()); +			pr_warn("NOHZ: local_softirq_pending %02x\n", +				(unsigned int) local_softirq_pending());  			ratelimit++;  		}  		return false;  |