Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 6ecc2e7

Browse files
Jacob PanKAGA-KOKO
authored andcommitted
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
1 parent ed1e48e commit 6ecc2e7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/x86/include/asm/apic.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,7 @@ static inline bool lapic_vector_set_in_irr(unsigned int vector)
503503

504504
static inline bool is_vector_pending(unsigned int vector)
505505
{
506-
unsigned int irr;
507-
508-
irr = apic_read(APIC_IRR + (vector / 32 * 0x10));
509-
if (irr & (1 << (vector % 32)))
510-
return true;
511-
512-
return pi_pending_this_cpu(vector);
506+
return lapic_vector_set_in_irr(vector) || pi_pending_this_cpu(vector);
513507
}
514508

515509
/*

0 commit comments

Comments
 (0)