Loading include/linux/sched.h +1 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,7 @@ extern u64 sched_clock_cpu(int cpu); extern void sched_clock_init(void); extern int sched_clock_initialized(void); #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK static inline void sched_clock_tick(void) Loading kernel/sched/core.c +2 −1 Original line number Diff line number Diff line Loading @@ -1900,7 +1900,8 @@ static inline void set_window_start(struct rq *rq) int cpu = cpu_of(rq); struct rq *sync_rq = cpu_rq(sync_cpu); if (rq->window_start || !sched_enable_hmp) if (rq->window_start || !sched_enable_hmp || !sched_clock_initialized() || !sched_clock_cpu(cpu)) return; if (cpu == sync_cpu) { Loading kernel/time/sched_clock.c +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ struct clock_data { static struct hrtimer sched_clock_timer; static int irqtime = -1; static int initialized; core_param(irqtime, irqtime, int, 0400); Loading Loading @@ -178,6 +179,11 @@ unsigned long long notrace sched_clock(void) return sched_clock_func(); } int sched_clock_initialized(void) { return initialized; } void __init sched_clock_postinit(void) { /* Loading @@ -196,6 +202,8 @@ void __init sched_clock_postinit(void) hrtimer_init(&sched_clock_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); sched_clock_timer.function = sched_clock_poll; hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL); initialized = 1; } static int sched_clock_suspend(void) Loading Loading
include/linux/sched.h +1 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,7 @@ extern u64 sched_clock_cpu(int cpu); extern void sched_clock_init(void); extern int sched_clock_initialized(void); #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK static inline void sched_clock_tick(void) Loading
kernel/sched/core.c +2 −1 Original line number Diff line number Diff line Loading @@ -1900,7 +1900,8 @@ static inline void set_window_start(struct rq *rq) int cpu = cpu_of(rq); struct rq *sync_rq = cpu_rq(sync_cpu); if (rq->window_start || !sched_enable_hmp) if (rq->window_start || !sched_enable_hmp || !sched_clock_initialized() || !sched_clock_cpu(cpu)) return; if (cpu == sync_cpu) { Loading
kernel/time/sched_clock.c +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ struct clock_data { static struct hrtimer sched_clock_timer; static int irqtime = -1; static int initialized; core_param(irqtime, irqtime, int, 0400); Loading Loading @@ -178,6 +179,11 @@ unsigned long long notrace sched_clock(void) return sched_clock_func(); } int sched_clock_initialized(void) { return initialized; } void __init sched_clock_postinit(void) { /* Loading @@ -196,6 +202,8 @@ void __init sched_clock_postinit(void) hrtimer_init(&sched_clock_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); sched_clock_timer.function = sched_clock_poll; hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL); initialized = 1; } static int sched_clock_suspend(void) Loading