--- zzzz-none-000/linux-4.9.279/drivers/cpuidle/cpuidle.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/cpuidle/cpuidle.c 2023-02-08 11:43:42.000000000 +0000 @@ -25,6 +25,10 @@ #include "cpuidle.h" +#if defined(CONFIG_AVM_POWER) +#include +#endif + DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices); DEFINE_PER_CPU(struct cpuidle_device, cpuidle_dev); @@ -198,9 +202,16 @@ trace_cpu_idle_rcuidle(index, dev->cpu); time_start = ns_to_ktime(local_clock()); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_start(); +#endif stop_critical_timings(); entered_state = target_state->enter(dev, drv, index); start_critical_timings(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_end(); + avm_cpu_wait_info(); +#endif time_end = ns_to_ktime(local_clock()); trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);