platform: plic: Bypass interrupt ID 0's priority programming
authorBin Meng <bmeng.cn@gmail.com>
Wed, 13 Mar 2019 16:13:32 +0000 (00:13 +0800)
committerAnup Patel <anup@brainfault.org>
Thu, 14 Mar 2019 15:13:35 +0000 (20:43 +0530)
Per PLIC spec, interrupt ID 0 is defined to mean "no interrupt".
We should bypass it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
platform/common/irqchip/plic.c

index 7509f05..51e1926 100644 (file)
@@ -118,7 +118,7 @@ int plic_cold_irqchip_init(unsigned long base,
        plic_base = (void *)base;
 
        /* Configure default priorities of all IRQs */
-       for (i = 0; i < plic_num_sources; i++)
+       for (i = 1; i <= plic_num_sources; i++)
                plic_set_priority(i, 1);
 
        return 0;