[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0a0d637-a4c2-48d0-b6f6-45688c8ef7da@oracle.com>
Date: Tue, 7 May 2024 10:58:13 +1000
From: imran.f.khan@...cle.com
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>, X86 Kernel <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/irq: Use existing helper for pending vector check
Hello Jacob,
This looks good to me.
On 7/5/2024 3:56 am, Jacob Pan wrote:
> lapic_vector_set_in_irr() is already available, use it for checking
> pending vectors at the local APIC. No functional change.
>
> Signed-off-by: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> Cc: Imran Khan <imran.f.khan@...cle.com>
Reviewed-by: Imran Khan <imran.f.khan@...cle.com>
> ---
> arch/x86/include/asm/apic.h | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 9122e93b89ea..d7a8ac961af8 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -505,13 +505,7 @@ static inline bool lapic_vector_set_in_irr(unsigned int vector)
>
> static inline bool is_vector_pending(unsigned int vector)
> {
> - unsigned int irr;
> -
> - irr = apic_read(APIC_IRR + (vector / 32 * 0x10));
> - if (irr & (1 << (vector % 32)))
> - return true;
> -
> - return pi_pending_this_cpu(vector);
> + return lapic_vector_set_in_irr(vector) || pi_pending_this_cpu(vector);
> }
>
> /*
Powered by blists - more mailing lists