From: Vineet Gupta Date: Thu, 12 Sep 2013 08:23:06 +0000 (+0530) Subject: ARC: Reset the value of Interrupt Priority Register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54c8bff14d604de23d0718eee59c5436a4703fe5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARC: Reset the value of Interrupt Priority Register In case bootloader has changed the priority of one/more IRQ lines Reported-by: Noam Camus Signed-off-by: Vineet Gupta --- diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c index 5fc92455da36..02684e1a0cf0 100644 --- a/arch/arc/kernel/irq.c +++ b/arch/arc/kernel/irq.c @@ -39,10 +39,14 @@ void arc_init_IRQ(void) level_mask |= IS_ENABLED(CONFIG_ARC_IRQ5_LV2) << 5; level_mask |= IS_ENABLED(CONFIG_ARC_IRQ6_LV2) << 6; - if (level_mask) { + /* + * Write to register, even if no LV2 IRQs configured to reset it + * in case bootloader had mucked with it + */ + write_aux_reg(AUX_IRQ_LEV, level_mask); + + if (level_mask) pr_info("Level-2 interrupts bitset %x\n", level_mask); - write_aux_reg(AUX_IRQ_LEV, level_mask); - } } /*