diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2024-05-06 10:56:12 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-05-08 15:15:15 +0200 |
commit | 6ecc2e7932fe8f132d3b671685f9995785f19e9a (patch) | |
tree | 244fb9b1cbaee385348372b573c85f7bee9cf5ea /arch | |
parent | ed1e48ea43703002dc202ac7f3b0b0b9981ec2f0 (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')
-rw-r--r-- | arch/x86/include/asm/apic.h | 8 |
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); } /* |