1. 05 Oct, 2022 12 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' · 99e2c73d
      Bjorn Helgaas authored
      - Distribute resources to unconfigured hotplug bridges at boot-time (not
        just when hot-adding such a bridge), which makes hot-adding devices to
        docks work (Mika Westerberg)
      
      - Fix the "revert to firmware assignment" code so we do the revert only if
        the address is actually reachable.  Previously we sometimes assigned
        addresses that could not be reached via upstream bridges (Maciej W.
        Rozycki)
      
      * pci/resource:
        PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
        PCI: Fix typo in pci_scan_child_bus_extend()
        PCI: Fix whitespace and indentation
        PCI: Distribute available resources for root buses, too
        PCI: Move pci_assign_unassigned_root_bus_resources()
        PCI: Pass available buses even if the bridge is already configured
        PCI: Fix used_buses calculation in pci_scan_child_bus_extend()
      99e2c73d
    • Bjorn Helgaas's avatar
      Merge branch 'pci/rebar' · c3acb566
      Bjorn Helgaas authored
      - Expose a sysfs interface for configuring Resizable BARs so we can resize
        BARs before assigning devices to a VM through VFIO (Alex Williamson)
      
      * pci/rebar:
        PCI: Expose PCIe Resizable BAR support via sysfs
      c3acb566
    • Bjorn Helgaas's avatar
      Merge branch 'pci/pm' · 034f93fc
      Bjorn Helgaas authored
      - Cache the PTM capability offset instead of searching for it every time
        (Bjorn Helgaas)
      
      - Separate PTM configuration from PTM enable (Bjorn Helgaas)
      
      - Add pci_suspend_ptm() and pci_resume_ptm() to disable and re-enable PTM
        on suspend/resume so some Root Ports can safely enter a lower-power PM
        state (Bjorn Helgaas)
      
      - Disable PTM for all devices during suspend; previously we only did this
        for Root Ports and even then only in certain cases (Bjorn Helgaas)
      
      - Simplify pci_pm_suspend_noirq() (Rajvi Jingar)
      
      - Reduce the delay after transitions to/from D3hot by using usleep_range()
        instead of msleep(), which reduces the typical delay from 19ms to 10ms
        (Sajid Dalvi, Will McVicker)
      
      * pci/pm:
        PCI/PM: Reduce D3hot delay with usleep_range()
        PCI/PM: Simplify pci_pm_suspend_noirq()
        PCI/PM: Always disable PTM for all devices during suspend
        PCI/PTM: Consolidate PTM interface declarations
        PCI/PTM: Reorder functions in logical order
        PCI/PTM: Preserve RsvdP bits in PTM Control register
        PCI/PTM: Move pci_ptm_info() body into its only caller
        PCI/PTM: Add pci_suspend_ptm() and pci_resume_ptm()
        PCI/PTM: Separate configuration and enable
        PCI/PTM: Add pci_upstream_ptm() helper
        PCI/PTM: Cache PTM Capability offset
      034f93fc
    • Bjorn Helgaas's avatar
      Merge branch 'pci/msi' · 519e5121
      Bjorn Helgaas authored
      - Correct a typo in 71020a3c ('PCI/MSI: Use msi_add_msi_desc()') that
        reversed the sense of 'can_mask' in msi_add_msi_desc() (Josef Johansson)
      
      * pci/msi:
        PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc()
      519e5121
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dpc' · f9538e27
      Bjorn Helgaas authored
      - Work around a BIOS defect that makes some Intel Root Ports report an RP
        PIO log size of zero (Mika Westerberg)
      
      * pci/dpc:
        PCI/DPC: Quirk PIO log size for certain Intel Root Ports
      f9538e27
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aspm' · c1c2d892
      Bjorn Helgaas authored
      - Save L1 PM Substates Capability across suspend/resume so L1SS keeps
        working after resume (Vidya Sagar)
      
      - If device lacks L1 PM Substates Capability, don't read junk and treat it
        as such a Capability (Bjorn Helgaas)
      
      - Fix the LTR_L1.2_THRESHOLD computation, which previously configured the
        threshold for entering L1.2 to be lower than intended, so L1.2 could be
        used when it shouldn't be (Bjorn Helgaas)
      
      * pci/aspm:
        PCI/ASPM: Correct LTR_L1.2_THRESHOLD computation
        PCI/ASPM: Ignore L1 PM Substates if device lacks capability
        PCI/ASPM: Factor out L1 PM Substates configuration
        PCI/ASPM: Save L1 PM Substates Capability for suspend/resume
        PCI/ASPM: Refactor L1 PM Substates Control Register programming
      c1c2d892
    • Alex Williamson's avatar
      PCI: Expose PCIe Resizable BAR support via sysfs · 91fa1277
      Alex Williamson authored
      Add a simple sysfs interface to Resizable BAR support, largely for the
      purposes of assigning such devices to a VM through VFIO.  Resizable BARs
      present a difficult feature to expose to a VM through emulation, as
      resizing a BAR is done on the host.  It can fail, and often does, but we
      have no means via emulation of a PCIe REBAR capability to handle the error
      cases.
      
      A vfio-pci specific ioctl interface is also cumbersome as there are often
      multiple devices within the same bridge aperture and handling them is a
      challenge.  In the interface proposed here, expanding a BAR potentially
      requires such devices to be soft-removed during the resize operation and
      rescanned after, in order for all the necessary resources to be released.
      A pci-sysfs interface is also more universal than a vfio specific
      interface.
      
      Please see the ABI documentation update for usage.
      
      Link: https://lore.kernel.org/r/166336088796.3597940.14973499936692558556.stgit@omenSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Cc: Krzysztof Wilczyński <kw@linux.com>
      91fa1277
    • Bjorn Helgaas's avatar
      PCI/ASPM: Correct LTR_L1.2_THRESHOLD computation · 7afeb84d
      Bjorn Helgaas authored
      80d7d7a9 ("PCI/ASPM: Calculate LTR_L1.2_THRESHOLD from device
      characteristics") replaced a fixed value (163840ns) with one computed from
      T_POWER_OFF, Common_Mode_Restore_Time, etc., but it encoded the
      LTR_L1.2_THRESHOLD value incorrectly.
      
      This is especially a problem for small thresholds, e.g., 63ns fell into the
      "threshold_ns < 1024" case and was encoded as 32ns:
      
        LTR_L1.2_THRESHOLD_Scale = 1 (multiplier is 32ns)
        LTR_L1.2_THRESHOLD_Value = 63 >> 5 = 1
        LTR_L1.2_THRESHOLD       = multiplier * value = 32ns * 1 = 32ns
      
      Correct the algorithm to encode all times of 1023ns (0x3ff) or smaller
      exactly and larger times conservatively (the encoded threshold is never
      smaller than was requested).  This reduces the chance of entering L1.2
      when the device can't tolerate the exit latency.
      
      Fixes: 80d7d7a9 ("PCI/ASPM: Calculate LTR_L1.2_THRESHOLD from device characteristics")
      Link: https://lore.kernel.org/r/20221005025809.2247547-4-helgaas@kernel.orgSigned-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      7afeb84d
    • Bjorn Helgaas's avatar
      PCI/ASPM: Ignore L1 PM Substates if device lacks capability · cfc00286
      Bjorn Helgaas authored
      187f91db ("PCI/ASPM: Remove struct aspm_register_info.l1ss_cap")
      inadvertently removed a check for existence of the L1 PM Substates (L1SS)
      Capability before reading it.
      
      If there is no L1SS Capability, this means we mistakenly read PCI_COMMAND
      and PCI_STATUS (config address 0x04) and interpret that as the PCI_L1SS_CAP
      register, so we may incorrectly configure L1SS.
      
      Make sure the L1SS Capability exists before trying to read it.
      
      Fixes: 187f91db ("PCI/ASPM: Remove struct aspm_register_info.l1ss_cap")
      Link: https://lore.kernel.org/r/20221005025809.2247547-3-helgaas@kernel.orgSigned-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      cfc00286
    • Bjorn Helgaas's avatar
      PCI/ASPM: Factor out L1 PM Substates configuration · 9e2a0317
      Bjorn Helgaas authored
      Move L1 PM Substates configuration from pcie_aspm_cap_init() to a new
      aspm_l1ss_init() function.  No functional change intended.
      
      Link: https://lore.kernel.org/r/20221005025809.2247547-2-helgaas@kernel.orgSigned-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      9e2a0317
    • Vidya Sagar's avatar
      PCI/ASPM: Save L1 PM Substates Capability for suspend/resume · 4ff116d0
      Vidya Sagar authored
      Previously the L1 PM Substates Control Registers (CTL1 and CTL2) weren't
      saved and restored during suspend/resume leading to the L1 PM Substates
      configuration being lost post-resume.
      
      Save the L1 PM Substates Control Registers so that the configuration is
      retained post-resume.
      
      [bhelgaas: drop pci_is_pcie() testing; we can rely on pci_configure_ltr()
      having already done that]
      Link: https://lore.kernel.org/r/20220913131822.16557-3-vidyas@nvidia.comSigned-off-by: default avatarVidya Sagar <vidyas@nvidia.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      4ff116d0
    • Vidya Sagar's avatar
      PCI/ASPM: Refactor L1 PM Substates Control Register programming · 5e85eba6
      Vidya Sagar authored
      Refactor the code to extract the common code to program Control
      Registers 1 and 2 of the L1 PM Substates capability to a new function
      aspm_program_l1ss() and call it for both parent and child devices.
      
      [bhelgaas: squash in update to preserve fields we're not updating from
      https://lore.kernel.org/r/36fa13c5-e0f8-022f-77f7-7908e4df98b8@nvidia.com]
      Link: https://lore.kernel.org/r/20220913131822.16557-2-vidyas@nvidia.comSigned-off-by: default avatarVidya Sagar <vidyas@nvidia.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5e85eba6
  2. 29 Sep, 2022 1 commit
  3. 27 Sep, 2022 1 commit
  4. 21 Sep, 2022 6 commits
  5. 20 Sep, 2022 1 commit
  6. 12 Sep, 2022 10 commits
  7. 26 Aug, 2022 1 commit
  8. 14 Aug, 2022 8 commits
    • Linus Torvalds's avatar
      Linux 6.0-rc1 · 568035b0
      Linus Torvalds authored
      568035b0
    • Yury Norov's avatar
      radix-tree: replace gfp.h inclusion with gfp_types.h · 9f162193
      Yury Norov authored
      Radix tree header includes gfp.h for __GFP_BITS_SHIFT only. Now we
      have gfp_types.h for this.
      
      Fixes powerpc allmodconfig build:
      
         In file included from include/linux/nodemask.h:97,
                          from include/linux/mmzone.h:17,
                          from include/linux/gfp.h:7,
                          from include/linux/radix-tree.h:12,
                          from include/linux/idr.h:15,
                          from include/linux/kernfs.h:12,
                          from include/linux/sysfs.h:16,
                          from include/linux/kobject.h:20,
                          from include/linux/pci.h:35,
                          from arch/powerpc/kernel/prom_init.c:24:
         include/linux/random.h: In function 'add_latent_entropy':
      >> include/linux/random.h:25:46: error: 'latent_entropy' undeclared (first use in this function); did you mean 'add_latent_entropy'?
            25 |         add_device_randomness((const void *)&latent_entropy, sizeof(latent_entropy));
               |                                              ^~~~~~~~~~~~~~
               |                                              add_latent_entropy
         include/linux/random.h:25:46: note: each undeclared identifier is reported only once for each function it appears in
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Jason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9f162193
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 74cbb480
      Linus Torvalds authored
      Pull vfs lseek fix from Al Viro:
       "Fix proc_reg_llseek() breakage. Always had been possible if somebody
        left NULL ->proc_lseek, became a practical issue now"
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        take care to handle NULL ->proc_lseek()
      74cbb480
    • Al Viro's avatar
      take care to handle NULL ->proc_lseek() · 3f61631d
      Al Viro authored
      Easily done now, just by clearing FMODE_LSEEK in ->f_mode
      during proc_reg_open() for such entries.
      
      Fixes: 868941b1 "fs: remove no_llseek"
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      3f61631d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.0-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 5d6a0f4d
      Linus Torvalds authored
      Pull more xen updates from Juergen Gross:
      
       - fix the handling of the "persistent grants" feature negotiation
         between Xen blkfront and Xen blkback drivers
      
       - a cleanup of xen.config and adding xen.config to Xen section in
         MAINTAINERS
      
       - support HVMOP_set_evtchn_upcall_vector, which is more compliant to
         "normal" interrupt handling than the global callback used up to now
      
       - further small cleanups
      
      * tag 'for-linus-6.0-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections
        xen: remove XEN_SCRUB_PAGES in xen.config
        xen/pciback: Fix comment typo
        xen/xenbus: fix return type in xenbus_file_read()
        xen-blkfront: Apply 'feature_persistent' parameter when connect
        xen-blkback: Apply 'feature_persistent' parameter when connect
        xen-blkback: fix persistent grants negotiation
        x86/xen: Add support for HVMOP_set_evtchn_upcall_vector
      5d6a0f4d
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-13' of... · 96f86ff0
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tool updates from Arnaldo Carvalho de Melo:
      
       - 'perf c2c' now supports ARM64, adjust its output to cope with
         differences with what is in x86_64. Now go find false sharing on
         ARM64 (at least Neoverse) as well!
      
       - Refactor the JSON processing, making the output more compact and thus
         reducing the size of the resulting perf binary
      
       - Improvements for 'perf offcpu' profiling, including tracking child
         processes
      
       - Update Intel JSON metrics and events files for broadwellde,
         broadwellx, cascadelakex, haswellx, icelakex, ivytown, jaketown,
         knightslanding, sapphirerapids, skylakex and snowridgex
      
       - Add 'perf stat' JSON output and a 'perf test' entry for it
      
       - Ignore memfd and anonymous mmap events if jitdump present
      
       - Refactor 'perf test' shell tests allowing subdirs
      
       - Fix an error handling path in 'parse_perf_probe_command()'
      
       - Fixes for the guest Intel PT tracing patchkit in the 1st batch of
         this merge window
      
       - Print debuginfod queries if -v option is used, to explain delays in
         processing when debuginfo servers are enabled to fetch DSOs with
         richer symbol tables
      
       - Improve error message for 'perf record -p not_existing_pid'
      
       - Fix openssl and libbpf feature detection
      
       - Add PMU pai_crypto event description for IBM z16 on 'perf list'
      
       - Fix typos and duplicated words on comments in various places
      
      * tag 'perf-tools-fixes-for-v6.0-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (81 commits)
        perf test: Refactor shell tests allowing subdirs
        perf vendor events: Update events for snowridgex
        perf vendor events: Update events and metrics for skylakex
        perf vendor events: Update metrics for sapphirerapids
        perf vendor events: Update events for knightslanding
        perf vendor events: Update metrics for jaketown
        perf vendor events: Update metrics for ivytown
        perf vendor events: Update events and metrics for icelakex
        perf vendor events: Update events and metrics for haswellx
        perf vendor events: Update events and metrics for cascadelakex
        perf vendor events: Update events and metrics for broadwellx
        perf vendor events: Update metrics for broadwellde
        perf jevents: Fold strings optimization
        perf jevents: Compress the pmu_events_table
        perf metrics: Copy entire pmu_event in find metric
        perf pmu-events: Hide the pmu_events
        perf pmu-events: Don't assume pmu_event is an array
        perf pmu-events: Move test events/metrics to JSON
        perf test: Use full metric resolution
        perf pmu-events: Hide pmu_events_map
        ...
      96f86ff0
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · d785610f
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Ensure we never emit lwarx with EH=1 on 32-bit, because some 32-bit
         CPUs trap on it rather than ignoring it as they should.
      
       - Fix ftrace when building with clang, which was broken by some
         refactoring.
      
       - A couple of other minor fixes.
      
      Thanks to Christophe Leroy, Naveen N.  Rao, Nick Desaulniers, Ondrej
      Mosnacek, Pali Rohár, Russell Currey, and Segher Boessenkool.
      
      * tag 'powerpc-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/kexec: Fix build failure from uninitialised variable
        powerpc/ppc-opcode: Fix PPC_RAW_TW()
        powerpc64/ftrace: Fix ftrace for clang builds
        powerpc: Make eh value more explicit when using lwarx
        powerpc: Don't hide eh field of lwarx behind a macro
        powerpc: Fix eh field when calling lwarx on PPC32
      d785610f
    • Linus Torvalds's avatar
      Merge tag 'pull-work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · aea23e7c
      Linus Torvalds authored
      Pull /proc/mounts fix from Al Viro:
       "Fix for /proc/mounts escaping - escape the '#' character too"
      
      * tag 'pull-work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: escape hash as well
      aea23e7c