]> xenbits.xensource.com Git - xen.git/commitdiff
xen/device-tree: Do not remap IRQs for secondary IRQ controllers
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Tue, 17 May 2016 12:15:50 +0000 (14:15 +0200)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 17 May 2016 17:27:04 +0000 (18:27 +0100)
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>
xen/common/device_tree.c

index 0ed86a7b03d271d7cd0c045128c01215fa4c9307..06a283728f033ec0c8e99f227616a92266f67fd1 100644 (file)
@@ -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 )
         {