mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/irq: Use existing helper for pending vector check
@ 2024-05-06 17:56 Jacob Pan
  2024-05-07  0:58 ` imran.f.khan
  2024-05-08 13:25 ` [tip: x86/irq] " tip-bot2 for Jacob Pan
  0 siblings, 2 replies; 3+ messages in thread
From: Jacob Pan @ 2024-05-06 17:56 UTC (permalink / raw)
  To: X86 Kernel, LKML, Thomas Gleixner, Dave Hansen, H. Peter Anvin,
	Ingo Molnar, Borislav Petkov
  Cc: Jacob Pan, Imran Khan

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>
---
 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);
 }
 
 /*
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-08 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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: x86/irq] " tip-bot2 for Jacob Pan

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®