--- zzzz-none-000/linux-2.6.13.1/kernel/timer.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/kernel/timer.c 2007-10-23 10:01:08.000000000 +0000 @@ -39,6 +39,9 @@ #include #include #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ #ifdef CONFIG_TIME_INTERPOLATION static void time_interpolator_update(long delta_nsec); @@ -178,6 +181,9 @@ timer->entry.next = NULL; timer->base = &per_cpu(tvec_bases, raw_smp_processor_id()).t_base; timer->magic = TIMER_MAGIC; +#ifdef CONFIG_HIGH_RES_TIMERS + timer->arch_cycle_expires = 0; +#endif /*--- #ifdef CONFIG_HIGH_RES_TIMERS ---*/ } EXPORT_SYMBOL(init_timer); @@ -490,7 +496,13 @@ spin_unlock_irq(&base->t_base.lock); { int preempt_count = preempt_count(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_timer_begin, (unsigned int)fn, 0); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ fn(data); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_timer_end, (unsigned int)fn, 0); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ if (preempt_count != preempt_count()) { printk(KERN_WARNING "huh, entered %p " "with preempt_count %08x, exited"