From: Will Deacon Date: Fri, 3 Feb 2012 13:52:14 +0000 (+0100) Subject: ARM: 7318/1: gic: refactor irq_start assignment X-Git-Tag: MMI-PSA29.97-13-9~17118^2~1^3~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0b823e9a543527dbb0f806252ee03a60f2aefbc;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ARM: 7318/1: gic: refactor irq_start assignment The irq_start and hwirq_base assignment code is fairly hairy and ended up being difficult to read following a conflict resolution for 3.2. This patch rearranges the code slightly to make it easier to read. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Russell King --- diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index b2dc2dd7f1df..a3bc86fa3156 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -697,13 +697,12 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, * For primary GICs, skip over SGIs. * For secondary GICs, skip over PPIs, too. */ - domain->hwirq_base = 32; - if (gic_nr == 0) { - if ((irq_start & 31) > 0) { - domain->hwirq_base = 16; - if (irq_start != -1) - irq_start = (irq_start & ~31) + 16; - } + if (gic_nr == 0 && (irq_start & 31) > 0) { + domain->hwirq_base = 16; + if (irq_start != -1) + irq_start = (irq_start & ~31) + 16; + } else { + domain->hwirq_base = 32; } /*