From: Russell King Date: Sun, 23 Oct 2011 13:42:30 +0000 (+0100) Subject: Merge branch 'ppi-irq-core-for-rmk' of git://github.com/mzyngier/arm-platforms into... X-Git-Tag: MMI-PSA29.97-13-9~18195^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34471a9168c8bfd7f0d00989a7b0797ad27d585e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'ppi-irq-core-for-rmk' of git://github.com/mzyngier/arm-platforms into devel-stable --- 34471a9168c8bfd7f0d00989a7b0797ad27d585e diff --cc arch/arm/common/gic.c index 734db99eaee7,a2b320503931..016c1aeb847c --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@@ -26,9 -26,11 +26,12 @@@ #include #include #include +#include #include #include + #include + #include + #include #include #include @@@ -277,8 -286,23 +287,25 @@@ static void __init gic_dist_init(struc if (gic_irqs > 1020) gic_irqs = 1020; + gic->gic_irqs = gic_irqs; + + /* + * Nobody would be insane enough to use PPIs on a secondary + * GIC, right? + */ + if (gic == &gic_data[0]) { + nrppis = (32 - irq_start) & 31; + + /* The GIC only supports up to 16 PPIs. */ + if (nrppis > 16) + BUG(); + + ppi_base = gic->irq_offset + 32 - nrppis; + } + + pr_info("Configuring GIC with %d sources (%d PPIs)\n", + gic_irqs, (gic == &gic_data[0]) ? nrppis : 0); + /* * Set all global interrupts to be level triggered, active low. */