1. 14 3月, 2014 1 次提交
  2. 12 3月, 2014 1 次提交
  3. 13 11月, 2013 1 次提交
    • T
      genirq: Prevent spurious detection for unconditionally polled interrupts · b39898cd
      Thomas Gleixner 提交于
      On a 68k platform a couple of interrupts are demultiplexed and
      "polled" from a top level interrupt. Unfortunately there is no way to
      determine which of the sub interrupts raised the top level interrupt,
      so all of the demultiplexed interrupt handlers need to be
      invoked. Given a high enough frequency this can trigger the spurious
      interrupt detection mechanism, if one of the demultiplex interrupts
      returns IRQ_NONE continuously. But this is a false positive as the
      polling causes this behaviour and not buggy hardware/software.
      
      Introduce IRQ_POLLED which can be set at interrupt chip setup time via
      irq_set_status_flags(). The flag excludes the interrupt from the
      spurious detector and from all core polling activities.
      Reported-and-tested-by: NMichael Schmitz <schmitzmic@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-m68k@vger.kernel.org
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311061149250.23353@ionos.tec.linutronix.de
      b39898cd
  4. 13 9月, 2013 1 次提交
  5. 25 6月, 2013 1 次提交
  6. 29 5月, 2013 6 次提交
    • G
      genirq: irqchip: Add mask to block out invalid irqs · e8bd834f
      Grant Likely 提交于
      Some controllers have irqs that aren't wired up and must never be used.
      For the generic chip attached to an irq_domain this provides a mask that
      can be used to block out particular irqs so that they never get mapped.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Link: http://lkml.kernel.org/r/1369793454-19197-2-git-send-email-grant.likely@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e8bd834f
    • T
      genirq: Generic chip: Add linear irq domain support · 088f40b7
      Thomas Gleixner 提交于
      Provide infrastructure for irq chip implementations which work on
      linear irq domains.
      
      - Interface to allocate multiple generic chips which are associated to
        the irq domain.
      
      - Interface to get the generic chip pointer for a particular hardware
        interrupt in the domain.
      
      - irq domain mapping function to install the chip for a particular
        interrupt.
      
      Note: This lacks a removal function for now.
      
      [ Sebastian Hesselbarth: Mask cache and pointer math fixups ]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jean-Francois Moine <moinejf@free.fr>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Gerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Rob Landley <rob@landley.net>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Link: http://lkml.kernel.org/r/20130506142539.450634298@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      088f40b7
    • T
      genirq: irqchip: Add a mask calculation function · d0051816
      Thomas Gleixner 提交于
      Some chips have weird bit mask access patterns instead of the linear
      you expect. Allow them to calculate the cached mask themself.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jean-Francois Moine <moinejf@free.fr>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Gerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Rob Landley <rob@landley.net>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Link: http://lkml.kernel.org/r/20130506142539.302898834@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      d0051816
    • T
      genirq: Generic chip: Cache per irq bit mask · 966dc736
      Thomas Gleixner 提交于
      Cache the per irq bit mask instead of recalculating it over and over.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jean-Francois Moine <moinejf@free.fr>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Gerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Rob Landley <rob@landley.net>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Link: http://lkml.kernel.org/r/20130506142539.227119865@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      966dc736
    • G
      genirq: Generic chip: Handle separate mask registers · af80b0fe
      Gerlando Falauto 提交于
      There are cases where all irq_chip_type instances have separate mask
      registers, making a shared mask register cache unsuitable for the
      purpose.
      
      Introduce a new flag IRQ_GC_MASK_CACHE_PER_TYPE. If set, point the per
      chip mask pointer to the per chip private mask cache instead.
      
      [ tglx: Simplified code, renamed flag and massaged changelog ]
      Signed-off-by: NGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Joey Oravec <joravec@drewtech.com>
      Cc: Lennert Buytenhek <kernel@wantstofly.org>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Holger Brunck <Holger.Brunck@keymile.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Simon Guinot <simon@sequanux.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jean-Francois Moine <moinejf@free.fr>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Link: http://lkml.kernel.org/r/20130506142539.152569748@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      af80b0fe
    • G
      genirq: Generic chip: Add support for per chip type mask cache · 899f0e66
      Gerlando Falauto 提交于
      Today the same interrupt mask cache (stored within struct irq_chip_generic)
      is shared between all the irq_chip_type instances. As there are instances
      where each irq_chip_type uses a distinct mask register (as it is the case
      for Orion SoCs), sharing a single mask cache may be incorrect.
      So add a distinct pointer for each irq_chip_type, which for now
      points to the original mask register within irq_chip_generic.
      So no functional changes here.
      
      [ tglx: Minor cosmetic tweaks ]
      Reported-by: NJoey Oravec <joravec@drewtech.com>
      Signed-off-by: NSimon Guinot <sguinot@lacie.com>
      Signed-off-by: NHolger Brunck <holger.brunck@keymile.com>
      Signed-off-by: NGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Lennert Buytenhek <kernel@wantstofly.org>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Holger Brunck <Holger.Brunck@keymile.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Simon Guinot <simon@sequanux.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jean-Francois Moine <moinejf@free.fr>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Link: http://lkml.kernel.org/r/20130506142539.082226607@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      899f0e66
  7. 28 1月, 2013 1 次提交
  8. 25 1月, 2013 1 次提交
    • A
      x86/MSI: Support multiple MSIs in presense of IRQ remapping · 51906e77
      Alexander Gordeev 提交于
      The MSI specification has several constraints in comparison with
      MSI-X, most notable of them is the inability to configure MSIs
      independently. As a result, it is impossible to dispatch
      interrupts from different queues to different CPUs. This is
      largely devalues the support of multiple MSIs in SMP systems.
      
      Also, a necessity to allocate a contiguous block of vector
      numbers for devices capable of multiple MSIs might cause a
      considerable pressure on x86 interrupt vector allocator and
      could lead to fragmentation of the interrupt vectors space.
      
      This patch overcomes both drawbacks in presense of IRQ remapping
      and lets devices take advantage of multiple queues and per-IRQ
      affinity assignments.
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/c8bd86ff56b5fc118257436768aaa04489ac0a4c.1353324359.git.agordeev@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      51906e77
  9. 01 12月, 2012 1 次提交
    • J
      s390/pci: PCI adapter interrupts for MSI/MSI-X · 9a4da8a5
      Jan Glauber 提交于
      Support PCI adapter interrupts using the Single-IRQ-mode. Single-IRQ-mode
      disables an adapter IRQ automatically after delivering it until the SIC
      instruction enables it again. This is used to reduce the number of IRQs
      for streaming workloads.
      
      Up to 64 MSI handlers can be registered per PCI function.
      A hash table is used to map interrupt numbers to MSI descriptors.
      The interrupt vector is scanned using the flogr instruction.
      Only MSI/MSI-X interrupts are supported, no legacy INTs.
      Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      9a4da8a5
  10. 01 11月, 2012 1 次提交
    • T
      genirq: Provide means to retrigger parent · 293a7a0a
      Thomas Gleixner 提交于
      Attempts to retrigger nested threaded IRQs currently fail because they
      have no primary handler. In order to support retrigger of nested
      IRQs, the parent IRQ needs to be retriggered.
      
      To fix, when an IRQ needs to be resent, if the interrupt has a parent
      IRQ and runs in the context of the parent IRQ, then resend the parent.
      
      Also, handle_nested_irq() needs to clear the replay flag like the
      other handlers, otherwise check_irq_resend() will set it and it will
      never be cleared.  Without clearing, it results in the first resend
      working fine, but check_irq_resend() returning early on subsequent
      resends because the replay flag is still set.
      
      Problem discovered on ARM/OMAP platforms where a nested IRQ that's
      also a wakeup IRQ happens late in suspend and needed to be retriggered
      during the resume process.
      
      [khilman@ti.com: changelog edits, clear IRQS_REPLAY in handle_nested_irq()]
      Reported-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1350425269-11489-1-git-send-email-khilman@deeprootsystems.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      293a7a0a
  11. 25 7月, 2012 1 次提交
  12. 01 7月, 2012 1 次提交
  13. 15 6月, 2012 1 次提交
  14. 22 5月, 2012 1 次提交
  15. 23 4月, 2012 1 次提交
    • B
      irq: Add IRQ_TYPE_DEFAULT for use by PIC drivers · 3fca40c7
      Benjamin Herrenschmidt 提交于
      This is meant typically to allow a PIC driver's irq domain map() callback
      to establish sane defaults for the interrupt (and make sure that the HW
      and the irq_desc are in sync as far as the trigger is concerned).
      
      The irq core may not call the set_trigger callback if it thinks the
      trigger is already set to the right setting, so we need to ensure new
      descriptors are properly synchronized with the hardware.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fca40c7
  16. 11 4月, 2012 1 次提交
  17. 01 11月, 2011 1 次提交
    • P
      irq: don't put module.h into irq.h for tracking irqgen modules. · ec53cf23
      Paul Gortmaker 提交于
      Recent commit "irq: Track the  owner of irq descriptor" in
      commit ID b6873807 placed module.h into linux/irq.h
      but we are trying to limit module.h inclusion to just C files
      that really need it, due to its size and number of children
      includes.  This targets just reversing that include.
      
      Add in the basic "struct module" since that is all we really need
      to ensure things compile.  In theory, b6873807 should have added the
      module.h include to the irqdesc.h header as well, but the implicit
      module.h everywhere presence masked this from showing up.  So give
      it the "struct module" as well.
      
      As for the C files, irqdesc.c is only using THIS_MODULE, so it
      does not need module.h - give it export.h instead.  The C file
      irq/manage.c is now (as of b6873807) using try_module_get and
      module_put and so it needs module.h (which it already has).
      
      Also convert the irq_alloc_descs variants to macros, since all
      they really do is is call the __irq_alloc_descs primitive.
      This avoids including export.h and no debug info is lost.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ec53cf23
  18. 03 10月, 2011 1 次提交
    • M
      genirq: Add support for per-cpu dev_id interrupts · 31d9d9b6
      Marc Zyngier 提交于
      The ARM GIC interrupt controller offers per CPU interrupts (PPIs),
      which are usually used to connect local timers to each core. Each CPU
      has its own private interface to the GIC, and only sees the PPIs that
      are directly connect to it.
      
      While these timers are separate devices and have a separate interrupt
      line to a core, they all use the same IRQ number.
      
      For these devices, request_irq() is not the right API as it assumes
      that an IRQ number is visible by a number of CPUs (through the
      affinity setting), but makes it very awkward to express that an IRQ
      number can be handled by all CPUs, and yet be a different interrupt
      line on each CPU, requiring a different dev_id cookie to be passed
      back to the handler.
      
      The *_percpu_irq() functions is designed to overcome these
      limitations, by providing a per-cpu dev_id vector:
      
      int request_percpu_irq(unsigned int irq, irq_handler_t handler,
      		   const char *devname, void __percpu *percpu_dev_id);
      void free_percpu_irq(unsigned int, void __percpu *);
      int setup_percpu_irq(unsigned int irq, struct irqaction *new);
      void remove_percpu_irq(unsigned int irq, struct irqaction *act);
      void enable_percpu_irq(unsigned int irq);
      void disable_percpu_irq(unsigned int irq);
      
      The API has a number of limitations:
      - no interrupt sharing
      - no threading
      - common handler across all the CPUs
      
      Once the interrupt is requested using setup_percpu_irq() or
      request_percpu_irq(), it must be enabled by each core that wishes its
      local interrupt to be delivered.
      
      Based on an initial patch by Thomas Gleixner.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1316793788-14500-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      31d9d9b6
  19. 12 9月, 2011 1 次提交
  20. 28 7月, 2011 2 次提交
    • S
      irq: Track the owner of irq descriptor · b6873807
      Sebastian Andrzej Siewior 提交于
      Interrupt descriptors can be allocated from modules. The interrupts
      are used by other modules, but we have no refcount on the module which
      provides the interrupts and there is no way to establish one on the
      device level as the interrupt using module is agnostic to the fact
      that the interrupt is provided by a module rather than by some builtin
      interrupt controller.
      
      To prevent removal of the interrupt providing module, we can track the
      owner of the interrupt descriptor, which also provides the relevant
      irq chip functions in the irq descriptor.
      
      request/setup_irq() can now acquire a refcount on the owner module to
      prevent unloading. free_irq() drops the refcount.
      Signed-off-by: NSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Link: http://lkml.kernel.org/r/20110711101731.GA13804@Chamillionaire.breakpoint.ccSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      b6873807
    • G
      irq: add irq_domain translation infrastructure · 08a543ad
      Grant Likely 提交于
      This patch adds irq_domain infrastructure for translating from
      hardware irq numbers to linux irqs.  This is particularly important
      for architectures adding device tree support because the current
      implementation (excluding PowerPC and SPARC) cannot handle
      translation for more than a single interrupt controller.  irq_domain
      supports device tree translation for any number of interrupt
      controllers.
      
      This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
      for device tree irq translation.  x86 is untested beyond compiling it,
      irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
      preserved until the core code is modified to actually register an
      irq_domain yet.  On ARM it works and is required for much of the new
      ARM device tree board support.
      
      PowerPC has /not/ been converted to use this new infrastructure.  It
      is still missing some features before it can replace the virq
      infrastructure already in powerpc (see documentation on
      irq_domain_map/unmap for details).  Followup patches will add the
      missing pieces and migrate PowerPC to use irq_domain.
      
      SPARC has its own method of managing interrupts from the device tree
      and is unaffected by this change.
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      08a543ad
  21. 08 7月, 2011 1 次提交
    • S
      genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd) · 659fb32d
      Simon Guinot 提交于
      This fixes a regression introduced by e59347a1 "arm: orion:
      Use generic irq chip".
      
      Depending on the device, interrupts acknowledgement is done by setting
      or by clearing a dedicated register. Replace irq_gc_ack() with some
      {set,clr}_bit variants allows to handle both cases.
      
      Note that this patch affects the following SoCs: Davinci, Samsung and
      Orion. Except for this last, the change is minor: irq_gc_ack() is just
      renamed into irq_gc_ack_set_bit().
      
      For the Orion SoCs, the edge GPIO interrupts support is currently
      broken. irq_gc_ack() try to acknowledge a such interrupt by setting
      the corresponding cause register bit. The Orion GPIO device expect the
      opposite. To fix this issue, the irq_gc_ack_clr_bit() variant is used.
      
      Tested on Network Space v2.
      Reported-by: NJoey Oravec <joravec@drewtech.com>
      Signed-off-by: NSimon Guinot <sguinot@lacie.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      659fb32d
  22. 23 6月, 2011 1 次提交
  23. 23 4月, 2011 4 次提交
  24. 30 3月, 2011 1 次提交
  25. 29 3月, 2011 3 次提交
  26. 28 3月, 2011 4 次提交