1. 11 2月, 2016 1 次提交
  2. 21 12月, 2015 2 次提交
  3. 18 12月, 2015 1 次提交
    • L
      irqchip/gic: Kconfig the number of instances · a27d21e0
      Linus Walleij 提交于
      There is currently a hack in the GIC driver making it possible
      to pass the number of GIC instances from the platform-specific
      include files and thus override the variable MAX_GIC_NR.
      
      With multiplatform deployments, this will not work as we need
      to get rid of the platform-specific include files.
      
      It turns out that this feature is only used by the RealView
      platform which has a cascaded GIC. So move the configuration
      to Kconfig and bump to 2 instances if we're building for the
      RealView. The include file hacks can then be removed.
      
      Tested on the ARM PB11MPCore with its cascaded GIC.
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      a27d21e0
  4. 16 12月, 2015 3 次提交
    • M
      irqchip/gic: Make interrupt ID 1020 invalid · 327ebe1f
      Marc Zyngier 提交于
      The GIC has no such thing as interrupt 1020: the last valid ID is
      1019, and the range 1020-1023 is reserved - 1023 indicating that
      no interrupt is pending. So let's make sure we don't try to handle
      this ID.
      
      This bug has been in since the initial GIC code was introduced in
      8ad68bbf ("[ARM] Add support for ARM RealView board").
      Reported-by: NEric Auger <eric.auger@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      327ebe1f
    • L
      irqchip/gic: Assign irqchip dynamically · 58b89649
      Linus Walleij 提交于
      Instead of having the irqchip being a static struct, make it part
      of the per-instance data so we can assign it a dynamic name. This
      has the usable side effect of displaying the GIC with an instance
      number as GIC0, GIC1 ... GICn in /proc/interrupts, which is helpful
      when debugging cascaded GICs, such as on the ARM PB11MPCore.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      58b89649
    • L
      irqchip/gic: Support RealView variant setup · 8673c1d7
      Linus Walleij 提交于
      The ARM RealView PB11MPCore reference design has some special
      bits in a system controller register to set up the GIC in one
      of three modes: legacy, new with DCC, new without DCC. The
      register is also used to enable FIQ.
      
      Since the platform will not boot unless this register is set
      up to "new with DCC" mode, we need a special quirk to be
      compiled-in for the RealView platforms.
      
      If we find the right compatible string on the GIC TestChip,
      we enable this quirk by looking up the system controller and
      enabling the special bits.
      
      We depend on the CONFIG_REALVIEW_DT Kconfig symbol as the old
      boardfile code has the same fix hardcoded, and this is only
      needed for the attempts to modernize the RealView code using
      device tree.
      
      After fixing this, the PB11MPCore boots with device tree
      only.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      8673c1d7
  5. 17 11月, 2015 2 次提交
  6. 14 10月, 2015 5 次提交
  7. 10 10月, 2015 1 次提交
  8. 01 10月, 2015 1 次提交
  9. 22 9月, 2015 1 次提交
  10. 16 9月, 2015 3 次提交
    • R
      irqchip: Kill off set_irq_flags usage · d17cab44
      Rob Herring 提交于
      set_irq_flags is ARM specific with custom flags which have genirq
      equivalents. Convert drivers to use the genirq interfaces directly, so we
      can kill off set_irq_flags. The translation of flags is as follows:
      
      IRQF_VALID -> !IRQ_NOREQUEST
      IRQF_PROBE -> !IRQ_NOPROBE
      IRQF_NOAUTOEN -> IRQ_NOAUTOEN
      
      For IRQs managed by an irqdomain, the irqdomain core code handles clearing
      and setting IRQ_NOREQUEST already, so there is no need to do this in
      .map() functions and we can simply remove the set_irq_flags calls. Some
      users also modify IRQ_NOPROBE and this has been maintained although it
      is not clear that is really needed. There appears to be a great deal of
      blind copy and paste of this code.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Lee Jones <lee@kernel.org>
      Cc: Alexander Shiyan <shc_work@mail.ru>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: linux-rpi-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Link: http://lkml.kernel.org/r/1440889285-5637-3-git-send-email-robh@kernel.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      d17cab44
    • T
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner 提交于
      Most interrupt flow handlers do not use the irq argument. Those few
      which use it can retrieve the irq number from the irq descriptor.
      
      Remove the argument.
      
      Search and replace was done with coccinelle and some extra helper
      scripts around it. Thanks to Julia for her help!
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      bd0b9ac4
    • T
      irqchip/gic: Use IRQD_FORWARDED_TO_VCPU flag · 71466535
      Thomas Gleixner 提交于
      Get rid of the handler_data abuse.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      71466535
  11. 15 9月, 2015 1 次提交
    • M
      irqchip/GIC: Add workaround for aliased GIC400 · 12e14066
      Marc Zyngier 提交于
      The GICv2 architecture mandates that the two 4kB GIC regions are
      contiguous, and on two separate physical pages (so that access to
      the second page can be trapped by a hypervisor). This doesn't work
      very well when PAGE_SIZE is 64kB.
      
      A relatively common hack^Wway to work around this is to alias each
      4kB region over its own 64kB page. Of course in this case, the base
      address you want to use is not really the begining of the region,
      but base + 60kB (so that you get a contiguous 8kB region over two
      distinct pages).
      
      Normally, this would be described in DT with a new property, but
      some HW is already out there, and the firmware makes sure that
      it will override whatever you put in the GIC node. Duh. And of course,
      said firmware source code is not available, despite being based
      on u-boot.
      
      The workaround is to detect the case where the CPU interface size
      is set to 128kB, and verify the aliasing by checking that the ID
      register for GIC400 (which is the only GIC wired this way so far)
      is the same at base and base + 0xF000. In this case, we update
      the GIC base address and let it roll.
      
      And if you feel slightly sick by looking at this, rest assured that
      I do too...
      Reported-by: NJulien Grall <julien.grall@citrix.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Stuart Yoder <stuart.yoder@freescale.com>
      Cc: Pavel Fedin <p.fedin@samsung.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1442142873-20213-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      12e14066
  12. 02 9月, 2015 1 次提交
  13. 27 8月, 2015 2 次提交
  14. 04 8月, 2015 2 次提交
    • J
      irqchip/gic: Ensure gic_cpu_if_up/down() programs correct GIC instance · 4c2880b3
      Jon Hunter 提交于
      Commit 32289506 ("irqchip: gic: Preserve gic V2 bypass bits in cpu
      ctrl register") added a new function, gic_cpu_if_up(), to program the
      GIC CPU_CTRL register. This function assumes that there is only one GIC
      instance present and hence always uses the chip data for the primary GIC
      controller. Although it is not common for there to be a secondary, some
      devices do support a secondary. Therefore, fix this by passing
      gic_cpu_if_up() a pointer to the appropriate chip data structure.
      
      Similarly, the function gic_cpu_if_down() only assumes that there is a
      single GIC instance present. Update this function so that an instance
      number is passed for the appropriate GIC and return an error code on
      failure. The vexpress TC2 (which has a single GIC) is currently the only
      user of this function and so update it accordingly. Note that because the
      TC2 only has a single GIC, the call to gic_cpu_if_down() should always
      be successful.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1438332252-25248-2-git-send-email-jonathanh@nvidia.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      4c2880b3
    • J
      irqchip/gic: Only allow the primary GIC to set the CPU map · 567e5a01
      Jon Hunter 提交于
      The gic_init_bases() function initialises an array that stores the mapping
      between the GIC and CPUs. This array is a global array that is
      unconditionally initialised on every call to gic_init_bases(). Although,
      it is not common for there to be more than one GIC instance, there are
      some devices that do support nested GIC controllers and gic_init_bases()
      can be called more than once.
      
      A 2nd call to gic_init_bases() will clear the previous CPU mapping and
      will only setup the mapping again for the CPU calling gic_init_bases().
      Fix this by only allowing the CPU map to be configured for the primary GIC.
      
      For secondary GICs the CPU map is not relevant because these GICs do not
      directly route the interrupts to the main CPU(s) but to other GICs or
      devices.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1438332252-25248-1-git-send-email-jonathanh@nvidia.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      567e5a01
  15. 27 7月, 2015 2 次提交
    • S
      irqchip/gic: Remove redundant gic_set_irqchip_flags · 0d3f2c92
      Sudeep Holla 提交于
      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: NSudeep Holla <sudeep.holla@arm.com>
      Acked-by: NLinus 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: NThomas Gleixner <tglx@linutronix.de>
      0d3f2c92
    • S
      irqchip/gic: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND · aec89ef7
      Sudeep Holla 提交于
      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: NSudeep 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: NThomas Gleixner <tglx@linutronix.de>
      aec89ef7
  16. 12 7月, 2015 3 次提交
  17. 07 7月, 2015 1 次提交
  18. 06 6月, 2015 1 次提交
  19. 25 4月, 2015 1 次提交
  20. 09 4月, 2015 1 次提交
  21. 26 3月, 2015 2 次提交
  22. 15 3月, 2015 3 次提交