Re: [PATCH v3 06/17] x86/apic: Add support to send IPI for Secure AVIC
From: Thomas Gleixner
Date: Thu Apr 03 2025 - 07:45:46 EST
On Tue, Apr 01 2025 at 17:06, Neeraj Upadhyay wrote:
> --- a/arch/x86/kernel/apic/x2apic_savic.c
> +++ b/arch/x86/kernel/apic/x2apic_savic.c
> @@ -46,6 +46,25 @@ static __always_inline void set_reg(unsigned int offset, u32 val)
>
> #define SAVIC_ALLOWED_IRR 0x204
>
> +static inline void update_vector(unsigned int cpu, unsigned int offset,
> + unsigned int vector, bool set)
Why aren't you placing that function right away there instead of adding
it first somewhere else and then shuffle it around?
> -static void __send_ipi_mask(const struct cpumask *mask, int vector, bool excl_self)
> +static void send_ipi_mask(const struct cpumask *mask, unsigned int vector, bool excl_self)
> {
> - unsigned long query_cpu;
> - unsigned long this_cpu;
> + unsigned int this_cpu;
> + unsigned int cpu;
Again. Do it right in the first place and not later. Same for the
underscores of the function name.