--- zzzz-none-000/linux-4.4.60/arch/arm/kernel/process.c 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/arch/arm/kernel/process.c 2018-11-08 13:36:17.000000000 +0000 @@ -37,6 +37,22 @@ #include #include +#ifdef CONFIG_AVM_POWERMETER +#include +#endif/*--- #ifdef CONFIG_AVM_POWERMETER ---*/ +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#include +#include +#include +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ +#if defined(CONFIG_AVM_POWER) +#include +#endif /*--- #if defined(CONFIG_AVM_POWER) ---*/ +#if defined(CONFIG_AVM_ENHANCED) +#include +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ + #ifdef CONFIG_CC_STACKPROTECTOR #include unsigned long __stack_chk_guard __read_mostly; @@ -66,11 +82,20 @@ void arch_cpu_idle(void) { - if (arm_pm_idle) - arm_pm_idle(); - else - cpu_do_idle(); - local_irq_enable(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_start(); +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ + if (arm_pm_idle) + arm_pm_idle(); + else + cpu_do_idle(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_end(); +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ + local_irq_enable(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_info(); +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ } void arch_cpu_idle_prepare(void) @@ -178,6 +203,9 @@ printk("Control: %08x%s\n", ctrl, buf); } #endif +#if defined(CONFIG_AVM_ENHANCED) + show_register_memory_classifier(regs); +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ } void show_regs(struct pt_regs * regs)