On Thu, Jan 8, 2015 at 7:06 AM, James Hogan <james.hogan@xxxxxxxxxx> wrote: > The cevt-r4k driver used to call into the GIC driver to find whether the > timer was pending, but only with External Interrupt Controller (EIC) > mode, where the Cause.IP bits can't be used as they encode the interrupt > priority level (Cause.RIPL) instead. > > However commit e9de688dac65 ("irqchip: mips-gic: Support local > interrupts") changed the condition from cpu_has_veic to gic_present. > This fails on cores such as P5600 which have a GIC but the local > interrupts aren't routable by the GIC, causing c0_compare_int_usable() > to consider the interrupt unusable so r4k_clockevent_init() fails. > > The previous behaviour wasn't really correct either though since P5600 > apparently supports EIC mode too, so lets use the Cause.TI bit instead > which should be present since release 2 of the MIPS32/MIPS64 > architecture. In fact multiple interrupts can be routed to that same CPU > interrupt line (e.g. performance counter and fast debug channel > interrupts), so lets use Cause.TI in preference to Cause.IP on all cores > since release 2. > > Fixes: e9de688dac65 ("irqchip: mips-gic: Support local interrupts") > Signed-off-by: James Hogan <james.hogan@xxxxxxxxxx> > Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> > Cc: Andrew Bresticker <abrestic@xxxxxxxxxxxx> > Cc: Qais Yousef <qais.yousef@xxxxxxxxxx> > Cc: Jason Cooper <jason@xxxxxxxxxxxxxx> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Cc: linux-mips@xxxxxxxxxxxxxx Thanks for catching this! Reviewed-by: Andrew Bresticker <abrestic@xxxxxxxxxxxx>