1. 12 Jul, 2019 6 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/virtualization' · 55ab3ecb
      Bjorn Helgaas authored
        - Fix problem with caching VF config space size (Alex Williamson)
      
      * pci/virtualization:
        PCI/IOV: Assume SR-IOV VFs support extended config space.
        Revert "PCI/IOV: Use VF0 cached config space size for other VFs"
      55ab3ecb
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' · 8c6af6f0
      Bjorn Helgaas authored
        - Evaluate ACPI "PCI Boot Configuration"_DSM (Benjamin Herrenschmidt)
      
        - Don't auto-realloc if we're preserving firmware config (Benjamin
          Herrenschmidt)
      
        - Allow arm64 to reallocate resources if necessary (Benjamin
          Herrenschmidt)
      
        - Preserve firmware config on arm64 when desired (Benjamin Herrenschmidt)
      
        - Simplify resource distribution to hotplug bridges (Nicholas Johnson)
      
      * pci/resource:
        PCI: Skip resource distribution when no hotplug bridges
        PCI: Simplify pci_bus_distribute_available_resources()
        arm64: PCI: Preserve firmware configuration when desired
        arm64: PCI: Allow resource reallocation if necessary
        PCI: Don't auto-realloc if we're preserving firmware config
        PCI/ACPI: Evaluate PCI Boot Configuration _DSM
      8c6af6f0
    • Bjorn Helgaas's avatar
      Merge branch 'pci/peer-to-peer' · 3306e99e
      Bjorn Helgaas authored
        - Prevent drivers that use dma_virt_ops from using peer-to-peer DMA
          (Logan Gunthorpe)
      
      * pci/peer-to-peer:
        PCI/P2PDMA: Fix missing check for dma_virt_ops
      3306e99e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' · e0997728
      Bjorn Helgaas authored
        - Generalize multi-function power dependency device links (Abhishek Sahu)
      
        - Add NVIDIA GPU multi-function power dependencies (Abhishek Sahu)
      
        - Optimize /proc/bus/pci/devices by using seq_puts() instead of
          seq_printf() (Markus Elfring)
      
        - Enable NVIDIA HDA controllers if BIOS didn't (Lukas Wunner)
      
      * pci/misc:
        PCI: Enable NVIDIA HDA controllers
        PCI: Use seq_puts() instead of seq_printf() in show_device()
        PCI: Add NVIDIA GPU multi-function power dependencies
        PCI: Generalize multi-function power dependency device links
      e0997728
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 8cf80c5c
      Bjorn Helgaas authored
        - If user prevents VF probing, return error instead of pretending a
          driver has claimed the VF (Alex Williamson)
      
        - Always allow probing with driver_override (Alex Williamson)
      
        - Decode PCIe 32 GT/s link speed (Gustavo Pimentel)
      
        - Ignore lockdep for sysfs remove to avoid lockdep false positive (Marek
          Vasut)
      
      * pci/enumeration:
        PCI: sysfs: Ignore lockdep for remove attribute
        PCI: Decode PCIe 32 GT/s link speed
        PCI: Always allow probing with driver_override
        PCI: Return error if cannot probe VF
      8cf80c5c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/docs' · b6a001c0
      Bjorn Helgaas authored
        - Convert docs to reST (Changbin Du)
      
        - Convert PM docs to reST (Mauro Carvalho Chehab)
      
      * pci/docs:
        docs: power: convert docs to ReST and rename to *.rst
        Documentation: PCI: convert endpoint/pci-test-howto.txt to reST
        Documentation: PCI: convert endpoint/pci-test-function.txt to reST
        Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST
        Documentation: PCI: convert endpoint/pci-endpoint.txt to reST
        Documentation: PCI: convert pcieaer-howto.txt to reST
        Documentation: PCI: convert pci-error-recovery.txt to reST
        Documentation: PCI: convert acpi-info.txt to reST
        Documentation: PCI: convert MSI-HOWTO.txt to reST
        Documentation: PCI: convert pci-iov-howto.txt to reST
        Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST
        Documentation: PCI: convert pci.txt to reST
        Documentation: add Linux PCI to Sphinx TOC tree
      b6a001c0
  2. 11 Jul, 2019 1 commit
    • Lukas Wunner's avatar
      PCI: Enable NVIDIA HDA controllers · b516ea58
      Lukas Wunner authored
      Many NVIDIA GPUs can be configured as either a single-function video device
      or a multi-function device with video at function 0 and an HDA audio
      controller at function 1.  The HDA controller can be enabled or disabled by
      a bit in the function 0 config space.
      
      Some BIOSes leave the HDA disabled, which means the HDMI connector from the
      NVIDIA GPU may not work.  Sometimes the BIOS enables the HDA if an HDMI
      cable is connected at boot time, but that doesn't handle hotplug cases.
      
      Enable the HDA controller on device enumeration and resume and re-read the
      header type, which tells us whether the GPU is a multi-function device.
      
      This quirk is limited to NVIDIA PCI devices with the VGA Controller device
      class.  This is expected to correspond to product configurations where the
      NVIDIA GPU has connectors attached.  Other products where the device class
      is 3D Controller are expected to correspond to configurations where the
      NVIDIA GPU is dedicated (dGPU) and has no connectors.  See original post
      (URL below) for more details.
      
      This commit takes inspiration from an earlier patch by Daniel Drake.
      
      Link: https://lore.kernel.org/r/20190708051744.24039-1-drake@endlessm.com v2
      Link: https://lore.kernel.org/r/20190613063514.15317-1-drake@endlessm.com v1
      Link: https://devtalk.nvidia.com/default/topic/1024022
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75985Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarDaniel Drake <drake@endlessm.com>
      [bhelgaas: commit log, log message, return early if already enabled]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Aaron Plattner <aplattner@nvidia.com>
      Cc: Peter Wu <peter@lekensteyn.nl>
      Cc: Ilia Mirkin <imirkin@alum.mit.edu>
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: Maik Freudenberg <hhfeuer@gmx.de>
      b516ea58
  3. 03 Jul, 2019 2 commits
  4. 02 Jul, 2019 4 commits
  5. 21 Jun, 2019 5 commits
  6. 14 Jun, 2019 1 commit
  7. 13 Jun, 2019 4 commits
    • Gustavo Pimentel's avatar
      PCI: Decode PCIe 32 GT/s link speed · de76cda2
      Gustavo Pimentel authored
      PCIe r5.0, sec 7.5.3.18, defines a new 32.0 GT/s bit in the Supported Link
      Speeds Vector of Link Capabilities 2.  Decode this new speed.  This does
      not affect the speed of the link, which should be negotiated automatically
      by the hardware; it only adds decoding when showing the speed to the user.
      
      Previously, reading the speed of a link operating at this speed showed
      "Unknown speed" instead of "32.0 GT/s".
      
      Link: https://lore.kernel.org/lkml/92365e3caf0fc559f9ab14bcd053bfc92d4f661c.1559664969.git.gustavo.pimentel@synopsys.comSigned-off-by: default avatarGustavo Pimentel <gustavo.pimentel@synopsys.com>
      [bhelgaas: changelog]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      de76cda2
    • Alex Williamson's avatar
      PCI: Always allow probing with driver_override · 2d2f4273
      Alex Williamson authored
      Commit 0e7df224 ("PCI: Add sysfs sriov_drivers_autoprobe to control
      VF driver binding") introduced the sriov_drivers_autoprobe attribute
      which allows users to prevent the kernel from automatically probing a
      driver for new VFs as they are created.  This allows VFs to be spawned
      without automatically binding the new device to a host driver, such as
      in cases where the user intends to use the device only with a meta
      driver like vfio-pci.  However, the current implementation prevents any
      use of drivers_probe with the VF while sriov_drivers_autoprobe=0.  This
      blocks the now current general practice of setting driver_override
      followed by using drivers_probe to bind a device to a specified driver.
      
      The kernel never automatically sets a driver_override therefore it seems
      we can assume a driver_override reflects the intent of the user.  Also,
      probing a device using a driver_override match seems outside the scope
      of the 'auto' part of sriov_drivers_autoprobe.  Therefore, let's allow
      driver_override matches regardless of sriov_drivers_autoprobe, which we
      can do by simply testing if a driver_override is set for a device as a
      'can probe' condition.
      
      Fixes: 0e7df224 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding")
      Link: https://lore.kernel.org/lkml/155742996741.21878.569845487290798703.stgit@gimli.home
      Link: https://lore.kernel.org/linux-pci/155672991496.20698.4279330795743262888.stgit@gimli.home/T/#uSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      2d2f4273
    • Abhishek Sahu's avatar
      PCI: Add NVIDIA GPU multi-function power dependencies · 6d2e369f
      Abhishek Sahu authored
      The NVIDIA Turing GPU is a multi-function PCI device with the following
      functions:
      
        - Function 0: VGA display controller
        - Function 1: Audio controller
        - Function 2: USB xHCI Host controller
        - Function 3: USB Type-C UCSI controller
      
      Function 0 is tightly coupled with other functions in the hardware.  When
      function 0 is in D3, it gates power for hardware blocks used by other
      functions, which means those functions only work when function 0 is in D0.
      If any of these functions (1/2/3) are in D0, then function 0 should also be
      in D0.
      
      Commit 07f4f97d ("vga_switcheroo: Use device link for HDA controller")
      already creates a device link to show the dependency of function 1 on
      function 0 of this GPU.  Create additional device links to express the
      dependencies of functions 2 and 3 on function 0.  This means function 0
      will be in D0 if any other function is in D0.
      
      [bhelgaas: I think the PCI spec expectation is that functions can be
      power-managed independently, so I don't think this device is technically
      compliant.  For example, the PCIe r5.0 spec, sec 1.4, says "the PCI/PCIe
      hardware/software model includes architectural constructs necessary to
      discover, configure, and use a Function, without needing Function-specific
      knowledge" and sec 5.1 says "D states are associated with a particular
      Function" and "PM provides ... a mechanism to identify power management
      capabilities of a given Function [and] the ability to transition a Function
      into a certain power management state."]
      
      Link: https://lore.kernel.org/lkml/20190606092225.17960-3-abhsahu@nvidia.comSigned-off-by: default avatarAbhishek Sahu <abhsahu@nvidia.com>
      [bhelgaas: commit log]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      6d2e369f
    • Abhishek Sahu's avatar
      PCI: Generalize multi-function power dependency device links · a17beb1a
      Abhishek Sahu authored
      Although not allowed by the PCI specs, some multi-function devices have
      power dependencies between the functions.  For example, function 1 may not
      work unless function 0 is in the D0 power state.
      
      The existing quirk_gpu_hda() adds a device link to express this dependency
      for GPU and HDA devices, but it really is not specific to those device
      types.
      
      Generalize it and rename it to pci_create_device_link() so we can create
      dependencies between any "consumer" and "producer" functions of a
      multi-function device, where the consumer is only functional if the
      producer is in D0.  This reorganization should not affect any
      functionality.
      
      Link: https://lore.kernel.org/lkml/20190606092225.17960-2-abhsahu@nvidia.comSigned-off-by: default avatarAbhishek Sahu <abhsahu@nvidia.com>
      [bhelgaas: commit log, reword diagnostic]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      a17beb1a
  8. 30 May, 2019 13 commits
  9. 19 May, 2019 4 commits
    • Linus Torvalds's avatar
      Linux 5.2-rc1 · a188339c
      Linus Torvalds authored
      a188339c
    • Linus Torvalds's avatar
      Merge tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 2e2c1220
      Linus Torvalds authored
      Pull UBIFS fixes from Richard Weinberger:
      
       - build errors wrt xattrs
      
       - mismerge which lead to a wrong Kconfig ifdef
      
       - missing endianness conversion
      
      * tag 'upstream-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubifs: Convert xattr inum to host order
        ubifs: Use correct config name for encryption
        ubifs: Fix build error without CONFIG_UBIFS_FS_XATTR
      2e2c1220
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · cb6f8739
      Linus Torvalds authored
      Merge yet more updates from Andrew Morton:
       "A few final bits:
      
         - large changes to vmalloc, yielding large performance benefits
      
         - tweak the console-flush-on-panic code
      
         - a few fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        panic: add an option to replay all the printk message in buffer
        initramfs: don't free a non-existent initrd
        fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount
        mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock
        mm/vmap: add DEBUG_AUGMENT_LOWEST_MATCH_CHECK macro
        mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro
        mm/vmalloc.c: keep track of free blocks for vmap allocation
      cb6f8739
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · ff8583d6
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - remove unneeded use of cc-option, cc-disable-warning, cc-ldoption
      
       - exclude tracked files from .gitignore
      
       - re-enable -Wint-in-bool-context warning
      
       - refactor samples/Makefile
      
       - stop building immediately if syncconfig fails
      
       - do not sprinkle error messages when $(CC) does not exist
      
       - move arch/alpha/defconfig to the configs subdirectory
      
       - remove crappy header search path manipulation
      
       - add comment lines to .config to clarify the end of menu blocks
      
       - check uniqueness of module names (adding new warnings intentionally)
      
      * tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits)
        kconfig: use 'else ifneq' for Makefile to improve readability
        kbuild: check uniqueness of module names
        kconfig: Terminate menu blocks with a comment in the generated config
        kbuild: add LICENSES to KBUILD_ALLDIRS
        kbuild: remove 'addtree' and 'flags' magic for header search paths
        treewide: prefix header search paths with $(srctree)/
        media: prefix header search paths with $(srctree)/
        media: remove unneeded header search paths
        alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig
        kbuild: terminate Kconfig when $(CC) or $(LD) is missing
        kbuild: turn auto.conf.cmd into a mandatory include file
        .gitignore: exclude .get_maintainer.ignore and .gitattributes
        kbuild: add all Clang-specific flags unconditionally
        kbuild: Don't try to add '-fcatch-undefined-behavior' flag
        kbuild: add some extra warning flags unconditionally
        kbuild: add -Wvla flag unconditionally
        arch: remove dangling asm-generic wrappers
        samples: guard sub-directories with CONFIG options
        kbuild: re-enable int-in-bool-context warning
        MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux*
        ...
      ff8583d6