--- zzzz-none-000/linux-2.6.28.10/arch/arm/kernel/irq.c 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/arch/arm/kernel/irq.c 2010-05-21 11:40:46.000000000 +0000 @@ -41,6 +41,9 @@ #include #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ /* * No architecture-specific irq_finish function defined in arm/arch/irqs.h. */ @@ -104,6 +107,7 @@ .lock = SPIN_LOCK_UNLOCKED }; +extern int cpu_wait_end(void); /* * do_IRQ handles all hardware IRQ's. Decoded IRQs should not * come via this function. Instead, they should provide their @@ -114,6 +118,12 @@ struct pt_regs *old_regs = set_irq_regs(regs); irq_enter(); + cpu_wait_end(); + +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling(regs, irq); + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)(irq_desc + irq), irq); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ /* * Some hardware gives randomly wrong interrupts. Rather @@ -124,6 +134,10 @@ else generic_handle_irq(irq); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)(irq_desc + irq), irq); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ + /* AT91 specific workaround */ irq_finish(irq);