firmware/br-ext-chip-allwinner/board/v83x/kernel/patches/00000-kernel_time_tick-sche...

23 lines
713 B
Diff

diff -drupN a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
--- a/kernel/time/tick-sched.c 2018-08-06 17:23:04.000000000 +0300
+++ b/kernel/time/tick-sched.c 2022-06-12 05:28:14.000000000 +0300
@@ -1009,6 +1009,18 @@ ktime_t tick_nohz_get_sleep_length(void)
return ts->sleep_length;
}
+/**
+ * tick_nohz_get_idle_calls - return the current idle calls counter value
+ *
+ * Called from the schedutil frequency scaling governor in scheduler context.
+ */
+unsigned long tick_nohz_get_idle_calls(void)
+{
+ struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
+
+ return ts->idle_calls;
+}
+
static void tick_nohz_account_idle_ticks(struct tick_sched *ts)
{
#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE