--- zzzz-none-000/linux-2.6.39.4/arch/x86/kernel/process.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/arch/x86/kernel/process.c 2021-11-10 13:23:10.000000000 +0000 @@ -22,6 +22,9 @@ #include #include #include +#if defined(CONFIG_AVM_POWER) +#include +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ struct kmem_cache *task_xstate_cachep; EXPORT_SYMBOL_GPL(task_xstate_cachep); @@ -84,12 +87,6 @@ } } -void show_regs(struct pt_regs *regs) -{ - show_registers(regs); - show_trace(NULL, regs, (unsigned long *)kernel_stack_pointer(regs), 0); -} - void show_regs_common(void) { const char *vendor, *product, *board; @@ -465,6 +462,9 @@ if (!need_resched()) { trace_power_start(POWER_CSTATE, 1, smp_processor_id()); trace_cpu_idle(1, smp_processor_id()); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_start(); +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) clflush((void *)¤t_thread_info()->flags); @@ -472,9 +472,13 @@ smp_mb(); if (!need_resched()) __sti_mwait(0, 0); - else + else local_irq_enable(); trace_power_end(smp_processor_id()); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_end(); + avm_cpu_wait_info(); +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } else local_irq_enable();