1. 20 4月, 2017 1 次提交
    • P
      irqchip/mips-gic: Separate IPI reservation & usage tracking · f8dcd9e8
      Paul Burton 提交于
      Since commit 2af70a96 ("irqchip/mips-gic: Add a IPI hierarchy
      domain") introduced the GIC IPI IRQ domain we have tracked both
      reservation of interrupts & their use with a single bitmap - ipi_resrv.
      If an interrupt is reserved for use as an IPI but not actually in use
      then the appropriate bit is set in ipi_resrv. If an interrupt is either
      not reserved for use as an IPI or has been allocated as one then the
      appropriate bit is clear in ipi_resrv.
      
      Unfortunately this means that checking whether a bit is set in ipi_resrv
      to prevent IPI interrupts being allocated for use with a device is
      broken, because if the interrupt has been allocated as an IPI first then
      its bit will be clear.
      
      Fix this by separating the tracking of IPI reservation & usage,
      introducing a separate ipi_available bitmap for the latter. This means
      that ipi_resrv will now always have bits set corresponding to all
      interrupts reserved for use as IPIs, whether or not they have been
      allocated yet, and therefore that checking it when allocating device
      interrupts works as expected.
      
      Fixes: 2af70a96 ("irqchip/mips-gic: Add a IPI hierarchy domain")
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Link: http://lkml.kernel.org/r/1492679256-14513-2-git-send-email-matt.redfearn@imgtec.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      f8dcd9e8
  2. 14 4月, 2017 1 次提交
  3. 12 4月, 2017 2 次提交
  4. 07 4月, 2017 14 次提交
  5. 31 3月, 2017 1 次提交
    • M
      irqchip/mips-gic: Fix Local compare interrupt · 42969893
      Matt Redfearn 提交于
      Commit 4cfffcfa ("irqchip/mips-gic: Fix local interrupts") added
      mapping of several local interrupts during initialisation of the gic
      driver. This associates virq numbers with these interrupts.
      Unfortunately, as not all of the interrupts are mapped in hardware
      order, when drivers subsequently request these interrupts they conflict
      with the mappings that have already been set up. For example, this
      manifests itself in the gic clocksource driver, which fails to probe
      with the message:
      
      clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0x7350c9738,
      max_idle_ns: 440795203769 ns
      GIC timer IRQ 25 setup failed: -22
      
      This is because virq 25 (the correct IRQ number specified via device
      tree) was allocated to the PERFCTR interrupt (and 24 to the timer, 26 to
      the FDC). To fix this, map all of these local interrupts in the hardware
      order so as to associate their virq numbers with the correct hw
      interrupts.
      
      Fixes: 4cfffcfa ("irqchip/mips-gic: Fix local interrupts")
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      42969893
  6. 14 3月, 2017 1 次提交
    • A
      irqchip/mvebu-odmi: Select GENERIC_MSI_IRQ_DOMAIN · fa23b9d1
      Arnd Bergmann 提交于
      This driver uses the MSI domain but has no strict dependency on PCI_MSI, so we
      may run into a build failure when CONFIG_GENERIC_MSI_IRQ_DOMAIN is disabled:
      
      drivers/irqchip/irq-mvebu-odmi.c:152:15: error: variable 'odmi_msi_ops' has initializer but incomplete type
       static struct msi_domain_ops odmi_msi_ops = {
                     ^~~~~~~~~~~~~~
      drivers/irqchip/irq-mvebu-odmi.c:155:15: error: variable 'odmi_msi_domain_info' has initializer but incomplete type
       static struct msi_domain_info odmi_msi_domain_info = {
                     ^~~~~~~~~~~~~~~
      drivers/irqchip/irq-mvebu-odmi.c:156:3: error: 'struct msi_domain_info' has no member named 'flags'
        .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
         ^~~~~
      drivers/irqchip/irq-mvebu-odmi.c:156:12: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
        .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
                  ^~~~~~~~~~~~~~~~~~~~~~~~
      drivers/irqchip/irq-mvebu-odmi.c:156:39: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function); did you mean 'MSI_FLAG_USE_DEF_DOM_OPS'?
      
      Selecting the option from this driver seems to solve this nicely, though I could
      not find any other instance of this in irqchip drivers.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      fa23b9d1
  7. 07 3月, 2017 2 次提交
  8. 06 3月, 2017 1 次提交
    • F
      irqchip/crossbar: Fix incorrect type of local variables · 077dbaee
      Franck Demathieu 提交于
      The max and entry variables are unsigned according to the dt-bindings.
      Fix following 3 sparse issues (-Wtypesign):
      
        drivers/irqchip/irq-crossbar.c:222:52: warning: incorrect type in argument 3 (different signedness)
        drivers/irqchip/irq-crossbar.c:222:52:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:222:52:    got int *<noident>
      
        drivers/irqchip/irq-crossbar.c:245:56: warning: incorrect type in argument 4 (different signedness)
        drivers/irqchip/irq-crossbar.c:245:56:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:245:56:    got int *<noident>
      
        drivers/irqchip/irq-crossbar.c:263:56: warning: incorrect type in argument 4 (different signedness)
        drivers/irqchip/irq-crossbar.c:263:56:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:263:56:    got int *<noident>
      Signed-off-by: NFranck Demathieu <fdemathieu@gmail.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      077dbaee
  9. 01 3月, 2017 1 次提交
    • F
      irqchip/crossbar: Fix incorrect type of local variables · b28ace12
      Franck Demathieu 提交于
      The max and entry variables are unsigned according to the dt-bindings.
      Fix following 3 sparse issues (-Wtypesign):
      
        drivers/irqchip/irq-crossbar.c:222:52: warning: incorrect type in argument 3 (different signedness)
        drivers/irqchip/irq-crossbar.c:222:52:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:222:52:    got int *<noident>
      
        drivers/irqchip/irq-crossbar.c:245:56: warning: incorrect type in argument 4 (different signedness)
        drivers/irqchip/irq-crossbar.c:245:56:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:245:56:    got int *<noident>
      
        drivers/irqchip/irq-crossbar.c:263:56: warning: incorrect type in argument 4 (different signedness)
        drivers/irqchip/irq-crossbar.c:263:56:    expected unsigned int [usertype] *out_value
        drivers/irqchip/irq-crossbar.c:263:56:    got int *<noident>
      Signed-off-by: NFranck Demathieu <fdemathieu@gmail.com>
      Cc: marc.zyngier@arm.com
      Cc: jason@lakedaemon.net
      Link: http://lkml.kernel.org/r/20170223094855.6546-1-fdemathieu@gmail.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      b28ace12
  10. 19 2月, 2017 1 次提交
  11. 09 2月, 2017 1 次提交
  12. 08 2月, 2017 7 次提交
    • R
      irqchip/gic-v3-its: Fix command buffer allocation · 5bc13c2c
      Robert Richter 提交于
      The its command buffer must be page aligned, but kzalloc() is not
      guaranteed to be (though it is mostly when allocating 64k). Use
      __get_free_pages() as this is used for other buffers as well.
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      [Marc: fixed the error path]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      5bc13c2c
    • M
      irqchip/mips-gic: Fix local interrupts · 4cfffcfa
      Marcin Nowakowski 提交于
      Some local interrupts are not initialised properly at the moment and
      cannot be used since the domain's alloc method is never called for them.
      
      This has been observed earlier and partially fixed in commit
      e875bd66 ("irqchip/mips-gic: Fix local interrupts"), but that change
      still relied on the interrupt to be requested by an external driver (eg.
      drivers/clocksource/mips-gic-timer.c).
      
      This does however not solve the issue for interrupts that are not
      referenced by any driver through the device tree and results in
      request_irq() calls returning -ENOSYS. It can be observed when attempting
      to use perf tool to access hardware performance counters.
      
      Fix this by explicitly calling irq_create_fwspec_mapping() for local
      interrupts.
      
      Fixes: e875bd66 ("irqchip/mips-gic: Fix local interrupts")
      Signed-off-by: NMarcin Nowakowski <marcin.nowakowski@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      4cfffcfa
    • L
      irqchip: Add a driver for Cortina Gemini · b4d3053c
      Linus Walleij 提交于
      As a part of transitioning the Gemini platform to device tree we
      create this clean, device-tree-only irqchip driver.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      b4d3053c
    • 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
  13. 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
  14. 23 1月, 2017 1 次提交
  15. 01 1月, 2017 2 次提交
  16. 25 12月, 2016 3 次提交