* [PATCH v3 1/1] xen/device-tree: Do not remap IRQs for secondary IRQ controllers
@ 2016-05-17 12:15 Edgar E. Iglesias
2016-05-17 13:14 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Edgar E. Iglesias @ 2016-05-17 12:15 UTC (permalink / raw)
To: xen-devel; +Cc: edgar.iglesias, julien.grall, sstabellini, wei.liu2, wei.chen
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
Do not remap IRQs connected to secondary interrupt controllers.
These IRQs have no meaning to us until they connect to the
primary controller.
Secondary IRQ controllers will at some point connect to the
primary controller (possibly via other IRQ controllers). We
map the IRQs at that last connection point.
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
ChangeLog:
v2 -> v3:
* Fix coding style issue with the comment
v1 -> v2:
* Rephrased comment no longer mentioning bus-bridges.
* Fixed coding style issues.
* Added a dt_dprintk to log skipped IRQs.
xen/common/device_tree.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 0ed86a7..06a2837 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -1176,6 +1176,23 @@ int dt_for_each_irq_map(const struct dt_device_node *dev,
for ( i = 0; i < pintsize; i++ )
dt_raw_irq.specifier[i] = dt_read_number(imap + i, 1);
+ if ( dt_raw_irq.controller != dt_interrupt_controller )
+ {
+ /*
+ * We don't map IRQs connected to secondary IRQ controllers as
+ * these IRQs have no meaning to us until they connect to the
+ * primary controller.
+ *
+ * Secondary IRQ controllers will at some point connect to
+ * the primary controller (possibly via other IRQ controllers).
+ * We map the IRQs at that last connection point.
+ */
+ imap += pintsize;
+ imaplen -= pintsize;
+ dt_dprintk(" -> Skipped IRQ for secondary IRQ controller\n");
+ continue;
+ }
+
ret = dt_irq_translate(&dt_raw_irq, &dt_irq);
if ( ret )
{
--
2.5.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v3 1/1] xen/device-tree: Do not remap IRQs for secondary IRQ controllers
2016-05-17 12:15 [PATCH v3 1/1] xen/device-tree: Do not remap IRQs for secondary IRQ controllers Edgar E. Iglesias
@ 2016-05-17 13:14 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2016-05-17 13:14 UTC (permalink / raw)
To: Edgar E. Iglesias
Cc: edgar.iglesias, sstabellini, wei.liu2, xen-devel, julien.grall,
wei.chen
On Tue, May 17, 2016 at 02:15:50PM +0200, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Do not remap IRQs connected to secondary interrupt controllers.
> These IRQs have no meaning to us until they connect to the
> primary controller.
>
> Secondary IRQ controllers will at some point connect to the
> primary controller (possibly via other IRQ controllers). We
> map the IRQs at that last connection point.
>
> Reviewed-by: Julien Grall <julien.grall@linaro.org>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-17 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 12:15 [PATCH v3 1/1] xen/device-tree: Do not remap IRQs for secondary IRQ controllers Edgar E. Iglesias
2016-05-17 13:14 ` Wei Liu
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.