1. 23 7月, 2020 2 次提交
  2. 10 7月, 2020 1 次提交
  3. 21 11月, 2019 1 次提交
    • R
      PCI: of: Add inbound resource parsing to helpers · 331f6345
      Rob Herring 提交于
      Extend devm_of_pci_get_host_bridge_resources() and
      pci_parse_request_of_pci_ranges() helpers to also parse the inbound
      addresses from DT 'dma-ranges' and populate a resource list with the
      translated addresses. This will help ensure 'dma-ranges' is always
      parsed in a consistent way.
      Tested-by: NSrinath Mannam <srinath.mannam@broadcom.com>
      Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> # for AArdvark
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reviewed-by: NSrinath Mannam <srinath.mannam@broadcom.com>
      Reviewed-by: NAndrew Murray <andrew.murray@arm.com>
      Acked-by: NGustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Toan Le <toan@os.amperecomputing.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Tom Joseph <tjoseph@cadence.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: Ryder Lee <ryder.lee@mediatek.com>
      Cc: Karthikeyan Mitran <m.karthikeyan@mobiveil.co.in>
      Cc: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Shawn Lin <shawn.lin@rock-chips.com>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: rfi@lists.rocketboards.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-rockchip@lists.infradead.org
      331f6345
  4. 29 10月, 2019 1 次提交
  5. 30 3月, 2019 1 次提交
  6. 25 9月, 2018 1 次提交
  7. 30 6月, 2018 1 次提交
  8. 08 6月, 2018 1 次提交
  9. 31 5月, 2018 2 次提交
  10. 15 5月, 2018 1 次提交
  11. 29 1月, 2018 1 次提交
  12. 10 11月, 2017 1 次提交
  13. 02 9月, 2017 1 次提交
  14. 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
  15. 03 7月, 2017 3 次提交
  16. 25 4月, 2017 1 次提交
  17. 09 2月, 2017 1 次提交
  18. 12 10月, 2016 3 次提交
  19. 13 9月, 2016 5 次提交
  20. 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
  21. 26 7月, 2016 1 次提交
  22. 21 6月, 2016 2 次提交
  23. 09 3月, 2016 3 次提交
  24. 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
  25. 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