From: "irqchip-bot for Marc Zyngier" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Marc Zyngier <maz@kernel.org>, tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] irqdomain: Implement irq_domain_clear_mapping() with irq_domain_set_mapping()
Date: Sun, 06 Jun 2021 12:43:48 -0000 [thread overview]
Message-ID: <162298342811.29796.3416072939038894683.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: ee1a2bc868c73578ae8bbe1107e62af078510c47
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/ee1a2bc868c73578ae8bbe1107e62af078510c47
Author: Marc Zyngier <maz@kernel.org>
AuthorDate: Mon, 05 Apr 2021 12:56:12 +01:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 02 Jun 2021 14:34:49 +01:00
irqdomain: Implement irq_domain_clear_mapping() with irq_domain_set_mapping()
Now that we only deal with irq_data pointers, it is pretty obvious
that irq_domain_clear_mapping() and irq_domain_set_mapping() are
almost the exact same thing.
Implement one it terms of the other.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
kernel/irq/irqdomain.c | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7a4e388..ed2ffff 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -498,21 +498,6 @@ static bool irq_domain_is_nomap(struct irq_domain *domain)
(domain->flags & IRQ_DOMAIN_FLAG_NO_MAP);
}
-static void irq_domain_clear_mapping(struct irq_domain *domain,
- irq_hw_number_t hwirq)
-{
- if (irq_domain_is_nomap(domain))
- return;
-
- if (hwirq < domain->revmap_size) {
- domain->revmap[hwirq] = NULL;
- } else {
- mutex_lock(&domain->revmap_tree_mutex);
- radix_tree_delete(&domain->revmap_tree, hwirq);
- mutex_unlock(&domain->revmap_tree_mutex);
- }
-}
-
static void irq_domain_set_mapping(struct irq_domain *domain,
irq_hw_number_t hwirq,
struct irq_data *irq_data)
@@ -529,6 +514,12 @@ static void irq_domain_set_mapping(struct irq_domain *domain,
}
}
+static void irq_domain_clear_mapping(struct irq_domain *domain,
+ irq_hw_number_t hwirq)
+{
+ irq_domain_set_mapping(domain, hwirq, NULL);
+}
+
static void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq)
{
struct irq_data *irq_data = irq_get_irq_data(irq);
reply other threads:[~2021-06-06 12:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=162298342811.29796.3416072939038894683.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).