From 43d5f60a7443ccf2195a06f3c242fefffb427f4b Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Mon, 28 Mar 2022 13:29:20 +0300 Subject: [PATCH] MPFS: Fix issue with external interrupt detection The bitmask overflow'd. Failing test is at mpfs_irq_dispatch / line 69 --- arch/risc-v/include/irq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h index 5abe73499a..4ae804c5b9 100644 --- a/arch/risc-v/include/irq.h +++ b/arch/risc-v/include/irq.h @@ -82,9 +82,9 @@ /* IRQ bit and IRQ mask */ #ifdef CONFIG_ARCH_RV32 -# define RISCV_IRQ_BIT (1 << 31) +# define RISCV_IRQ_BIT (UINT32_C(1) << 31) #else -# define RISCV_IRQ_BIT (1 << 63) +# define RISCV_IRQ_BIT (UINT64_C(1) << 63) #endif #define RISCV_IRQ_MASK (~RISCV_IRQ_BIT)