--- zzzz-none-000/linux-2.6.39.4/arch/x86/kernel/irq.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/arch/x86/kernel/irq.c 2021-11-10 13:38:14.000000000 +0000 @@ -17,6 +17,13 @@ #include #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ +#if defined(CONFIG_AVM_POWER) +#include +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ + atomic_t irq_err_count; /* Function pointer for generic interrupt vector handling */ @@ -182,9 +189,22 @@ exit_idle(); irq_enter(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_end(); /*--- auch wenn es wait_irqoff gibt: trotzdem aufrufen, um system-load-Ausgabe zu triggern ---*/ +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#if defined(avm_simple_profiling_enter_irq_context) + avm_simple_profiling_enter_irq_context((unsigned int)instruction_pointer(regs), regs->bp); +#else/*--- #if defined(avm_simple_profiling_enter_irq_context) ---*/ + avm_simple_profiling_enter_irqcontext((unsigned int)instruction_pointer(regs)); +#endif/*--- #else ---*//*--- #if defined(avm_simple_profiling_enter_irq_context) ---*/ +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ irq = __this_cpu_read(vector_irq[vector]); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)(irq_to_desc(irq)), irq); +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ if (!handle_irq(irq, regs)) { ack_APIC_irq(); @@ -192,7 +212,9 @@ pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n", __func__, smp_processor_id(), vector, irq); } - +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)(irq_to_desc(irq)), irq); +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ irq_exit(); set_irq_regs(old_regs); @@ -209,13 +231,28 @@ ack_APIC_irq(); exit_idle(); - irq_enter(); +#if defined(CONFIG_AVM_POWER) + avm_cpu_wait_end(); /*--- auch wenn es wait_irqoff gibt: trotzdem aufrufen, um system-load-Ausgabe zu triggern ---*/ +#endif/*--- #if defined(CONFIG_AVM_POWER) ---*/ +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#if defined(avm_simple_profiling_enter_irq_context) + avm_simple_profiling_enter_irq_context((unsigned int)instruction_pointer(regs), regs->bp); +#else/*--- #if defined(avm_simple_profiling_enter_irq_context) ---*/ + avm_simple_profiling_enter_irqcontext((unsigned int)instruction_pointer(regs)); +#endif/*--- #else ---*//*--- #if defined(avm_simple_profiling_enter_irq_context) ---*/ +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ inc_irq_stat(x86_platform_ipis); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_x86_platform_ipi, 0x100); +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ if (x86_platform_ipi_callback) x86_platform_ipi_callback(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_x86_platform_ipi, 0x100); +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ irq_exit(); @@ -249,7 +286,7 @@ data = irq_desc_get_irq_data(desc); affinity = data->affinity; - if (!irq_has_action(irq) || + if (!irq_has_action(irq) || irqd_is_per_cpu(data) || cpumask_subset(affinity, cpu_online_mask)) { raw_spin_unlock(&desc->lock); continue; @@ -276,7 +313,8 @@ else if (!(warned++)) set_affinity = 0; - if (!irqd_can_move_in_process_context(data) && chip->irq_unmask) + if (!irqd_can_move_in_process_context(data) && + !irqd_irq_disabled(data) && chip->irq_unmask) chip->irq_unmask(data); raw_spin_unlock(&desc->lock);