All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	Benoit Cousson <bcousson@baylibre.com>,
	Tony Lindgren <tony@atomide.com>, Nishanth Menon <nm@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Pankaj Dubey <pankaj.dubey@samsung.com>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jason Cooper <jason@lakedaemon.net>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Stefan Agner <stefan@agner.ch>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org
Subject: [PATCH v4 10/21] irqchip: GIC: get rid of routable domain
Date: Mon, 19 Jan 2015 09:44:04 +0000	[thread overview]
Message-ID: <1421660655-21394-11-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1421660655-21394-1-git-send-email-marc.zyngier@arm.com>

The only user of the so called "routable domain" functionality
now being fixed, let's clean up the GIC.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 drivers/irqchip/irq-gic.c       | 59 ++++-------------------------------------
 include/linux/irqchip/arm-gic.h |  6 -----
 2 files changed, 5 insertions(+), 60 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index d617ee5..9c30a76 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -795,15 +795,12 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-
-		gic_routable_irq_domain_ops->map(d, irq, hw);
 	}
 	return 0;
 }
 
 static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq)
 {
-	gic_routable_irq_domain_ops->unmap(d, irq);
 }
 
 static int gic_irq_domain_xlate(struct irq_domain *d,
@@ -822,16 +819,8 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
 	*out_hwirq = intspec[1] + 16;
 
 	/* For SPIs, we need to add 16 more to get the GIC irq ID number */
-	if (!intspec[0]) {
-		ret = gic_routable_irq_domain_ops->xlate(d, controller,
-							 intspec,
-							 intsize,
-							 out_hwirq,
-							 out_type);
-
-		if (IS_ERR_VALUE(ret))
-			return ret;
-	}
+	if (!intspec[0])
+		*out_hwirq += 16;
 
 	*out_type = intspec[2] & IRQ_TYPE_SENSE_MASK;
 
@@ -888,37 +877,6 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.xlate = gic_irq_domain_xlate,
 };
 
-/* Default functions for routable irq domain */
-static int gic_routable_irq_domain_map(struct irq_domain *d, unsigned int irq,
-			      irq_hw_number_t hw)
-{
-	return 0;
-}
-
-static void gic_routable_irq_domain_unmap(struct irq_domain *d,
-					  unsigned int irq)
-{
-}
-
-static int gic_routable_irq_domain_xlate(struct irq_domain *d,
-				struct device_node *controller,
-				const u32 *intspec, unsigned int intsize,
-				unsigned long *out_hwirq,
-				unsigned int *out_type)
-{
-	*out_hwirq += 16;
-	return 0;
-}
-
-static const struct irq_domain_ops gic_default_routable_irq_domain_ops = {
-	.map = gic_routable_irq_domain_map,
-	.unmap = gic_routable_irq_domain_unmap,
-	.xlate = gic_routable_irq_domain_xlate,
-};
-
-const struct irq_domain_ops *gic_routable_irq_domain_ops =
-					&gic_default_routable_irq_domain_ops;
-
 void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 			   void __iomem *dist_base, void __iomem *cpu_base,
 			   u32 percpu_offset, struct device_node *node)
@@ -926,7 +884,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 	irq_hw_number_t hwirq_base;
 	struct gic_chip_data *gic;
 	int gic_irqs, irq_base, i;
-	int nr_routable_irqs;
 
 	BUG_ON(gic_nr >= MAX_GIC_NR);
 
@@ -982,15 +939,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 	gic->gic_irqs = gic_irqs;
 
 	if (node) {		/* DT case */
-		const struct irq_domain_ops *ops = &gic_irq_domain_hierarchy_ops;
-
-		if (!of_property_read_u32(node, "arm,routable-irqs",
-					  &nr_routable_irqs)) {
-			ops = &gic_irq_domain_ops;
-			gic_irqs = nr_routable_irqs;
-		}
-
-		gic->domain = irq_domain_add_linear(node, gic_irqs, ops, gic);
+		gic->domain = irq_domain_add_linear(node, gic_irqs,
+						    &gic_irq_domain_hierarchy_ops,
+						    gic);
 	} else {		/* Non-DT case */
 		/*
 		 * For primary GICs, skip over SGIs.
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index 71d706d..3978c5b 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -115,11 +115,5 @@ int gic_get_cpu_id(unsigned int cpu);
 void gic_migrate_target(unsigned int new_cpu_id);
 unsigned long gic_get_sgir_physaddr(void);
 
-extern const struct irq_domain_ops *gic_routable_irq_domain_ops;
-static inline void __init register_routable_domain_ops
-					(const struct irq_domain_ops *ops)
-{
-	gic_routable_irq_domain_ops = ops;
-}
 #endif /* __ASSEMBLY */
 #endif
-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 10/21] irqchip: GIC: get rid of routable domain
Date: Mon, 19 Jan 2015 09:44:04 +0000	[thread overview]
Message-ID: <1421660655-21394-11-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1421660655-21394-1-git-send-email-marc.zyngier@arm.com>

