Skip to contentSkip to conversation

irqchip: or1k-pic: Undefine mask_ack for level triggered hardware

PATCH In review Stafford Horne 2 participants 3 messages Jun 28, 2022

Subsystems (2)
lore
Share & tools
lore

Stafford Horne

author maintainer
#0 lore raw

PATCH 1/1 irqchip: or1k-pic: Undefine mask_ack for level triggered hardware

The mask_ack operation clears the interrupt by writing to the PICSR register. This we don't want for level triggered interrupt because it does not actually clear the interrupt on the source hardware.

This was causing issues in qemu with multi core setups where interrupts would continue to fire even though they had been cleared in PICSR.

Just remove the mask_ack operation.

---
Note,

I currently have this queued with openrisc fixes for 5.19-rcX. If this is ok with the IRQ maintainers I would like to have this merged via the OpenRISC queue.

 drivers/irqchip/irq-or1k-pic.c | 1 -
 1 file changed, 1 deletion(-)
drivers/irqchip/irq-or1k-pic.c +0 -1
index 49b47e787644..f289ccd95291 100644
@@ -66,7 +66,6 @@ static struct or1k_pic_dev or1k_pic_level = {
 		.name = "or1k-PIC-level",
 		.irq_unmask = or1k_pic_unmask,
 		.irq_mask = or1k_pic_mask,
-		.irq_mask_ack = or1k_pic_mask_ack,
 	},
 	.handle = handle_level_irq,
 	.flags = IRQ_LEVEL | IRQ_NOPROBE,
Signature · 1 line
2.36.1
Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Stafford Horne

The mask_ack operation clears the interrupt by writing to the PICSR register. This we don't want for level triggered interrupt because it does not actually clear the interrupt on the source hardware.

This was causing issues in qemu with multi core setups where interrupts would continue to fire even though they had been cleared in PICSR.

Just remove the mask_ack operation.

---
Note,

I currently have this queued with openrisc fixes for 5.19-rcX. If this is ok with the IRQ maintainers I would like to have this merged via the OpenRISC queue.

 drivers/irqchip/irq-or1k-pic.c | 1 -
 1 file changed, 1 deletion(-)
drivers/irqchip/irq-or1k-pic.c +0 -0
index 49b47e787644..f289ccd95291 100644

drivers/irqchip/irq-or1k-pic.c static struct or1k_pic_dev or1k_pic_level = { · line 71

Quoted 7 lines
drivers/irqchip/irq-or1k-pic.c +0 -1
@@ -66,7 +66,6 @@ static struct or1k_pic_dev or1k_pic_level = {
 		.name = "or1k-PIC-level",
 		.irq_unmask = or1k_pic_unmask,
 		.irq_mask = or1k_pic_mask,
-		.irq_mask_ack = or1k_pic_mask_ack,
 	},
 	.handle = handle_level_irq,
 	.flags = IRQ_LEVEL | IRQ_NOPROBE,

Feel free to take this via your tree.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
author maintainer
#2 lore raw
Quoted 39 lines · Marc Zyngier
Quoted 27 lines · Stafford Horne

The mask_ack operation clears the interrupt by writing to the PICSR register. This we don't want for level triggered interrupt because it does not actually clear the interrupt on the source hardware.

This was causing issues in qemu with multi core setups where interrupts would continue to fire even though they had been cleared in PICSR.

Just remove the mask_ack operation.

---
Note,

I currently have this queued with openrisc fixes for 5.19-rcX. If this is ok with the IRQ maintainers I would like to have this merged via the OpenRISC queue.

 drivers/irqchip/irq-or1k-pic.c | 1 -
 1 file changed, 1 deletion(-)
drivers/irqchip/irq-or1k-pic.c +0 -0
index 49b47e787644..f289ccd95291 100644

drivers/irqchip/irq-or1k-pic.c static struct or1k_pic_dev or1k_pic_level = { · line 71

Quoted 7 lines
drivers/irqchip/irq-or1k-pic.c +0 -1
@@ -66,7 +66,6 @@ static struct or1k_pic_dev or1k_pic_level = {
 		.name = "or1k-PIC-level",
 		.irq_unmask = or1k_pic_unmask,
 		.irq_mask = or1k_pic_mask,
-		.irq_mask_ack = or1k_pic_mask_ack,
 	},
 	.handle = handle_level_irq,
 	.flags = IRQ_LEVEL | IRQ_NOPROBE,
Quoted 1 line

Feel free to take this via your tree.

Thanks,

-Stafford