X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Ftime%2Ftick-sched.c;h=64c97fc130c4db2f1241185d9075af7a0f5175f5;hb=0be75179df5e20306528800fc7c6a504b12b97db;hp=7fe53be860778b07210fb7a333bf49695bded575;hpb=ae17a14f14079d1e23f8b9824d6bafce6af9fa3e;p=karo-tx-linux.git diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 7fe53be86077..64c97fc130c4 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -993,6 +993,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