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: v3.2-rc1~130^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34471a9168c8bfd7f0d00989a7b0797ad27d585e;p=platform%2Fkernel%2Flinux-stable.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 734db99,a2b3205..016c1ae --- 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,9 -286,24 +287,26 @@@ 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. */ for (i = 32; i < gic_irqs; i += 16)