1. 27 Jul, 2015 5 commits
    • Brian Norris's avatar
      genirq: Add chip_[suspend|resume] PM support to irq_chip · be9b22b6
      Brian Norris authored
      Some (admittedly odd) irqchips perform functions that are not directly
      related to any of their child IRQ lines, and therefore need to perform
      some tasks during suspend/resume regardless of whether there are
      any "installed" interrupts for the irqchip. However, the current
      generic-chip framework does not call the chip's irq_{suspend,resume}
      when there are no interrupts installed (this makes sense, because there
      are no irq_data objects for such a call to be made).
      
      More specifically, irq-bcm7120-l2 configures both a forwarding mask
      (which affects other top-level GIC IRQs) and a second-level interrupt
      mask (for managing its own child interrupts). The former must be
      saved/restored on suspend/resume, even when there's nothing to do for
      the latter.
      
      This patch adds a new set of suspend/resume hooks to irq_chip_generic,
      to help represent *chip* suspend/resume, rather than IRQ suspend/resume.
      These callbacks will always be called for an IRQ chip (regardless of the
      installed interrupts) and are based on the per-chip irq_chip_generic
      struct, rather than the per-IRQ irq_data struct.
      
      The original problem report is described in extra detail here:
      http://lkml.kernel.org/g/20150619224123.GL4917@ld-irv-0074Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Tested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Cc: Gregory Fong <gregory.0xf0@gmail.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-mips@linux-mips.org
      Cc: Kevin Cernekee <cernekee@chromium.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1437607300-40858-1-git-send-email-computersforpeace@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      be9b22b6
    • Nicolas Pitre's avatar
      irqchip: Appropriate __init annotation for const data · c376023b
      Nicolas Pitre authored
      Init data marked const should be annotated with __initconst for
      correctness and not __initdata.  And for those already __initconst,
      they should be qualified as const at the compiler level too.
      This also fixes LTO builds that otherwise fail with section mismatch
      errors.
      Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1507241511551.1806@knanqh.ubzrSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c376023b
    • Bjorn Andersson's avatar
      genirq: Export irq_[get|set]_irqchip_state() · 1ee4fb3e
      Bjorn Andersson authored
      Export these functions to be able to build the Qualcomm family A PMIC
      gpio and mpp drivers as modules.
      
      [ tglx: Made them GPL exports ]
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: <kernel-build-reports@lists.linaro.org>
      Cc: <linaro-kernel@lists.linaro.org>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Link: http://lkml.kernel.org/r/1437594184-22966-1-git-send-email-bjorn.andersson@sonymobile.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1ee4fb3e
    • Sudeep Holla's avatar
      irqchip/gic: Remove redundant gic_set_irqchip_flags · 0d3f2c92
      Sudeep Holla authored
      Now that the GIC chip implementation enables IRQCHIP_SKIP_SET_WAKE and
      IRQCHIP_MASK_ON_SUSPEND by default, the platforms requiring them need
      not override the irqchip flags as before.
      
      This patch removes all the users of gic_set_irqchip_flags and the
      function itself.
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      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: 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-2-git-send-email-sudeep.holla@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      0d3f2c92
    • 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
  2. 26 Jul, 2015 3 commits
  3. 22 Jul, 2015 14 commits
  4. 20 Jul, 2015 3 commits
  5. 16 Jul, 2015 14 commits
  6. 12 Jul, 2015 1 commit