From: imran.f.khan@oracle.com
To: Jacob Pan <jacob.jun.pan@linux.intel.com>,
X86 Kernel <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] x86/irq: Use existing helper for pending vector check
Date: Tue, 7 May 2024 10:58:13 +1000 [thread overview]
Message-ID: <f0a0d637-a4c2-48d0-b6f6-45688c8ef7da@oracle.com> (raw)
In-Reply-To: <20240506175612.1141095-1-jacob.jun.pan@linux.intel.com>
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@linux.intel.com>
> Cc: Imran Khan <imran.f.khan@oracle.com>
Reviewed-by: Imran Khan <imran.f.khan@oracle.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);
> }
>
> /*
next prev parent reply other threads:[~2024-05-07 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 17:56 Jacob Pan
2024-05-07 0:58 ` imran.f.khan [this message]
2024-05-08 13:25 ` [tip: x86/irq] " tip-bot2 for Jacob Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0a0d637-a4c2-48d0-b6f6-45688c8ef7da@oracle.com \
--to=imran.f.khan@oracle.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®