The only user of the so called "routable domain" functionality
now being fixed, let's clean up the GIC.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 drivers/irqchip/irq-gic.c       | 59 ++++-------------------------------------
 include/linux/irqchip/arm-gic.h |  6 -----
 2 files changed, 5 insertions(+), 60 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index d617ee5..9c30a76 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -795,15 +795,12 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
 		irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data,
 				    handle_fasteoi_irq, NULL, NULL);
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-
-		gic_routable_irq_domain_ops->map(d, irq, hw);
 	}
 	return 0;
 }
 
 static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq)
 {
-	gic_routable_irq_domain_ops->unmap(d, irq);
 }
 
 static int gic_irq_domain_xlate(struct irq_domain *d,
@@ -822,16 +819,8 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
 	*out_hwirq = intspec[1] + 16;
 
 	/* For SPIs, we need to add 16 more to get the GIC irq ID number */
-	if (!intspec[0]) {
-		ret = gic_routable_irq_domain_ops->xlate(d, controller,
-							 intspec,
-							 intsize,
-							 out_hwirq,
-							 out_type);
-
-		if (IS_ERR_VALUE(ret))
-			return ret;
-	}
+	if (!intspec[0])
+		*out_hwirq += 16;
 
 	*out_type = intspec[2] & IRQ_TYPE_SENSE_MASK;
 
@@ -888,37 +877,6 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.xlate = gic_irq_domain_xlate,
 };
 
-/* Default functions for routable irq domain */
-static int gic_routable_irq_domain_map(struct irq_domain *d, unsigned int irq,
-			      irq_hw_number_t hw)
-{
-	return 0;
-}
-
-static void gic_routable_irq_domain_unmap(struct irq_domain *d,
-					  unsigned int irq)
-{
-}
-
-static int gic_routable_irq_domain_xlate(struct irq_domain *d,
-				struct device_node *controller,
-				const u32 *intspec, unsigned int intsize,
-				unsigned long *out_hwirq,
-				unsigned int *out_type)
-{
-	*out_hwirq += 16;
-	return 0;
-}
-
-static const struct irq_domain_ops gic_default_routable_irq_domain_ops = {
-	.map = gic_routable_irq_domain_map,
-	.unmap = gic_routable_irq_domain_unmap,
-	.xlate = gic_routable_irq_domain_xlate,
-};
-
-const struct irq_domain_ops *gic_routable_irq_domain_ops =
-					&gic_default_routable_irq_domain_ops;
-
 void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 			   void __iomem *dist_base, void __iomem *cpu_base,
 			   u32 percpu_offset, struct device_node *node)
@@ -926,7 +884,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 	irq_hw_number_t hwirq_base;
 	struct gic_chip_data *gic;
 	int gic_irqs, irq_base, i;
-	int nr_routable_irqs;
 
 	BUG_ON(gic_nr >= MAX_GIC_NR);
 
