Skip to contentSkip to conversation

Fix some accidentally dropped IRQ buslocks

PATCH Applied Charles Keepax 2 participants 7 messages Oct 23, 2025 – Oct 24, 2025 IRQ

lore
Share & tools
lore
#0 lore raw

cover Fix some accidentally dropped IRQ buslocks

In the conversion to scoped guards several buslocks were changed to plain lock operations. This causes issues with some regmap IRQ operations as they rely on the bus unlock to synchronise operations back to the physical chip and those are no longer called.

Thanks,
Charles

Charles Keepax (3):
genirq/chip: Add buslock back in to irq_set_handler() genirq/manage: Add buslock back in to __disable_irq_nosync() genirq/manage: Add buslock back in to enable_irq()

 kernel/irq/chip.c   | 2 +-
 kernel/irq/manage.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/3 genirq/chip: Add buslock back in to irq_set_handler()

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes 5cd05f3e2315 ("genirq/chip: Rework irq_set_handler() variants")
---
 kernel/irq/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/chip.c +1 -1
index 3ffa0d80ddd19..d1917b28761a3 100644
@@ -1030,7 +1030,7 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
 void __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 		       const char *name)
 {
-	scoped_irqdesc_get_and_lock(irq, 0)
+	scoped_irqdesc_get_and_buslock(irq, 0)
 		__irq_do_set_handler(scoped_irqdesc, handle, is_chained, name);
 }
 EXPORT_SYMBOL_GPL(__irq_set_handler);
Signature · 1 line
2.47.3
merge bot Applied
#2 lore raw

[tip: irq/urgent] genirq/chip: Add buslock back in to irq_set_handler()

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

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

Commit-ID:     5d7e45dd670e42df4836afeaa9baf9d41ca4b434
Gitweb:        https://git.kernel.org/tip/5d7e45dd670e42df4836afeaa9baf9d41ca4b434
Author:        Charles Keepax <[email protected]>
AuthorDate:    Thu, 23 Oct 2025 16:48:59 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Fri, 24 Oct 2025 11:38:39 +02:00

genirq/chip: Add buslock back in to irq_set_handler()

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes 5cd05f3e2315 ("genirq/chip: Rework irq_set_handler() variants")
---
 kernel/irq/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/chip.c +1 -1
index 3ffa0d8..d1917b2 100644
@@ -1030,7 +1030,7 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
 void __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 		       const char *name)
 {
-	scoped_irqdesc_get_and_lock(irq, 0)
+	scoped_irqdesc_get_and_buslock(irq, 0)
 		__irq_do_set_handler(scoped_irqdesc, handle, is_chained, name);
 }
 EXPORT_SYMBOL_GPL(__irq_set_handler);
#3 lore raw

PATCH 2/3 genirq/manage: Add buslock back in to __disable_irq_nosync()

In reply to Charles Keepax

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes 1b7444446724 ("genirq/manage: Rework __disable_irq_nosync()")
---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index c94837382037e..7d68fb5dc2428 100644
@@ -659,7 +659,7 @@ void __disable_irq(struct irq_desc *desc)
 
 static int __disable_irq_nosync(unsigned int irq)
 {
-	scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
+	scoped_irqdesc_get_and_buslock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
 		__disable_irq(scoped_irqdesc);
 		return 0;
 	}
Signature · 1 line
2.47.3
merge bot Applied
#4 lore raw

[tip: irq/urgent] genirq/manage: Add buslock back in to __disable_irq_nosync()

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

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

Commit-ID:     56363e25f79fe83e63039c5595b8cd9814173d37
Gitweb:        https://git.kernel.org/tip/56363e25f79fe83e63039c5595b8cd9814173d37
Author:        Charles Keepax <[email protected]>
AuthorDate:    Thu, 23 Oct 2025 16:49:00 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Fri, 24 Oct 2025 11:38:39 +02:00

genirq/manage: Add buslock back in to __disable_irq_nosync()

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes 1b7444446724 ("genirq/manage: Rework __disable_irq_nosync()")
---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index c948373..7d68fb5 100644
@@ -659,7 +659,7 @@ void __disable_irq(struct irq_desc *desc)
 
 static int __disable_irq_nosync(unsigned int irq)
 {
-	scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
+	scoped_irqdesc_get_and_buslock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
 		__disable_irq(scoped_irqdesc);
 		return 0;
 	}
#5 lore raw

PATCH 3/3 genirq/manage: Add buslock back in to enable_irq()

In reply to Charles Keepax

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes bddd10c55407 ("genirq/manage: Rework enable_irq()")
---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index 7d68fb5dc2428..400856abf6721 100644
@@ -789,7 +789,7 @@ void __enable_irq(struct irq_desc *desc)
  */
 void enable_irq(unsigned int irq)
 {
-	scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
+	scoped_irqdesc_get_and_buslock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
 		struct irq_desc *desc = scoped_irqdesc;
 
 		if (WARN(!desc->irq_data.chip, "enable_irq before setup/request_irq: irq %u\n", irq))
Signature · 1 line
2.47.3
merge bot Applied
#6 lore raw

[tip: irq/urgent] genirq/manage: Add buslock back in to enable_irq()

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

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

Commit-ID:     ef3330b99c01bda53f2a189b58bed8f6b7397f28
Gitweb:        https://git.kernel.org/tip/ef3330b99c01bda53f2a189b58bed8f6b7397f28
Author:        Charles Keepax <[email protected]>
AuthorDate:    Thu, 23 Oct 2025 16:49:01 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Fri, 24 Oct 2025 11:38:39 +02:00

genirq/manage: Add buslock back in to enable_irq()

The locking was changed from a buslock to a plain lock, but the patch description states there was no functional change. Assuming this was accidental so reverting to using the buslock.

Fixes bddd10c55407 ("genirq/manage: Rework enable_irq()")
---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index 7d68fb5..400856a 100644
@@ -789,7 +789,7 @@ void __enable_irq(struct irq_desc *desc)
  */
 void enable_irq(unsigned int irq)
 {
-	scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
+	scoped_irqdesc_get_and_buslock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
 		struct irq_desc *desc = scoped_irqdesc;
 
 		if (WARN(!desc->irq_data.chip, "enable_irq before setup/request_irq: irq %u\n", irq))