[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240506111634.121460-1-imran.f.khan@oracle.com>
Date: Mon, 6 May 2024 21:16:34 +1000
From: Imran Khan <imran.f.khan@...cle.com>
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86/irq: use lapic_vector_set_in_irr to check for pending vectors in fixup_irqs.
No functional change, just using readily available helper which
uses the same logic, that has been used here.
Signed-off-by: Imran Khan <imran.f.khan@...cle.com>
---
arch/x86/kernel/irq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 35fde0107901d..71432e42275c4 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -339,7 +339,7 @@ DEFINE_IDTENTRY_SYSVEC_SIMPLE(sysvec_kvm_posted_intr_nested_ipi)
/* A cpu has been removed from cpu_online_mask. Reset irq affinities. */
void fixup_irqs(void)
{
- unsigned int irr, vector;
+ unsigned int vector;
struct irq_desc *desc;
struct irq_data *data;
struct irq_chip *chip;
@@ -366,8 +366,7 @@ void fixup_irqs(void)
if (IS_ERR_OR_NULL(__this_cpu_read(vector_irq[vector])))
continue;
- irr = apic_read(APIC_IRR + (vector / 32 * 0x10));
- if (irr & (1 << (vector % 32))) {
+ if (lapic_vector_set_in_irr(vector)) {
desc = __this_cpu_read(vector_irq[vector]);
raw_spin_lock(&desc->lock);
--
2.34.1
Powered by blists - more mailing lists