]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: cevt-r4k: Drop GIC special case
authorJames Hogan <james.hogan@imgtec.com>
Mon, 19 Jan 2015 12:00:55 +0000 (12:00 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 5 Feb 2015 13:56:53 +0000 (14:56 +0100)
commit36dda88db92b643251ed415061e830d42246ecdb
tree94c7b0cc96305c93d09aca129302432037939803
parent0ac06a6042d0ee25a2907d75893ed1049ff658b4
MIPS: cevt-r4k: Drop GIC special case

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 1de966e96a76 ("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, added in commit 26ceb7070caa ("MIPS: Add EIC
support for GIC."), wasn't really correct either as far as I can tell,
since P5600 apparently supports EIC mode too, and in any case the use of
Cause.TI with r2 should have been sufficient anyway since commit
e5abe4cc2883 ("MIPS: PowerTV: Fix support for timer interrupts with > 64
external IRQs").

Therefore drop the call into the gic driver altogether, and add a
comment in c0_compare_int_pending() to clarify that Cause.TI does get
checked since MIPS r2.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Fixes: 1de966e96a76 ("irqchip: mips-gic: Support local interrupts")
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Steven J. Hill <steven.hill@imgtec.com>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9077/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cevt-r4k.c
drivers/irqchip/irq-mips-gic.c
include/linux/irqchip/mips-gic.h