1. 15 Nov, 2011 1 commit
    • Marc Zyngier's avatar
      ARM: gic: allow GIC to support non-banked setups · db0d4db2
      Marc Zyngier authored
      
      The GIC support code is heavily using the fact that hardware
      implementations are exposing banked registers. Unfortunately, it
      looks like at least one GIC implementation (EXYNOS) offers both
      the distributor and the CPU interfaces at different addresses,
      depending on the CPU.
      
      This problem is solved by allowing the distributor and CPU interface
      addresses to be per-cpu variables for the platforms that require it.
      The EXYNOS code is updated not to mess with the GIC internals while
      handling interrupts, and struct gic_chip_data is back to being private.
      The DT binding for the gic is updated to allow an optional "cpu-offset"
      value, which is used to compute the various base addresses.
      
      Finally, a new config option (GIC_NON_BANKED) is used to control this
      feature, so the overhead is only present on kernels compiled with
      support for EXYNOS.
      
      Tested on Origen (EXYNOS4) and Panda (OMAP4).
      
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Thomas Abraham <thomas.abraham@linaro.org>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      db0d4db2
  2. 31 Oct, 2011 4 commits
  3. 23 Oct, 2011 2 commits
  4. 17 Oct, 2011 1 commit
  5. 23 Sep, 2011 2 commits
  6. 13 Sep, 2011 1 commit
  7. 21 Jul, 2011 2 commits
    • Russell King's avatar
      ARM: GIC: avoid routing interrupts to offline CPUs · 5dfc54e0
      Russell King authored
      
      The irq_set_affinity() method can be called with masks which include
      offline CPUs.  This allows offline CPUs to have interrupts routed to
      them by writing to /proc/irq/*/smp_affinity after hotplug has taken
      a CPU offline.  Fix this by ensuring that we select a target CPU
      present in both the required affinity and the online CPU mask.
      
      Ensure that we return IRQ_SET_MASK_OK (which happens to be 0) on
      success to ensure generic code copies the new mask into the irq_data
      structure.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      5dfc54e0
    • Russell King's avatar
      ARM: CPU hotplug: fix abuse of irqdesc->node · 2ef75701
      Russell King authored
      
      irqdesc's node member is supposed to mark the numa node number for the
      interrupt.  Our use of it is non-standard.  Remove this, replacing the
      functionality with a test of the affinity mask.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      2ef75701
  8. 20 Jul, 2011 1 commit
  9. 11 May, 2011 2 commits
    • Santosh Shilimkar's avatar
      ARM: GIC: Convert GIC library to use the IO relaxed operations · 6ac77e46
      Santosh Shilimkar authored
      
      The GIC register accesses today make use of readl()/writel()
      which prove to be very expensive when used along with mandatory
      barriers. This mandatory barriers also introduces an un-necessary
      and expensive l2x0_sync() operation. On Cortex-A9 MP cores, GIC
      IO accesses from CPU are direct and doesn't go through L2X0 write
      buffer.
      
      A DSB before writel_relaxed() in gic_raise_softirq() is added to be
      compliant with the Barrier Litmus document - the mailbox scenario.
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      6ac77e46
    • Will Deacon's avatar
      ARM: gic: use handle_fasteoi_irq for SPIs · 1a01753e
      Will Deacon authored
      Currently, the gic uses handle_level_irq for handling SPIs (Shared
      Peripheral Interrupts), requiring active interrupts to be masked at
      the distributor level during IRQ handling.
      
      On a virtualised system, only the CPU interfaces are virtualised in
      hardware. Accesses to the distributor must be trapped by the
      hypervisor, adding latency to the critical interrupt path in Linux.
      
      This patch modifies the GIC code to use handle_fasteoi_irq for handling
      interrupts, which only requires us to signal EOI to the CPU interface
      when handling is complete. Cascaded IRQ handling is also updated to use
      the chained IRQ enter/exit functions to honour the flow control of the
      parent chip.
      
      Note that commit 846afbd1
      
       ("GIC: Dont disable INT in ack callback")
      broke cascading interrupts by forgetting to add IRQ masking. This is
      no longer an issue because the unmask call is now unnecessary.
      
      Tested on Versatile Express and Realview EB (1176 w/ cascaded GICs).
      Tested-and-reviewed-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
      Tested-and-acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      1a01753e
  10. 29 Mar, 2011 4 commits
  11. 08 Mar, 2011 1 commit
    • Santosh Shilimkar's avatar
      ARM: 6777/1: gic: Add hooks for architecture specific extensions · d7ed36a4
      Santosh Shilimkar authored
      
      Few architectures combine the GIC with an external interrupt
      controller. On such systems it may be necessary to update both
      the GIC registers and the external controller's registers to control
      IRQ behavior.
      
      This can be addressed in couple of possible methods.
       1. Export common GIC routines along with 'struct irq_chip gic_chip'
          and allow architectures to have custom function by override.
       2. Provide architecture specific function pointer hooks
          within GIC library and leave platforms to add the necessary
          code as part of these hooks.
      
      First one might be non-intrusive but have few shortcomings like arch
      needs to have there own custom gic library. Locks used should be
      common since it caters to same IRQs etc. Maintenance point of view
      also it leads to multiple file fixes.
      
      The second probably is cleaner and portable. It ensures that all the
      common GIC infrastructure is not touched and also provides archs to
      address their specific issue.
      
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: default avatarColin Cross <ccross@android.com>
      Tested-by: default avatarColin Cross <ccross@android.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      d7ed36a4
  12. 23 Feb, 2011 1 commit
  13. 13 Jan, 2011 1 commit
  14. 14 Dec, 2010 5 commits
  15. 06 Dec, 2010 1 commit
  16. 30 Nov, 2010 1 commit
  17. 12 Nov, 2010 1 commit
  18. 06 Oct, 2010 1 commit
  19. 16 Jun, 2010 1 commit
  20. 19 Jun, 2009 1 commit
  21. 17 May, 2009 1 commit
  22. 28 Apr, 2009 1 commit
    • Yinghai Lu's avatar
      irq: change ->set_affinity() to return status · d5dedd45
      Yinghai Lu authored
      
      according to Ingo, change set_affinity() in irq_chip should return int,
      because that way we can handle failure cases in a much cleaner way, in
      the genirq layer.
      
      v2: fix two typos
      
      [ Impact: extend API ]
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: linux-arch@vger.kernel.org
      LKML-Reference: <49F654E9.4070809@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d5dedd45
  23. 13 Dec, 2008 1 commit
  24. 06 Sep, 2008 1 commit
  25. 20 May, 2007 1 commit
  26. 17 May, 2007 1 commit
    • Russell King's avatar
      [ARM] gic: Fix gic cascade irq handling · 0f347bb9
      Russell King authored
      
      No need for the cascade irq function to have a "fastcall" annotation.
      Fix the range checking for valid IRQ numbers - comparing the value
      returned by the GIC with NR_IRQS is meaningless since we translate
      the GIC irq number to a Linux IRQ number afterwards.
      
      Check the GIC returned IRQ number is within limits first, then add
      the IRQ offset, and only then compare with NR_IRQS.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      0f347bb9