1. 08 2月, 2017 4 次提交
    • M
      irqchip/gic-v3-its: Rename MAPVI to MAPTI · 6a25ad3a
      Marc Zyngier 提交于
      Back in the days when the GICv3/v4 architecture was drafted,
      the command to an event to an LPI number was called MAPVI.
      Later on, and to avoid confusion with the GICv4 command VMAPI,
      it was renamed MAPTI. We've carried the old name for a long
      time, but it gets in the way of people reading the code in
      the light of the public architecture specification.
      
      Just repaint all the references and kill the old definition.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      6a25ad3a
    • M
      irqchip/gic-v3-its: Drop deprecated GITS_BASER_TYPE_CPU · 4f46de9d
      Marc Zyngier 提交于
      During the development of the GICv3/v4 architecture, it was
      envisaged to have a CPU table, though the use for it was
      never completely clear (the collection table serves that role
      pretty well). It ended being dropped before the specification
      was published, though it lived on in the driver.
      
      In order to avoid people scratching their head too much, let's do
      the same in the kernel.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      4f46de9d
    • M
      irqchip/gic-v3-its: Refactor command encoding · 4d36f136
      Marc Zyngier 提交于
      The way we encode the various ITS command fields is both tedious
      and error prone. Let's introduce a helper function that performs
      the encoding, and convert the existing encoders to use that
      helper. It also has the advantage of expressing the encoding in
      a way that matches the architecture specification.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      4d36f136
    • S
      irqchip/gic-v3-its: Enable cacheable attribute Read-allocate hints · 2fd632a0
      Shanker Donthineni 提交于
      Read-allocation hints are not enabled for both the GIC-ITS and GICR
      tables. This forces the hardware to always read the table contents
      from an external memory (DDR) which is slow compared to cache memory.
      Most of the tables are often read by hardware. So, it's better to
      enable Read-allocate hints in addition to Write-allocate hints in
      order to improve the GICR_PEND, GICR_PROP, Collection, Device, and
      vCPU tables lookup time.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      2fd632a0
  2. 03 2月, 2017 1 次提交
    • A
      irqchip/qcom: Add IRQ combiner driver · f20cc9b0
      Agustin Vega-Frias 提交于
      Driver for interrupt combiners in the Top-level Control and Status
      Registers (TCSR) hardware block in Qualcomm Technologies chips.
      
      An interrupt combiner in this block combines a set of interrupts by
      OR'ing the individual interrupt signals into a summary interrupt
      signal routed to a parent interrupt controller, and provides read-
      only, 32-bit registers to query the status of individual interrupts.
      The status bit for IRQ n is bit (n % 32) within register (n / 32)
      of the given combiner. Thus, each combiner can be described as a set
      of register offsets and the number of IRQs managed.
      Signed-off-by: NAgustin Vega-Frias <agustinv@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      f20cc9b0
  3. 25 12月, 2016 4 次提交
  4. 19 12月, 2016 1 次提交
  5. 29 11月, 2016 11 次提交
  6. 18 11月, 2016 1 次提交
  7. 17 11月, 2016 1 次提交
  8. 20 10月, 2016 2 次提交
  9. 19 10月, 2016 1 次提交
  10. 17 10月, 2016 1 次提交
    • M
      irqchip/gic-v3-its: Fix 64bit GIC{R,ITS}_TYPER accesses · 589ce5f4
      Marc Zyngier 提交于
      The GICv3 architecture specification mentions that a 64bit
      register can be accessed using two 32bit accesses. What it
      doesn't mention is that this is only guaranteed on a system
      that implements AArch32, and a pure AArch64 system is allowed
      not to support this. This causes issues with the GICR_TYPER
      and GITS_TYPER registers, which are both RO 64bit registers.
      
      In order to solve this, this patch switches the TYPER accesses
      to the gic_read_typer macro already used in other parts of the
      driver. This makes sure that we always use a 64bit access on
      64bit systems, and two 32bit accesses on 32bit system.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      589ce5f4
  11. 14 10月, 2016 3 次提交
  12. 12 10月, 2016 1 次提交
  13. 06 10月, 2016 3 次提交
  14. 05 10月, 2016 2 次提交
  15. 21 9月, 2016 3 次提交
    • A
      drivers/irqchip: Add STM32 external interrupts support · e0720416
      Alexandre TORGUE 提交于
      The STM32 external interrupt controller consists of edge detectors that
      generate interrupts requests or wake-up events.
      
      Each line can be independently configured as interrupt or wake-up source,
      and triggers either on rising, falling or both edges. Each line can also
      be masked independently.
      
      Originally-from: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Signed-off-by: NAlexandre TORGUE <alexandre.torgue@st.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Daniel Thompson <daniel.thompson@linaro.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: arnd@arndb.de
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: bruherrera@gmail.com
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: linux-gpio@vger.kernel.org
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: lee.jones@linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1474387259-18926-3-git-send-email-alexandre.torgue@st.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e0720416
    • P
      irqchip/mips-gic: Use for_each_set_bit to iterate over local IRQs · 0f4ed158
      Paul Burton 提交于
      The MIPS GIC driver has previously iterated over bits set in a bitmap
      representing pending local IRQs by calling find_first_bit, clearing that
      bit then calling find_first_bit again until all bits are clear. If
      multiple interrupts are pending then this is wasteful, as find_first_bit
      will have to loop over the whole bitmap from the start. Use the
      for_each_set_bit macro which performs exactly what we need here instead.
      It will use find_next_bit and thus only scan over the relevant part of
      the bitmap, and it makes the intent of the code clearer.
      
      This makes the same change for local interrupts that commit cae750ba
      ("irqchip: mips-gic: Use for_each_set_bit to iterate over IRQs") made
      for shared interrupts.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/20160913165427.31686-1-paul.burton@imgtec.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      0f4ed158
    • P
      irqchip/mips-gic: Fix local interrupts · e875bd66
      Paul Burton 提交于
      Since the device hierarchy domain was added by commit c98c1822
      ("irqchip/mips-gic: Add device hierarchy domain"), GIC local interrupts
      have been broken.
      
      Users attempting to setup a per-cpu local IRQ, for example the GIC timer
      clock events code in drivers/clocksource/mips-gic-timer.c, the
      setup_percpu_irq function would refuse with -EINVAL because the GIC
      irqchip driver never called irq_set_percpu_devid so the
      IRQ_PER_CPU_DEVID flag was never set for the IRQ. This happens because
      irq_set_percpu_devid was being called from the gic_irq_domain_map
      function which is no longer called.
      
      Doing only that runs into further problems because gic_dev_domain_alloc
      set the struct irq_chip for all interrupts, local or shared, to
      gic_level_irq_controller despite that only being suitable for shared
      interrupts. The typical outcome of this is that gic_level_irq_controller
      callback functions are called for local interrupts, and then hwirq
      number calculations overflow & the driver ends up attempting to access
      some invalid register with an address calculated from an invalid hwirq
      number. Best case scenario is that this then leads to a bus error. This
      is fixed by abstracting the setup of the hwirq & chip to a new function
      gic_setup_dev_chip which is used by both the root GIC IRQ domain & the
      device domain.
      
      Finally, decoding local interrupts failed because gic_dev_domain_alloc
      only called irq_domain_alloc_irqs_parent for shared interrupts. Local
      ones were therefore never associated with hwirqs in the root GIC IRQ
      domain and the virq in gic_handle_local_int would always be 0. This is
      fixed by calling irq_domain_alloc_irqs_parent unconditionally & having
      gic_irq_domain_alloc handle both local & shared interrupts, which is
      easy due to the aforementioned abstraction of chip setup into
      gic_setup_dev_chip.
      
      This fixes use of the MIPS GIC timer for clock events, which has been
      broken since c98c1822 ("irqchip/mips-gic: Add device hierarchy
      domain") but hadn't been noticed due to a silent fallback to the MIPS
      coprocessor 0 count/compare clock events device.
      
      Fixes: c98c1822 ("irqchip/mips-gic: Add device hierarchy domain")
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/20160913165335.31389-1-paul.burton@imgtec.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e875bd66
  16. 20 9月, 2016 1 次提交
    • J
      irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning · 727653d6
      James Morse 提交于
      gic_raise_softirq() walks the list of cpus using for_each_cpu(), it calls
      gic_compute_target_list() which advances the iterator by the number of
      CPUs in the cluster.
      
      If gic_compute_target_list() reaches the last CPU it leaves the iterator
      pointing at the last CPU. This means the next time round the for_each_cpu()
      loop cpumask_next() will be called with an invalid CPU.
      
      This triggers a warning when built with CONFIG_DEBUG_PER_CPU_MAPS:
      [    3.077738] GICv3: CPU1: found redistributor 1 region 0:0x000000002f120000
      [    3.077943] CPU1: Booted secondary processor [410fd0f0]
      [    3.078542] ------------[ cut here ]------------
      [    3.078746] WARNING: CPU: 1 PID: 0 at ../include/linux/cpumask.h:121 gic_raise_softirq+0x12c/0x170
      [    3.078812] Modules linked in:
      [    3.078869]
      [    3.078930] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-rc5+ #5188
      [    3.078994] Hardware name: Foundation-v8A (DT)
      [    3.079059] task: ffff80087a1a0080 task.stack: ffff80087a19c000
      [    3.079145] PC is at gic_raise_softirq+0x12c/0x170
      [    3.079226] LR is at gic_raise_softirq+0xa4/0x170
      [    3.079296] pc : [<ffff0000083ead24>] lr : [<ffff0000083eac9c>] pstate: 200001c9
      [    3.081139] Call trace:
      [    3.081202] Exception stack(0xffff80087a19fbe0 to 0xffff80087a19fd10)
      
      [    3.082269] [<ffff0000083ead24>] gic_raise_softirq+0x12c/0x170
      [    3.082354] [<ffff00000808e614>] smp_send_reschedule+0x34/0x40
      [    3.082433] [<ffff0000080e80a0>] resched_curr+0x50/0x88
      [    3.082512] [<ffff0000080e89d0>] check_preempt_curr+0x60/0xd0
      [    3.082593] [<ffff0000080e8a60>] ttwu_do_wakeup+0x20/0xe8
      [    3.082672] [<ffff0000080e8bb8>] ttwu_do_activate+0x90/0xc0
      [    3.082753] [<ffff0000080ea9a4>] try_to_wake_up+0x224/0x370
      [    3.082836] [<ffff0000080eabc8>] default_wake_function+0x10/0x18
      [    3.082920] [<ffff000008103134>] __wake_up_common+0x5c/0xa0
      [    3.083003] [<ffff0000081031f4>] __wake_up_locked+0x14/0x20
      [    3.083086] [<ffff000008103f80>] complete+0x40/0x60
      [    3.083168] [<ffff00000808df7c>] secondary_start_kernel+0x15c/0x1d0
      [    3.083240] [<00000000808911a4>] 0x808911a4
      [    3.113401] Detected PIPT I-cache on CPU2
      
      Avoid updating the iterator if the next call to cpumask_next() would
      cause the for_each_cpu() loop to exit.
      
      There is no change to gic_raise_softirq()'s behaviour, (cpumask_next()s
      eventual call to _find_next_bit() will return early as start >= nbits),
      this patch just silences the warning.
      
      Fixes: 021f6537 ("irqchip: gic-v3: Initial support for GICv3")
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1474306155-3303-1-git-send-email-james.morse@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      727653d6