Skip to contentSkip to conversation

xen/device-tree: Do not remap IRQs for secondary IRQ controllers

PATCH In review Edgar E. Iglesias 2 participants 2 messages May 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 xen/device-tree: Do not remap IRQs for secondary IRQ controllers

From: "Edgar E. Iglesias" <[email protected]>

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.

---

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(+)
xen/common/device_tree.c +17 -0
index 0ed86a7..06a2837 100644
@@ -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 )
         {
Signature · 7 lines
2.5.0


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 6 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Do not remap IRQs connected to secondary interrupt controllers. These IRQs have no meaning to us until they connect to the primary controller.

Quoted 6 lines

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.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel