From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
kernel-team@android.com, Jason Cooper <jason@lakedaemon.net>,
Valentin Schneider <valentin.schneider@arm.com>
Subject: [PATCH v2 1/4] genirq: Walk the irq_data hierarchy when resending an interrupt
Date: Thu, 3 Sep 2020 19:32:03 +0100 [thread overview]
Message-ID: <20200903183206.104838-2-maz@kernel.org> (raw)
In-Reply-To: <20200903183206.104838-1-maz@kernel.org>
On resending an interrupt, we only check the topmost irqchip for
a irq_retrigger callback. However, this callback could be implemented
at a lower level. Use irq_chip_retrigger_hierarchy() in this case.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
kernel/irq/resend.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index c48ce19a257f..8ccd32a0cc80 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -86,6 +86,18 @@ static int irq_sw_resend(struct irq_desc *desc)
}
#endif
+static int try_retrigger(struct irq_desc *desc)
+{
+ if (desc->irq_data.chip->irq_retrigger)
+ return desc->irq_data.chip->irq_retrigger(&desc->irq_data);
+
+#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
+ return irq_chip_retrigger_hierarchy(&desc->irq_data);
+#else
+ return 0;
+#endif
+}
+
/*
* IRQ resend
*
@@ -113,8 +125,7 @@ int check_irq_resend(struct irq_desc *desc, bool inject)
desc->istate &= ~IRQS_PENDING;
- if (!desc->irq_data.chip->irq_retrigger ||
- !desc->irq_data.chip->irq_retrigger(&desc->irq_data))
+ if (!try_retrigger(desc))
err = irq_sw_resend(desc);
/* If the retrigger was successfull, mark it with the REPLAY bit */
--
2.28.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Jason Cooper <jason@lakedaemon.net>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <valentin.schneider@arm.com>,
kernel-team@android.com
Subject: [PATCH v2 1/4] genirq: Walk the irq_data hierarchy when resending an interrupt
Date: Thu, 3 Sep 2020 19:32:03 +0100 [thread overview]
Message-ID: <20200903183206.104838-2-maz@kernel.org> (raw)
In-Reply-To: <20200903183206.104838-1-maz@kernel.org>
On resending an interrupt, we only check the topmost irqchip for
a irq_retrigger callback. However, this callback could be implemented
at a lower level. Use irq_chip_retrigger_hierarchy() in this case.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
kernel/irq/resend.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index c48ce19a257f..8ccd32a0cc80 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -86,6 +86,18 @@ static int irq_sw_resend(struct irq_desc *desc)
}
#endif
+static int try_retrigger(struct irq_desc *desc)
+{
+ if (desc->irq_data.chip->irq_retrigger)
+ return desc->irq_data.chip->irq_retrigger(&desc->irq_data);
+
+#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
+ return irq_chip_retrigger_hierarchy(&desc->irq_data);
+#else
+ return 0;
+#endif
+}
+
/*
* IRQ resend
*
@@ -113,8 +125,7 @@ int check_irq_resend(struct irq_desc *desc, bool inject)
desc->istate &= ~IRQS_PENDING;
- if (!desc->irq_data.chip->irq_retrigger ||
- !desc->irq_data.chip->irq_retrigger(&desc->irq_data))
+ if (!try_retrigger(desc))
err = irq_sw_resend(desc);
/* If the retrigger was successfull, mark it with the REPLAY bit */
--
2.28.0
next prev parent reply other threads:[~2020-09-03 18:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 18:32 [PATCH v2 0/4] irqchip/gic: Generalize use of HW-based retriggering Marc Zyngier
2020-09-03 18:32 ` Marc Zyngier
2020-09-03 18:32 ` Marc Zyngier [this message]
2020-09-03 18:32 ` [PATCH v2 1/4] genirq: Walk the irq_data hierarchy when resending an interrupt Marc Zyngier
2020-09-04 19:28 ` Valentin Schneider
2020-09-04 19:28 ` Valentin Schneider
2020-09-05 9:26 ` Marc Zyngier
2020-09-05 9:26 ` Marc Zyngier
2020-09-05 12:58 ` Valentin Schneider
2020-09-05 12:58 ` Valentin Schneider
2020-09-03 18:32 ` [PATCH v2 2/4] irqchip/gic-v2, v3: Implement irq_chip->irq_retrigger() Marc Zyngier
2020-09-03 18:32 ` Marc Zyngier
2020-09-03 18:32 ` [PATCH v2 3/4] irqchip/git-v3-its: Implement irq_retrigger callback for device-triggered LPIs Marc Zyngier
2020-09-03 18:32 ` Marc Zyngier
2020-09-03 18:32 ` [PATCH v2 4/4] irqchip/gic-v2, v3: Prevent SW resends entirely Marc Zyngier
2020-09-03 18:32 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200903183206.104838-2-maz@kernel.org \
--to=maz@kernel.org \
--cc=jason@lakedaemon.net \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=valentin.schneider@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.