From: Thomas Gleixner Date: Wed, 21 Nov 2012 19:31:52 +0000 (+0100) Subject: Merge branch 'fortglx/3.8/time' of git://git.linaro.org/people/jstultz/linux into... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c3f9e281697d02889c3b08922f3b30be75f56c2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'fortglx/3.8/time' of git://git.linaro.org/people/jstultz/linux into timers/core Fix trivial conflicts in: kernel/time/tick-sched.c Signed-off-by: Thomas Gleixner --- 9c3f9e281697d02889c3b08922f3b30be75f56c2 diff --cc kernel/time/tick-sched.c index 77729cc3750b,a678046c3e5e..c96fd6a7625c --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@@ -98,49 -98,6 +98,49 @@@ static ktime_t tick_init_jiffy_update(v return period; } + +static void tick_sched_do_timer(ktime_t now) +{ + int cpu = smp_processor_id(); + +#ifdef CONFIG_NO_HZ + /* + * Check if the do_timer duty was dropped. We don't care about + * concurrency: This happens only when the cpu in charge went + * into a long sleep. If two cpus happen to assign themself to + * this duty, then the jiffies update is still serialized by - * xtime_lock. ++ * jiffies_lock. + */ + if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) + tick_do_timer_cpu = cpu; +#endif + + /* Check, if the jiffies need an update */ + if (tick_do_timer_cpu == cpu) + tick_do_update_jiffies64(now); +} + +static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) +{ +#ifdef CONFIG_NO_HZ + /* + * When we are idle and the tick is stopped, we have to touch + * the watchdog as we might not schedule for a really long + * time. This happens on complete idle SMP systems while + * waiting on the login prompt. We also increment the "start of + * idle" jiffy stamp so the idle accounting adjustment we do + * when we go busy again does not account too much ticks. + */ + if (ts->tick_stopped) { + touch_softlockup_watchdog(); + if (is_idle_task(current)) + ts->idle_jiffies++; + } +#endif + update_process_times(user_mode(regs)); + profile_tick(CPU_PROFILING); +} + /* * NOHZ - aka dynamic tick functionality */ @@@ -859,7 -874,7 +859,7 @@@ void tick_setup_sched_timer(void /* Get the next period (per cpu) */ hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update()); -- /* Offset the tick to avert xtime_lock contention. */ ++ /* Offset the tick to avert jiffies_lock contention. */ if (sched_skew_tick) { u64 offset = ktime_to_ns(tick_period) >> 1; do_div(offset, num_possible_cpus());