build/patch/kernel/archive/sunxi-5.10/megous/irqchip-sun6i-r-Fix-interrupt-handling-on-A83T.patch

65 lines
2.2 KiB
Diff

From 792519d20c91516aa06008d6ec763e0a0485cfff Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Wed, 24 Jun 2020 10:11:38 +0200
Subject: [PATCH 174/351] irqchip: sun6i-r: Fix interrupt handling on A83T
Thanks to Samuel for suggesting a fix:
> It's definitely the EOI mode. see https://patchwork.kernel.org/patch/7006711/
> You can't receive other IRQs, such as RSB, until EOI. I'll need
> to move the ack to an irq_unmask callback on the level chip and
> remove IRQCHIP_EOI_THREADED.
> I think it would also work if you moved one of the IRQs to
> a different CPU, since the priority drop is at the CPU interface
> level.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/irqchip/irq-sun6i-r.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-sun6i-r.c b/drivers/irqchip/irq-sun6i-r.c
index a5deea92057f..56a1b9e964f4 100644
--- a/drivers/irqchip/irq-sun6i-r.c
+++ b/drivers/irqchip/irq-sun6i-r.c
@@ -48,12 +48,12 @@ static void sun6i_r_intc_irq_ack(struct irq_data *data)
sun6i_r_intc_nmi_ack();
}
-static void sun6i_r_intc_irq_eoi(struct irq_data *data)
+static void sun6i_r_intc_irq_unmask(struct irq_data *data)
{
if (data->hwirq == NMI_HWIRQ)
sun6i_r_intc_nmi_ack();
- irq_chip_eoi_parent(data);
+ irq_chip_unmask_parent(data);
}
static int sun6i_r_intc_irq_set_type(struct irq_data *data, unsigned int type)
@@ -143,16 +143,15 @@ static struct irq_chip sun6i_r_intc_edge = {
static struct irq_chip sun6i_r_intc_level = {
.name = "sun6i-r-intc",
.irq_mask = irq_chip_mask_parent,
- .irq_unmask = irq_chip_unmask_parent,
- .irq_eoi = sun6i_r_intc_irq_eoi,
+ .irq_unmask = sun6i_r_intc_irq_unmask,
+ .irq_eoi = irq_chip_eoi_parent,
.irq_set_affinity = irq_chip_set_affinity_parent,
.irq_set_type = sun6i_r_intc_irq_set_type,
.irq_get_irqchip_state = irq_chip_get_parent_state,
.irq_set_irqchip_state = irq_chip_set_parent_state,
.irq_set_wake = sun6i_r_intc_irq_set_wake,
.irq_set_vcpu_affinity = irq_chip_set_vcpu_affinity_parent,
- .flags = IRQCHIP_SET_TYPE_MASKED |
- IRQCHIP_EOI_THREADED,
+ .flags = IRQCHIP_SET_TYPE_MASKED,
};
static int sun6i_r_intc_domain_alloc(struct irq_domain *domain,
--
2.34.0