drivers: irq-chip: irq-gic: introduce gic_cpu_if_down()
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 20 Mar 2013 03:59:04 +0000 (23:59 -0400)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 07:30:39 +0000 (09:30 +0200)
commit0f4e18f6c9cdc1246da523f25b83776ece5b4b8a
tree8ab34591c35559e50679adfb2b8b893c88205d29
parent0284d57fefb977c52748176308d30d30a148d24c
drivers: irq-chip: irq-gic: introduce gic_cpu_if_down()

When processors are about to hit low power states, the assertion of
standbywfi signal, triggered by the wfi instruction, is essential to
entering low power modes. If an IRQ is pending on the processor at the
time wfi is issued, the wfi instruction completes and the processor
restarts execution without asserting the standbywfi signal. Depending
on the platform power controller HW this behaviour can be acceptable or
not; if this behaviour must be prevented software should be provided
with a way to disable the routing of interrupts to the core IRQ pins.

On systems where raw GIC distributor interrupts are connected to the power
controller as wake-up events (hence the power controller still senses
IRQs and can wake up cores upon IRQ pending), the GIC CPU interface can
be disabled on power down, so that the GIC CPU IF output is gated and wfi
cannot complete, thereby preventing the standbywfi issue.

This patch adds a simple function to the GIC driver that allows to
disable the GIC CPU IF from power down procedures.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
[rewrote commit log]

Signed-off-by: Olof Johansson <olof@lixom.net>
(cherry picked from commit 10d9eb8a17cfb697967928bde06f3e7e530b03ac)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
drivers/irqchip/irq-gic.c
include/linux/irqchip/arm-gic.h