summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index f215300f75..8a04507385 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -98,7 +98,7 @@ static void UIRQ(void)
98 if(status == 0) 98 if(status == 0)
99 panicf("Unhandled IRQ (source unknown!)"); 99 panicf("Unhandled IRQ (source unknown!)");
100 100
101 unsigned irq_no = find_first_set_bit(status); 101 unsigned irq_no = 31 - __builtin_clz(status);
102 102
103 panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)", 103 panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)",
104 masked ? "" : "no", irq_no, irqname[irq_no], status); 104 masked ? "" : "no", irq_no, irqname[irq_no], status);