Commit 1d50d2ce6337724d30055bdbe082236cc86e6785
Committed by
Jason Cooper
1 parent
7171511eae
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
irqchip: crossbar: Dont use '0' to mark reserved interrupts
Today '0' is actually reserved, but may not be the same in the future. So, use a flag to mark the GIC interrupts that are reserved. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Sricharan R <r.sricharan@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Link: https://lkml.kernel.org/r/1403766634-18543-2-git-send-email-r.sricharan@ti.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
drivers/irqchip/irq-crossbar.c
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include <linux/irqchip/arm-gic.h> |
18 | 18 | |
19 | 19 | #define IRQ_FREE -1 |
20 | +#define IRQ_RESERVED -2 | |
20 | 21 | #define GIC_IRQ_START 32 |
21 | 22 | |
22 | 23 | /* |
... | ... | @@ -139,7 +140,7 @@ |
139 | 140 | pr_err("Invalid reserved entry\n"); |
140 | 141 | goto err3; |
141 | 142 | } |
142 | - cb->irq_map[entry] = 0; | |
143 | + cb->irq_map[entry] = IRQ_RESERVED; | |
143 | 144 | } |
144 | 145 | } |
145 | 146 | |
... | ... | @@ -170,7 +171,7 @@ |
170 | 171 | * reserved irqs. so find and store the offsets once. |
171 | 172 | */ |
172 | 173 | for (i = 0; i < max; i++) { |
173 | - if (!cb->irq_map[i]) | |
174 | + if (cb->irq_map[i] == IRQ_RESERVED) | |
174 | 175 | continue; |
175 | 176 | |
176 | 177 | cb->register_offsets[i] = reserved; |