Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Will Deacon and committed by
Russell King
e0b823e9 342d00ae

+6 -7
+6 -7
arch/arm/common/gic.c
··· 697 697 * For primary GICs, skip over SGIs. 698 698 * For secondary GICs, skip over PPIs, too. 699 699 */ 700 - domain->hwirq_base = 32; 701 - if (gic_nr == 0) { 702 - if ((irq_start & 31) > 0) { 703 - domain->hwirq_base = 16; 704 - if (irq_start != -1) 705 - irq_start = (irq_start & ~31) + 16; 706 - } 700 + if (gic_nr == 0 && (irq_start & 31) > 0) { 701 + domain->hwirq_base = 16; 702 + if (irq_start != -1) 703 + irq_start = (irq_start & ~31) + 16; 704 + } else { 705 + domain->hwirq_base = 32; 707 706 } 708 707 709 708 /*