Skip to contentSkip to conversation

irq/manage: use raw_spinlock_irq in irq_set_affinity_notifier

PATCH Applied chengkaitao 2 participants 2 messages Nov 18, 2025 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irq/manage: use raw_spinlock_irq in irq_set_affinity_notifier

From: Chengkaitao <[email protected]>

Since irq_set_affinity_notifier may sleep, there is no disable_irq nesting scenario, so raw_spinlock_irqsave can be replaced with raw_spinlock_irq.

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index 400856abf672..065040028bda 100644
@@ -547,7 +547,7 @@ int irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *noti
 		INIT_WORK(&notify->work, irq_affinity_notify);
 	}
 
-	scoped_guard(raw_spinlock_irqsave, &desc->lock) {
+	scoped_guard(raw_spinlock_irq, &desc->lock) {
 		old_notify = desc->affinity_notify;
 		desc->affinity_notify = notify;
 	}
Signature · 1 line
2.50.1 (Apple Git-155)
merge bot Applied
#1 lore raw

[tip: irq/core] genirq: Use raw_spinlock_irq() in irq_set_affinity_notifier()

The following commit has been merged into the irq/core branch of tip:

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     9d3faec60b1303fbec53d7a9b48a8c0fc5ae029b
Gitweb:        https://git.kernel.org/tip/9d3faec60b1303fbec53d7a9b48a8c0fc5ae029b
Author:        Chengkaitao <[email protected]>
AuthorDate:    Tue, 18 Nov 2025 09:27:54 +08:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Tue, 18 Nov 2025 16:19:40 +01:00

genirq: Use raw_spinlock_irq() in irq_set_affinity_notifier()

Since irq_set_affinity_notifier() may sleep, interrupts are enabled. So raw_spinlock_irqsave() can be replaced with raw_spinlock_irq().

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index c812b6f..c1ce30c 100644
@@ -547,7 +547,7 @@ int irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *noti
 		INIT_WORK(&notify->work, irq_affinity_notify);
 	}
 
-	scoped_guard(raw_spinlock_irqsave, &desc->lock) {
+	scoped_guard(raw_spinlock_irq, &desc->lock) {
 		old_notify = desc->affinity_notify;
 		desc->affinity_notify = notify;
 	}