[tip: x86/cleanups] x86/apic: Move apic_update_irq_cfg() call to apic_update_vector()

tip-bot2 for Neeraj Upadhyay posted 1 patch 2 months, 3 weeks ago
arch/x86/kernel/apic/vector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[tip: x86/cleanups] x86/apic: Move apic_update_irq_cfg() call to apic_update_vector()
Posted by tip-bot2 for Neeraj Upadhyay 2 months, 3 weeks ago
The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     7f2b41ac3f29f682cde113f1d0b4b43d261902fe
Gitweb:        https://git.kernel.org/tip/7f2b41ac3f29f682cde113f1d0b4b43d261902fe
Author:        Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
AuthorDate:    Wed, 09 Jul 2025 09:02:24 +05:30
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 15 Jul 2025 11:54:09 +02:00

x86/apic: Move apic_update_irq_cfg() call to apic_update_vector()

All callers of apic_update_vector() also call apic_update_irq_cfg() after it.
So, move the apic_update_irq_cfg() call to apic_update_vector().

No functional change intended.

Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250709033242.267892-18-Neeraj.Upadhyay@amd.com
---
 arch/x86/kernel/apic/vector.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 93069b1..a947b46 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -183,6 +183,7 @@ setnew:
 	apicd->cpu = newcpu;
 	BUG_ON(!IS_ERR_OR_NULL(per_cpu(vector_irq, newcpu)[newvec]));
 	per_cpu(vector_irq, newcpu)[newvec] = desc;
+	apic_update_irq_cfg(irqd, newvec, newcpu);
 }
 
 static void vector_assign_managed_shutdown(struct irq_data *irqd)
@@ -261,7 +262,6 @@ assign_vector_locked(struct irq_data *irqd, const struct cpumask *dest)
 	if (vector < 0)
 		return vector;
 	apic_update_vector(irqd, vector, cpu);
-	apic_update_irq_cfg(irqd, vector, cpu);
 
 	return 0;
 }
@@ -338,7 +338,7 @@ assign_managed_vector(struct irq_data *irqd, const struct cpumask *dest)
 	if (vector < 0)
 		return vector;
 	apic_update_vector(irqd, vector, cpu);
-	apic_update_irq_cfg(irqd, vector, cpu);
+
 	return 0;
 }