1. 31 5月, 2018 2 次提交
  2. 29 1月, 2018 1 次提交
  3. 10 11月, 2017 1 次提交
  4. 02 9月, 2017 1 次提交
  5. 17 8月, 2017 3 次提交
    • P
      PCI: xilinx: Don't enable config completion interrupts · aac2e96b
      Paul Burton 提交于
      The Xilinx AXI bridge for PCI Express device provides interrupts indicating
      the completion of config space accesses. We have previously
      enabled/unmasked them but do nothing with them besides acknowledge them.
      
      Leave the interrupts masked in order to avoid servicing a large number of
      pointless interrupts during boot.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Bharat Kumar Gogada <bharatku@xilinx.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Ravikiran Gummaluri <rgummal@xilinx.com>
      aac2e96b
    • P
      PCI: xilinx: Unify INTx & MSI interrupt decode · d0b5dda6
      Paul Burton 提交于
      The INTx & MSI interrupt decode paths duplicated a fair bit of common
      functionality. They also strictly handled interrupts in order of INTx then
      MSI, so if both types of interrupt were to be asserted simultaneously and
      the MSI interrupt were first in the FIFO then the INTx code would read it &
      ignore it before the MSI code then had to read it again, wasting the
      original FIFO read.
      
      Unify the INTx & MSI decode in order to reduce that duplication & allow a
      single FIFO read to be performed for each interrupt regardless of its type.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Bharat Kumar Gogada <bharatku@xilinx.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Ravikiran Gummaluri <rgummal@xilinx.com>
      d0b5dda6
    • P
      PCI: xilinx: Translate INTx range to hwirqs 0-3 · 5c125683
      Paul Burton 提交于
      The pcie-xilinx driver creates an IRQ domain of size 4 for legacy PCI INTx
      interrupts, which at first glance seems reasonable since there are 4
      possible such interrupts. Unfortunately the driver then proceeds to use the
      range 1-4 as the hwirq numbers for INTA-INTD, causing warnings & broken
      interrupts when attempting to use INTD/hwirq=4 due to it being beyond the
      range of the IRQ domain:
      
        WARNING: CPU: 0 PID: 1 at kernel/irq/irqdomain.c:365
            irq_domain_associate+0x170/0x220
        error: hwirq 0x4 is too large for dummy
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W
            4.12.0-rc5-00126-g19e1b3a10aad-dirty #427
        Stack : 0000000000000000 0000000000000004 0000000000000006 ffffffff8092c78a
                0000000000000061 ffffffff8018bf60 0000000000000000 0000000000000000
                ffffffff8088c287 ffffffff80811d18 a8000000ffc60000 ffffffff80926678
                0000000000000001 0000000000000000 ffffffff80887880 ffffffff80960000
                ffffffff80920000 ffffffff801e6744 ffffffff80887880 a8000000ffc4f8f8
                000000000000089c ffffffff8018d260 0000000000010000 ffffffff80811d18
                0000000000000000 0000000000000001 0000000000000000 0000000000000000
                0000000000000000 a8000000ffc4f840 0000000000000000 ffffffff8042cf34
                0000000000000000 0000000000000000 0000000000000000 0000000000040c00
                0000000000000000 ffffffff8010d1c8 0000000000000000 ffffffff8042cf34
                ...
        Call Trace:
        [<ffffffff8010d1c8>] show_stack+0x80/0xa0
        [<ffffffff8042cf34>] dump_stack+0xd4/0x110
        [<ffffffff8013ea98>] __warn+0xf0/0x108
        [<ffffffff8013eb14>] warn_slowpath_fmt+0x3c/0x48
        [<ffffffff80196528>] irq_domain_associate+0x170/0x220
        [<ffffffff80196bf0>] irq_create_mapping+0x88/0x118
        [<ffffffff801976a8>] irq_create_fwspec_mapping+0xb8/0x320
        [<ffffffff80197970>] irq_create_of_mapping+0x60/0x70
        [<ffffffff805d1318>] of_irq_parse_and_map_pci+0x20/0x38
        [<ffffffff8049c210>] pci_fixup_irqs+0x60/0xe0
        [<ffffffff8049cd64>] xilinx_pcie_probe+0x28c/0x478
        [<ffffffff804e8ca8>] platform_drv_probe+0x50/0xd0
        [<ffffffff804e73a4>] driver_probe_device+0x2c4/0x3a0
        [<ffffffff804e7544>] __driver_attach+0xc4/0xd0
        [<ffffffff804e5254>] bus_for_each_dev+0x64/0xa8
        [<ffffffff804e5e40>] bus_add_driver+0x1f0/0x268
        [<ffffffff804e8000>] driver_register+0x68/0x118
        [<ffffffff801001a4>] do_one_initcall+0x4c/0x178
        [<ffffffff808d3ca8>] kernel_init_freeable+0x204/0x2b0
        [<ffffffff80730b68>] kernel_init+0x10/0xf8
        [<ffffffff80106218>] ret_from_kernel_thread+0x14/0x1c
      
      Fix this by making use of the new pci_irqd_intx_xlate() helper to translate
      the INTx 1-4 range into the 0-3 range suitable for the IRQ domain of size
      4, and stop adding 1 to the hwirq number decoded from the interrupt FIFO
      which is already in the range 0-3.
      
      Whilst we're here we switch to using PCI_NUM_INTX rather than the magic
      number 4, making it clearer what the 4 means.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Bharat Kumar Gogada <bharatku@xilinx.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Ravikiran Gummaluri <rgummal@xilinx.com>
      5c125683
  6. 03 7月, 2017 3 次提交
  7. 25 4月, 2017 1 次提交
  8. 09 2月, 2017 1 次提交
  9. 12 10月, 2016 3 次提交
  10. 13 9月, 2016 5 次提交
  11. 25 8月, 2016 1 次提交
    • P
      PCI: xilinx: Make explicitly non-modular · da4eafca
      Paul Gortmaker 提交于
      This code is not being built as a module by anyone:
      
        drivers/pci/host/Kconfig:config PCIE_XILINX
        drivers/pci/host/Kconfig:  bool "Xilinx AXI PCIe host bridge support"
      
      Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(),
      etc., so that when reading the driver there is no doubt it is builtin-only.
      The information is preserved in comments at the top of the file.
      
      Note that for non-modular code, builtin_platform_driver() uses the same
      init level priority as module_platform_driver(), so this doesn't change
      init ordering.
      
      [bhelgaas: changelog]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Michal Simek <michal.simek@xilinx.com>
      CC: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
      da4eafca
  12. 26 7月, 2016 1 次提交
  13. 21 6月, 2016 2 次提交
  14. 09 3月, 2016 3 次提交
  15. 07 1月, 2016 1 次提交
    • G
      PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD · 8ff0ef99
      Grygorii Strashko 提交于
      On -RT and if kernel is booting with "threadirqs" cmd line parameter,
      PCIe/PCI (MSI) IRQ cascade handlers (like dra7xx_pcie_msi_irq_handler())
      will be forced threaded and, as result, will generate warnings like this:
      
        WARNING: CPU: 1 PID: 82 at kernel/irq/handle.c:150 handle_irq_event_percpu+0x14c/0x174()
        irq 460 handler irq_default_primary_handler+0x0/0x14 enabled interrupts
        Backtrace:
         (warn_slowpath_common) from (warn_slowpath_fmt+0x38/0x40)
         (warn_slowpath_fmt) from (handle_irq_event_percpu+0x14c/0x174)
         (handle_irq_event_percpu) from (handle_irq_event+0x84/0xb8)
         (handle_irq_event) from (handle_simple_irq+0x90/0x118)
         (handle_simple_irq) from (generic_handle_irq+0x30/0x44)
         (generic_handle_irq) from (dra7xx_pcie_msi_irq_handler+0x7c/0x8c)
         (dra7xx_pcie_msi_irq_handler) from (irq_forced_thread_fn+0x28/0x5c)
         (irq_forced_thread_fn) from (irq_thread+0x128/0x204)
      
      This happens because all of them invoke generic_handle_irq() from the
      requested handler.  generic_handle_irq() grabs raw_locks and thus needs to
      run in raw-IRQ context.
      
      This issue was originally reproduced on TI dra7-evem, but, as was
      identified during discussion [1], other hosts can also suffer from this
      issue.  Fix all them at once by marking PCIe/PCI (MSI) IRQ cascade handlers
      IRQF_NO_THREAD explicitly.
      
      [1] http://lkml.kernel.org/r/1448027966-21610-1-git-send-email-grygorii.strashko@ti.com
      
      [bhelgaas: add stable tag, fix typos]
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: Lucas Stach <l.stach@pengutronix.de> (for imx6)
      CC: stable@vger.kernel.org
      CC: Kishon Vijay Abraham I <kishon@ti.com>
      CC: Jingoo Han <jingoohan1@gmail.com>
      CC: Kukjin Kim <kgene@kernel.org>
      CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      CC: Richard Zhu <Richard.Zhu@freescale.com>
      CC: Thierry Reding <thierry.reding@gmail.com>
      CC: Stephen Warren <swarren@wwwdotorg.org>
      CC: Alexandre Courbot <gnurou@gmail.com>
      CC: Simon Horman <horms@verge.net.au>
      CC: Pratyush Anand <pratyush.anand@gmail.com>
      CC: Michal Simek <michal.simek@xilinx.com>
      CC: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
      CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      8ff0ef99
  16. 21 8月, 2015 1 次提交
    • L
      ARM/PCI, designware, xilinx: Use pci_scan_root_bus_msi() · 8953aab1
      Lorenzo Pieralisi 提交于
      ARM previously stored the msi_controller pointer in its sysdata, struct
      pci_sys_data, and implemented pcibios_msi_controller() to retrieve it.
      That made PCI host controller drivers specific to ARM because they had to
      put the msi_controller pointer in the ARM-specific pci_sys_data.
      
      There is now a generic mechanism, pci_scan_root_bus_msi(), for giving the
      msi_controller pointer to the PCI core.  Use this for all ARM systems and
      for the DesignWare and Xilinx PCI host controller drivers.
      
      This removes an ARM dependency from the DesignWare, DRA7xx, EXYNOS, i.MX6,
      Keystone, Layerscape, SPEAr13xx, and Xilinx drivers.
      
      [bhelgaas: changelog, split into separate patch]
      Suggested-by: NRussell King <linux@arm.linux.org.uk>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NJingoo Han <jingoohan1@gmail.com>
      CC: Pratyush Anand <pratyush.anand@gmail.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Simon Horman <horms@verge.net.au>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      CC: Thierry Reding <thierry.reding@gmail.com>
      CC: Michal Simek <michal.simek@xilinx.com>
      CC: Marc Zyngier <marc.zyngier@arm.com>
      8953aab1
  17. 19 8月, 2015 1 次提交
  18. 12 8月, 2015 1 次提交
    • R
      PCI: Kill off set_irq_flags() usage · 3e146753
      Rob Herring 提交于
      set_irq_flags is ARM-specific with custom flags which have genirq
      equivalents.  Convert drivers to use the genirq interfaces directly, so we
      can kill off set_irq_flags.  The translation of flags is as follows:
      
        IRQF_VALID -> !IRQ_NOREQUEST
        IRQF_PROBE -> !IRQ_NOPROBE
        IRQF_NOAUTOEN -> IRQ_NOAUTOEN
      
      For IRQs managed by an irqdomain, the irqdomain core code handles clearing
      and setting IRQ_NOREQUEST already, so there is no need to do this in .map()
      functions, and we can simply remove the set_irq_flags calls.  Some users
      also modify IRQ_NOPROBE, and this has been maintained although it is not
      clear that is really needed.  There appears to be a great deal of blind
      copy and paste of this code.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NJingoo Han <jingoohan1@gmail.com>
      CC: Kishon Vijay Abraham I <kishon@ti.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Thierry Reding <thierry.reding@gmail.com>
      CC: Stephen Warren <swarren@wwwdotorg.org>
      CC: Alexandre Courbot <gnurou@gmail.com>
      CC: Jingoo Han <jingoohan1@gmail.com>
      CC: Pratyush Anand <pratyush.anand@gmail.com>
      CC: Simon Horman <horms@verge.net.au>
      CC: Michal Simek <michal.simek@xilinx.com>
      CC: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
      3e146753
  19. 23 7月, 2015 1 次提交
  20. 21 7月, 2015 1 次提交
    • R
      PCI: xilinx: Check for MSI interrupt flag before handling as INTx · e4a8f8ee
      Russell Joyce 提交于
      Occasionally both MSI and INTx bits in the interrupt decode register are
      set at once by the Xilinx AXI PCIe Bridge, so the MSI flag in the interrupt
      message should be checked to ensure that the correct handler is used.
      
      If this check is not in place and the interrupt message type is MSI, the
      INTx handler will be used erroneously when both type bits are set.  This
      will also be followed by a second read of the message FIFO, which can
      result in the function returning early and the interrupt decode register
      not being cleared if the FIFO is now empty.
      Signed-off-by: NRussell Joyce <russell.joyce@york.ac.uk>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      e4a8f8ee
  21. 05 2月, 2015 1 次提交
  22. 31 1月, 2015 1 次提交
  23. 24 1月, 2015 1 次提交
    • A
      PCI: xilinx: Fix harmless format string warning · abc596b9
      Arnd Bergmann 提交于
      The xilinx PCIe driver prints a register value whose type is propagated to
      the type returned by the GENMASK() macro.  Unfortunately, that type has
      recently changed as the result of a bug fix, so now we get a warning about
      the type:
      
        drivers/pci/host/pcie-xilinx.c: In function 'xilinx_pcie_clear_err_interrupts':
        drivers/pci/host/pcie-xilinx.c:154:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
      
      Change the code so we always print the number as an 'unsigned long' type to
      avoid the warning.  The original code was fine on 32-bit architectures but
      not on 64-bit.  Now it works as expected on both.
      
      Fixes: 00b4d9a1 ("bitops: Fix shift overflow in GENMASK macros")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
      abc596b9
  24. 23 11月, 2014 2 次提交
    • T
      PCI/MSI: Rename mask/unmask_msi_irq treewide · 280510f1
      Thomas Gleixner 提交于
      The PCI/MSI irq chip callbacks mask/unmask_msi_irq have been renamed
      to pci_msi_mask/unmask_irq to mark them PCI specific. Rename all usage
      sites. The conversion helper functions are kept around to avoid
      conflicts in next and will be removed after merging into mainline.
      
      Coccinelle assisted conversion. No functional change.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: x86@kernel.org
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Mohit Kumar <mohit.kumar@st.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Yijing Wang <wangyijing@huawei.com>
      280510f1
    • J
      PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg() · 83a18912
      Jiang Liu 提交于
      Rename write_msi_msg() to pci_write_msi_msg() to mark it as PCI
      specific.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      83a18912
  25. 22 11月, 2014 1 次提交