mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'linus' into timers/core
Pick up the latest fixes and refresh the branch. Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
commit
dba861461f
1165 changed files with 11868 additions and 6119 deletions
|
|
@ -33,6 +33,21 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device);
|
|||
*/
|
||||
ktime_t tick_next_period;
|
||||
ktime_t tick_period;
|
||||
|
||||
/*
|
||||
* tick_do_timer_cpu is a timer core internal variable which holds the CPU NR
|
||||
* which is responsible for calling do_timer(), i.e. the timekeeping stuff. This
|
||||
* variable has two functions:
|
||||
*
|
||||
* 1) Prevent a thundering herd issue of a gazillion of CPUs trying to grab the
|
||||
* timekeeping lock all at once. Only the CPU which is assigned to do the
|
||||
* update is handling it.
|
||||
*
|
||||
* 2) Hand off the duty in the NOHZ idle case by setting the value to
|
||||
* TICK_DO_TIMER_NONE, i.e. a non existing CPU. So the next cpu which looks
|
||||
* at it will take over and keep the time keeping alive. The handover
|
||||
* procedure also covers cpu hotplug.
|
||||
*/
|
||||
int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -361,8 +361,8 @@ void __init tick_nohz_init(void)
|
|||
/*
|
||||
* NO HZ enabled ?
|
||||
*/
|
||||
int tick_nohz_enabled __read_mostly = 1;
|
||||
|
||||
static int tick_nohz_enabled __read_mostly = 1;
|
||||
int tick_nohz_active __read_mostly;
|
||||
/*
|
||||
* Enable / Disable tickless mode
|
||||
*/
|
||||
|
|
@ -461,7 +461,7 @@ u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time)
|
|||
struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
|
||||
ktime_t now, idle;
|
||||
|
||||
if (!tick_nohz_enabled)
|
||||
if (!tick_nohz_active)
|
||||
return -1;
|
||||
|
||||
now = ktime_get();
|
||||
|
|
@ -502,7 +502,7 @@ u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time)
|
|||
struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
|
||||
ktime_t now, iowait;
|
||||
|
||||
if (!tick_nohz_enabled)
|
||||
if (!tick_nohz_active)
|
||||
return -1;
|
||||
|
||||
now = ktime_get();
|
||||
|
|
@ -707,8 +707,10 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
|
||||
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) {
|
||||
ts->sleep_length = (ktime_t) { .tv64 = NSEC_PER_SEC/HZ };
|
||||
return false;
|
||||
}
|
||||
|
||||
if (need_resched())
|
||||
return false;
|
||||
|
|
@ -795,11 +797,6 @@ void tick_nohz_idle_enter(void)
|
|||
local_irq_disable();
|
||||
|
||||
ts = &__get_cpu_var(tick_cpu_sched);
|
||||
/*
|
||||
* set ts->inidle unconditionally. even if the system did not
|
||||
* switch to nohz mode the cpu frequency governers rely on the
|
||||
* update of the idle time accounting in tick_nohz_start_idle().
|
||||
*/
|
||||
ts->inidle = 1;
|
||||
__tick_nohz_idle_enter(ts);
|
||||
|
||||
|
|
@ -968,7 +965,7 @@ static void tick_nohz_switch_to_nohz(void)
|
|||
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
|
||||
ktime_t next;
|
||||
|
||||
if (!tick_nohz_enabled)
|
||||
if (!tick_nohz_active)
|
||||
return;
|
||||
|
||||
local_irq_disable();
|
||||
|
|
@ -976,7 +973,7 @@ static void tick_nohz_switch_to_nohz(void)
|
|||
local_irq_enable();
|
||||
return;
|
||||
}
|
||||
|
||||
tick_nohz_active = 1;
|
||||
ts->nohz_mode = NOHZ_MODE_LOWRES;
|
||||
|
||||
/*
|
||||
|
|
@ -1132,8 +1129,10 @@ void tick_setup_sched_timer(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_NO_HZ_COMMON
|
||||
if (tick_nohz_enabled)
|
||||
if (tick_nohz_enabled) {
|
||||
ts->nohz_mode = NOHZ_MODE_HIGHRES;
|
||||
tick_nohz_active = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* HIGH_RES_TIMERS */
|
||||
|
|
|
|||
|
|
@ -1347,7 +1347,7 @@ static inline void old_vsyscall_fixup(struct timekeeper *tk)
|
|||
tk->xtime_nsec -= remainder;
|
||||
tk->xtime_nsec += 1ULL << tk->shift;
|
||||
tk->ntp_error += remainder << tk->ntp_error_shift;
|
||||
|
||||
tk->ntp_error -= (1ULL << tk->shift) << tk->ntp_error_shift;
|
||||
}
|
||||
#else
|
||||
#define old_vsyscall_fixup(tk)
|
||||
|
|
|
|||
Loading…
Reference in a new issue