[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <171863226909.10875.4590561687027411709.tip-bot2@tip-bot2>
Date: Mon, 17 Jun 2024 13:51:09 -0000
From: "tip-bot2 for Herve Codina" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Herve Codina <herve.codina@...tlin.com>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] irqdomain: Convert domain creation functions to
irq_domain_instantiate()
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 2ada5ed6ecac06e32defe39b15b33e9a6b004413
Gitweb: https://git.kernel.org/tip/2ada5ed6ecac06e32defe39b15b33e9a6b004413
Author: Herve Codina <herve.codina@...tlin.com>
AuthorDate: Fri, 14 Jun 2024 19:32:19 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Mon, 17 Jun 2024 15:48:15 +02:00
irqdomain: Convert domain creation functions to irq_domain_instantiate()
Domain creation functions use __irq_domain_add(). With the introduction
of irq_domain_instantiate(), __irq_domain_add() becomes obsolete.
In order to fully remove __irq_domain_add(), convert domain
creation function to irq_domain_instantiate()
Signed-off-by: Herve Codina <herve.codina@...tlin.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/r/20240614173232.1184015-19-herve.codina@bootlin.com
---
kernel/irq/irqdomain.c | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 4d2a403..c9b076c 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -442,10 +442,17 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
const struct irq_domain_ops *ops,
void *host_data)
{
+ struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = size,
+ .hwirq_max = size,
+ .ops = ops,
+ .host_data = host_data,
+ };
struct irq_domain *domain;
- domain = __irq_domain_add(fwnode, size, size, 0, ops, host_data);
- if (!domain)
+ domain = irq_domain_instantiate(&info);
+ if (IS_ERR(domain))
return NULL;
if (first_irq > 0) {
@@ -498,11 +505,20 @@ struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode,
const struct irq_domain_ops *ops,
void *host_data)
{
+ struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = first_hwirq + size,
+ .hwirq_max = first_hwirq + size,
+ .ops = ops,
+ .host_data = host_data,
+ };
struct irq_domain *domain;
- domain = __irq_domain_add(fwnode, first_hwirq + size, first_hwirq + size, 0, ops, host_data);
- if (domain)
- irq_domain_associate_many(domain, first_irq, first_hwirq, size);
+ domain = irq_domain_instantiate(&info);
+ if (IS_ERR(domain))
+ return NULL;
+
+ irq_domain_associate_many(domain, first_irq, first_hwirq, size);
return domain;
}
Powered by blists - more mailing lists