1. 29 8月, 2013 1 次提交
    • N
      drivers: irq-chip: irq-gic: introduce gic_cpu_if_down() · 10d9eb8a
      Nicolas Pitre 提交于
      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: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      [rewrote commit log]
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      10d9eb8a
  2. 15 7月, 2013 1 次提交
    • P
      clocksource+irqchip: delete __cpuinit usage from all related files · 8c37bb3a
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      This removes all the drivers/clocksource and drivers/irqchip uses of
      the __cpuinit macros from all C files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      8c37bb3a
  3. 20 6月, 2013 1 次提交
    • S
      irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case · 8b6fd652
      Shawn Guo 提交于
      Commit c0114709 (irqchip: gic: Perform the gic_secondary_init() call via
      CPU notifier) moves gic_secondary_init() that used to be called in
      .smp_secondary_init hook into a notifier call.  But it changes the
      system behavior a little bit.  Before the commit, gic_cpu_init()
      is called not only when kernel brings up the secondary cores but also
      when system resuming procedure hot-plugs the cores back to kernel.
      While after the commit, the function will not be called in the latter
      case, where the 'action' will not be CPU_STARTING but
      CPU_STARTING_FROZEN.  This behavior difference at least causes the
      following suspend/resume regression on imx6q.
      
      $ echo mem > /sys/power/state
      PM: Syncing filesystems ... done.
      PM: Preparing system for mem sleep
      mmc1: card e624 removed
      Freezing user space processes ... (elapsed 0.01 seconds) done.
      Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
      PM: Entering mem sleep
      PM: suspend of devices complete after 5.930 msecs
      PM: suspend devices took 0.010 seconds
      PM: late suspend of devices complete after 0.343 msecs
      PM: noirq suspend of devices complete after 0.828 msecs
      Disabling non-boot CPUs ...
      CPU1: shutdown
      CPU2: shutdown
      CPU3: shutdown
      Enabling non-boot CPUs ...
      CPU1: Booted secondary processor
      INFO: rcu_sched detected stalls on CPUs/tasks: { 1 2 3} (detected by 0, t=2102 jiffies, g=4294967169, c=4294967168, q=17)
      Task dump for CPU 1:
      swapper/1       R running      0     0      1 0x00000000
      Backtrace:
      [<bf895ff4>] (0xbf895ff4) from [<00000000>] (  (null))
      Backtrace aborted due to bad frame pointer <8007ccdc>
      Task dump for CPU 2:
      swapper/2       R running      0     0      1 0x00000000
      Backtrace:
      [<8075dbdc>] (0x8075dbdc) from [<00000000>] (  (null))
      Backtrace aborted due to bad frame pointer <00000002>
      Task dump for CPU 3:
      swapper/3       R running      0     0      1 0x00000000
      Backtrace:
      [<8075dbdc>] (0x8075dbdc) from [<00000000>] (  (null))
      
      Fix the regression by checking 'action' being CPU_STARTING_FROZEN to
      have gic_cpu_init() called for secondary cores when system resumes.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      8b6fd652
  4. 03 4月, 2013 1 次提交
  5. 27 3月, 2013 4 次提交
  6. 05 3月, 2013 1 次提交
  7. 13 1月, 2013 3 次提交
    • R
      irqchip: Move ARM gic.h to include/linux/irqchip/arm-gic.h · 520f7bd7
      Rob Herring 提交于
      Now that we have GIC moved to drivers/irqchip and all GIC DT init for
      platforms using irqchip_init, move gic.h and update the remaining
      includes.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Anton Vorontsov <avorontsov@mvista.com>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Shiraz Hashim <shiraz.hashim@st.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      520f7bd7
    • R
      irqchip: Move ARM GIC to drivers/irqchip · 81243e44
      Rob Herring 提交于
      Now that we have drivers/irqchip, move GIC irqchip to drivers/irqchip. This
      is necessary to share the GIC with arm and arm64.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      81243e44
    • R
      ARM: remove mach .handle_irq for GIC users · 1d5cc604
      Rob Herring 提交于
      Now that the GIC initialization sets up the handle_arch_irq pointer, we
      can remove it for all machines and make it static.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Anton Vorontsov <avorontsov@mvista.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Dinh Nguyen <dinguyen@altera.com>
      Cc: Shiraz Hashim <shiraz.hashim@st.com>
      Acked-by: NStephen Warren <swarren@nvidia.com>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      1d5cc604
  8. 11 1月, 2013 2 次提交
  9. 19 11月, 2012 1 次提交
    • N
      ARM: gic: use a private mapping for CPU target interfaces · 384a2902
      Nicolas Pitre 提交于
      The GIC interface numbering does not necessarily follow the logical
      CPU numbering, especially for complex topologies such as multi-cluster
      systems.
      
      Fortunately we can easily probe the GIC to create a mapping as the
      Interrupt Processor Targets Registers for the first 32 interrupts are
      read-only, and each field returns a value that always corresponds to
      the processor reading the register.
      
      Initially all mappings target all CPUs in case an IPI is required to
      boot secondary CPUs.  It is refined as those CPUs discover what their
      actual mapping is.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      384a2902
  10. 24 3月, 2012 1 次提交
  11. 16 2月, 2012 2 次提交
  12. 15 2月, 2012 1 次提交
    • G
      irq_domain: Make irq_domain structure match powerpc's irq_host · 7bb69bad
      Grant Likely 提交于
      Part of the series to unify the irq remapping mechanisms in the
      kernel.  A follow up patch will copy the powerpc implementation into
      kernel/irq/irqdomain.c, which will be a lot easier if the structures
      are identical.
      
      Where they differ, I've chose to use the powerpc names since there is
      a lot more code using those names.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      7bb69bad
  13. 23 1月, 2012 1 次提交
  14. 27 11月, 2011 2 次提交
  15. 16 11月, 2011 3 次提交
    • M
      ARM: GIC: Make MULTI_IRQ_HANDLER mandatory · 08d33b27
      Marc Zyngier 提交于
      Now that MULTI_IRQ_HANDLER is selected by all the in-tree
      GIC users, make it mandatory and remove the unused macros.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      08d33b27
    • M
      ARM: GIC: Add global gic_handle_irq() function · 562e0027
      Marc Zyngier 提交于
      Provide the GIC code with a low level handler that can be used
      by platforms using CONFIG_MULTI_IRQ_HANDLER.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      562e0027
    • M
      ARM: gic: allow GIC to support non-banked setups · db0d4db2
      Marc Zyngier 提交于
      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: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      db0d4db2
  16. 01 11月, 2011 1 次提交
  17. 31 10月, 2011 3 次提交
  18. 23 10月, 2011 2 次提交
  19. 17 10月, 2011 1 次提交
  20. 23 9月, 2011 2 次提交
  21. 13 9月, 2011 1 次提交
  22. 21 7月, 2011 2 次提交
    • R
      ARM: GIC: avoid routing interrupts to offline CPUs · 5dfc54e0
      Russell King 提交于
      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: NRussell King <rmk+kernel@arm.linux.org.uk>
      5dfc54e0
    • R
      ARM: CPU hotplug: fix abuse of irqdesc->node · 2ef75701
      Russell King 提交于
      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: NRussell King <rmk+kernel@arm.linux.org.uk>
      2ef75701
  23. 20 7月, 2011 1 次提交
  24. 11 5月, 2011 2 次提交
    • S
      ARM: GIC: Convert GIC library to use the IO relaxed operations · 6ac77e46
      Santosh Shilimkar 提交于
      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: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      6ac77e46
    • W
      ARM: gic: use handle_fasteoi_irq for SPIs · 1a01753e
      Will Deacon 提交于
      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: NAbhijeet Dharmapurikar <adharmap@codeaurora.org>
      Tested-and-acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      1a01753e