summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2024-05-06 10:56:12 -0700
committerThomas Gleixner <tglx@linutronix.de>2024-05-08 15:15:15 +0200
commit6ecc2e7932fe8f132d3b671685f9995785f19e9a (patch)
tree244fb9b1cbaee385348372b573c85f7bee9cf5ea /arch/x86/include
parented1e48ea43703002dc202ac7f3b0b0b9981ec2f0 (diff)
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
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/apic.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 5644c396713e..467532b3e070 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);
}
/*