Skip to content

Commit d727be7

Browse files
atishp04Marc Zyngier
authored andcommitted
irqchip/sifive-plic: Fix maximum priority threshold value
As per the PLIC specification, maximum priority threshold value is 0x7 not 0xF. Even though it doesn't cause any error in qemu/hifive unleashed, there may be some implementation which checks the upper bound resulting in an illegal access. Fixes: ccbe80b ("irqchip/sifive-plic: Enable/Disable external interrupts upon cpu online/offline") Signed-off-by: Atish Patra <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3688b0d commit d727be7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-sifive-plic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#define CONTEXT_THRESHOLD 0x00
5757
#define CONTEXT_CLAIM 0x04
5858

59-
#define PLIC_DISABLE_THRESHOLD 0xf
59+
#define PLIC_DISABLE_THRESHOLD 0x7
6060
#define PLIC_ENABLE_THRESHOLD 0
6161

6262
struct plic_priv {

0 commit comments

Comments
 (0)