• Sudeep Holla's avatar
    irqchip/gic: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND · aec89ef7
    Sudeep Holla authored
    The GIC controller doesn't provides any facility to configure the wakeup
    sources. For the same reason, GIC chip implementation can't provide
    irq_set_wake functionality, but that results in the irqchip core
    preventing the systems from entering sleep states like "suspend to RAM".
    
    The GICv1/v2 controllers support wakeup events. They signal these wakeup
    events even when CPU interface is disabled which means the wakeup
    outputs are always enabled with the required logic in always-on domain.
    An implementation can powerdown the GIC completely, but then the wake-up
    must be relayed to some control logic within the power controller that
    acts as wake-up interrupt controller.
    
    Setting the IRQCHIP_SKIP_SET_WAKE flags will ensure that the interrupts
    from GIC can work as wakeup interrupts and resume from suspend-to-{idle,
    ram}. The wakeup interrupt sources need to use enable_irq_wake() and the
    irqchip core will then set the IRQD_WAKEUP_STATE flag.
    
    Also it's always safer to mask all the non wakeup interrupts are masked
    at the chip level when suspending. The irqchip infrastructure can handle
    masking of those interrupts at the chip level. The chip implementation
    just have to indicate that with IRQCHIP_MASK_ON_SUSPEND.
    
    This patch enables IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so
    that the irqchip core allows and handles the power managemant wake up
    modes.
    Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Cc: Simon Horman <horms@verge.net.au>
    Cc: Jason Cooper <jason@lakedaemon.net>
    Cc: Michal Simek <michal.simek@xilinx.com>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Magnus Damm <magnus.damm@gmail.com>
    Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1436971109-20189-1-git-send-email-sudeep.holla@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    aec89ef7
irq-gic.c 29.1 KB