--- zzzz-none-000/linux-4.9.279/arch/x86/kernel/smp.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/arch/x86/kernel/smp.c 2023-02-08 11:43:42.000000000 +0000 @@ -34,6 +34,12 @@ #include #include #include +#if defined(CONFIG_AVM_POWER) +#include +#endif +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif /* * Some notes on x86 processor bugs affecting SMP operation: @@ -274,7 +280,13 @@ { irq_enter(); ack_APIC_irq(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_reschedule_interrupt, 0x101); +#endif __smp_reschedule_interrupt(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_reschedule_interrupt, 0x101); +#endif irq_exit(); /* * KVM uses this interrupt to force a cpu out of guest mode @@ -292,7 +304,13 @@ */ ipi_entering_ack_irq(); trace_reschedule_entry(RESCHEDULE_VECTOR); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_trace_reschedule_interrupt, 0x101); +#endif __smp_reschedule_interrupt(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_trace_reschedule_interrupt, 0x101); +#endif trace_reschedule_exit(RESCHEDULE_VECTOR); exiting_irq(); /* @@ -309,7 +327,13 @@ __visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs) { ipi_entering_ack_irq(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_call_function_interrupt, 0x102); +#endif __smp_call_function_interrupt(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_call_function_interrupt, 0x102); +#endif exiting_irq(); } @@ -318,8 +342,14 @@ { ipi_entering_ack_irq(); trace_call_function_entry(CALL_FUNCTION_VECTOR); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_trace_call_function_interrupt, 0x102); +#endif __smp_call_function_interrupt(); trace_call_function_exit(CALL_FUNCTION_VECTOR); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_trace_call_function_interrupt, 0x102); +#endif exiting_irq(); } @@ -333,7 +363,13 @@ smp_call_function_single_interrupt(struct pt_regs *regs) { ipi_entering_ack_irq(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_call_function_single_interrupt, 0x103); +#endif __smp_call_function_single_interrupt(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_call_function_single_interrupt, 0x103); +#endif exiting_irq(); } @@ -342,7 +378,13 @@ { ipi_entering_ack_irq(); trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_begin, (unsigned int)smp_trace_call_function_single_interrupt, 0x103); +#endif __smp_call_function_single_interrupt(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hw_irq_end, (unsigned int)smp_trace_call_function_single_interrupt, 0x103); +#endif trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR); exiting_irq(); }