• Anup Patel's avatar
    irqchip/sifive-plic: Add warning in plic_init() if handler already present · 3fecb5aa
    Anup Patel authored
    
    
    We have two enteries (one for M-mode and another for S-mode) in the
    interrupts-extended DT property of PLIC DT node for each HART. It is
    expected that firmware/bootloader will set M-mode HWIRQ line of each
    HART to 0xffffffff (i.e. -1) in interrupts-extended DT property
    because Linux runs in S-mode only.
    
    If firmware/bootloader is buggy then it will not correctly update
    interrupts-extended DT property which might result in a plic_handler
    configured twice. This patch adds a warning in plic_init() if a
    plic_handler is already marked present. This warning provides us
    a hint about incorrectly updated interrupts-extended DT property.
    Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    3fecb5aa
irq-sifive-plic.c 6.78 KB