Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0b823e9 authored by Will Deacon's avatar Will Deacon Committed by Russell King
Browse files

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: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 342d00ae
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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) {
	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;
	}

	/*