linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Jacob Pan" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Imran Khan <imran.f.khan@oracle.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/irq] x86/irq: Use existing helper for pending vector check
Date: Wed, 08 May 2024 13:25:57 -0000	[thread overview]
Message-ID: <171517475718.10875.16618789278156468301.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240506175612.1141095-1-jacob.jun.pan@linux.intel.com>

The following commit has been merged into the x86/irq branch of tip:

Commit-ID:     6ecc2e7932fe8f132d3b671685f9995785f19e9a
Gitweb:        https://git.kernel.org/tip/6ecc2e7932fe8f132d3b671685f9995785f19e9a
Author:        Jacob Pan <jacob.jun.pan@linux.intel.com>
AuthorDate:    Mon, 06 May 2024 10:56:12 -07:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 08 May 2024 15:15:15 +02:00

x86/irq: Use existing helper for pending vector check

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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Imran Khan <imran.f.khan@oracle.com>
Link: https://lore.kernel.org/r/20240506175612.1141095-1-jacob.jun.pan@linux.intel.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 5644c39..467532b 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -503,13 +503,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);
 }
 
 /*

      parent reply	other threads:[~2024-05-08 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 17:56 [PATCH] x86/irq: Use existing helper for pending vector check Jacob Pan
2024-05-07  0:58 ` imran.f.khan
2024-05-08 13:25 ` tip-bot2 for Jacob Pan [this message]

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=171517475718.10875.16618789278156468301.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=imran.f.khan@oracle.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).