1. Jun 01, 2023
  2. May 31, 2023
    • Miguel Ojeda's avatar
      .gitattributes: set diff driver for Rust source code files · 8f8d4be9
      Miguel Ojeda authored
      Git supports a builtin Rust diff driver [1] since v2.23.0 (2019).
      
      It improves the choice of hunk headers in some cases, such as
      diffs within methods, since those are indented in Rust within
      an `impl` block, and therefore the default diff driver would
      pick the outer `impl` block instead (rather than the method
      where the changed code is).
      
      For instance, with the default diff driver:
      
          @@ -455,6 +455,8 @@ impl fmt::Write for RawFormatter {
                   // Amount that we can copy. `saturating_sub` ensures we get 0 if `pos` goes past `end`.
                   let len_to_copy = core::cmp::min(pos_new, self.end).saturating_sub(self.pos);
      
          +        test_diff_driver();
          +
                   if len_to_copy > 0 {
                       // SAFETY: If `len_to_copy` is non-zero, then we know `pos` has not gone past `end`
                       // yet, so it is valid for write per the type invariants.
      
      With the Rust diff driver:
      
          @@ -455,6 +455,8 @@ fn write_str(&mut self, s: &str) -> fmt::Result {
                   // Amount that we can copy. `saturating_sub` ensures we get 0 if `pos` goes past `end`.
                   let len_to_copy = core::cmp::min(pos_new, self.end).saturating_sub(self.pos);
      
          +        test_diff_driver();
          +
                   if len_to_copy > 0 {
                       // SAFETY: If `len_to_copy` is non-zero, then we know `pos` has not gone past `end`
                       // yet, so it is valid for write per the type invariants.
      
      Thus set the `rust` diff driver for `*.rs` source files.
      
      The Rust repository also does so since 2020 [2].
      
      Link: https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header [1]
      Link: https://github.com/rust-lang/rust/pull/78882
      
       [2]
      Reviewed-by: default avatarGary Guo <gary@garyguo.net>
      Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
      Link: https://lore.kernel.org/r/20230418233048.335281-1-ojeda@kernel.org
      
      
      [ Added link to Rust repository ]
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      8f8d4be9
    • Miguel Ojeda's avatar
      rust: upgrade to Rust 1.68.2 · 3ed03f4d
      Miguel Ojeda authored
      This is the first upgrade to the Rust toolchain since the initial Rust
      merge, from 1.62.0 to 1.68.2 (i.e. the latest).
      
      # Context
      
      The kernel currently supports only a single Rust version [1] (rather
      than a minimum) given our usage of some "unstable" Rust features [2]
      which do not promise backwards compatibility.
      
      The goal is to reach a point where we can declare a minimum version for
      the toolchain. For instance, by waiting for some of the features to be
      stabilized. Therefore, the first minimum Rust version that the kernel
      will support is "in the future".
      
      # Upgrade policy
      
      Given we will eventually need to reach that minimum version, it would be
      ideal to upgrade the compiler from time to time to be as close as
      possible to that goal and find any issues sooner. In the extreme, we
      could upgrade as soon as a new Rust release is out. Of course, upgrading
      so often is in stark contrast to what one normally would need for GCC
      and LLVM, especially given the release schedule: 6 weeks for Rust vs.
      half a year for LLVM and a year for GCC.
      
      Having said that, there is no particular advantage to updating slowly
      either: kernel developers in "stable" distributions are unlikely to be
      able to use their distribution-provided Rust toolchain for the kernel
      anyway [3]. Instead, by routinely upgrading to the latest instead,
      kernel developers using Linux distributions that track the latest Rust
      release may be able to use those rather than Rust-provided ones,
      especially if their package manager allows to pin / hold back /
      downgrade the version for some days during windows where the version may
      not match. For instance, Arch, Fedora, Gentoo and openSUSE all provide
      and track the latest version of Rust as they get released every 6 weeks.
      
      Then, when the minimum version is reached, we will stop upgrading and
      decide how wide the window of support will be. For instance, a year of
      Rust versions. We will probably want to start small, and then widen it
      over time, just like the kernel did originally for LLVM, see commit
      3519c4d6 ("Documentation: add minimum clang/llvm version").
      
      # Unstable features stabilized
      
      This upgrade allows us to remove the following unstable features since
      they were stabilized:
      
        - `feature(explicit_generic_args_with_impl_trait)` (1.63).
        - `feature(core_ffi_c)` (1.64).
        - `feature(generic_associated_types)` (1.65).
        - `feature(const_ptr_offset_from)` (1.65, *).
        - `feature(bench_black_box)` (1.66, *).
        - `feature(pin_macro)` (1.68).
      
      The ones marked with `*` apply only to our old `rust` branch, not
      mainline yet, i.e. only for code that we may potentially upstream.
      
      With this patch applied, the only unstable feature allowed to be used
      outside the `kernel` crate is `new_uninit`, though other code to be
      upstreamed may increase the list.
      
      Please see [2] for details.
      
      # Other required changes
      
      Since 1.63, `rustdoc` triggers the `broken_intra_doc_links` lint for
      links pointing to exported (`#[macro_export]`) `macro_rules`. An issue
      was opened upstream [4], but it turns out it is intended behavior. For
      the moment, just add an explicit reference for each link. Later we can
      revisit this if `rustdoc` removes the compatibility measure.
      
      Nevertheless, this was helpful to discover a link that was pointing to
      the wrong place unintentionally. Since that one was actually wrong, it
      is fixed in a previous commit independently.
      
      Another change was the addition of `cfg(no_rc)` and `cfg(no_sync)` in
      upstream [5], thus remove our original changes for that.
      
      Similarly, upstream now tests that it compiles successfully with
      `#[cfg(not(no_global_oom_handling))]` [6], which allow us to get rid
      of some changes, such as an `#[allow(dead_code)]`.
      
      In addition, remove another `#[allow(dead_code)]` due to new uses
      within the standard library.
      
      Finally, add `try_extend_trusted` and move the code in `spec_extend.rs`
      since upstream moved it for the infallible version.
      
      # `alloc` upgrade and reviewing
      
      There are a large amount of changes, but the vast majority of them are
      due to our `alloc` fork being upgraded at once.
      
      There are two kinds of changes to be aware of: the ones coming from
      upstream, which we should follow as closely as possible, and the updates
      needed in our added fallible APIs to keep them matching the newer
      infallible APIs coming from upstream.
      
      Instead of taking a look at the diff of this patch, an alternative
      approach is reviewing a diff of the changes between upstream `alloc` and
      the kernel's. This allows to easily inspect the kernel additions only,
      especially to check if the fallible methods we already have still match
      the infallible ones in the new version coming from upstream.
      
      Another approach is reviewing the changes introduced in the additions in
      the kernel fork between the two versions. This is useful to spot
      potentially unintended changes to our additions.
      
      To apply these approaches, one may follow steps similar to the following
      to generate a pair of patches that show the differences between upstream
      Rust and the kernel (for the subset of `alloc` we use) before and after
      applying this patch:
      
          # Get the difference with respect to the old version.
          git -C rust checkout $(linux/scripts/min-tool-version.sh rustc)
          git -C linux ls-tree -r --name-only HEAD -- rust/alloc |
              cut -d/ -f3- |
              grep -Fv README.md |
              xargs -IPATH cp rust/library/alloc/src/PATH linux/rust/alloc/PATH
          git -C linux diff --patch-with-stat --summary -R > old.patch
          git -C linux restore rust/alloc
      
          # Apply this patch.
          git -C linux am rust-upgrade.patch
      
          # Get the difference with respect to the new version.
          git -C rust checkout $(linux/scripts/min-tool-version.sh rustc)
          git -C linux ls-tree -r --name-only HEAD -- rust/alloc |
              cut -d/ -f3- |
              grep -Fv README.md |
              xargs -IPATH cp rust/library/alloc/src/PATH linux/rust/alloc/PATH
          git -C linux diff --patch-with-stat --summary -R > new.patch
          git -C linux restore rust/alloc
      
      Now one may check the `new.patch` to take a look at the additions (first
      approach) or at the difference between those two patches (second
      approach). For the latter, a side-by-side tool is recommended.
      
      Link: https://rust-for-linux.com/rust-version-policy [1]
      Link: https://github.com/Rust-for-Linux/linux/issues/2 [2]
      Link: https://lore.kernel.org/rust-for-linux/CANiq72mT3bVDKdHgaea-6WiZazd8Mvurqmqegbe5JZxVyLR8Yg@mail.gmail.com/ [3]
      Link: https://github.com/rust-lang/rust/issues/106142 [4]
      Link: https://github.com/rust-lang/rust/pull/89891 [5]
      Link: https://github.com/rust-lang/rust/pull/98652
      
       [6]
      Reviewed-by: default avatarBjörn Roy Baron <bjorn3_gh@protonmail.com>
      Reviewed-by: default avatarGary Guo <gary@garyguo.net>
      Reviewed-By: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      Tested-by: default avatarAriel Miculas <amiculas@cisco.com>
      Tested-by: default avatarDavid Gow <davidgow@google.com>
      Tested-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Link: https://lore.kernel.org/r/20230418214347.324156-4-ojeda@kernel.org
      
      
      [ Removed `feature(core_ffi_c)` from `uapi` ]
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      3ed03f4d
    • Miguel Ojeda's avatar
      rust: arc: fix intra-doc link in `Arc<T>::init` · eed7a146
      Miguel Ojeda authored
      `Arc<T>::init` refers to `Arc<T>::pin_init` via an intra-doc link
      using the text `pin_init`, rather than more explicitly, which makes
      `rustdoc` point it to the `pin_init!` macro instead.
      
      This is required for the compiler upgrade since the newer `rustdoc`
      would trigger the `broken_intra_doc_links` lint [1], but in this case
      the macro was not the intended target to begin with, and so the actual
      fix is to make it point to the right place, regardless of the upgrade.
      
      Thus make it more explicit.
      
      Fixes: 92c4a1e7 ("rust: init/sync: add `InPlaceInit` trait to pin-initialize smart pointers")
      Link: https://github.com/rust-lang/rust/issues/106142
      
       [1]
      Reviewed-by: default avatarGary Guo <gary@garyguo.net>
      Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
      Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      Reviewed-by: default avatarBjörn Roy Baron <bjorn3_gh@protonmail.com>
      Tested-by: default avatarAriel Miculas <amiculas@cisco.com>
      Tested-by: default avatarDavid Gow <davidgow@google.com>
      Tested-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Link: https://lore.kernel.org/r/20230418214347.324156-3-ojeda@kernel.org
      
      
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      eed7a146
    • Miguel Ojeda's avatar
      rust: alloc: clarify what is the upstream version · f438c1dd
      Miguel Ojeda authored
      
      
      It may be unclear for readers which upstream Rust version these files
      are based on. They may be unaware that they are intended to match the
      minimum (and only, so far) supported version of Rust in the kernel.
      
      Thus clarify it.
      
      Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
      Reviewed-by: default avatarBjörn Roy Baron <bjorn3_gh@protonmail.com>
      Reviewed-by: default avatarGary Guo <gary@garyguo.net>
      Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      Tested-by: default avatarAriel Miculas <amiculas@cisco.com>
      Tested-by: default avatarDavid Gow <davidgow@google.com>
      Tested-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Link: https://lore.kernel.org/r/20230418214347.324156-2-ojeda@kernel.org
      
      
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      f438c1dd
  3. May 28, 2023
  4. May 27, 2023
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 49572d53
      Linus Torvalds authored
      Pull compute express link fixes from Dan Williams:
       "The 'media ready' series prevents the driver from acting on bad
        capacity information, and it moves some checks earlier in the init
        sequence which impacts topics in the queue for 6.5.
      
        Additional hotplug testing uncovered a missing enable for memory
        decode. A debug crash fix is also included.
      
        Summary:
      
         - Stop trusting capacity data before the "media ready" indication
      
         - Add missing HDM decoder capability enable for the cold-plug case
      
         - Fix a debug message induced crash"
      
      * tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl: Explicitly initialize resources when media is not ready
        cxl/port: Fix NULL pointer access in devm_cxl_add_port()
        cxl: Move cxl_await_media_ready() to before capacity info retrieval
        cxl: Wait Memory_Info_Valid before access memory related info
        cxl/port: Enable the HDM decoder capability for switch ports
      49572d53
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 18713e8a
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There have not been a lot of fixes for for the soc tree in 6.4, but
        these have been sitting here for too long.
      
        For the devicetree side, there is one minor warning fix for vexpress,
        the rest all all for the the NXP i.MX platforms: SoC specific bugfixes
        for the iMX8 clocks and its USB-3.0 gadget device, as well as board
        specific fixes for regulators and the phy on some of the i.MX boards.
      
        The microchip risc-v and arm32 maintainers now also add a shared
        maintainer file entry for the arm64 parts.
      
        The remaining fixes are all for firmware drivers, addressing mistakes
        in the optee, scmi and ff-a firmware driver implementation, mostly in
        the error handling code, incorrect use of the alloc_workqueue()
        interface in SCMI, and compatibility with corner cases of the firmware
        implementation"
      
      * tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        MAINTAINERS: update arm64 Microchip entries
        arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed
        dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type
        arm64: dts: colibri-imx8x: delete adc1 and dsp
        arm64: dts: colibri-imx8x: fix iris pinctrl configuration
        arm64: dts: colibri-imx8x: move pinctrl property from SoM to eval board
        arm64: dts: colibri-imx8x: fix eval board pin configuration
        arm64: dts: imx8mp: Fix video clock parents
        ARM: dts: imx6qdl-mba6: Add missing pvcie-supply regulator
        ARM: dts: imx6ull-dhcor: Set and limit the mode for PMIC buck 1, 2 and 3
        arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay
        arm64: dts: imx8mn: Fix video clock parents
        firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors
        firmware: arm_ffa: Fix FFA device names for logical partitions
        firmware: arm_ffa: Fix usage of partition info get count flag
        firmware: arm_ffa: Check if ffa_driver remove is present before executing
        arm64: dts: arm: add missing cache properties
        ARM: dts: vexpress: add missing cache properties
        firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation
        optee: fix uninited async notif value
      18713e8a
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 96f15fc6
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
      
       - Quirk Ice Lake Root Ports to work around DPC log size issue (Mika
         Westerberg)
      
      * tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports
      96f15fc6
    • Linus Torvalds's avatar
      Merge tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio · 8846af75
      Linus Torvalds authored
      Pull VFIO fix from Alex Williamson:
      
       - Test for and return error for invalid pfns through the pin pages
         interface (Yan Zhao)
      
      * tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio:
        vfio/type1: check pfn valid before converting to struct page
      8846af75
    • Linus Torvalds's avatar
      Merge tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux · a92c9ab6
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes for the storage side of things:
      
         - Fix bio caching condition for passthrough IO (Anuj)
      
         - end-of-device check fix for zero sized devices (Christoph)
      
         - Update Paolo's email address
      
         - NVMe pull request via Keith with a single quirk addition
      
         - Fix regression in how wbt enablement is done (Yu)
      
         - Fix race in active queue accounting (Tian)"
      
      * tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux:
        NVMe: Add MAXIO 1602 to bogus nid list.
        block: make bio_check_eod work for zero sized devices
        block: fix bio-cache for passthru IO
        block, bfq: update Paolo's address in maintainer list
        blk-mq: fix race condition in active queue accounting
        blk-wbt: fix that wbt can't be disabled by default
      a92c9ab6
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux · 6fae9129
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single fix for the conditional schedule with the SQPOLL thread,
        dropping the uring_lock if we do need to reschedule"
      
      * tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux:
        io_uring: unlock sqd->lock before sq thread release CPU
      6fae9129
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 77af1f2b
      Linus Torvalds authored
      Pull thermal control fix from Rafael Wysocki:
       "Fix a regression introduced inadvertently during the 6.3 cycle by a
        commit making the Intel int340x thermal driver use sysfs_emit_at()
        instead of scnprintf() (Srinivas Pandruvada)"
      
      * tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: int340x: Add new line for UUID display
      77af1f2b
    • Linus Torvalds's avatar
      Merge tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c551afcd
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Fix three issues related to the ->fast_switch callback in the AMD
        P-state cpufreq driver (Gautham R. Shenoy and Wyes Karny)"
      
      * tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: amd-pstate: Update policy->cur in amd_pstate_adjust_perf()
        cpufreq: amd-pstate: Remove fast_switch_possible flag from active driver
        cpufreq: amd-pstate: Add ->fast_switch() callback
      c551afcd
    • Dave Jiang's avatar
      cxl: Explicitly initialize resources when media is not ready · 793a539a
      Dave Jiang authored
      
      
      When media is not ready do not assume that the capacity information from
      the identify command is valid, i.e. ->total_bytes
      ->partition_align_bytes ->{volatile,persistent}_only_bytes. Explicitly
      zero out the capacity resources and exit early.
      
      Given zero-init of those fields this patch is functionally equivalent to
      the prior state, but it improves readability and robustness going
      forward.
      
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/168506118166.3004974.13523455340007852589.stgit@djiang5-mobl3
      
      
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      793a539a
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 91a30434
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix incorrect output in in-tree gpio tools
      
       - fix a shell coding issue in gpio-sim selftests
      
       - correctly set the permissions for debugfs attributes exposed by
         gpio-mockup
      
       - fix chip name and pin count in gpio-f7188x for one of the supported
         models
      
       - fix numberspace pollution when using dynamically and statically
         allocated GPIOs together
      
      * tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio-f7188x: fix chip name and pin count on Nuvoton chip
        gpiolib: fix allocation of mixed dynamic/static GPIOs
        gpio: mockup: Fix mode of debugfs files
        selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
        tools: gpio: fix debounce_period_us output of lsgpio
      91a30434
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · b158dd94
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - handle memory allocation error in checksumming helper (reported by
         syzbot)
      
       - fix lockdep splat when aborting a transaction, add NOFS protection
         around invalidate_inode_pages2 that could allocate with GFP_KERNEL
      
       - reduce chances to hit an ENOSPC during scrub with RAID56 profiles
      
      * tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: use nofs when cleaning up aborted transactions
        btrfs: handle memory allocation failure in btrfs_csum_one_bio
        btrfs: scrub: try harder to mark RAID56 block groups read-only
      b158dd94
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm · b83ac44e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This week's collection is pretty spread out, accel/qaic has a bunch of
        fixes, amdgpu, then lots of single fixes across a bunch of places.
      
        core:
         - fix drmm_mutex_init lock class
      
        mgag200:
         - fix gamma lut initialisation
      
        pl111:
         - fix FB depth on IMPD-1 framebuffer
      
        amdgpu:
         - Fix missing BO unlocking in KIQ error path
         - Avoid spurious secure display error messages
         - SMU13 fix
         - Fix an OD regression
         - GPU reset display IRQ warning fix
         - MST fix
      
        radeon:
         - Fix a DP regression
      
        i915:
         - PIPEDMC disabling fix for bigjoiner config
      
        panel:
         - fix aya neo air plus quirk
      
        sched:
         - remove redundant NULL check
      
        qaic:
         - fix NNC message corruption
         - Grab ch_lock during QAIC_ATTACH_SLICE_BO
         - Flush the transfer list again
         - Validate if BO is sliced before slicing
         - Validate user data before grabbing any lock
         - initialize ret variable to 0
         - silence some uninitialized variable warnings"
      
      * tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Have Payload Properly Created After Resume
        drm/amd/display: Fix warning in disabling vblank irq
        drm/amd/pm: Fix output of pp_od_clk_voltage
        drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7
        drm/radeon: reintroduce radeon_dp_work_func content
        drm/amdgpu: don't enable secure display on incompatible platforms
        drm:amd:amdgpu: Fix missing buffer object unlock in failure path
        accel/qaic: Fix NNC message corruption
        accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO
        accel/qaic: Flush the transfer list again
        accel/qaic: Validate if BO is sliced before slicing
        accel/qaic: Validate user data before grabbing any lock
        accel/qaic: initialize ret variable to 0
        drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration
        drm: fix drmm_mutex_init()
        drm/sched: Remove redundant check
        drm: panel-orientation-quirks: Change Air's quirk to support Air Plus
        accel/qaic: silence some uninitialized variable warnings
        drm/pl111: Fix FB depth on IMPD-1 framebuffer
        drm/mgag200: Fix gamma lut not initialized.
      b83ac44e
    • Linus Torvalds's avatar
      x86: re-introduce support for ERMS copies for user space accesses · 47ee3f1d
      Linus Torvalds authored
      I tried to streamline our user memory copy code fairly aggressively in
      commit adfcf423 ("x86: don't use REP_GOOD or ERMS for user memory
      copies"), in order to then be able to clean up the code and inline the
      modern FSRM case in commit 577e6a7f ("x86: inline the 'rep movs' in
      user copies for the FSRM case").
      
      We had reports [1] of that causing regressions earlier with blogbench,
      but that turned out to be a horrible benchmark for that case, and not a
      sufficient reason for re-instating "rep movsb" on older machines.
      
      However, now Eric Dumazet reported [2] a regression in performance that
      seems to be a rather more real benchmark, where due to the removal of
      "rep movs" a TCP stream over a 100Gbps network no longer reaches line
      speed.
      
      And it turns out that with the simplified the calling convention for the
      non-FSRM case in commit 427fda2c ("x86: improve on the non-rep
      'copy_user' function"), re-introducing the ERMS case is actually fairly
      simple.
      
      Of course, that "fairly simple" is glossing over several missteps due to
      having to fight our assembler alternative code.  This code really wanted
      to rewrite a conditional branch to have two different targets, but that
      made objtool sufficiently unhappy that this instead just ended up doing
      a choice between "jump to the unrolled loop, or use 'rep movsb'
      directly".
      
      Let's see if somebody finds a case where the kernel memory copies also
      care (see commit 68674f94: "x86: don't use REP_GOOD or ERMS for
      small memory copies").  But Eric does argue that the user copies are
      special because networking tries to copy up to 32KB at a time, if
      order-3 pages allocations are possible.
      
      In-kernel memory copies are typically small, unless they are the special
      "copy pages at a time" kind that still use "rep movs".
      
      Link: https://lore.kernel.org/lkml/202305041446.71d46724-yujie.liu@intel.com/ [1]
      Link: https://lore.kernel.org/lkml/CANn89iKUbyrJ=r2+_kK+sb2ZSSHifFZ7QkPLDpAtkJ8v4WUumA@mail.gmail.com/
      
       [2]
      Reported-and-tested-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: adfcf423
      
       ("x86: don't use REP_GOOD or ERMS for user memory copies")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      47ee3f1d
  5. May 26, 2023