res = 0;
if (!(s->security_extn && !attrs.secure) && gic_has_groups(s)) {
/* Every byte offset holds 8 group status bits */
- irq = (offset - 0x080) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x080) * 8;
if (irq >= s->num_irq) {
goto bad_reg;
}
irq = (offset - 0x100) * 8;
else
irq = (offset - 0x180) * 8;
- irq += GIC_BASE_IRQ;
if (irq >= s->num_irq)
goto bad_reg;
res = 0;
irq = (offset - 0x200) * 8;
else
irq = (offset - 0x280) * 8;
- irq += GIC_BASE_IRQ;
if (irq >= s->num_irq)
goto bad_reg;
res = 0;
goto bad_reg;
}
- irq += GIC_BASE_IRQ;
if (irq >= s->num_irq)
goto bad_reg;
res = 0;
}
} else if (offset < 0x800) {
/* Interrupt Priority. */
- irq = (offset - 0x400) + GIC_BASE_IRQ;
+ irq = (offset - 0x400);
if (irq >= s->num_irq)
goto bad_reg;
res = gic_dist_get_priority(s, cpu, irq, attrs);
/* For uniprocessor GICs these RAZ/WI */
res = 0;
} else {
- irq = (offset - 0x800) + GIC_BASE_IRQ;
+ irq = (offset - 0x800);
if (irq >= s->num_irq) {
goto bad_reg;
}
}
} else if (offset < 0xf00) {
/* Interrupt Configuration. */
- irq = (offset - 0xc00) * 4 + GIC_BASE_IRQ;
+ irq = (offset - 0xc00) * 4;
if (irq >= s->num_irq)
goto bad_reg;
res = 0;
*/
if (!(s->security_extn && !attrs.secure) && gic_has_groups(s)) {
/* Every byte offset holds 8 group status bits */
- irq = (offset - 0x80) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x80) * 8;
if (irq >= s->num_irq) {
goto bad_reg;
}
}
} else if (offset < 0x180) {
/* Interrupt Set Enable. */
- irq = (offset - 0x100) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x100) * 8;
if (irq >= s->num_irq)
goto bad_reg;
if (irq < GIC_NR_SGIS) {
}
} else if (offset < 0x200) {
/* Interrupt Clear Enable. */
- irq = (offset - 0x180) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x180) * 8;
if (irq >= s->num_irq)
goto bad_reg;
if (irq < GIC_NR_SGIS) {
}
} else if (offset < 0x280) {
/* Interrupt Set Pending. */
- irq = (offset - 0x200) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x200) * 8;
if (irq >= s->num_irq)
goto bad_reg;
if (irq < GIC_NR_SGIS) {
}
} else if (offset < 0x300) {
/* Interrupt Clear Pending. */
- irq = (offset - 0x280) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x280) * 8;
if (irq >= s->num_irq)
goto bad_reg;
if (irq < GIC_NR_SGIS) {
goto bad_reg;
}
- irq = (offset - 0x300) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x300) * 8;
if (irq >= s->num_irq) {
goto bad_reg;
}
goto bad_reg;
}
- irq = (offset - 0x380) * 8 + GIC_BASE_IRQ;
+ irq = (offset - 0x380) * 8;
if (irq >= s->num_irq) {
goto bad_reg;
}
}
} else if (offset < 0x800) {
/* Interrupt Priority. */
- irq = (offset - 0x400) + GIC_BASE_IRQ;
+ irq = (offset - 0x400);
if (irq >= s->num_irq)
goto bad_reg;
gic_dist_set_priority(s, cpu, irq, value, attrs);
* annoying exception of the 11MPCore's GIC.
*/
if (s->num_cpu != 1 || s->revision == REV_11MPCORE) {
- irq = (offset - 0x800) + GIC_BASE_IRQ;
+ irq = (offset - 0x800);
if (irq >= s->num_irq) {
goto bad_reg;
}
}
} else if (offset < 0xf00) {
/* Interrupt Configuration. */
- irq = (offset - 0xc00) * 4 + GIC_BASE_IRQ;
+ irq = (offset - 0xc00) * 4;
if (irq >= s->num_irq)
goto bad_reg;
if (irq < GIC_NR_SGIS)