]> Git Repo - J-linux.git/commitdiff
x86/irq: Use existing helper for pending vector check
authorJacob Pan <[email protected]>
Mon, 6 May 2024 17:56:12 +0000 (10:56 -0700)
committerThomas Gleixner <[email protected]>
Wed, 8 May 2024 13:15:15 +0000 (15:15 +0200)
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Imran Khan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/include/asm/apic.h

index 5644c396713e1e1a3e24a2e8dcbaa5008aec7f82..467532b3e07089b2e2ce3d185abfc26178f3bc92 100644 (file)
@@ -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);
 }
 
 /*
This page took 0.045086 seconds and 4 git commands to generate.