Re: [patch 13/41] x86/smp: Remove pointless duplicated interrupt code

From: Steven Rostedt
Date: Fri Aug 25 2017 - 14:24:48 EST


On Fri, 25 Aug 2017 12:31:16 +0200
Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> -static inline void __smp_call_function_interrupt(void)
> -{
> - generic_smp_call_function_interrupt();
> - inc_irq_stat(irq_call_count);

Interesting. The origin code calls the
generic_smp_call_function_interrupt() and then calls inc_irq_stat().
Not sure it matters, but just stating this because...

> }
>
> __visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
> {
> ipi_entering_ack_irq();
> - __smp_call_function_interrupt();
> - exiting_irq();
> -}
> -
> -__visible void __irq_entry
> -smp_trace_call_function_interrupt(struct pt_regs *regs)
> -{
> - ipi_entering_ack_irq();
> trace_call_function_entry(CALL_FUNCTION_VECTOR);
> - __smp_call_function_interrupt();
> - trace_call_function_exit(CALL_FUNCTION_VECTOR);
> - exiting_irq();
> -}
> -
> -static inline void __smp_call_function_single_interrupt(void)
> -{
> - generic_smp_call_function_single_interrupt();
> inc_irq_stat(irq_call_count);
> -}
> -
> -__visible void __irq_entry
> -smp_call_function_single_interrupt(struct pt_regs *regs)
> -{
> - ipi_entering_ack_irq();
> - __smp_call_function_single_interrupt();
> + generic_smp_call_function_interrupt();

here and

> + trace_call_function_exit(CALL_FUNCTION_VECTOR);
> exiting_irq();
> }
>
> -__visible void __irq_entry
> -smp_trace_call_function_single_interrupt(struct pt_regs *regs)
> +__visible void __irq_entry smp_call_function_single_interrupt(struct pt_regs *r)
> {
> ipi_entering_ack_irq();
> trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR);
> - __smp_call_function_single_interrupt();
> + inc_irq_stat(irq_call_count);
> + generic_smp_call_function_single_interrupt();

here, you reverse it.

Should at least be mentioned in the change log.

-- Steve

> trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR);
> exiting_irq();
> }
>