@@ -982,15 +939,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 	gic->gic_irqs = gic_irqs;
 
 	if (node) {		/* DT case */
-		const struct irq_domain_ops *ops = &gic_irq_domain_hierarchy_ops;
-
-		if (!of_property_read_u32(node, "arm,routable-irqs",
-					  &nr_routable_irqs)) {
-			ops = &gic_irq_domain_ops;
-			gic_irqs = nr_routable_irqs;
-		}
-
-		gic->domain = irq_domain_add_linear(node, gic_irqs, ops, gic);
+		gic->domain = irq_domain_add_linear(node, gic_irqs,
+						    &gic_irq_domain_hierarchy_ops,
+						    gic);
 	} else {		/* Non-DT case */
 		/*
 		 * For primary GICs, skip over SGIs.
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index 71d706d..3978c5b 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -115,11 +115,5 @@ int gic_get_cpu_id(unsigned int cpu);
 void gic_migrate_target(unsigned int new_cpu_id);
 unsigned long gic_get_sgir_physaddr(void);
 
-extern const struct irq_domain_ops *gic_routable_irq_domain_ops;
-static inline void __init register_routable_domain_ops
-					(const struct irq_domain_ops *ops)
-{
-	gic_routable_irq_domain_ops = ops;
-}
 #endif /* __ASSEMBLY */
 #endif
-- 
2.1.4

  parent reply	other threads:[~2015-01-19  9:44 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  9:43 [PATCH v4 00/21] irqchip: gic: killing gic_arch_extn and co, slowly Marc Zyngier
2015-01-19  9:43 ` Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 01/21] ARM: tegra: irq: nuke leftovers from non-DT support Marc Zyngier
2015-01-19  9:43   ` Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 02/21] irqchip: tegra: add DT-based support for legacy interrupt controller Marc Zyngier
2015-01-19  9:43   ` Marc Zyngier
2015-01-20  7:51   ` Peter De Schrijver
2015-01-20  7:51     ` Peter De Schrijver
2015-01-19  9:43 ` [PATCH v4 03/21] ARM: tegra: skip gic_arch_extn setup if DT has a LIC node Marc Zyngier
2015-01-19  9:43   ` Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 04/21] ARM: tegra: update DTs to expose legacy interrupt controller Marc Zyngier
2015-01-19  9:43   ` Marc Zyngier
2015-01-19  9:43 ` [PATCH v4 05/21] DT: tegra: add binding for the " Marc Zyngier
2015-01-19  9:43   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 06/21] ARM: tegra: remove old LIC support Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 07/21] genirq: Add irqchip_set_wake_parent Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 08/21] irqchip: crossbar: convert dra7 crossbar to stacked domains Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 09/21] DT: update ti,irq-crossbar binding Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` Marc Zyngier [this message]
2015-01-19  9:44   ` [PATCH v4 10/21] irqchip: GIC: get rid of routable domain Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 11/21] DT: arm,gic: kill arm,routable-irqs Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 12/21] DT: omap4/5: add binding for the wake-up generator Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-21 16:26   ` Tony Lindgren
2015-01-21 16:26     ` Tony Lindgren
2015-01-19  9:44 ` [PATCH v4 13/21] ARM: omap: convert wakeupgen to stacked domains Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-21 16:30   ` Tony Lindgren
2015-01-21 16:30     ` Tony Lindgren
2015-01-21 17:22     ` Marc Zyngier
2015-01-21 17:22       ` Marc Zyngier
2015-01-21 18:36       ` Tony Lindgren
2015-01-21 18:36         ` Tony Lindgren
2015-01-21 20:12         ` santosh shilimkar
2015-01-21 20:12           ` santosh shilimkar
2015-01-21 20:43           ` Tony Lindgren
2015-01-21 20:43             ` Tony Lindgren
2015-01-21 21:28             ` santosh shilimkar
2015-01-21 21:28               ` santosh shilimkar
2015-01-21 21:37               ` Tony Lindgren
2015-01-21 21:37                 ` Tony Lindgren
2015-01-19  9:44 ` [PATCH v4 14/21] ARM: imx6: convert GPC " Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19 10:47   ` Lucas Stach
2015-01-19 10:47     ` Lucas Stach
2015-01-19 11:12     ` Marc Zyngier
2015-01-19 11:12       ` Marc Zyngier
2015-01-20 11:19   ` Shawn Guo
2015-01-20 11:19     ` Shawn Guo
2015-01-19  9:44 ` [PATCH v4 15/21] ARM: exynos4/5: convert pmu wakeup " Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-20  7:42   ` Pankaj Dubey
2015-01-20  7:42     ` Pankaj Dubey
2015-01-20  9:43     ` Marc Zyngier
2015-01-20  9:43       ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 16/21] DT: exynos: update PMU binding Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-20  7:47   ` Pankaj Dubey
2015-01-20  7:47     ` Pankaj Dubey
2015-01-19  9:44 ` [PATCH v4 17/21] irqchip: gic: add an entry point to set up irqchip flags Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 18/21] ARM: shmobile: remove use of gic_arch_extn.irq_set_wake Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 19/21] ARM: ux500: switch from gic_arch_extn to gic_set_irqchip_flags Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 20/21] ARM: zynq: " Marc Zyngier
2015-01-19  9:44   ` Marc Zyngier
2015-01-19  9:44 ` [PATCH v4 21/21] irqchip: gic: Drop support for gic_arch_extn Marc Zyngier
2015-01-19  9:44   ` 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=1421660655-21394-11-git-send-email-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=bcousson@baylibre.com \
    --cc=gnurou@gmail.com \
    --cc=horms@verge.net.au \
    --cc=jason@lakedaemon.net \
    --cc=kernel@pengutronix.de \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=nm@ti.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=ssantosh@kernel.org \
    --cc=stefan@agner.ch \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.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.