Skip to contentSkip to conversation

Fix arm GIC irq mask calculations

PATCH In review Lennart Sorensen 2 participants 2 messages May 25, 2015 – May 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix arm GIC irq mask calculations

3.14 has made changes to how irqs are handled and ipipe is using the wrong value to calculate the mask. Change to the correct value by always using the access function to get the irq.

This fixes booting with 3.14.39 on the TI AM572x.

---
 drivers/irqchip/irq-gic.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/irqchip/irq-gic.c +4 -4
index 7a68905..c4ff114 100644
@@ -155,7 +155,7 @@ static inline unsigned int gic_irq(struct irq_data *d)
  */
 static void gic_mask_irq(struct irq_data *d)
 {
-	u32 mask = 1 << (d->irq % 32);
+	u32 mask = 1 << (gic_irq(d) % 32);
 	unsigned long flags;
 
 	raw_spin_lock_irqsave_cond(&irq_controller_lock, flags);
@@ -168,7 +168,7 @@ static void gic_mask_irq(struct irq_data *d)
 
 static void gic_unmask_irq(struct irq_data *d)
 {
-	u32 mask = 1 << (d->irq % 32);
+	u32 mask = 1 << (gic_irq(d) % 32);
 	unsigned long flags;
 
 	raw_spin_lock_irqsave_cond(&irq_controller_lock, flags);
@@ -195,7 +195,7 @@ static void gic_eoi_irq(struct irq_data *d)
 
 static void gic_hold_irq(struct irq_data *d)
 {
-	u32 mask = 1 << (d->irq % 32);
+	u32 mask = 1 << (gic_irq(d) % 32);
 	unsigned long flags;
 
 	raw_spin_lock_irqsave_cond(&irq_controller_lock, flags);
@@ -211,7 +211,7 @@ static void gic_hold_irq(struct irq_data *d)
 
 static void gic_release_irq(struct irq_data *d)
 {
-	u32 mask = 1 << (d->irq % 32);
+	u32 mask = 1 << (gic_irq(d) % 32);
 	unsigned long flags;
 
 	raw_spin_lock_irqsave_cond(&irq_controller_lock, flags);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 7 lines · Lennart Sorensen

3.14 has made changes to how irqs are handled and ipipe is using the wrong value to calculate the mask. Change to the correct value by always using the access function to get the irq.

This fixes booting with 3.14.39 on the TI AM572x.

This patch is fine by me.

Signature · 1 line
					    Gilles.