1. Jul 06, 2021
    • Bjorn Helgaas's avatar
      Merge branch 'remotes/lorenzo/pci/iproc' · 19a41f99
      Bjorn Helgaas authored
      - Fix multi-MSI base vector number allocation (Sandor Bodo-Merle)
      
      - Restrict multi-MSI support to uniprocessor kernel (Sandor Bodo-Merle)
      
      * remotes/lorenzo/pci/iproc:
        PCI: iproc: Support multi-MSI only on uniprocessor kernel
        PCI: iproc: Fix multi-MSI base vector number allocation
      19a41f99
    • Bjorn Helgaas's avatar
      Merge branch 'remotes/lorenzo/pci/hv' · 02722a84
      Bjorn Helgaas authored
      - Fix race when removing device (Long Li)
      
      - Remove unused bus device removal refcount/functions (Long Li)
      
      * remotes/lorenzo/pci/hv:
        PCI: hv: Remove bus device removal unused refcount/functions
        PCI: hv: Fix a race condition when removing the device
      02722a84
    • Bjorn Helgaas's avatar
      Merge branch 'remotes/lorenzo/pci/ftpci100' · 777e5e6b
      Bjorn Helgaas authored
      - Rename PCI_IOSIZE, etc in ftpci100 to avoid macro name collisions (Randy
        Dunlap)
      
      * remotes/lorenzo/pci/ftpci100:
        PCI: ftpci100: Rename macro name collision
      777e5e6b
    • Bjorn Helgaas's avatar
      Merge branch 'remotes/lorenzo/pci/aardvark' · c04881e8
      Bjorn Helgaas authored
      - Decode PIO Posted/Non-posted Request correctly in error logging (Pali
        Rohár)
      
      - Work around incorrect Vendor ID in Marvell Armada 3700 (Pali Rohár)
      
      * remotes/lorenzo/pci/aardvark:
        PCI: aardvark: Implement workaround for the readback value of VEND_ID
        PCI: aardvark: Fix checking for PIO Non-posted Request
      c04881e8
    • Bjorn Helgaas's avatar
      Merge branch 'pci/kernel-doc' · 4343292f
      Bjorn Helgaas authored
      - Fix kernel-doc formatting errors (Krzysztof Wilczyński)
      
      * pci/kernel-doc:
        PCI: Fix kernel-doc formatting
      4343292f
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/xgene' · 5e0716fc
      Bjorn Helgaas authored
      - Annotate __iomem pointer (Bjorn Helgaas)
      
      * pci/host/xgene:
        PCI: xgene: Annotate __iomem pointer
      5e0716fc
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/tegra194' · 5a57de58
      Bjorn Helgaas authored
      - Fix host init during resume (Vidya Sagar)
      
      - Fix ill-defined MSI IRQ shift behavior (Jon Hunter)
      
      * pci/host/tegra194:
        PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift
        PCI: tegra194: Fix host initialization during resume
      5a57de58
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/tegra' · 7b8f0c86
      Bjorn Helgaas authored
      - Add missing MODULE_DEVICE_TABLE for driver loading (Zou Wei)
      
      * pci/host/tegra:
        PCI: tegra: Add missing MODULE_DEVICE_TABLE
      7b8f0c86
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/rockchip' · d2918cb7
      Bjorn Helgaas authored
      - Register IRQ handlers after device and data are ready (Javier Martinez
        Canillas)
      
      * pci/host/rockchip:
        PCI: rockchip: Register IRQ handlers after device and data are ready
      d2918cb7
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/intel-gw' · 364a716b
      Bjorn Helgaas authored
      - Fix INTx enable (Martin Blumenstingl)
      
      * pci/host/intel-gw:
        PCI: intel-gw: Fix INTx enable
      364a716b
    • Bjorn Helgaas's avatar
      Merge branch 'pci/host/imx6' · 570987cb
      Bjorn Helgaas authored
      - Drop redundant error message from imx6_pcie_probe() (Zhen Lei)
      
      - Limit DBI register length on i.MX 6QuadPlus (Richard Zhu)
      
      - Add "vph-supply" to indicate which regulator supplies PHY (Richard Zhu)
      
      - Enable PHY internal regulator when supplied >3V (Richard Zhu)
      
      * pci/host/imx6:
        PCI: imx6: Enable PHY internal regulator when supplied >3V
        dt-bindings: imx6q-pcie: Add "vph-supply" for PHY supply voltage
        PCI: imx6: Limit DBI register length for imx6qp PCIe
        PCI: imx6: Remove imx6_pcie_probe() redundant error message
      570987cb
    • Bjorn Helgaas's avatar
      Merge branch 'pci/virtualization' · 524e6b03
      Bjorn Helgaas authored
      - Clarify error message for unbound devices (Moritz Fischer)
      
      * pci/virtualization:
        PCI/IOV: Clarify error message for unbound devices
      524e6b03
    • Bjorn Helgaas's avatar
      Merge branch 'pci/sysfs' · 71327000
      Bjorn Helgaas authored
      - Fix dsm_label_utf16s_to_utf8s() buffer overrun (Krzysztof Wilczyński)
      
      - Use sysfs_emit() and sysfs_emit_at() in "show" functions (Krzysztof
        Wilczyński)
      
      - Fix 'resource_alignment' newline issues (Krzysztof Wilczyński)
      
      - Add newline to 'devspec' sysfs file (Krzysztof Wilczyński)
      
      * pci/sysfs:
        PCI/sysfs: Add 'devspec' newline
        PCI/sysfs: Fix 'resource_alignment' newline issues
        PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions
        PCI/sysfs: Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s()
        PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
      
      # Conflicts:
      #	drivers/pci/p2pdma.c
      71327000
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' · 131e4f76
      Bjorn Helgaas authored
      - Coalesce host bridge apertures so we can allocate large BARs that cross
        contiguous apertures (Kai-Heng Feng)
      
      * pci/resource:
        PCI: Coalesce host bridge contiguous apertures
      131e4f76
    • Bjorn Helgaas's avatar
      Merge branch 'pci/reset' · 76d826c3
      Bjorn Helgaas authored
      - Add pci_reset_bus_function() Secondary Bus Reset interface (Raphael
        Norwitz)
      
      - Work around Huawei Intelligent NIC VF FLR erratum (Chiqijun)
      
      * pci/reset:
        PCI: Work around Huawei Intelligent NIC VF FLR erratum
        PCI: Add pci_reset_bus_function() Secondary Bus Reset interface
      76d826c3
    • Bjorn Helgaas's avatar
      Merge branch 'pci/pm' · e92605b0
      Bjorn Helgaas authored
      - Leave Apple Thunderbolt controllers on for s2idle or standby so they work
        after resume (Konstantin Kharlamov)
      
      * pci/pm:
        PCI: Leave Apple Thunderbolt controllers on for s2idle or standby
      e92605b0
    • Bjorn Helgaas's avatar
      Merge branch 'pci/p2pdma' · c9fb9042
      Bjorn Helgaas authored
      - Rename Rename upstream_bridge_distance() to calc_map_type_and_dist()
        (Logan Gunthorpe)
      
      - Collect ACS list message in stack buffer to avoid sleeping (Logan
        Gunthorpe)
      
      - Use correct calc_map_type_and_dist() return type (Logan Gunthorpe)
      
      - Warn if host bridge not in whitelist (Logan Gunthorpe)
      
      - Refactor pci_p2pdma_map_type() (Logan Gunthorpe)
      
      - Avoid pci_get_slot(), which may sleep (Logan Gunthorpe)
      
      - Simplify distance calculation in __calc_map_type_and_dist() and
        calc_map_type_and_dist_warn() (Christoph Hellwig)
      
      - Finish RCU conversion of pdev->p2pdma (Eric Dumazet)
      
      * pci/p2pdma:
        PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma
        PCI/P2PDMA: Simplify distance calculation
        PCI/P2PDMA: Avoid pci_get_slot(), which may sleep
        PCI/P2PDMA: Refactor pci_p2pdma_map_type()
        PCI/P2PDMA: Warn if host bridge not in whitelist
        PCI/P2PDMA: Use correct calc_map_type_and_dist() return type
        PCI/P2PDMA: Collect acs list in stack buffer to avoid sleeping
        PCI/P2PDMA: Rename upstream_bridge_distance() and rework doc
      c9fb9042
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' · 96b0df24
      Bjorn Helgaas authored
      - Return true/false (not 1/0) from bool functions (Yang Li)
      
      - Add Joyce Ooi as Altera PCIe maintainer (Joyce Ooi)
      
      * pci/misc:
        MAINTAINERS: Add Joyce Ooi as Altera PCIe maintainer
        x86/pci: Return true/false (not 1/0) from bool functions
      96b0df24
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' · 56d2731c
      Bjorn Helgaas authored
      - Ignore pciehp Link Down/Up caused by DPC so device remains bound to
        driver (Lukas Wunner)
      
      - Declare global cpci_debug in header file (Krzysztof Wilczyński)
      
      * pci/hotplug:
        PCI: cpcihp: Declare cpci_debug in header file
        PCI: pciehp: Ignore Link Down/Up caused by DPC
      56d2731c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/error' · 5f2554cc
      Bjorn Helgaas authored
      - Make domain/bus/dev/fn format in AER messages match pci_name() format
        (Yicong Yang)
      
      * pci/error:
        Documentation: PCI: Fix typo in pci-error-recovery.rst
        PCI/AER: Use consistent format when printing PCI device
      5f2554cc
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 104eb9d8
      Bjorn Helgaas authored
      - Add a debug message on PCI device release (Niklas Schnelle)
      
      - Dynamically map ECAM regions to reduce vmalloc usage (Russell King)
      
      * pci/enumeration:
        PCI: Dynamically map ECAM regions
        PCI: Print a debug message on PCI device release
      104eb9d8
    • Eric Dumazet's avatar
      PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma · ae21f835
      Eric Dumazet authored
      While looking at pci_alloc_p2pmem() I found RCU protection was not properly
      applied there, as pdev->p2pdma was potentially read multiple times.
      
      Fix pci_alloc_p2pmem(), add __rcu qualifier to p2pdma field of struct
      pci_dev, and fix all other accesses to this field with proper RCU verbs.
      
      Link: https://lore.kernel.org/r/20210701095621.3129283-1-eric.dumazet@gmail.com
      Fixes: 1570175a
      
       ("PCI/P2PDMA: track pgmap references per resource, not globally")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      ae21f835
    • Bjorn Helgaas's avatar
      PCI: xgene: Annotate __iomem pointer · 662e4b03
      Bjorn Helgaas authored
      "bar_addr" is passed as the argument to writel(), which expects a
      "void __iomem *".  Annotate "bar_addr" correctly.  Resolves an sparse
      "incorrect type in argument 2 (different address spaces)" warning.
      
      Link: https://lore.kernel.org/r/202105171809.Tay9fImZ-lkp@intel.com
      Link: https://lore.kernel.org/r/20210517171839.25777-1-helgaas@kernel.org
      
      
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      662e4b03
    • Krzysztof Wilczyński's avatar
      PCI: Fix kernel-doc formatting · 347269c1
      Krzysztof Wilczyński authored
      Fix kernel-doc formatting throughout drivers/pci and related include files.
      No change to functionality intended.
      
      Check for warnings:
      
        $ find include drivers/pci -type f -path "*pci*.[ch]" | xargs scripts/kernel-doc -none
      
      [bhelgaas: squashed to one commit]
      Link: https://lore.kernel.org/r/20210509030237.368540-1-kw@linux.com
      Link: https://lore.kernel.org/r/20210703151306.1922450-1-kw@linux.com
      Link: https://lore.kernel.org/r/20210703151306.1922450-2-kw@linux.com
      Link: https://lore.kernel.org/r/20210703151306.1922450-3-kw@linux.com
      Link: https://lore.kernel.org/r/20210703151306.1922450-4-kw@linux.com
      Link: https://lore.kernel.org/r/20210703151306.1922450-5-kw@linux.com
      
      
      Signed-off-by: default avatarKrzysztof Wilczyński <kw@linux.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      347269c1
  2. Jul 02, 2021
  3. Jul 01, 2021
  4. Jun 29, 2021
  5. Jun 25, 2021
  6. Jun 22, 2021
  7. Jun 17, 2021
    • Russell King's avatar
      PCI: Dynamically map ECAM regions · 8fe55ef2
      Russell King authored
      
      
      Attempting to boot 32-bit ARM kernels under QEMU's 3.x virt models fails
      when we have more than 512M of RAM in the model as we run out of vmalloc
      space for the PCI ECAM regions. This failure will be silent when running
      libvirt, as the console in that situation is a PCI device.
      
      In this configuration, the kernel maps the whole ECAM, which QEMU sets up
      for 256 buses, even when maybe only seven buses are in use.  Each bus uses
      1M of ECAM space, and ioremap() adds an additional guard page between
      allocations. The kernel vmap allocator will align these regions to 512K,
      resulting in each mapping eating 1.5M of vmalloc space. This means we need
      384M of vmalloc space just to map all of these, which is very wasteful of
      resources.
      
      Fix this by only mapping the ECAM for buses we are going to be using.  In
      my setups, this is around seven buses in most guests, which is 10.5M of
      vmalloc space - way smaller than the 384M that would otherwise be required.
      This also means that the kernel can boot without forcing extra RAM into
      highmem with the vmalloc= argument, or decreasing the virtual RAM available
      to the guest.
      
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/E1lhCAV-0002yb-50@rmk-PC.armlinux.org.uk
      
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      8fe55ef2