1. 21 5月, 2019 1 次提交
  2. 03 5月, 2019 4 次提交
  3. 01 5月, 2019 3 次提交
  4. 29 4月, 2019 11 次提交
  5. 23 4月, 2019 1 次提交
  6. 20 4月, 2019 1 次提交
    • L
      irqchip: Add driver for IXP4xx · 5b978c10
      Linus Walleij 提交于
      The IXP4xx (arch/arm/mach-ixp4xx) is an old Intel XScale
      platform that has very wide deployment and use.
      
      As part of modernizing the platform, we need to implement a
      proper irqchip in the irqchip subsystem.
      
      The IXP4xx irqchip is tightly jotted together with the GPIO
      controller, and whereas in the past we would deal with this
      complex logic by adding necessarily different code, we can
      nowadays modernize it using a hierarchical irqchip.
      
      The actual IXP4 irqchip is a simple active low level IRQ
      controller, whereas the GPIO functionality resides in a
      different memory area and adds edge trigger support for
      the interrupts.
      
      The interrupts from GPIO lines 0..12 are 1:1 mapped to
      a fixed set of hardware IRQs on this IRQchip, so we
      expect the child GPIO interrupt controller to go in and
      allocate descriptors for these interrupts.
      
      For the other interrupts, as we do not yet have DT
      support for this platform, we create a linear irqdomain
      and then go in and allocate the IRQs that the legacy
      boards use. This code will be removed on the DT probe
      path when we add DT support to the platform.
      
      We add some translation code for supporting DT
      translations for the fwnodes, but we leave most of that
      for later.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5b978c10
  7. 17 4月, 2019 1 次提交
    • P
      MIPS: perf: ath79: Fix perfcount IRQ assignment · a1e8783d
      Petr Štetiar 提交于
      Currently it's not possible to use perf on ath79 due to genirq flags
      mismatch happening on static virtual IRQ 13 which is used for
      performance counters hardware IRQ 5.
      
      On TP-Link Archer C7v5:
      
                 CPU0
        2:          0      MIPS   2  ath9k
        4:        318      MIPS   4  19000000.eth
        7:      55034      MIPS   7  timer
        8:       1236      MISC   3  ttyS0
       12:          0      INTC   1  ehci_hcd:usb1
       13:          0  gpio-ath79   2  keys
       14:          0  gpio-ath79   5  keys
       15:         31  AR724X PCI    1  ath10k_pci
      
       $ perf top
       genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
      
      On TP-Link Archer C7v4:
      
               CPU0
        4:          0      MIPS   4  19000000.eth
        5:       7135      MIPS   5  1a000000.eth
        7:      98379      MIPS   7  timer
        8:         30      MISC   3  ttyS0
       12:      90028      INTC   0  ath9k
       13:       5520      INTC   1  ehci_hcd:usb1
       14:       4623      INTC   2  ehci_hcd:usb2
       15:      32844  AR724X PCI    1  ath10k_pci
       16:          0  gpio-ath79  16  keys
       23:          0  gpio-ath79  23  keys
      
       $ perf top
       genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
      
      This problem is happening, because currently statically assigned virtual
      IRQ 13 for performance counters is not claimed during the initialization
      of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
      this interrupt isn't available for further use.
      
      So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
      Tested-by: NKevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
      Signed-off-by: NPetr Štetiar <ynezz@true.cz>
      Acked-by: NJohn Crispin <john@phrozen.org>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      a1e8783d
  8. 05 4月, 2019 2 次提交
  9. 21 3月, 2019 7 次提交
  10. 11 3月, 2019 1 次提交
  11. 05 3月, 2019 1 次提交
    • A
      irqchip/imx-irqsteer: Fix of_property_read_u32() error handling · 7d3a5eb7
      Arnd Bergmann 提交于
      gcc points out that irqs_num is not initialized when of_property_read_u32()
      is an empty stub function:
      
                       Included from drivers/irqchip/irq-imx-irqsteer.c:7:
      drivers/irqchip/irq-imx-irqsteer.c: In function 'imx_irqsteer_probe':
      include/uapi/linux/kernel.h:13:49: error: 'irqs_num' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      The same can actually happen with CONFIG_OF=y as well, though we don't
      get a warning then.
      
      Add error checking here that lets the code deal with missing or
      invalid properties as well as avoid the warning.
      
      Fixes: 28528fca ("irqchip/imx-irqsteer: Add multi output interrupts support")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      7d3a5eb7
  12. 22 2月, 2019 2 次提交
  13. 21 2月, 2019 5 次提交
    • D
      irqchip/brcmstb-l2: Use _irqsave locking variants in non-interrupt code · 33517881
      Doug Berger 提交于
      Using the irq_gc_lock/irq_gc_unlock functions in the suspend and
      resume functions creates the opportunity for a deadlock during
      suspend, resume, and shutdown. Using the irq_gc_lock_irqsave/
      irq_gc_unlock_irqrestore variants prevents this possible deadlock.
      
      Cc: stable@vger.kernel.org
      Fixes: 7f646e92 ("irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller")
      Signed-off-by: NDoug Berger <opendmb@gmail.com>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      [maz: tidied up $SUBJECT]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      33517881
    • S
      irqchip/gicv3-its: Use NUMA aware memory allocation for ITS tables · 539d3782
      Shanker Donthineni 提交于
      The NUMA node information is visible to ITS driver but not being used
      other than handling hardware errata. ITS/GICR hardware accesses to the
      local NUMA node is usually quicker than the remote NUMA node. How slow
      the remote NUMA accesses are depends on the implementation details.
      
      This patch allocates memory for ITS management tables and command
      queue from the corresponding NUMA node using the appropriate NUMA
      aware functions. This change improves the performance of the ITS
      tables read latency on systems where it has more than one ITS block,
      and with the slower inter node accesses.
      
      Apache Web server benchmarking using ab tool on a HiSilicon D06
      board with multiple numa mem nodes shows Time per request and
      Transfer rate improvements of ~3.6% with this patch.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
      Signed-off-by: NShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
      Reviewed-by: NGanapatrao Kulkarni <gkulkarni@marvell.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      539d3782
    • A
      irqchip/sifive-plic: Implement irq_set_affinity() for SMP host · cc9f04f9
      Anup Patel 提交于
      Currently on SMP host, all CPUs take external interrupts routed via
      PLIC. All CPUs will try to claim a given external interrupt but only
      one of them will succeed while other CPUs would simply resume whatever
      they were doing before. This means if we have N CPUs then for every
      external interrupt N-1 CPUs will always fail to claim it and waste
      their CPU time.
      
      Instead of above, external interrupts should be taken by only one CPU
      and we should have provision to explicitly specify IRQ affinity from
      kernel-space or user-space.
      
      This patch provides irq_set_affinity() implementation for PLIC driver.
      It also updates irq_enable() such that PLIC interrupts are only enabled
      for one of CPUs specified in IRQ affinity mask.
      
      With this patch in-place, we can change IRQ affinity at any-time from
      user-space using procfs.
      
      Example:
      
      / # cat /proc/interrupts
                 CPU0       CPU1       CPU2       CPU3
        8:         44          0          0          0  SiFive PLIC   8  virtio0
       10:         48          0          0          0  SiFive PLIC  10  ttyS0
      IPI0:        55        663         58        363  Rescheduling interrupts
      IPI1:         0          1          3         16  Function call interrupts
      / #
      / #
      / # echo 4 > /proc/irq/10/smp_affinity
      / #
      / # cat /proc/interrupts
                 CPU0       CPU1       CPU2       CPU3
        8:         45          0          0          0  SiFive PLIC   8  virtio0
       10:        160          0         17          0  SiFive PLIC  10  ttyS0
      IPI0:        68        693         77        410  Rescheduling interrupts
      IPI1:         0          2          3         16  Function call interrupts
      Signed-off-by: NAnup Patel <anup@brainfault.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      cc9f04f9
    • A
      irqchip/sifive-plic: Differentiate between PLIC handler and context · 6adfe8d2
      Anup Patel 提交于
      We explicitly differentiate between PLIC handler and context because
      PLIC context is for given mode of HART whereas PLIC handler is per-CPU
      software construct meant for handling interrupts from a particular
      PLIC context.
      
      To achieve this differentiation, we rename "nr_handlers" to "nr_contexts"
      and "nr_mapped" to "nr_handlers" in plic_init().
      Signed-off-by: NAnup Patel <anup@brainfault.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      6adfe8d2
    • A
      irqchip/sifive-plic: Add warning in plic_init() if handler already present · 3fecb5aa
      Anup Patel 提交于
      We have two enteries (one for M-mode and another for S-mode) in the
      interrupts-extended DT property of PLIC DT node for each HART. It is
      expected that firmware/bootloader will set M-mode HWIRQ line of each
      HART to 0xffffffff (i.e. -1) in interrupts-extended DT property
      because Linux runs in S-mode only.
      
      If firmware/bootloader is buggy then it will not correctly update
      interrupts-extended DT property which might result in a plic_handler
      configured twice. This patch adds a warning in plic_init() if a
      plic_handler is already marked present. This warning provides us
      a hint about incorrectly updated interrupts-extended DT property.
      Signed-off-by: NAnup Patel <anup@brainfault.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      3fecb5aa