Merge tag 'riscv-for-linus-6.9-mw2' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Mar 2024 17:41:13 +0000 (10:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Mar 2024 17:41:13 +0000 (10:41 -0700)
Pull RISC-V updates from Palmer Dabbelt:

 - Support for various vector-accelerated crypto routines

 - Hibernation is now enabled for portable kernel builds

 - mmap_rnd_bits_max is larger on systems with larger VAs

 - Support for fast GUP

 - Support for membarrier-based instruction cache synchronization

 - Support for the Andes hart-level interrupt controller and PMU

 - Some cleanups around unaligned access speed probing and Kconfig
   settings

 - Support for ACPI LPI and CPPC

 - Various cleanus related to barriers

 - A handful of fixes

* tag 'riscv-for-linus-6.9-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (66 commits)
  riscv: Fix syscall wrapper for >word-size arguments
  crypto: riscv - add vector crypto accelerated AES-CBC-CTS
  crypto: riscv - parallelize AES-CBC decryption
  riscv: Only flush the mm icache when setting an exec pte
  riscv: Use kcalloc() instead of kzalloc()
  riscv/barrier: Add missing space after ','
  riscv/barrier: Consolidate fence definitions
  riscv/barrier: Define RISCV_FULL_BARRIER
  riscv/barrier: Define __{mb,rmb,wmb}
  RISC-V: defconfig: Enable CONFIG_ACPI_CPPC_CPUFREQ
  cpufreq: Move CPPC configs to common Kconfig and add RISC-V
  ACPI: RISC-V: Add CPPC driver
  ACPI: Enable ACPI_PROCESSOR for RISC-V
  ACPI: RISC-V: Add LPI driver
  cpuidle: RISC-V: Move few functions to arch/riscv
  riscv: Introduce set_compat_task() in asm/compat.h
  riscv: Introduce is_compat_thread() into compat.h
  riscv: add compile-time test into is_compat_task()
  riscv: Replace direct thread flag check with is_compat_task()
  riscv: Improve arch_get_mmap_end() macro
  ...

26 files changed:
1  2 
Documentation/devicetree/bindings/riscv/cpus.yaml
MAINTAINERS
arch/riscv/Kconfig
arch/riscv/boot/dts/renesas/r9a07g043f.dtsi
arch/riscv/include/asm/bitops.h
arch/riscv/include/asm/cpufeature.h
arch/riscv/include/asm/hwcap.h
arch/riscv/include/asm/pgtable.h
arch/riscv/include/asm/suspend.h
arch/riscv/include/asm/tlb.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/cpufeature.c
arch/riscv/kernel/smpboot.c
arch/riscv/kernel/suspend.c
arch/riscv/lib/csum.c
arch/riscv/mm/init.c
crypto/Kconfig
drivers/acpi/Kconfig
drivers/cpufreq/Kconfig.arm
drivers/perf/Kconfig
drivers/perf/riscv_pmu_sbi.c
include/linux/mm.h
init/Kconfig
kernel/sched/core.c
kernel/sched/membarrier.c
mm/mmap.c

index b252c3966b8bf000cc75a68a79a551e1a8c554d2,6ccd75cbbc59d17579a44420ffd96ecdef8f69fe..d87dd50f1a4b577f525353660cb5fe82493b52f4
@@@ -75,10 -75,6 +75,10 @@@ properties
        - riscv,sv57
        - riscv,none
  
 +  reg:
 +    description:
 +      The hart ID of this CPU node.
 +
    riscv,cbom-block-size:
      $ref: /schemas/types.yaml#/definitions/uint32
      description:
          const: 1
  
        compatible:
-         const: riscv,cpu-intc
+         oneOf:
+           - items:
+               - const: andestech,cpu-intc
+               - const: riscv,cpu-intc
+           - const: riscv,cpu-intc
  
        interrupt-controller: true
  
diff --combined MAINTAINERS
index de6a64b248ae73950f69d7adfb7dab0ebf0bc50c,cc80968ec355d15185cdd5ff43c253ddbe3e400a..aa3b947fb0801dc9de9365c1d61ca4a0733431d2
@@@ -24,7 -24,7 +24,7 @@@ Descriptions of section entries and pre
           filing info, a direct bug tracker link, or a mailto: URI.
        C: URI for *chat* protocol, server and channel where developers
           usually hang out, for example irc://server/channel.
 -      P: Subsystem Profile document for more details submitting
 +      P: *Subsystem Profile* document for more details submitting
           patches to the given subsystem. This is either an in-tree file,
           or a URI. See Documentation/maintainer/maintainer-entry-profile.rst
           for details.
@@@ -579,12 -579,6 +579,12 @@@ F:       drivers/iio/accel/adxl372.
  F:    drivers/iio/accel/adxl372_i2c.c
  F:    drivers/iio/accel/adxl372_spi.c
  
 +AF8133J THREE-AXIS MAGNETOMETER DRIVER
 +M:    OndÅ™ej Jirman <megi@xff.cz>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml
 +F:    drivers/iio/magnetometer/af8133j.c
 +
  AF9013 MEDIA DRIVER
  L:    linux-media@vger.kernel.org
  S:    Orphan
@@@ -620,7 -614,7 +620,7 @@@ AGPGART DRIVE
  M:    David Airlie <airlied@redhat.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Maintained
 -T:    git git://anongit.freedesktop.org/drm/drm
 +T:    git https://gitlab.freedesktop.org/drm/kernel.git
  F:    drivers/char/agp/
  F:    include/linux/agp*
  F:    include/uapi/linux/agp*
@@@ -903,12 -897,6 +903,12 @@@ Q:       https://patchwork.kernel.org/project
  F:    drivers/infiniband/hw/efa/
  F:    include/uapi/rdma/efa-abi.h
  
 +AMD ADDRESS TRANSLATION LIBRARY (ATL)
 +M:    Yazen Ghannam <Yazen.Ghannam@amd.com>
 +L:    linux-edac@vger.kernel.org
 +S:    Supported
 +F:    drivers/ras/amd/atl/*
 +
  AMD AXI W1 DRIVER
  M:    Kris Chaplin <kris.chaplin@amd.com>
  R:    Thomas Delev <thomas.delev@amd.com>
@@@ -1070,7 -1058,7 +1070,7 @@@ F:      include/linux/amd-pstate.
  F:    tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
  
  AMD PTDMA DRIVER
 -M:    Sanjay R Mehta <sanju.mehta@amd.com>
 +M:    Basavaraj Natikar <Basavaraj.Natikar@amd.com>
  L:    dmaengine@vger.kernel.org
  S:    Maintained
  F:    drivers/dma/ptdma/
@@@ -1110,14 -1098,6 +1110,14 @@@ F:    Documentation/devicetree/bindings/pe
  F:    drivers/perf/amlogic/
  F:    include/soc/amlogic/
  
 +AMPHENOL CHIPCAP 2 HUMIDITY-TEMPERATURE IIO DRIVER
 +M:    Javier Carrasco <javier.carrasco.cruz@gmail.com>
 +L:    linux-hwmon@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
 +F:    Documentation/hwmon/chipcap2.rst
 +F:    drivers/hwmon/chipcap2.c
 +
  AMPHION VPU CODEC V4L2 DRIVER
  M:    Ming Qian <ming.qian@nxp.com>
  M:    Zhou Peng <eagle.zhou@nxp.com>
@@@ -1164,7 -1144,7 +1164,7 @@@ L:      linux-iio@vger.kernel.or
  S:    Supported
  W:    http://ez.analog.com/community/linux-device-drivers
  F:    Documentation/devicetree/bindings/iio/adc/adi,ad7091r*
 -F:    drivers/iio/adc/drivers/iio/adc/ad7091r*
 +F:    drivers/iio/adc/ad7091r*
  
  ANALOG DEVICES INC AD7192 DRIVER
  M:    Alexandru Tachici <alexandru.tachici@analog.com>
@@@ -1287,14 -1267,6 +1287,14 @@@ W:    https://ez.analog.com/linux-software
  F:    Documentation/devicetree/bindings/hwmon/adi,adm1177.yaml
  F:    drivers/hwmon/adm1177.c
  
 +ANALOG DEVICES INC ADMFM2000 DRIVER
 +M:    Kim Seer Paller <kimseer.paller@analog.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Supported
 +W:    https://ez.analog.com/linux-software-drivers
 +F:    Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml
 +F:    drivers/iio/frequency/admfm2000.c
 +
  ANALOG DEVICES INC ADMV1013 DRIVER
  M:    Antoniu Miclaus <antoniu.miclaus@analog.com>
  L:    linux-iio@vger.kernel.org
@@@ -1412,9 -1384,17 +1412,9 @@@ F:     drivers/iio/amplifiers/hmc425a.
  F:    drivers/staging/iio/*/ad*
  X:    drivers/iio/*/adjd*
  
 -ANALOG DEVICES INC MAX31760 DRIVER
 -M:    Ibrahim Tilki <Ibrahim.Tilki@analog.com>
 -S:    Maintained
 -W:    http://wiki.analog.com/
 -W:    https://ez.analog.com/linux-software-drivers
 -F:    Documentation/devicetree/bindings/hwmon/adi,max31760.yaml
 -F:    Documentation/hwmon/max31760.rst
 -F:    drivers/hwmon/max31760.c
 -
  ANALOGBITS PLL LIBRARIES
  M:    Paul Walmsley <paul.walmsley@sifive.com>
 +M:    Samuel Holland <samuel.holland@sifive.com>
  S:    Supported
  F:    drivers/clk/analogbits/*
  F:    include/linux/clk/analogbits*
@@@ -2176,7 -2156,7 +2176,7 @@@ M:      Shawn Guo <shawnguo@kernel.org
  M:    Sascha Hauer <s.hauer@pengutronix.de>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  R:    Fabio Estevam <festevam@gmail.com>
 -R:    NXP Linux Team <linux-imx@nxp.com>
 +L:    imx@lists.linux.dev
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
@@@ -2377,8 -2357,8 +2377,8 @@@ M:      Sean Wang <sean.wang@mediatek.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/devicetree/bindings/rtc/rtc-mt2712.txt
 -F:    Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
 +F:    Documentation/devicetree/bindings/rtc/mediatek,mt2712-rtc.yaml
 +F:    Documentation/devicetree/bindings/rtc/mediatek,mt7622-rtc.yaml
  F:    drivers/rtc/rtc-mt2712.c
  F:    drivers/rtc/rtc-mt6397.c
  F:    drivers/rtc/rtc-mt7622.c
@@@ -2485,7 -2465,6 +2485,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/arm/ste-*
  F:    Documentation/devicetree/bindings/arm/ux500.yaml
  F:    Documentation/devicetree/bindings/arm/ux500/
 +F:    Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml
  F:    Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml
  F:    arch/arm/boot/dts/st/ste-*
  F:    arch/arm/mach-nomadik/
@@@ -2494,7 -2473,6 +2494,7 @@@ F:      drivers/clk/clk-nomadik.
  F:    drivers/clocksource/clksrc-dbx500-prcmu.c
  F:    drivers/dma/ste_dma40*
  F:    drivers/pmdomain/st/ste-ux500-pm-domain.c
 +F:    drivers/gpio/gpio-nomadik.c
  F:    drivers/hwspinlock/u8500_hsem.c
  F:    drivers/i2c/busses/i2c-nomadik.c
  F:    drivers/iio/adc/ab8500-gpadc.c
@@@ -2564,14 -2542,13 +2564,14 @@@ F:   drivers/*/*/*wpcm
  F:    drivers/*/*wpcm*
  
  ARM/NXP S32G ARCHITECTURE
 -M:    Chester Lin <chester62515@gmail.com>
 -R:    Andreas Färber <afaerber@suse.de>
 +R:    Chester Lin <chester62515@gmail.com>
  R:    Matthias Brugger <mbrugger@suse.com>
 -R:    NXP S32 Linux Team <s32@nxp.com>
 +R:    Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>
 +L:    NXP S32 Linux Team <s32@nxp.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm64/boot/dts/freescale/s32g*.dts*
 +F:    drivers/pinctrl/nxp/
  
  ARM/Orion SoC/Technologic Systems TS-78xx platform support
  M:    Alexander Clouter <alex@digriz.org.uk>
@@@ -2617,7 -2594,6 +2617,7 @@@ F:      drivers/pci/controller/dwc/pcie-qcom
  F:    drivers/phy/qualcomm/
  F:    drivers/power/*/msm*
  F:    drivers/reset/reset-qcom-*
 +F:    drivers/rtc/rtc-pm8xxx.c
  F:    drivers/spi/spi-geni-qcom.c
  F:    drivers/spi/spi-qcom-qspi.c
  F:    drivers/spi/spi-qup.c
@@@ -2776,7 -2752,6 +2776,7 @@@ M:      Andrzej Hajda <andrzej.hajda@intel.c
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-media@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml
  F:    drivers/media/platform/samsung/s5p-mfc/
  
  ARM/SOCFPGA ARCHITECTURE
@@@ -3193,10 -3168,10 +3193,10 @@@ F:   drivers/hwmon/asus-ec-sensors.
  
  ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
  M:    Corentin Chary <corentin.chary@gmail.com>
 -L:    acpi4asus-user@lists.sourceforge.net
 +M:    Luke D. Jones <luke@ljones.dev>
  L:    platform-driver-x86@vger.kernel.org
  S:    Maintained
 -W:    http://acpi4asus.sf.net
 +W:    https://asus-linux.org/
  F:    drivers/platform/x86/asus*.c
  F:    drivers/platform/x86/eeepc*.c
  
@@@ -3207,12 -3182,6 +3207,12 @@@ S:    Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
  F:    drivers/platform/x86/asus-tf103c-dock.c
  
 +ASUS ROG RYUJIN AIO HARDWARE MONITOR DRIVER
 +M:    Aleksa Savic <savicaleksa83@gmail.com>
 +L:    linux-hwmon@vger.kernel.org
 +S:    Maintained
 +F:    drivers/hwmon/asus_rog_ryujin.c
 +
  ASUS WIRELESS RADIO CONTROL DRIVER
  M:    João Paulo Rechi Vita <jprvita@gmail.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -3407,15 -3376,11 +3407,15 @@@ F:   drivers/base/auxiliary.
  F:    include/linux/auxiliary_bus.h
  
  AUXILIARY DISPLAY DRIVERS
 -M:    Miguel Ojeda <ojeda@kernel.org>
 -S:    Maintained
 +M:    Andy Shevchenko <andy@kernel.org>
 +R:    Geert Uytterhoeven <geert@linux-m68k.org>
 +S:    Odd Fixes
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
  F:    Documentation/devicetree/bindings/auxdisplay/
  F:    drivers/auxdisplay/
  F:    include/linux/cfag12864b.h
 +F:    include/uapi/linux/map_to_14segment.h
 +F:    include/uapi/linux/map_to_7segment.h
  
  AVIA HX711 ANALOG DIGITAL CONVERTER IIO DRIVER
  M:    Andreas Klinger <ak@it-klinger.de>
@@@ -3571,7 -3536,6 +3571,7 @@@ R:      Brian Foster <bfoster@redhat.com
  L:    linux-bcachefs@vger.kernel.org
  S:    Supported
  C:    irc://irc.oftc.net/bcache
 +T:    git https://evilpiepirate.org/git/bcachefs.git
  F:    fs/bcachefs/
  
  BDISP ST MEDIA DRIVER
@@@ -3613,6 -3577,7 +3613,6 @@@ F:      include/uapi/linux/bfs_fs.
  
  BITMAP API
  M:    Yury Norov <yury.norov@gmail.com>
 -R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  R:    Rasmus Villemoes <linux@rasmusvillemoes.dk>
  S:    Maintained
  F:    include/linux/bitfield.h
@@@ -3834,7 -3799,6 +3834,7 @@@ M:      Alexei Starovoitov <ast@kernel.org
  M:    Daniel Borkmann <daniel@iogearbox.net>
  M:    Andrii Nakryiko <andrii@kernel.org>
  R:    Martin KaFai Lau <martin.lau@linux.dev>
 +R:    Eduard Zingerman <eddyz87@gmail.com>
  R:    Song Liu <song@kernel.org>
  R:    Yonghong Song <yonghong.song@linux.dev>
  R:    John Fastabend <john.fastabend@gmail.com>
@@@ -3895,7 -3859,6 +3895,7 @@@ F:      net/unix/unix_bpf.
  
  BPF [LIBRARY] (libbpf)
  M:    Andrii Nakryiko <andrii@kernel.org>
 +M:    Eduard Zingerman <eddyz87@gmail.com>
  L:    bpf@vger.kernel.org
  S:    Maintained
  F:    tools/lib/bpf/
@@@ -3953,7 -3916,6 +3953,7 @@@ F:      security/bpf
  
  BPF [SELFTESTS] (Test Runners & Infrastructure)
  M:    Andrii Nakryiko <andrii@kernel.org>
 +M:    Eduard Zingerman <eddyz87@gmail.com>
  R:    Mykola Lysenko <mykolal@fb.com>
  L:    bpf@vger.kernel.org
  S:    Maintained
@@@ -4207,14 -4169,14 +4207,14 @@@ F:   drivers/firmware/broadcom/tee_bnxt_f
  F:    drivers/net/ethernet/broadcom/bnxt/
  F:    include/linux/firmware/broadcom/tee_bnxt_fw.h
  
 -BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
 -M:    Arend van Spriel <aspriel@gmail.com>
 -M:    Franky Lin <franky.lin@broadcom.com>
 -M:    Hante Meuleman <hante.meuleman@broadcom.com>
 +BROADCOM BRCM80211 IEEE802.11 WIRELESS DRIVERS
 +M:    Arend van Spriel <arend.vanspriel@broadcom.com>
  L:    linux-wireless@vger.kernel.org
 +L:    brcm80211@lists.linux.dev
  L:    brcm80211-dev-list.pdl@broadcom.com
  S:    Supported
  F:    drivers/net/wireless/broadcom/brcm80211/
 +F:    include/linux/platform_data/brcmfmac.h
  
  BROADCOM BRCMSTB GPIO DRIVER
  M:    Doug Berger <opendmb@gmail.com>
@@@ -4585,7 -4547,7 +4585,7 @@@ F:      drivers/net/ieee802154/ca8210.
  
  CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
  M:    David Howells <dhowells@redhat.com>
 -L:    linux-cachefs@redhat.com (moderated for non-subscribers)
 +L:    netfs@lists.linux.dev
  S:    Supported
  F:    Documentation/filesystems/caching/cachefiles.rst
  F:    fs/cachefiles/
@@@ -4667,8 -4629,8 +4667,8 @@@ S:      Maintaine
  F:    net/sched/sch_cake.c
  
  CAN NETWORK DRIVERS
 -M:    Wolfgang Grandegger <wg@grandegger.com>
  M:    Marc Kleine-Budde <mkl@pengutronix.de>
 +M:    Vincent Mailhol <mailhol.vincent@wanadoo.fr>
  L:    linux-can@vger.kernel.org
  S:    Maintained
  W:    https://github.com/linux-can
@@@ -5028,12 -4990,6 +5028,12 @@@ R:    Sami Kyöstilä <skyostil@chromium.o
  S:    Maintained
  F:    drivers/platform/chrome/cros_hps_i2c.c
  
 +CHROMEOS EC WATCHDOG
 +M:    Lukasz Majczak <lma@chromium.org>
 +L:    chrome-platform@lists.linux.dev
 +S:    Maintained
 +F:    drivers/watchdog/cros_ec_wdt.c
 +
  CHRONTEL CH7322 CEC DRIVER
  M:    Joe Tessler <jrt@google.com>
  L:    linux-media@vger.kernel.org
@@@ -5058,7 -5014,6 +5058,7 @@@ F:      include/linux/mfd/cs42l43
  F:    include/sound/cs*
  F:    sound/pci/hda/cirrus*
  F:    sound/pci/hda/cs*
 +F:    sound/pci/hda/hda_component*
  F:    sound/pci/hda/hda_cs_dsp_ctl.*
  F:    sound/soc/codecs/cs*
  
@@@ -5284,7 -5239,6 +5284,7 @@@ R:      Paulo Alcantara <pc@manguebit.com> (
  R:    Ronnie Sahlberg <ronniesahlberg@gmail.com> (directory leases, sparse files)
  R:    Shyam Prasad N <sprasad@microsoft.com> (multichannel)
  R:    Tom Talpey <tom@talpey.com> (RDMA, smbdirect)
 +R:    Bharath SM <bharathsm@microsoft.com> (deferred close, directory leases)
  L:    linux-cifs@vger.kernel.org
  L:    samba-technical@lists.samba.org (moderated for non-subscribers)
  S:    Supported
@@@ -5335,7 -5289,6 +5335,7 @@@ M:      Dan Williams <dan.j.williams@intel.c
  L:    linux-cxl@vger.kernel.org
  S:    Maintained
  F:    drivers/cxl/
 +F:    include/linux/cxl-einj.h
  F:    include/linux/cxl-event.h
  F:    include/uapi/linux/cxl_mem.h
  F:    tools/testing/cxl/
@@@ -5425,12 -5378,11 +5425,12 @@@ CONTROL GROUP - MEMORY RESOURCE CONTROL
  M:    Johannes Weiner <hannes@cmpxchg.org>
  M:    Michal Hocko <mhocko@kernel.org>
  M:    Roman Gushchin <roman.gushchin@linux.dev>
 -M:    Shakeel Butt <shakeelb@google.com>
 +M:    Shakeel Butt <shakeel.butt@linux.dev>
  R:    Muchun Song <muchun.song@linux.dev>
  L:    cgroups@vger.kernel.org
  L:    linux-mm@kvack.org
  S:    Maintained
 +F:    include/linux/memcontrol.h
  F:    mm/memcontrol.c
  F:    mm/swap_cgroup.c
  F:    samples/cgroup/*
@@@ -5658,11 -5610,6 +5658,11 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml
  F:    drivers/net/can/ctucanfd/
  
 +CVE ASSIGNMENT CONTACT
 +M:    CVE Assignment Team <cve@kernel.org>
 +S:    Maintained
 +F:    Documentation/process/cve.rst
 +
  CW1200 WLAN driver
  S:    Orphan
  F:    drivers/net/wireless/st/cw1200/
@@@ -6011,6 -5958,7 +6011,6 @@@ S:      Maintaine
  F:    drivers/platform/x86/dell/dell-wmi-descriptor.c
  
  DELL WMI HARDWARE PRIVACY SUPPORT
 -M:    Perry Yuan <Perry.Yuan@dell.com>
  L:    Dell.Client.Kernel@dell.com
  L:    platform-driver-x86@vger.kernel.org
  S:    Maintained
@@@ -6171,14 -6119,6 +6171,14 @@@ F:    include/linux/device-mapper.
  F:    include/linux/dm-*.h
  F:    include/uapi/linux/dm-*.h
  
 +DEVICE-MAPPER VDO TARGET
 +M:    Matthew Sakai <msakai@redhat.com>
 +M:    dm-devel@lists.linux.dev
 +L:    dm-devel@lists.linux.dev
 +S:    Maintained
 +F:    Documentation/admin-guide/device-mapper/vdo*.rst
 +F:    drivers/md/dm-vdo/
 +
  DEVLINK
  M:    Jiri Pirko <jiri@resnulli.us>
  L:    netdev@vger.kernel.org
@@@ -6206,16 -6146,16 +6206,16 @@@ DIALOG SEMICONDUCTOR DRIVER
  M:    Support Opensource <support.opensource@diasemi.com>
  S:    Supported
  W:    http://www.dialog-semiconductor.com/products
 -F:    Documentation/devicetree/bindings/input/da90??-onkey.txt
  F:    Documentation/devicetree/bindings/input/dlg,da72??.txt
 +F:    Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
  F:    Documentation/devicetree/bindings/mfd/da90*.txt
  F:    Documentation/devicetree/bindings/mfd/dlg,da90*.yaml
  F:    Documentation/devicetree/bindings/regulator/da92*.txt
  F:    Documentation/devicetree/bindings/regulator/dlg,da9*.yaml
  F:    Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml
  F:    Documentation/devicetree/bindings/sound/da[79]*.txt
 -F:    Documentation/devicetree/bindings/thermal/da90??-thermal.txt
 -F:    Documentation/devicetree/bindings/watchdog/dlg,da90??-watchdog.yaml
 +F:    Documentation/devicetree/bindings/thermal/dlg,da9062-thermal.yaml
 +F:    Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
  F:    Documentation/hwmon/da90??.rst
  F:    drivers/gpio/gpio-da90??.c
  F:    drivers/hwmon/da90??-hwmon.c
@@@ -6433,7 -6373,6 +6433,7 @@@ L:      linux-doc@vger.kernel.or
  S:    Maintained
  F:    Documentation/admin-guide/quickly-build-trimmed-linux.rst
  F:    Documentation/admin-guide/reporting-issues.rst
 +F:    Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
  
  DOCUMENTATION SCRIPTS
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
@@@ -7053,7 -6992,7 +7053,7 @@@ L:      dri-devel@lists.freedesktop.or
  S:    Maintained
  B:    https://gitlab.freedesktop.org/drm
  C:    irc://irc.oftc.net/dri-devel
 -T:    git git://anongit.freedesktop.org/drm/drm
 +T:    git https://gitlab.freedesktop.org/drm/kernel.git
  F:    Documentation/devicetree/bindings/display/
  F:    Documentation/devicetree/bindings/gpu/
  F:    Documentation/gpu/
@@@ -7087,7 -7026,7 +7087,7 @@@ X:      drivers/gpu/drm/mediatek
  X:    drivers/gpu/drm/msm/
  X:    drivers/gpu/drm/nouveau/
  X:    drivers/gpu/drm/radeon/
 -X:    drivers/gpu/drm/renesas/
 +X:    drivers/gpu/drm/renesas/rcar-du/
  X:    drivers/gpu/drm/tegra/
  
  DRM DRIVERS FOR ALLWINNER A10
@@@ -7255,22 -7194,12 +7255,22 @@@ F:   Documentation/devicetree/bindings/di
  F:    Documentation/devicetree/bindings/display/renesas,du.yaml
  F:    drivers/gpu/drm/renesas/rcar-du/
  
 +DRM DRIVERS FOR RENESAS RZ
 +M:    Biju Das <biju.das.jz@bp.renesas.com>
 +L:    dri-devel@lists.freedesktop.org
 +L:    linux-renesas-soc@vger.kernel.org
 +S:    Maintained
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
 +F:    drivers/gpu/drm/renesas/rz-du/
 +
  DRM DRIVERS FOR RENESAS SHMOBILE
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  M:    Geert Uytterhoeven <geert+renesas@glider.be>
  L:    dri-devel@lists.freedesktop.org
  L:    linux-renesas-soc@vger.kernel.org
  S:    Supported
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
  F:    drivers/gpu/drm/renesas/shmobile/
  F:    include/linux/platform_data/shmob_drm.h
@@@ -7380,7 -7309,6 +7380,7 @@@ F:      drivers/gpu/drm/xlnx
  
  DRM GPU SCHEDULER
  M:    Luben Tuikov <ltuikov89@gmail.com>
 +M:    Matthew Brost <matthew.brost@intel.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
@@@ -7650,6 -7578,7 +7650,6 @@@ R:      Robert Richter <rric@kernel.org
  L:    linux-edac@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
 -F:    Documentation/admin-guide/ras.rst
  F:    Documentation/driver-api/edac.rst
  F:    drivers/edac/
  F:    include/linux/edac.h
@@@ -7857,8 -7786,8 +7857,8 @@@ F:      drivers/media/usb/em28xx
  
  EMMC CMDQ HOST CONTROLLER INTERFACE (CQHCI) DRIVER
  M:    Adrian Hunter <adrian.hunter@intel.com>
 -M:    Ritesh Harjani <riteshh@codeaurora.org>
 -M:    Asutosh Das <asutoshd@codeaurora.org>
 +M:    Asutosh Das <quic_asutoshd@quicinc.com>
 +R:    Ritesh Harjani <ritesh.list@gmail.com>
  L:    linux-mmc@vger.kernel.org
  S:    Supported
  F:    drivers/mmc/host/cqhci*
@@@ -7956,13 -7885,6 +7956,13 @@@ S:    Maintaine
  F:    include/linux/errseq.h
  F:    lib/errseq.c
  
 +ESD CAN NETWORK DRIVERS
 +M:    Stefan Mätje <stefan.maetje@esd.eu>
 +R:    socketcan@esd.eu
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/esd/
 +
  ESD CAN/USB DRIVERS
  M:    Frank Jungclaus <frank.jungclaus@esd.eu>
  R:    socketcan@esd.eu
@@@ -8033,13 -7955,12 +8033,13 @@@ L:   rust-for-linux@vger.kernel.or
  S:    Maintained
  F:    rust/kernel/net/phy.rs
  
 -EXEC & BINFMT API
 +EXEC & BINFMT API, ELF
  R:    Eric Biederman <ebiederm@xmission.com>
  R:    Kees Cook <keescook@chromium.org>
  L:    linux-mm@kvack.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
 +F:    Documentation/userspace-api/ELF.rst
  F:    fs/*binfmt_*.c
  F:    fs/exec.c
  F:    include/linux/binfmts.h
@@@ -8058,19 -7979,11 +8058,19 @@@ S:   Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git
  F:    fs/exfat/
  
 +EXPRESSWIRE PROTOCOL LIBRARY
 +M:    Duje Mihanović <duje.mihanovic@skole.hr>
 +L:    linux-leds@vger.kernel.org
 +S:    Maintained
 +F:    drivers/leds/leds-expresswire.c
 +F:    include/linux/leds-expresswire.h
 +
  EXT2 FILE SYSTEM
  M:    Jan Kara <jack@suse.com>
  L:    linux-ext4@vger.kernel.org
  S:    Maintained
  F:    Documentation/filesystems/ext2.rst
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git
  F:    fs/ext2/
  F:    include/linux/ext2*
  
@@@ -8247,7 -8160,6 +8247,7 @@@ F:      include/uapi/scsi/fc
  FILE LOCKING (flock() and fcntl()/lockf())
  M:    Jeff Layton <jlayton@kernel.org>
  M:    Chuck Lever <chuck.lever@oracle.com>
 +R:    Alexander Aring <alex.aring@gmail.com>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  F:    fs/fcntl.c
@@@ -8311,8 -8223,7 +8311,8 @@@ F:      include/linux/iomap.
  
  FILESYSTEMS [NETFS LIBRARY]
  M:    David Howells <dhowells@redhat.com>
 -L:    linux-cachefs@redhat.com (moderated for non-subscribers)
 +R:    Jeff Layton <jlayton@kernel.org>
 +L:    netfs@lists.linux.dev
  L:    linux-fsdevel@vger.kernel.org
  S:    Supported
  F:    Documentation/filesystems/caching/
@@@ -8578,7 -8489,7 +8578,7 @@@ FREESCALE IMX / MXC FEC DRIVE
  M:    Wei Fang <wei.fang@nxp.com>
  R:    Shenwei Wang <shenwei.wang@nxp.com>
  R:    Clark Wang <xiaoning.wang@nxp.com>
 -R:    NXP Linux Team <linux-imx@nxp.com>
 +L:    imx@lists.linux.dev
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/fsl,fec.yaml
@@@ -8613,7 -8524,7 +8613,7 @@@ F:      drivers/i2c/busses/i2c-imx.
  FREESCALE IMX LPI2C DRIVER
  M:    Dong Aisheng <aisheng.dong@nxp.com>
  L:    linux-i2c@vger.kernel.org
 -L:    linux-imx@nxp.com
 +L:    imx@lists.linux.dev
  S:    Maintained
  F:    Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
  F:    drivers/i2c/busses/i2c-imx-lpi2c.c
@@@ -8673,13 -8584,6 +8673,13 @@@ F:    Documentation/devicetree/bindings/so
  F:    drivers/soc/fsl/qe/qmc.c
  F:    include/soc/fsl/qe/qmc.h
  
 +FREESCALE QUICC ENGINE QMC HDLC DRIVER
 +M:    Herve Codina <herve.codina@bootlin.com>
 +L:    netdev@vger.kernel.org
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Maintained
 +F:    drivers/net/wan/fsl_qmc_hdlc.c
 +
  FREESCALE QUICC ENGINE TSA DRIVER
  M:    Herve Codina <herve.codina@bootlin.com>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -9001,11 -8905,6 +9001,11 @@@ F:    Documentation/i2c/muxes/i2c-mux-gpio
  F:    drivers/i2c/muxes/i2c-mux-gpio.c
  F:    include/linux/platform_data/i2c-mux-gpio.h
  
 +GENERIC GPIO RESET DRIVER
 +M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 +S:    Maintained
 +F:    drivers/reset/reset-gpio.c
 +
  GENERIC HDLC (WAN) DRIVERS
  M:    Krzysztof Halasa <khc@pm.waw.pl>
  S:    Maintained
@@@ -9076,10 -8975,9 +9076,10 @@@ F:    include/linux/string.
  F:    include/linux/string_choices.h
  F:    include/linux/string_helpers.h
  F:    lib/string.c
 +F:    lib/string_kunit.c
  F:    lib/string_helpers.c
 -F:    lib/test-string_helpers.c
 -F:    lib/test_string.c
 +F:    lib/string_helpers_kunit.c
 +F:    scripts/coccinelle/api/string_choices.cocci
  
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
@@@ -9181,7 -9079,6 +9181,7 @@@ F:      Documentation/devicetree/bindings/cl
  F:    arch/arm64/boot/dts/exynos/google/
  F:    drivers/clk/samsung/clk-gs101.c
  F:    include/dt-bindings/clock/google,gs101.h
 +K:    [gG]oogle.?[tT]ensor
  
  GPD POCKET FAN DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
@@@ -9251,7 -9148,6 +9251,7 @@@ S:      Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
  F:    Documentation/ABI/obsolete/sysfs-gpio
  F:    Documentation/ABI/testing/gpio-cdev
 +F:    Documentation/userspace-api/gpio/
  F:    drivers/gpio/gpiolib-cdev.c
  F:    include/uapi/linux/gpio.h
  F:    tools/gpio/
@@@ -9524,7 -9420,7 +9524,7 @@@ T:      git git://linuxtv.org/media_tree.gi
  F:    drivers/media/usb/hdpvr/
  
  HEWLETT PACKARD ENTERPRISE ILO CHIF DRIVER
 -M:    Matt Hsiao <matt.hsiao@hpe.com>
 +M:    Keng-Yu Lin <keng-yu.lin@hpe.com>
  S:    Supported
  F:    drivers/misc/hpilo.[ch]
  
@@@ -9894,11 -9790,10 +9894,11 @@@ F:   drivers/iio/pressure/hsc030pa
  
  HONEYWELL MPRLS0025PA PRESSURE SENSOR SERIES IIO DRIVER
  M:    Andreas Klinger <ak@it-klinger.de>
 +M:    Petre Rodan <petre.rodan@subdimension.ro>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml
 -F:    drivers/iio/pressure/mprls0025pa.c
 +F:    drivers/iio/pressure/mprls0025pa*
  
  HP BIOSCFG DRIVER
  M:    Jorge Lopez <jorge.lopez2@hp.com>
@@@ -10179,6 -10074,7 +10179,6 @@@ S:   Maintaine
  W:    https://i2c.wiki.kernel.org/
  Q:    https://patchwork.ozlabs.org/project/linux-i2c/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
 -F:    Documentation/devicetree/bindings/i2c/i2c.txt
  F:    Documentation/i2c/
  F:    drivers/i2c/*
  F:    include/dt-bindings/i2c/i2c.h
@@@ -10194,7 -10090,7 +10194,7 @@@ L:   linux-i2c@vger.kernel.or
  S:    Maintained
  W:    https://i2c.wiki.kernel.org/
  Q:    https://patchwork.ozlabs.org/project/linux-i2c/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
  F:    Documentation/devicetree/bindings/i2c/
  F:    drivers/i2c/algos/
  F:    drivers/i2c/busses/
@@@ -10386,7 -10282,7 +10386,7 @@@ F:   drivers/scsi/ibmvscsi/ibmvscsi
  F:    include/scsi/viosrp.h
  
  IBM Power Virtual SCSI Device Target Driver
 -M:    Michael Cyr <mikecyr@linux.ibm.com>
 +M:    Tyrel Datwyler <tyreld@linux.ibm.com>
  L:    linux-scsi@vger.kernel.org
  L:    target-devel@vger.kernel.org
  S:    Supported
@@@ -10398,17 -10294,12 +10398,17 @@@ M:        Nayna Jain <nayna@linux.ibm.com
  M:    Paulo Flabiano Smorigo <pfsmorigo@gmail.com>
  L:    linux-crypto@vger.kernel.org
  S:    Supported
 -F:    drivers/crypto/vmx/Kconfig
 -F:    drivers/crypto/vmx/Makefile
 -F:    drivers/crypto/vmx/aes*
 -F:    drivers/crypto/vmx/ghash*
 -F:    drivers/crypto/vmx/ppc-xlate.pl
 -F:    drivers/crypto/vmx/vmx.c
 +F:    arch/powerpc/crypto/Kconfig
 +F:    arch/powerpc/crypto/Makefile
 +F:    arch/powerpc/crypto/aes.c
 +F:    arch/powerpc/crypto/aes_cbc.c
 +F:    arch/powerpc/crypto/aes_ctr.c
 +F:    arch/powerpc/crypto/aes_xts.c
 +F:    arch/powerpc/crypto/aesp8-ppc.*
 +F:    arch/powerpc/crypto/ghash.c
 +F:    arch/powerpc/crypto/ghashp8-ppc.pl
 +F:    arch/powerpc/crypto/ppc-xlate.pl
 +F:    arch/powerpc/crypto/vmx.c
  
  IBM ServeRAID RAID DRIVER
  S:    Orphan
@@@ -10491,14 -10382,6 +10491,14 @@@ L: linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/rc/iguanair.c
  
 +IIO BACKEND FRAMEWORK
 +M:    Nuno Sa <nuno.sa@analog.com>
 +R:    Olivier Moysan <olivier.moysan@foss.st.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/iio/industrialio-backend.c
 +F:    include/linux/iio/backend.h
 +
  IIO DIGITAL POTENTIOMETER DAC
  M:    Peter Rosin <peda@axentia.se>
  L:    linux-iio@vger.kernel.org
@@@ -10521,7 -10404,6 +10521,7 @@@ L:   linux-iio@vger.kernel.or
  S:    Maintained
  F:    drivers/iio/industrialio-gts-helper.c
  F:    include/linux/iio/iio-gts-helper.h
 +F:    drivers/iio/test/iio-test-gts.c
  
  IIO MULTIPLEXER
  M:    Peter Rosin <peda@axentia.se>
@@@ -10584,11 -10466,11 +10584,11 @@@ F:        drivers/media/rc/img-ir
  
  IMGTEC POWERVR DRM DRIVER
  M:    Frank Binns <frank.binns@imgtec.com>
 -M:    Donald Robson <donald.robson@imgtec.com>
  M:    Matt Coster <matt.coster@imgtec.com>
  S:    Supported
  T:    git git://anongit.freedesktop.org/drm/drm-misc
 -F:    Documentation/devicetree/bindings/gpu/img,powervr.yaml
 +F:    Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
 +F:    Documentation/devicetree/bindings/gpu/img,powervr-sgx.yaml
  F:    Documentation/gpu/imagination/
  F:    drivers/gpu/drm/imagination/
  F:    include/uapi/drm/pvr_drm.h
@@@ -10605,6 -10487,22 +10605,6 @@@ L:  linux-fbdev@vger.kernel.or
  S:    Orphan
  F:    drivers/video/fbdev/imsttfb.c
  
 -INA209 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
 -F:    Documentation/hwmon/ina209.rst
 -F:    drivers/hwmon/ina209.c
 -
 -INA2XX HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/ina2xx.rst
 -F:    drivers/hwmon/ina2xx.c
 -F:    include/linux/platform_data/ina2xx.h
 -
  INDEX OF FURTHER KERNEL DOCUMENTATION
  M:    Carlos Bilbao <carlos.bilbao@amd.com>
  S:    Maintained
@@@ -10830,7 -10728,7 +10830,7 @@@ INTEL DRM I915 DRIVER (Meteor Lake, DG
  M:    Jani Nikula <jani.nikula@linux.intel.com>
  M:    Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  M:    Rodrigo Vivi <rodrigo.vivi@intel.com>
 -M:    Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
 +M:    Tvrtko Ursulin <tursulin@ursulin.net>
  L:    intel-gfx@lists.freedesktop.org
  S:    Supported
  W:    https://drm.pages.freedesktop.org/intel-docs/
@@@ -10902,11 -10800,11 +10902,11 @@@ F:        drivers/gpio/gpio-tangier.
  
  INTEL GVT-g DRIVERS (Intel GPU Virtualization)
  M:    Zhenyu Wang <zhenyuw@linux.intel.com>
 -M:    Zhi Wang <zhi.a.wang@intel.com>
 +M:    Zhi Wang <zhi.wang.linux@gmail.com>
  L:    intel-gvt-dev@lists.freedesktop.org
  L:    intel-gfx@lists.freedesktop.org
  S:    Supported
 -W:    https://01.org/igvt-g
 +W:    https://github.com/intel/gvt-linux/wiki
  T:    git https://github.com/intel/gvt-linux.git
  F:    drivers/gpu/drm/i915/gvt/
  
@@@ -11228,6 -11126,7 +11228,6 @@@ S:   Supporte
  F:    drivers/net/wireless/intel/iwlegacy/
  
  INTEL WIRELESS WIFI LINK (iwlwifi)
 -M:    Gregory Greenman <gregory.greenman@intel.com>
  M:    Miri Korenblit <miriam.rachel.korenblit@intel.com>
  L:    linux-wireless@vger.kernel.org
  S:    Supported
@@@ -11252,16 -11151,6 +11252,16 @@@ L: netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/wwan/iosm/
  
 +INTEL(R) FLEXIBLE RETURN AND EVENT DELIVERY
 +M:    Xin Li <xin@zytor.com>
 +M:    "H. Peter Anvin" <hpa@zytor.com>
 +S:    Supported
 +F:    Documentation/arch/x86/x86_64/fred.rst
 +F:    arch/x86/entry/entry_64_fred.S
 +F:    arch/x86/entry/entry_fred.c
 +F:    arch/x86/include/asm/fred.h
 +F:    arch/x86/kernel/fred.c
 +
  INTEL(R) TRACE HUB
  M:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
  S:    Supported
@@@ -11350,6 -11239,7 +11350,6 @@@ F:   drivers/iommu
  F:    include/linux/iommu.h
  F:    include/linux/iova.h
  F:    include/linux/of_iommu.h
 -F:    include/uapi/linux/iommu.h
  
  IOMMUFD
  M:    Jason Gunthorpe <jgg@nvidia.com>
@@@ -11589,6 -11479,14 +11589,6 @@@ S:  Maintaine
  F:    arch/x86/include/asm/jailhouse_para.h
  F:    arch/x86/kernel/jailhouse.c
  
 -JC42.4 TEMPERATURE SENSOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/hwmon/jedec,jc42.yaml
 -F:    Documentation/hwmon/jc42.rst
 -F:    drivers/hwmon/jc42.c
 -
  JFS FILESYSTEM
  M:    Dave Kleikamp <shaggy@kernel.org>
  L:    jfs-discussion@lists.sourceforge.net
@@@ -11826,7 -11724,6 +11826,7 @@@ F:   fs/smb/server
  KERNEL UNIT TESTING FRAMEWORK (KUnit)
  M:    Brendan Higgins <brendanhiggins@google.com>
  M:    David Gow <davidgow@google.com>
 +R:    Rae Moar <rmoar@google.com>
  L:    linux-kselftest@vger.kernel.org
  L:    kunit-dev@googlegroups.com
  S:    Maintained
@@@ -12148,12 -12045,6 +12148,12 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
  F:    drivers/video/backlight/ktd253-backlight.c
  
 +KTD2801 BACKLIGHT DRIVER
 +M:    Duje Mihanović <duje.mihanovic@skole.hr>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml
 +F:    drivers/video/backlight/ktd2801-backlight.c
 +
  KTEST
  M:    Steven Rostedt <rostedt@goodmis.org>
  M:    John Hawley <warthog9@eaglescrag.net>
@@@ -12261,11 -12152,11 +12261,11 @@@ F:        Documentation/scsi/53c700.rs
  F:    drivers/scsi/53c700*
  
  LEAKING_ADDRESSES
 -M:    Tobin C. Harding <me@tobin.cc>
  M:    Tycho Andersen <tycho@tycho.pizza>
 +R:    Kees Cook <keescook@chromium.org>
  L:    linux-hardening@vger.kernel.org
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    scripts/leaking_addresses.pl
  
  LED SUBSYSTEM
@@@ -12491,6 -12382,7 +12491,6 @@@ F:   drivers/*/*/*pasemi
  F:    drivers/*/*pasemi*
  F:    drivers/char/tpm/tpm_ibmvtpm*
  F:    drivers/crypto/nx/
 -F:    drivers/crypto/vmx/
  F:    drivers/i2c/busses/i2c-opal.c
  F:    drivers/net/ethernet/ibm/ibmveth.*
  F:    drivers/net/ethernet/ibm/ibmvnic.*
@@@ -12618,6 -12510,7 +12618,6 @@@ F:   arch/powerpc/include/asm/livepatch.
  F:    include/linux/livepatch.h
  F:    kernel/livepatch/
  F:    kernel/module/livepatch.c
 -F:    lib/livepatch/
  F:    samples/livepatch/
  F:    tools/testing/selftests/livepatch/
  
@@@ -12658,6 -12551,13 +12658,6 @@@ F:  Documentation/hwmon/lm90.rs
  F:    drivers/hwmon/lm90.c
  F:    include/dt-bindings/thermal/lm90.h
  
 -LM95234 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/lm95234.rst
 -F:    drivers/hwmon/lm95234.c
 -
  LME2510 MEDIA DRIVER
  M:    Malcolm Priestley <tvboxspy@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -12861,13 -12761,12 +12861,13 @@@ W:        https://ez.analog.com/linux-software
  F:    Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
  F:    drivers/iio/temperature/ltc2983.c
  
 -LTC4261 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 +LTC4282 HARDWARE MONITOR DRIVER
 +M:    Nuno Sa <nuno.sa@analog.com>
  L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/ltc4261.rst
 -F:    drivers/hwmon/ltc4261.c
 +S:    Supported
 +F:    Documentation/devicetree/bindings/hwmon/adi,ltc4282.yaml
 +F:    Documentation/hwmon/ltc4282.rst
 +F:    drivers/hwmon/ltc4282.c
  
  LTC4286 HARDWARE MONITOR DRIVER
  M:    Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
@@@ -13003,8 -12902,6 +13003,8 @@@ M:   Alejandro Colomar <alx@kernel.org
  L:    linux-man@vger.kernel.org
  S:    Maintained
  W:    http://www.kernel.org/doc/man-pages
 +T:    git git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
 +T:    git git://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git
  
  MANAGEMENT COMPONENT TRANSPORT PROTOCOL (MCTP)
  M:    Jeremy Kerr <jk@codeconstruct.com.au>
@@@ -13156,15 -13053,6 +13156,15 @@@ L: netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/marvell/octeon_ep
  
 +MARVELL OCTEON ENDPOINT VF DRIVER
 +M:    Veerasenareddy Burru <vburru@marvell.com>
 +M:    Sathesh Edara <sedara@marvell.com>
 +M:    Shinas Rasheed <srasheed@marvell.com>
 +M:    Satananda Burla <sburla@marvell.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/marvell/octeon_ep_vf
 +
  MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER
  M:    Sunil Goutham <sgoutham@marvell.com>
  M:    Geetha sowjanya <gakula@marvell.com>
@@@ -13225,6 -13113,13 +13225,6 @@@ S:  Maintaine
  F:    Documentation/hwmon/max15301.rst
  F:    drivers/hwmon/pmbus/max15301.c
  
 -MAX16065 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/max16065.rst
 -F:    drivers/hwmon/max16065.c
 -
  MAX2175 SDR TUNER DRIVER
  M:    Ramesh Shanmugasundaram <rashanmu@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -13235,6 -13130,15 +13235,6 @@@ F:  Documentation/userspace-api/media/dr
  F:    drivers/media/i2c/max2175*
  F:    include/uapi/linux/max2175.h
  
 -MAX31827 TEMPERATURE SWITCH DRIVER
 -M:    Daniel Matyas <daniel.matyas@analog.com>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Supported
 -W:    https://ez.analog.com/linux-software-drivers
 -F:    Documentation/devicetree/bindings/hwmon/adi,max31827.yaml
 -F:    Documentation/hwmon/max31827.rst
 -F:    drivers/hwmon/max31827.c
 -
  MAX31335 RTC DRIVER
  M:    Antoniu Miclaus <antoniu.miclaus@analog.com>
  L:    linux-rtc@vger.kernel.org
@@@ -13249,6 -13153,15 +13249,6 @@@ S:  Orpha
  F:    Documentation/hwmon/max6650.rst
  F:    drivers/hwmon/max6650.c
  
 -MAX6697 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/hwmon/max6697.txt
 -F:    Documentation/hwmon/max6697.rst
 -F:    drivers/hwmon/max6697.c
 -F:    include/linux/platform_data/max6697.h
 -
  MAX9286 QUAD GMSL DESERIALIZER DRIVER
  M:    Jacopo Mondi <jacopo+renesas@jmondi.org>
  M:    Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
@@@ -13664,7 -13577,6 +13664,7 @@@ T:   git git://linuxtv.org/media_tree.gi
  F:    Documentation/devicetree/bindings/media/renesas,csi2.yaml
  F:    Documentation/devicetree/bindings/media/renesas,isp.yaml
  F:    Documentation/devicetree/bindings/media/renesas,vin.yaml
 +F:    drivers/media/platform/renesas/rcar-csi2.c
  F:    drivers/media/platform/renesas/rcar-isp.c
  F:    drivers/media/platform/renesas/rcar-vin/
  
@@@ -13752,7 -13664,7 +13752,7 @@@ L:   dmaengine@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/devicetree/bindings/dma/mtk-*
 +F:    Documentation/devicetree/bindings/dma/mediatek,*
  F:    drivers/dma/mediatek/
  
  MEDIATEK ETHERNET DRIVER
@@@ -13829,13 -13741,6 +13829,13 @@@ F: Documentation/devicetree/bindings/me
  F:    drivers/media/platform/mediatek/vcodec/
  F:    drivers/media/platform/mediatek/vpu/
  
 +MEDIATEK MIPI-CSI CDPHY DRIVER
 +M:    Julien Stephan <jstephan@baylibre.com>
 +M:    Andy Hsieh <andy.hsieh@mediatek.com>
 +S:    Supported
 +F:    Documentation/devicetree/bindings/phy/mediatek,mt8365-csi-rx.yaml
 +F:    drivers/phy/mediatek/phy-mtk-mipi-csi-0-5*
 +
  MEDIATEK MMC/SD/SDIO DRIVER
  M:    Chaotian Jing <chaotian.jing@mediatek.com>
  S:    Maintained
@@@ -14102,7 -14007,7 +14102,7 @@@ F:   include/uapi/rdma/mlx5-abi.
  
  MELLANOX MLX5 VDPA DRIVER
  M:    Dragos Tatulea <dtatulea@nvidia.com>
 -L:    virtualization@lists.linux-foundation.org
 +L:    virtualization@lists.linux.dev
  S:    Supported
  F:    drivers/vdpa/mlx5/
  
@@@ -14134,7 -14039,9 +14134,9 @@@ M:   Mathieu Desnoyers <mathieu.desnoyers
  M:    "Paul E. McKenney" <paulmck@kernel.org>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
- F:    arch/powerpc/include/asm/membarrier.h
+ F:    Documentation/scheduler/membarrier.rst
+ F:    arch/*/include/asm/membarrier.h
+ F:    arch/*/include/asm/sync_core.h
  F:    include/uapi/linux/membarrier.h
  F:    kernel/sched/membarrier.c
  
@@@ -14188,35 -14095,15 +14190,35 @@@ T:        git git://git.kernel.org/pub/scm/lin
  T:    quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
  F:    include/linux/gfp.h
  F:    include/linux/gfp_types.h
 +F:    include/linux/memfd.h
 +F:    include/linux/memory.h
  F:    include/linux/memory_hotplug.h
 +F:    include/linux/memory-tiers.h
 +F:    include/linux/mempolicy.h
 +F:    include/linux/mempool.h
 +F:    include/linux/memremap.h
  F:    include/linux/mm.h
 +F:    include/linux/mm_*.h
  F:    include/linux/mmzone.h
 +F:    include/linux/mmu_notifier.h
  F:    include/linux/pagewalk.h
  F:    include/linux/rmap.h
  F:    include/trace/events/ksm.h
  F:    mm/
  F:    tools/mm/
  F:    tools/testing/selftests/mm/
 +N:    include/linux/page[-_]*
 +
 +MEMORY MAPPING
 +M:    Andrew Morton <akpm@linux-foundation.org>
 +R:    Liam R. Howlett <Liam.Howlett@oracle.com>
 +R:    Vlastimil Babka <vbabka@suse.cz>
 +R:    Lorenzo Stoakes <lstoakes@gmail.com>
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +W:    http://www.linux-mm.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
 +F:    mm/mmap.c
  
  MEMORY TECHNOLOGY DEVICES (MTD)
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
@@@ -14345,6 -14232,7 +14347,6 @@@ F:   drivers/misc/xilinx_tmr_manager.
  
  MICROCHIP AT91 DMA DRIVERS
  M:    Ludovic Desroches <ludovic.desroches@microchip.com>
 -M:    Tudor Ambarus <tudor.ambarus@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    dmaengine@vger.kernel.org
  S:    Supported
@@@ -14393,8 -14281,9 +14395,8 @@@ F:   Documentation/devicetree/bindings/me
  F:    drivers/media/platform/microchip/microchip-csi2dc.c
  
  MICROCHIP ECC DRIVER
 -M:    Tudor Ambarus <tudor.ambarus@linaro.org>
  L:    linux-crypto@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/crypto/atmel-ecc.*
  
  MICROCHIP EIC DRIVER
@@@ -14474,7 -14363,7 +14476,7 @@@ MICROCHIP MCP16502 PMIC DRIVE
  M:    Claudiu Beznea <claudiu.beznea@tuxon.dev>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
 -F:    Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt
 +F:    Documentation/devicetree/bindings/regulator/microchip,mcp16502.yaml
  F:    drivers/regulator/mcp16502.c
  
  MICROCHIP MCP3564 ADC DRIVER
@@@ -14499,8 -14388,9 +14501,8 @@@ S:   Maintaine
  F:    drivers/mmc/host/atmel-mci.c
  
  MICROCHIP NAND DRIVER
 -M:    Tudor Ambarus <tudor.ambarus@linaro.org>
  L:    linux-mtd@lists.infradead.org
 -S:    Supported
 +S:    Orphan
  F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
  F:    drivers/mtd/nand/raw/atmel/*
  
@@@ -14512,13 -14402,6 +14514,13 @@@ F: Documentation/devicetree/bindings/nv
  F:    drivers/nvmem/microchip-otpc.c
  F:    include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
  
 +MICROCHIP PAC1934 POWER/ENERGY MONITOR DRIVER
 +M:    Marius Cristea <marius.cristea@microchip.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/iio/adc/microchip,pac1934.yaml
 +F:    drivers/iio/adc/pac1934.c
 +
  MICROCHIP PCI1XXXX GP DRIVER
  M:    Vaibhaav Ram T.L <vaibhaavram.tl@microchip.com>
  M:    Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
@@@ -14675,14 -14558,6 +14677,14 @@@ F: Documentation/driver-api/surface_agg
  F:    drivers/platform/surface/surface_dtx.c
  F:    include/uapi/linux/surface_aggregator/dtx.h
  
 +MICROSOFT SURFACE SENSOR FAN DRIVER
 +M:    Maximilian Luz <luzmaximilian@gmail.com>
 +M:    Ivor Wanders <ivor@iwanders.net>
 +L:    linux-hwmon@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/hwmon/surface_fan.rst
 +F:    drivers/hwmon/surface_fan.c
 +
  MICROSOFT SURFACE GPE LID SUPPORT DRIVER
  M:    Maximilian Luz <luzmaximilian@gmail.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -14786,17 -14661,6 +14788,17 @@@ F: arch/mips
  F:    drivers/platform/mips/
  F:    include/dt-bindings/mips/
  
 +MIPS BAIKAL-T1 PLATFORM
 +M:    Serge Semin <fancer.lancer@gmail.com>
 +L:    linux-mips@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/bus/baikal,bt1-*.yaml
 +F:    Documentation/devicetree/bindings/clock/baikal,bt1-*.yaml
 +F:    drivers/bus/bt1-*.c
 +F:    drivers/clk/baikal-t1/
 +F:    drivers/memory/bt1-l2-ctl.c
 +F:    drivers/mtd/maps/physmap-bt1-rom.[ch]
 +
  MIPS BOSTON DEVELOPMENT BOARD
  M:    Paul Burton <paulburton@kernel.org>
  L:    linux-mips@vger.kernel.org
@@@ -14917,17 -14781,6 +14919,17 @@@ W: https://linuxtv.or
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  F:    drivers/media/dvb-frontends/mn88473*
  
 +MOBILEYE MIPS SOCS
 +M:    Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
 +M:    Gregory CLEMENT <gregory.clement@bootlin.com>
 +M:    Théo Lebrun <theo.lebrun@bootlin.com>
 +L:    linux-mips@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/mips/mobileye.yaml
 +F:    arch/mips/boot/dts/mobileye/
 +F:    arch/mips/configs/eyeq5_defconfig
 +F:    arch/mips/mobileye/board-epm5.its.S
 +
  MODULE SUPPORT
  M:    Luis Chamberlain <mcgrof@kernel.org>
  L:    linux-modules@vger.kernel.org
@@@ -15209,6 -15062,15 +15211,6 @@@ M:  Samuel Mendoza-Jonas <sam@mendozajon
  S:    Maintained
  F:    net/ncsi/
  
 -NCT6775 HARDWARE MONITOR DRIVER - CORE & PLATFORM DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/nct6775.rst
 -F:    drivers/hwmon/nct6775-core.c
 -F:    drivers/hwmon/nct6775-platform.c
 -F:    drivers/hwmon/nct6775.h
 -
  NCT6775 HARDWARE MONITOR DRIVER - I2C DRIVER
  M:    Zev Weiss <zev@bewilderbeest.net>
  L:    linux-hwmon@vger.kernel.org
@@@ -15220,7 -15082,6 +15222,7 @@@ NETDEVSI
  M:    Jakub Kicinski <kuba@kernel.org>
  S:    Maintained
  F:    drivers/net/netdevsim/*
 +F:    tools/testing/selftests/drivers/net/netdevsim/*
  
  NETEM NETWORK EMULATOR
  M:    Stephen Hemminger <stephen@networkplumber.org>
@@@ -15238,6 -15099,7 +15240,6 @@@ F:   drivers/net/ethernet/neterion
  NETFILTER
  M:    Pablo Neira Ayuso <pablo@netfilter.org>
  M:    Jozsef Kadlecsik <kadlec@netfilter.org>
 -M:    Florian Westphal <fw@strlen.de>
  L:    netfilter-devel@vger.kernel.org
  L:    coreteam@netfilter.org
  S:    Maintained
@@@ -15317,7 -15179,6 +15319,7 @@@ F:   Documentation/networking/net_cacheli
  F:    drivers/connector/
  F:    drivers/net/
  F:    include/dt-bindings/net/
 +F:    include/linux/cn_proc.h
  F:    include/linux/etherdevice.h
  F:    include/linux/fcdevice.h
  F:    include/linux/fddidevice.h
@@@ -15325,7 -15186,6 +15327,7 @@@ F:   include/linux/hippidevice.
  F:    include/linux/if_*
  F:    include/linux/inetdevice.h
  F:    include/linux/netdevice.h
 +F:    include/uapi/linux/cn_proc.h
  F:    include/uapi/linux/if_*
  F:    include/uapi/linux/netdevice.h
  X:    drivers/net/wireless/
@@@ -15374,8 -15234,6 +15376,8 @@@ F:   Documentation/networking
  F:    Documentation/networking/net_cachelines/
  F:    Documentation/process/maintainer-netdev.rst
  F:    Documentation/userspace-api/netlink/
 +F:    include/linux/framer/framer-provider.h
 +F:    include/linux/framer/framer.h
  F:    include/linux/in.h
  F:    include/linux/indirect_call_wrapper.h
  F:    include/linux/net.h
@@@ -15463,7 -15321,7 +15465,7 @@@ K:   \bmdo
  NETWORKING [MPTCP]
  M:    Matthieu Baerts <matttbe@kernel.org>
  M:    Mat Martineau <martineau@kernel.org>
 -R:    Geliang Tang <geliang.tang@linux.dev>
 +R:    Geliang Tang <geliang@kernel.org>
  L:    netdev@vger.kernel.org
  L:    mptcp@lists.linux.dev
  S:    Maintained
@@@ -15569,6 -15427,7 +15571,6 @@@ M:   Ryusuke Konishi <konishi.ryusuke@gma
  L:    linux-nilfs@vger.kernel.org
  S:    Supported
  W:    https://nilfs.sourceforge.io/
 -W:    https://nilfs.osdn.jp/
  T:    git https://github.com/konis/nilfs2.git
  F:    Documentation/filesystems/nilfs2.rst
  F:    fs/nilfs2/
@@@ -15709,6 -15568,16 +15711,6 @@@ W:  https://github.com/davejiang/linux/w
  T:    git https://github.com/davejiang/linux.git
  F:    drivers/ntb/hw/intel/
  
 -NTFS FILESYSTEM
 -M:    Anton Altaparmakov <anton@tuxera.com>
 -R:    Namjae Jeon <linkinjeon@kernel.org>
 -L:    linux-ntfs-dev@lists.sourceforge.net
 -S:    Supported
 -W:    http://www.tuxera.com/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
 -F:    Documentation/filesystems/ntfs.rst
 -F:    fs/ntfs/
 -
  NTFS3 FILESYSTEM
  M:    Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
  L:    ntfs3@lists.linux.dev
@@@ -15837,7 -15706,7 +15839,7 @@@ F:   drivers/iio/gyro/fxas21002c_spi.
  NXP i.MX 7D/6SX/6UL/93 AND VF610 ADC DRIVER
  M:    Haibo Chen <haibo.chen@nxp.com>
  L:    linux-iio@vger.kernel.org
 -L:    linux-imx@nxp.com
 +L:    imx@lists.linux.dev
  S:    Maintained
  F:    Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
  F:    Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
@@@ -15874,7 -15743,7 +15876,7 @@@ F:   drivers/gpu/drm/imx/dcss
  NXP i.MX 8QXP ADC DRIVER
  M:    Cai Huoqing <cai.huoqing@linux.dev>
  M:    Haibo Chen <haibo.chen@nxp.com>
 -L:    linux-imx@nxp.com
 +L:    imx@lists.linux.dev
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
@@@ -15882,7 -15751,7 +15884,7 @@@ F:   drivers/iio/adc/imx8qxp-adc.
  
  NXP i.MX 8QXP/8QM JPEG V4L2 DRIVER
  M:    Mirela Rabulea <mirela.rabulea@nxp.com>
 -R:    NXP Linux Team <linux-imx@nxp.com>
 +L:    imx@lists.linux.dev
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
@@@ -15892,7 -15761,7 +15894,7 @@@ NXP i.MX CLOCK DRIVER
  M:    Abel Vesa <abelvesa@kernel.org>
  R:    Peng Fan <peng.fan@nxp.com>
  L:    linux-clk@vger.kernel.org
 -L:    linux-imx@nxp.com
 +L:    imx@lists.linux.dev
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git clk/imx
  F:    Documentation/devicetree/bindings/clock/imx*
@@@ -15962,14 -15831,6 +15964,14 @@@ S: Maintaine
  F:    Documentation/hwmon/nzxt-kraken2.rst
  F:    drivers/hwmon/nzxt-kraken2.c
  
 +NZXT-KRAKEN3 HARDWARE MONITORING DRIVER
 +M:    Jonas Malaco <jonas@protocubo.io>
 +M:    Aleksa Savic <savicaleksa83@gmail.com>
 +L:    linux-hwmon@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/hwmon/nzxt-kraken3.rst
 +F:    drivers/hwmon/nzxt-kraken3.c
 +
  NZXT-SMART2 HARDWARE MONITORING DRIVER
  M:    Aleksandr Mezin <mezin.alexander@gmail.com>
  L:    linux-hwmon@vger.kernel.org
@@@ -16499,8 -16360,8 +16501,8 @@@ S:   Supporte
  F:    drivers/infiniband/ulp/opa_vnic
  
  OPEN FIRMWARE AND FLATTENED DEVICE TREE
 -M:    Rob Herring <robh+dt@kernel.org>
 -M:    Frank Rowand <frowand.list@gmail.com>
 +M:    Rob Herring <robh@kernel.org>
 +M:    Saravana Kannan <saravanak@google.com>
  L:    devicetree@vger.kernel.org
  S:    Maintained
  W:    http://www.devicetree.org/
@@@ -16516,7 -16377,7 +16518,7 @@@ K:   of_overlay_fdt_appl
  K:    of_overlay_remove
  
  OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
 -M:    Rob Herring <robh+dt@kernel.org>
 +M:    Rob Herring <robh@kernel.org>
  M:    Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
  M:    Conor Dooley <conor+dt@kernel.org>
  L:    devicetree@vger.kernel.org
@@@ -16623,7 -16484,7 +16625,7 @@@ M:   Miklos Szeredi <miklos@szeredi.hu
  M:    Amir Goldstein <amir73il@gmail.com>
  L:    linux-unionfs@vger.kernel.org
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git
  F:    Documentation/filesystems/overlayfs.rst
  F:    fs/overlayfs/
  
@@@ -16861,7 -16722,6 +16863,7 @@@ F:   drivers/pci/controller/dwc/*layersca
  PCI DRIVER FOR FU740
  M:    Paul Walmsley <paul.walmsley@sifive.com>
  M:    Greentime Hu <greentime.hu@sifive.com>
 +M:    Samuel Holland <samuel.holland@sifive.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
@@@ -16974,7 -16834,6 +16976,7 @@@ F:   drivers/pci/controller/dwc/*designwa
  
  PCI DRIVER FOR TI DRA7XX/J721E
  M:    Vignesh Raghavendra <vigneshr@ti.com>
 +R:    Siddharth Vadapalli <s-vadapalli@ti.com>
  L:    linux-omap@vger.kernel.org
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -16999,8 -16858,9 +17001,8 @@@ F:   Documentation/devicetree/bindings/pc
  F:    drivers/pci/controller/pcie-xilinx-cpm.c
  
  PCI ENDPOINT SUBSYSTEM
 -M:    Lorenzo Pieralisi <lpieralisi@kernel.org>
 +M:    Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  M:    Krzysztof WilczyÅ„ski <kw@linux.com>
 -R:    Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  R:    Kishon Vijay Abraham I <kishon@kernel.org>
  L:    linux-pci@vger.kernel.org
  S:    Supported
@@@ -17096,6 -16956,7 +17098,6 @@@ F:   include/asm-generic/pci
  F:    include/linux/of_pci.h
  F:    include/linux/pci*
  F:    include/uapi/linux/pci*
 -F:    lib/pci*
  
  PCIE DRIVER FOR AMAZON ANNAPURNA LABS
  M:    Jonathan Chocron <jonnyc@amazon.com>
@@@ -17319,7 -17180,7 +17321,7 @@@ R:   John Garry <john.g.garry@oracle.com
  R:    Will Deacon <will@kernel.org>
  R:    James Clark <james.clark@arm.com>
  R:    Mike Leach <mike.leach@linaro.org>
 -R:    Leo Yan <leo.yan@linaro.org>
 +R:    Leo Yan <leo.yan@linux.dev>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    tools/build/feature/test-libopencsd.c
@@@ -17400,12 -17261,9 +17402,12 @@@ M: Shawn Guo <shawnguo@kernel.org
  M:    Jacky Bai <ping.bai@nxp.com>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  L:    linux-gpio@vger.kernel.org
 +L:    NXP S32 Linux Team <s32@nxp.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/fsl,*
 +F:    Documentation/devicetree/bindings/pinctrl/nxp,s32*
  F:    drivers/pinctrl/freescale/
 +F:    drivers/pinctrl/nxp/
  
  PIN CONTROLLER - INTEL
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
@@@ -17459,6 -17317,14 +17461,6 @@@ S:  Supporte
  F:    drivers/gpio/gpio-sama5d2-piobu.c
  F:    drivers/pinctrl/pinctrl-at91*
  
 -PIN CONTROLLER - NXP S32
 -M:    Chester Lin <clin@suse.com>
 -R:    NXP S32 Linux Team <s32@nxp.com>
 -L:    linux-gpio@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/pinctrl/nxp,s32*
 -F:    drivers/pinctrl/nxp/
 -
  PIN CONTROLLER - QUALCOMM
  M:    Bjorn Andersson <andersson@kernel.org>
  L:    linux-arm-msm@vger.kernel.org
@@@ -17475,6 -17341,7 +17477,6 @@@ F:   Documentation/devicetree/bindings/pi
  F:    drivers/pinctrl/renesas/
  
  PIN CONTROLLER - SAMSUNG
 -M:    Tomasz Figa <tomasz.figa@gmail.com>
  M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
  M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  R:    Alim Akhtar <alim.akhtar@samsung.com>
@@@ -17561,6 -17428,35 +17563,6 @@@ S:  Maintaine
  F:    Documentation/hwmon/pm6764tr.rst
  F:    drivers/hwmon/pmbus/pm6764tr.c
  
 -PMBUS HARDWARE MONITORING DRIVERS
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -W:    http://hwmon.wiki.kernel.org/
 -W:    http://www.roeck-us.net/linux/drivers/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
 -F:    Documentation/devicetree/bindings/hwmon/ltc2978.txt
 -F:    Documentation/devicetree/bindings/hwmon/max31785.txt
 -F:    Documentation/hwmon/adm1275.rst
 -F:    Documentation/hwmon/ibm-cffps.rst
 -F:    Documentation/hwmon/ir35221.rst
 -F:    Documentation/hwmon/lm25066.rst
 -F:    Documentation/hwmon/ltc2978.rst
 -F:    Documentation/hwmon/ltc3815.rst
 -F:    Documentation/hwmon/max16064.rst
 -F:    Documentation/hwmon/max20751.rst
 -F:    Documentation/hwmon/max31785.rst
 -F:    Documentation/hwmon/max34440.rst
 -F:    Documentation/hwmon/max8688.rst
 -F:    Documentation/hwmon/pmbus-core.rst
 -F:    Documentation/hwmon/pmbus.rst
 -F:    Documentation/hwmon/tps40422.rst
 -F:    Documentation/hwmon/ucd9000.rst
 -F:    Documentation/hwmon/ucd9200.rst
 -F:    Documentation/hwmon/zl6100.rst
 -F:    drivers/hwmon/pmbus/
 -F:    include/linux/pmbus.h
 -
  PMC SIERRA MaxRAID DRIVER
  L:    linux-scsi@vger.kernel.org
  S:    Orphan
@@@ -17595,7 -17491,6 +17597,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    fs/timerfd.c
  F:    include/linux/time_namespace.h
  F:    include/linux/timer*
 +F:    include/trace/events/timer*
  F:    kernel/time/*timer*
  F:    kernel/time/namespace.c
  
@@@ -17632,7 -17527,6 +17634,7 @@@ F:   Documentation/devicetree/bindings/po
  F:    drivers/power/supply/
  F:    include/linux/power/
  F:    include/linux/power_supply.h
 +F:    tools/testing/selftests/power_supply/
  
  POWERNV OPERATOR PANEL LCD DISPLAY DRIVER
  M:    Suraj Jitindar Singh <sjitindarsingh@gmail.com>
@@@ -17724,7 -17618,7 +17726,7 @@@ M:   Joel Granados <j.granados@samsung.co
  L:    linux-kernel@vger.kernel.org
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-next
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git sysctl-next
  F:    fs/proc/proc_sysctl.c
  F:    include/linux/sysctl.h
  F:    kernel/sysctl-test.c
@@@ -17782,13 -17676,6 +17784,13 @@@ F: fs/pstore
  F:    include/linux/pstore*
  K:    \b(pstore|ramoops)
  
 +PT5161L HARDWARE MONITOR DRIVER
 +M:    Cosmo Chou <cosmo.chou@quantatw.com>
 +L:    linux-hwmon@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/hwmon/pt5161l.rst
 +F:    drivers/hwmon/pt5161l.c
 +
  PTP HARDWARE CLOCK SUPPORT
  M:    Richard Cochran <richardcochran@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -18087,34 -17974,33 +18089,34 @@@ F:        drivers/media/tuners/qt1010
  
  QUALCOMM ATH12K WIRELESS DRIVER
  M:    Kalle Valo <kvalo@kernel.org>
 -M:    Jeff Johnson <quic_jjohnson@quicinc.com>
 +M:    Jeff Johnson <jjohnson@kernel.org>
  L:    ath12k@lists.infradead.org
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
  F:    drivers/net/wireless/ath/ath12k/
 +N:    ath12k
  
  QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
  M:    Kalle Valo <kvalo@kernel.org>
 -M:    Jeff Johnson <quic_jjohnson@quicinc.com>
 +M:    Jeff Johnson <jjohnson@kernel.org>
  L:    ath10k@lists.infradead.org
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
 -F:    Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
  F:    drivers/net/wireless/ath/ath10k/
 +N:    ath10k
  
  QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
  M:    Kalle Valo <kvalo@kernel.org>
 -M:    Jeff Johnson <quic_jjohnson@quicinc.com>
 +M:    Jeff Johnson <jjohnson@kernel.org>
  L:    ath11k@lists.infradead.org
  S:    Supported
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
  B:    https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
 -F:    Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
  F:    drivers/net/wireless/ath/ath11k/
 +N:    ath11k
  
  QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
  M:    Toke Høiland-Jørgensen <toke@toke.dk>
@@@ -18125,13 -18011,6 +18127,13 @@@ T: git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
  F:    drivers/net/wireless/ath/ath9k/
  
 +QUALCOMM ATHEROS QCA7K ETHERNET DRIVER
 +M:    Stefan Wahren <wahrenst@gmx.net>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/qca,qca7000.txt
 +F:    drivers/net/ethernet/qualcomm/qca*
 +
  QUALCOMM BAM-DMUX WWAN NETWORK DRIVER
  M:    Stephan Gerhold <stephan@gerhold.net>
  L:    netdev@vger.kernel.org
@@@ -18204,6 -18083,7 +18206,6 @@@ F:   drivers/net/ethernet/qualcomm/emac
  
  QUALCOMM ETHQOS ETHERNET DRIVER
  M:    Vinod Koul <vkoul@kernel.org>
 -R:    Bhupesh Sharma <bhupesh.sharma@linaro.org>
  L:    netdev@vger.kernel.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
@@@ -18475,17 -18355,11 +18477,17 @@@ M:        Tony Luck <tony.luck@intel.com
  M:    Borislav Petkov <bp@alien8.de>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
 -F:    Documentation/admin-guide/ras.rst
 +F:    Documentation/admin-guide/RAS
  F:    drivers/ras/
  F:    include/linux/ras.h
  F:    include/ras/ras_event.h
  
 +RAS FRU MEMORY POISON MANAGER (FMPM)
 +M:    Yazen Ghannam <Yazen.Ghannam@amd.com>
 +L:    linux-edac@vger.kernel.org
 +S:    Maintained
 +F:    drivers/ras/amd/fmpm.c
 +
  RC-CORE / LIRC FRAMEWORK
  M:    Sean Young <sean@mess.org>
  L:    linux-media@vger.kernel.org
@@@ -18556,7 -18430,7 +18558,7 @@@ S:   Supporte
  F:    drivers/infiniband/sw/rdmavt
  
  RDS - RELIABLE DATAGRAM SOCKETS
 -M:    Santosh Shilimkar <santosh.shilimkar@oracle.com>
 +M:    Allison Henderson <allison.henderson@oracle.com>
  L:    netdev@vger.kernel.org
  L:    linux-rdma@vger.kernel.org
  L:    rds-devel@oss.oracle.com (moderated for non-subscribers)
@@@ -18975,7 -18849,6 +18977,7 @@@ F:   Documentation/devicetree/bindings/ri
  F:    arch/riscv/boot/dts/
  X:    arch/riscv/boot/dts/allwinner/
  X:    arch/riscv/boot/dts/renesas/
 +X:    arch/riscv/boot/dts/sophgo/
  
  RISC-V PMU DRIVERS
  M:    Atish Patra <atishp@atishpatra.org>
@@@ -19224,7 -19097,6 +19226,7 @@@ F:   Documentation/rust
  F:    rust/
  F:    samples/rust/
  F:    scripts/*rust*
 +F:    tools/testing/selftests/rust/
  K:    \b(?i:rust)\b
  
  RXRPC SOCKETS (AF_RXRPC)
@@@ -19518,6 -19390,7 +19520,6 @@@ F:   drivers/media/platform/samsung/exyno
  SAMSUNG SOC CLOCK DRIVERS
  M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
  M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
 -M:    Tomasz Figa <tomasz.figa@gmail.com>
  M:    Chanwoo Choi <cw00.choi@samsung.com>
  R:    Alim Akhtar <alim.akhtar@samsung.com>
  L:    linux-samsung-soc@vger.kernel.org
@@@ -19759,7 -19632,7 +19761,7 @@@ F:   drivers/mmc/host/sdhci-of-at91.
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) NXP i.MX DRIVER
  M:    Haibo Chen <haibo.chen@nxp.com>
 -L:    linux-imx@nxp.com
 +L:    imx@lists.linux.dev
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
  F:    drivers/mmc/host/sdhci-esdhc-imx.c
@@@ -20094,15 -19967,36 +20096,15 @@@ S:        Maintaine
  F:    drivers/watchdog/simatic-ipc-wdt.c
  
  SIFIVE DRIVERS
 -M:    Palmer Dabbelt <palmer@dabbelt.com>
  M:    Paul Walmsley <paul.walmsley@sifive.com>
 +M:    Samuel Holland <samuel.holland@sifive.com>
  L:    linux-riscv@lists.infradead.org
  S:    Supported
 +F:    drivers/dma/sf-pdma/
  N:    sifive
 +K:    fu[57]40
  K:    [^@]sifive
  
 -SIFIVE CACHE DRIVER
 -M:    Conor Dooley <conor@kernel.org>
 -L:    linux-riscv@lists.infradead.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/cache/sifive,ccache0.yaml
 -F:    drivers/cache/sifive_ccache.c
 -
 -SIFIVE FU540 SYSTEM-ON-CHIP
 -M:    Paul Walmsley <paul.walmsley@sifive.com>
 -M:    Palmer Dabbelt <palmer@dabbelt.com>
 -L:    linux-riscv@lists.infradead.org
 -S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git
 -N:    fu540
 -K:    fu540
 -
 -SIFIVE PDMA DRIVER
 -M:    Green Wan <green.wan@sifive.com>
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
 -F:    drivers/dma/sf-pdma/
 -
 -
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  L:    linux-input@vger.kernel.org
@@@ -20311,8 -20205,8 +20313,8 @@@ F:   Documentation/devicetree/bindings/ne
  F:    drivers/net/ethernet/socionext/sni_ave.c
  
  SOCIONEXT (SNI) NETSEC NETWORK DRIVER
 -M:    Jassi Brar <jaswinder.singh@linaro.org>
  M:    Ilias Apalodimas <ilias.apalodimas@linaro.org>
 +M:    Masahisa Kojima <kojima.masahisa@socionext.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/socionext,synquacer-netsec.yaml
@@@ -20553,13 -20447,12 +20555,13 @@@ F:        drivers/char/sonypi.
  F:    drivers/platform/x86/sony-laptop.c
  F:    include/linux/sony-laptop.h
  
 -SOPHGO DEVICETREES
 -M:    Chao Wei <chao.wei@sophgo.com>
 +SOPHGO DEVICETREES and DRIVERS
  M:    Chen Wang <unicorn_wang@outlook.com>
 +M:    Inochi Amaoto <inochiama@outlook.com>
 +T:    git https://github.com/sophgo/linux.git
  S:    Maintained
 -F:    arch/riscv/boot/dts/sophgo/
 -F:    Documentation/devicetree/bindings/riscv/sophgo.yaml
 +N:    sophgo
 +K:    sophgo
  
  SOUND
  M:    Jaroslav Kysela <perex@perex.cz>
@@@ -20593,12 -20486,6 +20595,12 @@@ F: include/uapi/sound/compress_
  F:    sound/core/compress_offload.c
  F:    sound/soc/soc-compress.c
  
 +SOUND - CORE KUNIT TEST
 +M:    Ivan Orlov <ivan.orlov0322@gmail.com>
 +L:    linux-sound@vger.kernel.org
 +S:    Supported
 +F:    sound/core/sound_kunit.c
 +
  SOUND - DMAENGINE HELPERS
  M:    Lars-Peter Clausen <lars@metafoo.de>
  S:    Supported
@@@ -20664,7 -20551,6 +20666,7 @@@ F:   Documentation/translations/sp_SP
  
  SPARC + UltraSPARC (sparc/sparc64)
  M:    "David S. Miller" <davem@davemloft.net>
 +M:    Andreas Larsson <andreas@gaisler.com>
  L:    sparclinux@vger.kernel.org
  S:    Maintained
  Q:    http://patchwork.ozlabs.org/project/sparclinux/list/
@@@ -21051,13 -20937,6 +21053,13 @@@ S: Maintaine
  T:    git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
  F:    Documentation/devicetree/bindings/soc/starfive/
  
 +STARFIVE STARLINK PMU DRIVER
 +M:    Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
 +S:    Maintained
 +F:    Documentation/admin-guide/perf/starfive_starlink_pmu.rst
 +F:    Documentation/devicetree/bindings/perf/starfive,jh8100-starlink-pmu.yaml
 +F:    drivers/perf/starfive_starlink_pmu.c
 +
  STARFIVE TRNG DRIVER
  M:    Jia Jie Ho <jiajie.ho@starfivetech.com>
  S:    Supported
@@@ -21079,12 -20958,6 +21081,12 @@@ F: Documentation/devicetree/bindings/ph
  F:    drivers/phy/starfive/phy-jh7110-pcie.c
  F:    drivers/phy/starfive/phy-jh7110-usb.c
  
 +STARFIVE JH8100 EXTERNAL INTERRUPT CONTROLLER DRIVER
 +M:    Changhuang Liang <changhuang.liang@starfivetech.com>
 +S:    Supported
 +F:    Documentation/devicetree/bindings/interrupt-controller/starfive,jh8100-intc.yaml
 +F:    drivers/irqchip/irq-starfive-jh8100-intc.c
 +
  STATIC BRANCH/CALL
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Josh Poimboeuf <jpoimboe@kernel.org>
@@@ -21450,7 -21323,6 +21452,7 @@@ F:   drivers/clk/clk-sc[mp]i.
  F:    drivers/cpufreq/sc[mp]i-cpufreq.c
  F:    drivers/firmware/arm_scmi/
  F:    drivers/firmware/arm_scpi.c
 +F:    drivers/hwmon/scmi-hwmon.c
  F:    drivers/pmdomain/arm/
  F:    drivers/powercap/arm_scmi_powercap.c
  F:    drivers/regulator/scmi-regulator.c
@@@ -21645,7 -21517,7 +21647,7 @@@ F:   tools/testing/selftests/drivers/net/
  TECHNICAL ADVISORY BOARD PROCESS DOCS
  M:    "Theodore Ts'o" <tytso@mit.edu>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -L:    tech-board-discuss@lists.linux-foundation.org
 +L:    tech-board-discuss@lists.linux.dev
  S:    Maintained
  F:    Documentation/process/contribution-maturity-model.rst
  F:    Documentation/process/researcher-guidelines.rst
@@@ -22070,6 -21942,7 +22072,6 @@@ F:   drivers/i2c/busses/i2c-davinci.
  
  TI DAVINCI SERIES CLOCK DRIVER
  M:    David Lechner <david@lechnology.com>
 -R:    Sekhar Nori <nsekhar@ti.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/clock/ti/davinci/
  F:    drivers/clk/davinci/
@@@ -22134,14 -22007,6 +22136,14 @@@ F: Documentation/devicetree/bindings/me
  F:    drivers/media/i2c/ds90*
  F:    include/media/i2c/ds90*
  
 +TI HDC302X HUMIDITY DRIVER
 +M:    Javier Carrasco <javier.carrasco.cruz@gmail.com>
 +M:    Li peiyu <579lpy@gmail.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml
 +F:    drivers/iio/humidity/hdc3020.c
 +
  TI ICSSG ETHERNET DRIVER (ICSSG)
  R:    MD Danish Anwar <danishanwar@ti.com>
  R:    Roger Quadros <rogerq@kernel.org>
@@@ -22288,6 -22153,22 +22290,6 @@@ F:  drivers/mmc/host/renesas_sdhi
  F:    drivers/mmc/host/tmio_mmc*
  F:    include/linux/mfd/tmio.h
  
 -TMP401 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
 -F:    Documentation/hwmon/tmp401.rst
 -F:    drivers/hwmon/tmp401.c
 -
 -TMP464 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <linux@roeck-us.net>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/devicetree/bindings/hwmon/ti,tmp464.yaml
 -F:    Documentation/hwmon/tmp464.rst
 -F:    drivers/hwmon/tmp464.c
 -
  TMP513 HARDWARE MONITOR DRIVER
  M:    Eric Tremblay <etremblay@distech-controls.com>
  L:    linux-hwmon@vger.kernel.org
@@@ -22574,7 -22455,6 +22576,7 @@@ F:   include/uapi/misc/uacce
  
  UBI FILE SYSTEM (UBIFS)
  M:    Richard Weinberger <richard@nod.at>
 +R:    Zhihao Cheng <chengzhihao1@huawei.com>
  L:    linux-mtd@lists.infradead.org
  S:    Supported
  W:    http://www.linux-mtd.infradead.org/doc/ubifs.html
@@@ -22593,23 -22473,6 +22595,23 @@@ F: Documentation/block/ublk.rs
  F:    drivers/block/ublk_drv.c
  F:    include/uapi/linux/ublk_cmd.h
  
 +UBSAN
 +M:    Kees Cook <keescook@chromium.org>
 +R:    Marco Elver <elver@google.com>
 +R:    Andrey Konovalov <andreyknvl@gmail.com>
 +R:    Andrey Ryabinin <ryabinin.a.a@gmail.com>
 +L:    kasan-dev@googlegroups.com
 +L:    linux-hardening@vger.kernel.org
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
 +F:    Documentation/dev-tools/ubsan.rst
 +F:    include/linux/ubsan.h
 +F:    lib/Kconfig.ubsan
 +F:    lib/test_ubsan.c
 +F:    lib/ubsan.c
 +F:    scripts/Makefile.ubsan
 +K:    \bARCH_HAS_UBSAN\b
 +
  UCLINUX (M68KNOMMU AND COLDFIRE)
  M:    Greg Ungerer <gerg@linux-m68k.org>
  L:    linux-m68k@lists.linux-m68k.org
@@@ -22720,7 -22583,6 +22722,7 @@@ F:   drivers/ufs/host/ufs-renesas.
  
  UNSORTED BLOCK IMAGES (UBI)
  M:    Richard Weinberger <richard@nod.at>
 +R:    Zhihao Cheng <chengzhihao1@huawei.com>
  L:    linux-mtd@lists.infradead.org
  S:    Supported
  W:    http://www.linux-mtd.infradead.org/
@@@ -23000,8 -22862,9 +23002,8 @@@ S:   Maintaine
  F:    drivers/usb/typec/mux/pi3usb30532.c
  
  USB TYPEC PORT CONTROLLER DRIVERS
 -M:    Guenter Roeck <linux@roeck-us.net>
  L:    linux-usb@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/usb/typec/tcpm/
  
  USB UHCI DRIVER
@@@ -23210,11 -23073,12 +23212,11 @@@ L:        kvm@vger.kernel.or
  S:    Maintained
  F:    drivers/vfio/pci/mlx5/
  
 -VFIO VIRTIO PCI DRIVER
 -M:    Yishai Hadas <yishaih@nvidia.com>
 +VFIO NVIDIA GRACE GPU DRIVER
 +M:    Ankit Agrawal <ankita@nvidia.com>
  L:    kvm@vger.kernel.org
 -L:    virtualization@lists.linux-foundation.org
 -S:    Maintained
 -F:    drivers/vfio/pci/virtio
 +S:    Supported
 +F:    drivers/vfio/pci/nvgrace-gpu/
  
  VFIO PCI DEVICE SPECIFIC DRIVERS
  R:    Jason Gunthorpe <jgg@nvidia.com>
@@@ -23239,13 -23103,6 +23241,13 @@@ L: kvm@vger.kernel.or
  S:    Maintained
  F:    drivers/vfio/platform/
  
 +VFIO VIRTIO PCI DRIVER
 +M:    Yishai Hadas <yishaih@nvidia.com>
 +L:    kvm@vger.kernel.org
 +L:    virtualization@lists.linux.dev
 +S:    Maintained
 +F:    drivers/vfio/pci/virtio
 +
  VGA_SWITCHEROO
  R:    Lukas Wunner <lukas@wunner.de>
  S:    Maintained
@@@ -23599,8 -23456,8 +23601,8 @@@ F:   Documentation/driver-api/vme.rs
  F:    drivers/staging/vme_user/
  
  VMWARE BALLOON DRIVER
 -M:    Nadav Amit <namit@vmware.com>
 -R:    VMware PV-Drivers Reviewers <pv-drivers@vmware.com>
 +M:    Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
 +R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    drivers/misc/vmw_balloon.c
@@@ -24263,13 -24120,14 +24265,13 @@@ F:        drivers/net/ethernet/xilinx/xilinx_a
  
  XILINX CAN DRIVER
  M:    Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
 -R:    Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
  L:    linux-can@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/can/xilinx,can.yaml
  F:    drivers/net/can/xilinx_can.c
  
  XILINX EVENT MANAGEMENT DRIVER
 -M:    Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
 +M:    Michal Simek <michal.simek@amd.com>
  S:    Maintained
  F:    drivers/soc/xilinx/xlnx_event_manager.c
  F:    include/linux/firmware/xlnx-event-manager.h
@@@ -24299,7 -24157,7 +24301,7 @@@ XILINX SD-FEC IP CORE
  M:    Derek Kiernan <derek.kiernan@amd.com>
  M:    Dragan Cvetic <dragan.cvetic@amd.com>
  S:    Maintained
 -F:    Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
 +F:    Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml
  F:    Documentation/misc-devices/xilinx_sdfec.rst
  F:    drivers/misc/Kconfig
  F:    drivers/misc/Makefile
@@@ -24377,14 -24235,6 +24379,14 @@@ M: Harsha <harsha.harsha@amd.com
  S:    Maintained
  F:    drivers/crypto/xilinx/zynqmp-sha.c
  
 +XILINX ZYNQMP NVMEM DRIVER
 +M:    Praveen Teja Kundanala <praveen.teja.kundanala@amd.com>
 +M:    Kalyani Akula <kalyani.akula@amd.com>
 +R:    Michal Simek <michal.simek@amd.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml
 +F:    drivers/nvmem/zynqmp_nvmem.c
 +
  XILLYBUS DRIVER
  M:    Eli Billauer <eli.billauer@gmail.com>
  L:    linux-kernel@vger.kernel.org
@@@ -24491,6 -24341,13 +24493,6 @@@ T:  git git://git.kernel.org/pub/scm/lin
  F:    Documentation/filesystems/zonefs.rst
  F:    fs/zonefs/
  
 -ZPOOL COMPRESSED PAGE STORAGE API
 -M:    Dan Streetman <ddstreet@ieee.org>
 -L:    linux-mm@kvack.org
 -S:    Maintained
 -F:    include/linux/zpool.h
 -F:    mm/zpool.c
 -
  ZR36067 VIDEO FOR LINUX DRIVER
  M:    Corentin Labbe <clabbe@baylibre.com>
  L:    mjpeg-users@lists.sourceforge.net
@@@ -24539,15 -24396,11 +24541,15 @@@ ZSWAP COMPRESSED SWAP CACHIN
  M:    Johannes Weiner <hannes@cmpxchg.org>
  M:    Yosry Ahmed <yosryahmed@google.com>
  M:    Nhat Pham <nphamcs@gmail.com>
 +R:    Chengming Zhou <chengming.zhou@linux.dev>
  L:    linux-mm@kvack.org
  S:    Maintained
  F:    Documentation/admin-guide/mm/zswap.rst
 +F:    include/linux/zpool.h
  F:    include/linux/zswap.h
 +F:    mm/zpool.c
  F:    mm/zswap.c
 +F:    tools/testing/selftests/cgroup/test_zswap.c
  
  THE REST
  M:    Linus Torvalds <torvalds@linux-foundation.org>
diff --combined arch/riscv/Kconfig
index 92b1dbf55176fa1ec989a6b6567e3418a496ed13,8ebafe337eac9880970ff877065c3f7161375313..be09c8836d56be91d24a768cbe3a2411423716f6
@@@ -27,17 -27,21 +27,21 @@@ config RISC
        select ARCH_HAS_GCOV_PROFILE_ALL
        select ARCH_HAS_GIGANTIC_PAGE
        select ARCH_HAS_KCOV
+       select ARCH_HAS_MEMBARRIER_CALLBACKS
+       select ARCH_HAS_MEMBARRIER_SYNC_CORE
        select ARCH_HAS_MMIOWB
        select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
        select ARCH_HAS_PMEM_API
+       select ARCH_HAS_PREPARE_SYNC_CORE_CMD
        select ARCH_HAS_PTE_SPECIAL
        select ARCH_HAS_SET_DIRECT_MAP if MMU
        select ARCH_HAS_SET_MEMORY if MMU
        select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
        select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
+       select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
        select ARCH_HAS_SYSCALL_WRAPPER
        select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 -      select ARCH_HAS_UBSAN_SANITIZE_ALL
 +      select ARCH_HAS_UBSAN
        select ARCH_HAS_VDSO_DATA
        select ARCH_KEEP_MEMBLOCK if ACPI
        select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
@@@ -47,6 -51,9 +51,9 @@@
        select ARCH_SUPPORTS_CFI_CLANG
        select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
        select ARCH_SUPPORTS_HUGETLBFS if MMU
+       # LLD >= 14: https://github.com/llvm/llvm-project/issues/50505
+       select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
+       select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
        select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
        select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
        select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
        select HAVE_ARCH_KGDB_QXFER_PKT
        select HAVE_ARCH_MMAP_RND_BITS if MMU
        select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
+       select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_THREAD_STRUCT_WHITELIST
        select HAVE_ARCH_TRACEHOOK
        select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION
        select HAVE_EBPF_JIT if MMU
+       select HAVE_FAST_GUP if MMU
        select HAVE_FUNCTION_ARG_ACCESS_API
        select HAVE_FUNCTION_ERROR_INJECTION
        select HAVE_GCC_PLUGINS
        select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
        select HAVE_MOVE_PMD
        select HAVE_MOVE_PUD
 +      select HAVE_PAGE_SIZE_4KB
        select HAVE_PCI
        select HAVE_PERF_EVENTS
        select HAVE_PERF_REGS
        select IRQ_FORCED_THREADING
        select KASAN_VMALLOC if KASAN
        select LOCK_MM_AND_FIND_VMA
+       select MMU_GATHER_RCU_TABLE_FREE if SMP && MMU
        select MODULES_USE_ELF_RELA if MODULES
        select MODULE_SECTIONS if MODULES
        select OF
  
  config CLANG_SUPPORTS_DYNAMIC_FTRACE
        def_bool CC_IS_CLANG
 -      # https://github.com/llvm/llvm-project/commit/6ab8927931851bb42b2c93a00801dc499d7d9b1e
 -      depends on CLANG_VERSION >= 130000
        # https://github.com/ClangBuiltLinux/linux/issues/1817
        depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
  
@@@ -311,7 -322,7 +321,7 @@@ config AS_HAS_INS
        def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero)
  
  config AS_HAS_OPTION_ARCH
 -      # https://reviews.llvm.org/D123515
 +      # https://github.com/llvm/llvm-project/commit/9e8ed3403c191ab9c4903e8eeb8f732ff8a43cb4
        def_bool y
        depends on $(as-instr, .option arch$(comma) +m)
  
@@@ -576,6 -587,13 +586,13 @@@ config TOOLCHAIN_HAS_ZB
        depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
        depends on AS_HAS_OPTION_ARCH
  
+ # This symbol indicates that the toolchain supports all v1.0 vector crypto
+ # extensions, including Zvk*, Zvbb, and Zvbc.  LLVM added all of these at once.
+ # binutils added all except Zvkb, then added Zvkb.  So we just check for Zvkb.
+ config TOOLCHAIN_HAS_VECTOR_CRYPTO
+       def_bool $(as-instr, .option arch$(comma) +v$(comma) +zvkb)
+       depends on AS_HAS_OPTION_ARCH
  config RISCV_ISA_ZBB
        bool "Zbb extension support for bit manipulation instructions"
        depends on TOOLCHAIN_HAS_ZBB
@@@ -686,27 -704,61 +703,61 @@@ config THREAD_SIZE_ORDE
          affects irq stack size, which is equal to thread stack size.
  
  config RISCV_MISALIGNED
-       bool "Support misaligned load/store traps for kernel and userspace"
+       bool
        select SYSCTL_ARCH_UNALIGN_ALLOW
-       default y
        help
-         Say Y here if you want the kernel to embed support for misaligned
-         load/store for both kernel and userspace. When disable, misaligned
-         accesses will generate SIGBUS in userspace and panic in kernel.
+         Embed support for emulating misaligned loads and stores.
+ choice
+       prompt "Unaligned Accesses Support"
+       default RISCV_PROBE_UNALIGNED_ACCESS
+       help
+         This determines the level of support for unaligned accesses. This
+         information is used by the kernel to perform optimizations. It is also
+         exposed to user space via the hwprobe syscall. The hardware will be
+         probed at boot by default.
+ config RISCV_PROBE_UNALIGNED_ACCESS
+       bool "Probe for hardware unaligned access support"
+       select RISCV_MISALIGNED
+       help
+         During boot, the kernel will run a series of tests to determine the
+         speed of unaligned accesses. This probing will dynamically determine
+         the speed of unaligned accesses on the underlying system. If unaligned
+         memory accesses trap into the kernel as they are not supported by the
+         system, the kernel will emulate the unaligned accesses to preserve the
+         UABI.
+ config RISCV_EMULATED_UNALIGNED_ACCESS
+       bool "Emulate unaligned access where system support is missing"
+       select RISCV_MISALIGNED
+       help
+         If unaligned memory accesses trap into the kernel as they are not
+         supported by the system, the kernel will emulate the unaligned
+         accesses to preserve the UABI. When the underlying system does support
+         unaligned accesses, the unaligned accesses are assumed to be slow.
+ config RISCV_SLOW_UNALIGNED_ACCESS
+       bool "Assume the system supports slow unaligned memory accesses"
+       depends on NONPORTABLE
+       help
+         Assume that the system supports slow unaligned memory accesses. The
+         kernel and userspace programs may not be able to run at all on systems
+         that do not support unaligned memory accesses.
  
  config RISCV_EFFICIENT_UNALIGNED_ACCESS
-       bool "Assume the CPU supports fast unaligned memory accesses"
+       bool "Assume the system supports fast unaligned memory accesses"
        depends on NONPORTABLE
        select DCACHE_WORD_ACCESS if MMU
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
        help
-         Say Y here if you want the kernel to assume that the CPU supports
-         efficient unaligned memory accesses.  When enabled, this option
-         improves the performance of the kernel on such CPUs.  However, the
-         kernel will run much more slowly, or will not be able to run at all,
-         on CPUs that do not support efficient unaligned memory accesses.
+         Assume that the system supports fast unaligned memory accesses. When
+         enabled, this option improves the performance of the kernel on such
+         systems. However, the kernel and userspace programs will run much more
+         slowly, or will not be able to run at all, on systems that do not
+         support efficient unaligned memory accesses.
  
-         If unsure what to do here, say N.
+ endchoice
  
  endmenu # "Platform type"
  
@@@ -765,7 -817,7 +816,7 @@@ config ARCH_SUPPORTS_CRASH_DUM
        def_bool y
  
  config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
 -      def_bool CRASH_CORE
 +      def_bool CRASH_RESERVE
  
  config COMPAT
        bool "Kernel support for 32-bit U-mode"
@@@ -981,19 -1033,7 +1032,19 @@@ config RISCV_ISA_FALLBAC
  config BUILTIN_DTB
        bool "Built-in device tree"
        depends on OF && NONPORTABLE
 -      default y if XIP_KERNEL
 +      help
 +        Build a device tree into the Linux image.
 +        This option should be selected if no bootloader is being used.
 +        If unsure, say N.
 +
 +
 +config BUILTIN_DTB_SOURCE
 +      string "Built-in device tree source"
 +      depends on BUILTIN_DTB
 +      help
 +        DTS file path (without suffix, relative to arch/riscv/boot/dts)
 +        for the DTS file that will be used to produce the DTB linked into the
 +        kernel.
  
  endmenu # "Boot options"
  
@@@ -1011,11 -1051,8 +1062,8 @@@ menu "Power management options
  
  source "kernel/power/Kconfig"
  
- # Hibernation is only possible on systems where the SBI implementation has
- # marked its reserved memory as not accessible from, or does not run
- # from the same memory as, Linux
  config ARCH_HIBERNATION_POSSIBLE
-       def_bool NONPORTABLE
+       def_bool y
  
  config ARCH_HIBERNATION_HEADER
        def_bool HIBERNATION
index 09ef10b39f46cfd5313910a540908f14428177c1,d7a66043f13b95eed4d436354df284ac9975099c..f35324b9173cde4985e0eba9dc807c4bcfc7f534
@@@ -27,7 -27,7 +27,7 @@@
                        riscv,isa-base = "rv64i";
                        riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
                                               "zicntr", "zicsr", "zifencei",
-                                              "zihpm";
+                                              "zihpm", "xandespmu";
                        mmu-type = "riscv,sv39";
                        i-cache-size = <0x8000>;
                        i-cache-line-size = <0x40>;
  
                        cpu0_intc: interrupt-controller {
                                #interrupt-cells = <1>;
-                               compatible = "riscv,cpu-intc";
+                               compatible = "andestech,cpu-intc", "riscv,cpu-intc";
                                interrupt-controller;
                        };
                };
        };
  };
  
 +&pinctrl {
 +      gpio-ranges = <&pinctrl 0 0 232>;
 +};
 +
  &soc {
        dma-noncoherent;
        interrupt-parent = <&plic>;
index 329d8244a9b3fd516104808db5a959acfb469b22,c4c2173dfe996aeabba1375c8c0f8bec069ec537..880606b0469a83bc97d864da9235ce29b5807970
  #include <asm-generic/bitops/fls.h>
  
  #else
+ #define __HAVE_ARCH___FFS
+ #define __HAVE_ARCH___FLS
+ #define __HAVE_ARCH_FFS
+ #define __HAVE_ARCH_FLS
+ #include <asm-generic/bitops/__ffs.h>
+ #include <asm-generic/bitops/__fls.h>
+ #include <asm-generic/bitops/ffs.h>
+ #include <asm-generic/bitops/fls.h>
  #include <asm/alternative-macros.h>
  #include <asm/hwcap.h>
  
@@@ -37,9 -47,7 +47,7 @@@
  
  static __always_inline unsigned long variable__ffs(unsigned long word)
  {
-       int num;
 -      asm_volatile_goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
 +      asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
                                      RISCV_ISA_EXT_ZBB, 1)
                          : : : : legacy);
  
        return word;
  
  legacy:
-       num = 0;
- #if BITS_PER_LONG == 64
-       if ((word & 0xffffffff) == 0) {
-               num += 32;
-               word >>= 32;
-       }
- #endif
-       if ((word & 0xffff) == 0) {
-               num += 16;
-               word >>= 16;
-       }
-       if ((word & 0xff) == 0) {
-               num += 8;
-               word >>= 8;
-       }
-       if ((word & 0xf) == 0) {
-               num += 4;
-               word >>= 4;
-       }
-       if ((word & 0x3) == 0) {
-               num += 2;
-               word >>= 2;
-       }
-       if ((word & 0x1) == 0)
-               num += 1;
-       return num;
+       return generic___ffs(word);
  }
  
  /**
@@@ -93,9 -76,7 +76,7 @@@
  
  static __always_inline unsigned long variable__fls(unsigned long word)
  {
-       int num;
 -      asm_volatile_goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
 +      asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
                                      RISCV_ISA_EXT_ZBB, 1)
                          : : : : legacy);
  
        return BITS_PER_LONG - 1 - word;
  
  legacy:
-       num = BITS_PER_LONG - 1;
- #if BITS_PER_LONG == 64
-       if (!(word & (~0ul << 32))) {
-               num -= 32;
-               word <<= 32;
-       }
- #endif
-       if (!(word & (~0ul << (BITS_PER_LONG - 16)))) {
-               num -= 16;
-               word <<= 16;
-       }
-       if (!(word & (~0ul << (BITS_PER_LONG - 8)))) {
-               num -= 8;
-               word <<= 8;
-       }
-       if (!(word & (~0ul << (BITS_PER_LONG - 4)))) {
-               num -= 4;
-               word <<= 4;
-       }
-       if (!(word & (~0ul << (BITS_PER_LONG - 2)))) {
-               num -= 2;
-               word <<= 2;
-       }
-       if (!(word & (~0ul << (BITS_PER_LONG - 1))))
-               num -= 1;
-       return num;
+       return generic___fls(word);
  }
  
  /**
  
  static __always_inline int variable_ffs(int x)
  {
-       int r;
-       if (!x)
-               return 0;
 -      asm_volatile_goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
 +      asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
                                      RISCV_ISA_EXT_ZBB, 1)
                          : : : : legacy);
  
+       if (!x)
+               return 0;
        asm volatile (".option push\n"
                      ".option arch,+zbb\n"
                      CTZW "%0, %1\n"
                      ".option pop\n"
-                     : "=r" (r) : "r" (x) :);
+                     : "=r" (x) : "r" (x) :);
  
-       return r + 1;
+       return x + 1;
  
  legacy:
-       r = 1;
-       if (!(x & 0xffff)) {
-               x >>= 16;
-               r += 16;
-       }
-       if (!(x & 0xff)) {
-               x >>= 8;
-               r += 8;
-       }
-       if (!(x & 0xf)) {
-               x >>= 4;
-               r += 4;
-       }
-       if (!(x & 3)) {
-               x >>= 2;
-               r += 2;
-       }
-       if (!(x & 1)) {
-               x >>= 1;
-               r += 1;
-       }
-       return r;
+       return generic_ffs(x);
  }
  
  /**
  
  static __always_inline int variable_fls(unsigned int x)
  {
-       int r;
-       if (!x)
-               return 0;
 -      asm_volatile_goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
 +      asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
                                      RISCV_ISA_EXT_ZBB, 1)
                          : : : : legacy);
  
+       if (!x)
+               return 0;
        asm volatile (".option push\n"
                      ".option arch,+zbb\n"
                      CLZW "%0, %1\n"
                      ".option pop\n"
-                     : "=r" (r) : "r" (x) :);
+                     : "=r" (x) : "r" (x) :);
  
-       return 32 - r;
+       return 32 - x;
  
  legacy:
-       r = 32;
-       if (!(x & 0xffff0000u)) {
-               x <<= 16;
-               r -= 16;
-       }
-       if (!(x & 0xff000000u)) {
-               x <<= 8;
-               r -= 8;
-       }
-       if (!(x & 0xf0000000u)) {
-               x <<= 4;
-               r -= 4;
-       }
-       if (!(x & 0xc0000000u)) {
-               x <<= 2;
-               r -= 2;
-       }
-       if (!(x & 0x80000000u)) {
-               x <<= 1;
-               r -= 1;
-       }
-       return r;
+       return generic_fls(x);
  }
  
  /**
index 0bd11862b7607b9ffebf8460ea6cc00cc1e4ff62,46061f5e976439d0e9c9c5a223fedde10d5a6958..3478054461510ea79abd70aa81c8d817b64ad32c
@@@ -1,6 -1,6 +1,6 @@@
  /* SPDX-License-Identifier: GPL-2.0-only */
  /*
-  * Copyright 2022-2023 Rivos, Inc
+  * Copyright 2022-2024 Rivos, Inc
   */
  
  #ifndef _ASM_CPUFEATURE_H
@@@ -28,29 -28,38 +28,38 @@@ struct riscv_isainfo 
  
  DECLARE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo);
  
- DECLARE_PER_CPU(long, misaligned_access_speed);
  /* Per-cpu ISA extensions. */
  extern struct riscv_isainfo hart_isa[NR_CPUS];
  
  void riscv_user_isa_enable(void);
  
- #ifdef CONFIG_RISCV_MISALIGNED
- bool unaligned_ctl_available(void);
- bool check_unaligned_access_emulated(int cpu);
+ #if defined(CONFIG_RISCV_MISALIGNED)
+ bool check_unaligned_access_emulated_all_cpus(void);
  void unaligned_emulation_finish(void);
+ bool unaligned_ctl_available(void);
+ DECLARE_PER_CPU(long, misaligned_access_speed);
  #else
  static inline bool unaligned_ctl_available(void)
  {
        return false;
  }
+ #endif
+ #if defined(CONFIG_RISCV_PROBE_UNALIGNED_ACCESS)
+ DECLARE_STATIC_KEY_FALSE(fast_unaligned_access_speed_key);
  
- static inline bool check_unaligned_access_emulated(int cpu)
+ static __always_inline bool has_fast_unaligned_accesses(void)
  {
-       return false;
+       return static_branch_likely(&fast_unaligned_access_speed_key);
+ }
+ #else
+ static __always_inline bool has_fast_unaligned_accesses(void)
+ {
+       if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
+               return true;
+       else
+               return false;
  }
- static inline void unaligned_emulation_finish(void) {}
  #endif
  
  unsigned long riscv_get_elf_hwcap(void);
@@@ -80,7 -89,7 +89,7 @@@ riscv_has_extension_likely(const unsign
                           "ext must be < RISCV_ISA_EXT_MAX");
  
        if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE)) {
 -              asm_volatile_goto(
 +              asm goto(
                ALTERNATIVE("j  %l[l_no]", "nop", 0, %[ext], 1)
                :
                : [ext] "i" (ext)
@@@ -103,7 -112,7 +112,7 @@@ riscv_has_extension_unlikely(const unsi
                           "ext must be < RISCV_ISA_EXT_MAX");
  
        if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE)) {
 -              asm_volatile_goto(
 +              asm goto(
                ALTERNATIVE("nop", "j   %l[l_yes]", 0, %[ext], 1)
                :
                : [ext] "i" (ext)
@@@ -135,6 -144,4 +144,4 @@@ static __always_inline bool riscv_cpu_h
        return __riscv_isa_extension_available(hart_isa[cpu].isa, ext);
  }
  
- DECLARE_STATIC_KEY_FALSE(fast_misaligned_access_speed_key);
  #endif
index 1f2d2599c655d20be6df7516382e20a7e3956301,bae7eac76c180c3b988dd277319207d11892a4a1..e17d0078a65116810cda686225c78e0ff420a603
  #define RISCV_ISA_EXT_ZFA             71
  #define RISCV_ISA_EXT_ZTSO            72
  #define RISCV_ISA_EXT_ZACAS           73
+ #define RISCV_ISA_EXT_XANDESPMU               74
  
 +#define RISCV_ISA_EXT_XLINUXENVCFG    127
 +
  #define RISCV_ISA_EXT_MAX             128
  #define RISCV_ISA_EXT_INVALID         U32_MAX
  
index 20242402fc11baa76b435be4f3872487f17d961d,b2e6965748f214d83531d1d31e315c0c26682c4f..97fcde30e2477d55f8046d844191a1e4b0ba5e1a
@@@ -84,7 -84,7 +84,7 @@@
   * Define vmemmap for pfn_to_page & page_to_pfn calls. Needed if kernel
   * is configured with CONFIG_SPARSEMEM_VMEMMAP enabled.
   */
 -#define vmemmap               ((struct page *)VMEMMAP_START)
 +#define vmemmap               ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT))
  
  #define PCI_IO_SIZE      SZ_16M
  #define PCI_IO_END       VMEMMAP_START
  #define VA_USER_SV48 (UL(1) << (VA_BITS_SV48 - 1))
  #define VA_USER_SV57 (UL(1) << (VA_BITS_SV57 - 1))
  
- #ifdef CONFIG_COMPAT
  #define MMAP_VA_BITS_64 ((VA_BITS >= VA_BITS_SV48) ? VA_BITS_SV48 : VA_BITS)
  #define MMAP_MIN_VA_BITS_64 (VA_BITS_SV39)
  #define MMAP_VA_BITS (is_compat_task() ? VA_BITS_SV32 : MMAP_VA_BITS_64)
  #define MMAP_MIN_VA_BITS (is_compat_task() ? VA_BITS_SV32 : MMAP_MIN_VA_BITS_64)
- #else
- #define MMAP_VA_BITS ((VA_BITS >= VA_BITS_SV48) ? VA_BITS_SV48 : VA_BITS)
- #define MMAP_MIN_VA_BITS (VA_BITS_SV39)
- #endif /* CONFIG_COMPAT */
  #else
  #include <asm/pgtable-32.h>
  #endif /* CONFIG_64BIT */
@@@ -241,7 -235,7 +235,7 @@@ static inline int pmd_bad(pmd_t pmd
  }
  
  #define pmd_leaf      pmd_leaf
 -static inline int pmd_leaf(pmd_t pmd)
 +static inline bool pmd_leaf(pmd_t pmd)
  {
        return pmd_present(pmd) && (pmd_val(pmd) & _PAGE_LEAF);
  }
@@@ -439,9 -433,11 +433,11 @@@ static inline pte_t pte_mkhuge(pte_t pt
        return pte;
  }
  
+ #ifdef CONFIG_RISCV_ISA_SVNAPOT
  #define pte_leaf_size(pte)    (pte_napot(pte) ?                               \
                                        napot_cont_size(napot_cont_order(pte)) :\
                                        PAGE_SIZE)
+ #endif
  
  #ifdef CONFIG_NUMA_BALANCING
  /*
@@@ -517,25 -513,23 +513,25 @@@ static inline void set_pte(pte_t *ptep
        WRITE_ONCE(*ptep, pteval);
  }
  
- void flush_icache_pte(pte_t pte);
+ void flush_icache_pte(struct mm_struct *mm, pte_t pte);
  
- static inline void __set_pte_at(pte_t *ptep, pte_t pteval)
+ static inline void __set_pte_at(struct mm_struct *mm, pte_t *ptep, pte_t pteval)
  {
        if (pte_present(pteval) && pte_exec(pteval))
-               flush_icache_pte(pteval);
+               flush_icache_pte(mm, pteval);
  
        set_pte(ptep, pteval);
  }
  
 +#define PFN_PTE_SHIFT         _PAGE_PFN_SHIFT
 +
  static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
                pte_t *ptep, pte_t pteval, unsigned int nr)
  {
        page_table_check_ptes_set(mm, ptep, pteval, nr);
  
        for (;;) {
-               __set_pte_at(ptep, pteval);
+               __set_pte_at(mm, ptep, pteval);
                if (--nr == 0)
                        break;
                ptep++;
  static inline void pte_clear(struct mm_struct *mm,
        unsigned long addr, pte_t *ptep)
  {
-       __set_pte_at(ptep, __pte(0));
+       __set_pte_at(mm, ptep, __pte(0));
  }
  
  #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS     /* defined in mm/pgtable.c */
@@@ -662,6 -656,12 +658,12 @@@ static inline int pmd_write(pmd_t pmd
        return pte_write(pmd_pte(pmd));
  }
  
+ #define pud_write pud_write
+ static inline int pud_write(pud_t pud)
+ {
+       return pte_write(pud_pte(pud));
+ }
  #define pmd_dirty pmd_dirty
  static inline int pmd_dirty(pmd_t pmd)
  {
@@@ -713,14 -713,14 +715,14 @@@ static inline void set_pmd_at(struct mm
                                pmd_t *pmdp, pmd_t pmd)
  {
        page_table_check_pmd_set(mm, pmdp, pmd);
-       return __set_pte_at((pte_t *)pmdp, pmd_pte(pmd));
+       return __set_pte_at(mm, (pte_t *)pmdp, pmd_pte(pmd));
  }
  
  static inline void set_pud_at(struct mm_struct *mm, unsigned long addr,
                                pud_t *pudp, pud_t pud)
  {
        page_table_check_pud_set(mm, pudp, pud);
-       return __set_pte_at((pte_t *)pudp, pud_pte(pud));
+       return __set_pte_at(mm, (pte_t *)pudp, pud_pte(pud));
  }
  
  #ifdef CONFIG_PAGE_TABLE_CHECK
@@@ -871,8 -871,8 +873,8 @@@ static inline pte_t pte_swp_clear_exclu
  #define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
  
  #ifdef CONFIG_COMPAT
- #define TASK_SIZE_32  (_AC(0x80000000, UL))
- #define TASK_SIZE     (test_thread_flag(TIF_32BIT) ? \
+ #define TASK_SIZE_32  (_AC(0x80000000, UL) - PAGE_SIZE)
+ #define TASK_SIZE     (is_compat_task() ? \
                         TASK_SIZE_32 : TASK_SIZE_64)
  #else
  #define TASK_SIZE     TASK_SIZE_64
index 491296a335d0ce6cd9c8f242646c3c60c762bc87,076f8a9437cf5af85defbc506c79dd8b5e47438d..4718096fa5e3fc19306239de2ecfa353fc755991
@@@ -14,7 -14,6 +14,7 @@@ struct suspend_context 
        struct pt_regs regs;
        /* Saved and restored by high-level functions */
        unsigned long scratch;
 +      unsigned long envcfg;
        unsigned long tvec;
        unsigned long ie;
  #ifdef CONFIG_MMU
@@@ -56,4 -55,7 +56,7 @@@ int hibernate_resume_nonboot_cpu_disabl
  asmlinkage void hibernate_restore_image(unsigned long resume_satp, unsigned long satp_temp,
                                        unsigned long cpu_resume);
  asmlinkage int hibernate_core_restore_code(void);
+ bool riscv_sbi_hsm_is_supported(void);
+ bool riscv_sbi_suspend_state_is_valid(u32 state);
+ int riscv_sbi_hart_suspend(u32 state);
  #endif
index 50b63b5c15bd8b19dac37176ef98c3489c837e05,a0b8b853503fe7994e1c95410f5613a9b40fefb4..1f6c38420d8e0764d74a27e870f74d055a67f08e
@@@ -10,13 -10,31 +10,31 @@@ struct mmu_gather
  
  static void tlb_flush(struct mmu_gather *tlb);
  
+ #ifdef CONFIG_MMU
+ #include <linux/swap.h>
+ /*
+  * While riscv platforms with riscv_ipi_for_rfence as true require an IPI to
+  * perform TLB shootdown, some platforms with riscv_ipi_for_rfence as false use
+  * SBI to perform TLB shootdown. To keep software pagetable walkers safe in this
+  * case we switch to RCU based table free (MMU_GATHER_RCU_TABLE_FREE). See the
+  * comment below 'ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE' in include/asm-generic/tlb.h
+  * for more details.
+  */
+ static inline void __tlb_remove_table(void *table)
+ {
+       free_page_and_swap_cache(table);
+ }
+ #endif /* CONFIG_MMU */
  #define tlb_flush tlb_flush
  #include <asm-generic/tlb.h>
  
  static inline void tlb_flush(struct mmu_gather *tlb)
  {
  #ifdef CONFIG_MMU
 -      if (tlb->fullmm || tlb->need_flush_all)
 +      if (tlb->fullmm || tlb->need_flush_all || tlb->freed_tables)
                flush_tlb_mm(tlb->mm);
        else
                flush_tlb_mm_range(tlb->mm, tlb->start, tlb->end,
index 5e591f831638f2a18aa3008edb400c6f2f0c71ca,c8085126a6f98969ec27ab46af8ca8dfe77a3bf4..81d94a8ee10f29d3104a4f82c58eba92d124c329
@@@ -7,7 -7,6 +7,7 @@@ ifdef CONFIG_FTRAC
  CFLAGS_REMOVE_ftrace.o        = $(CC_FLAGS_FTRACE)
  CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
  CFLAGS_REMOVE_sbi.o   = $(CC_FLAGS_FTRACE)
 +CFLAGS_REMOVE_return_address.o        = $(CC_FLAGS_FTRACE)
  endif
  CFLAGS_syscall_table.o        += $(call cc-option,-Wno-override-init,)
  CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
@@@ -39,7 -38,6 +39,6 @@@ extra-y += vmlinux.ld
  obj-y += head.o
  obj-y += soc.o
  obj-$(CONFIG_RISCV_ALTERNATIVE) += alternative.o
- obj-y += copy-unaligned.o
  obj-y += cpu.o
  obj-y += cpufeature.o
  obj-y += entry.o
@@@ -47,7 -45,6 +46,7 @@@ obj-y += irq.
  obj-y += process.o
  obj-y += ptrace.o
  obj-y += reset.o
 +obj-y += return_address.o
  obj-y += setup.o
  obj-y += signal.o
  obj-y += syscall_table.o
@@@ -64,6 -61,9 +63,9 @@@ obj-y += tests
  obj-$(CONFIG_MMU) += vdso.o vdso/
  
  obj-$(CONFIG_RISCV_MISALIGNED)        += traps_misaligned.o
+ obj-$(CONFIG_RISCV_MISALIGNED)        += unaligned_access_speed.o
+ obj-$(CONFIG_RISCV_PROBE_UNALIGNED_ACCESS)    += copy-unaligned.o
  obj-$(CONFIG_FPU)             += fpu.o
  obj-$(CONFIG_RISCV_ISA_V)     += vector.o
  obj-$(CONFIG_RISCV_ISA_V)     += kernel_mode_vector.o
@@@ -94,7 -94,7 +96,7 @@@ obj-$(CONFIG_KGDB)            += kgdb.
  obj-$(CONFIG_KEXEC_CORE)      += kexec_relocate.o crash_save_regs.o machine_kexec.o
  obj-$(CONFIG_KEXEC_FILE)      += elf_kexec.o machine_kexec_file.o
  obj-$(CONFIG_CRASH_DUMP)      += crash_dump.o
 -obj-$(CONFIG_CRASH_CORE)      += crash_core.o
 +obj-$(CONFIG_VMCORE_INFO)     += vmcore_info.o
  
  obj-$(CONFIG_JUMP_LABEL)      += jump_label.o
  
index 79a5a35fab964d3b54db97b5504f45f68dface11,afeae3ff43dc1f880594708444121b823ba8d7ce..3ed2359eae353f863561c02983e4e5e5bf27603d
@@@ -11,7 -11,6 +11,6 @@@
  #include <linux/cpu.h>
  #include <linux/cpuhotplug.h>
  #include <linux/ctype.h>
- #include <linux/jump_label.h>
  #include <linux/log2.h>
  #include <linux/memory.h>
  #include <linux/module.h>
  #include <asm/cacheflush.h>
  #include <asm/cpufeature.h>
  #include <asm/hwcap.h>
- #include <asm/hwprobe.h>
  #include <asm/patch.h>
  #include <asm/processor.h>
 +#include <asm/sbi.h>
  #include <asm/vector.h>
  
- #include "copy-unaligned.h"
  #define NUM_ALPHA_EXTS ('z' - 'a' + 1)
  
- #define MISALIGNED_ACCESS_JIFFIES_LG2 1
- #define MISALIGNED_BUFFER_SIZE 0x4000
- #define MISALIGNED_BUFFER_ORDER get_order(MISALIGNED_BUFFER_SIZE)
- #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80)
  unsigned long elf_hwcap __read_mostly;
  
  /* Host ISA bitmap */
@@@ -44,11 -34,6 +35,6 @@@ static DECLARE_BITMAP(riscv_isa, RISCV_
  /* Per-cpu ISA extensions. */
  struct riscv_isainfo hart_isa[NR_CPUS];
  
- /* Performance information */
- DEFINE_PER_CPU(long, misaligned_access_speed);
- static cpumask_t fast_misaligned_access;
  /**
   * riscv_isa_extension_base() - Get base extension word
   *
@@@ -202,16 -187,6 +188,16 @@@ static const unsigned int riscv_zvbb_ex
        RISCV_ISA_EXT_ZVKB
  };
  
 +/*
 + * While the [ms]envcfg CSRs were not defined until version 1.12 of the RISC-V
 + * privileged ISA, the existence of the CSRs is implied by any extension which
 + * specifies [ms]envcfg bit(s). Hence, we define a custom ISA extension for the
 + * existence of the CSR, and treat it as a subset of those other extensions.
 + */
 +static const unsigned int riscv_xlinuxenvcfg_exts[] = {
 +      RISCV_ISA_EXT_XLINUXENVCFG
 +};
 +
  /*
   * The canonical order of ISA extension names in the ISA string is defined in
   * chapter 27 of the unprivileged specification.
@@@ -261,8 -236,8 +247,8 @@@ const struct riscv_isa_ext_data riscv_i
        __RISCV_ISA_EXT_DATA(c, RISCV_ISA_EXT_c),
        __RISCV_ISA_EXT_DATA(v, RISCV_ISA_EXT_v),
        __RISCV_ISA_EXT_DATA(h, RISCV_ISA_EXT_h),
 -      __RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM),
 -      __RISCV_ISA_EXT_DATA(zicboz, RISCV_ISA_EXT_ZICBOZ),
 +      __RISCV_ISA_EXT_SUPERSET(zicbom, RISCV_ISA_EXT_ZICBOM, riscv_xlinuxenvcfg_exts),
 +      __RISCV_ISA_EXT_SUPERSET(zicboz, RISCV_ISA_EXT_ZICBOZ, riscv_xlinuxenvcfg_exts),
        __RISCV_ISA_EXT_DATA(zicntr, RISCV_ISA_EXT_ZICNTR),
        __RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND),
        __RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR),
        __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL),
        __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT),
        __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT),
+       __RISCV_ISA_EXT_DATA(xandespmu, RISCV_ISA_EXT_XANDESPMU),
  };
  
  const size_t riscv_isa_ext_count = ARRAY_SIZE(riscv_isa_ext);
@@@ -549,20 -525,6 +536,20 @@@ static void __init riscv_fill_hwcap_fro
                        set_bit(RISCV_ISA_EXT_ZIHPM, isainfo->isa);
                }
  
 +              /*
 +               * "V" in ISA strings is ambiguous in practice: it should mean
 +               * just the standard V-1.0 but vendors aren't well behaved.
 +               * Many vendors with T-Head CPU cores which implement the 0.7.1
 +               * version of the vector specification put "v" into their DTs.
 +               * CPU cores with the ratified spec will contain non-zero
 +               * marchid.
 +               */
 +              if (acpi_disabled && riscv_cached_mvendorid(cpu) == THEAD_VENDOR_ID &&
 +                  riscv_cached_marchid(cpu) == 0x0) {
 +                      this_hwcap &= ~isa2hwcap[RISCV_ISA_EXT_v];
 +                      clear_bit(RISCV_ISA_EXT_v, isainfo->isa);
 +              }
 +
                /*
                 * All "okay" hart should have same isa. Set HWCAP based on
                 * common capabilities of every "okay" hart, in case they don't
@@@ -731,251 -693,10 +718,10 @@@ unsigned long riscv_get_elf_hwcap(void
        return hwcap;
  }
  
- static int check_unaligned_access(void *param)
- {
-       int cpu = smp_processor_id();
-       u64 start_cycles, end_cycles;
-       u64 word_cycles;
-       u64 byte_cycles;
-       int ratio;
-       unsigned long start_jiffies, now;
-       struct page *page = param;
-       void *dst;
-       void *src;
-       long speed = RISCV_HWPROBE_MISALIGNED_SLOW;
-       if (check_unaligned_access_emulated(cpu))
-               return 0;
-       /* Make an unaligned destination buffer. */
-       dst = (void *)((unsigned long)page_address(page) | 0x1);
-       /* Unalign src as well, but differently (off by 1 + 2 = 3). */
-       src = dst + (MISALIGNED_BUFFER_SIZE / 2);
-       src += 2;
-       word_cycles = -1ULL;
-       /* Do a warmup. */
-       __riscv_copy_words_unaligned(dst, src, MISALIGNED_COPY_SIZE);
-       preempt_disable();
-       start_jiffies = jiffies;
-       while ((now = jiffies) == start_jiffies)
-               cpu_relax();
-       /*
-        * For a fixed amount of time, repeatedly try the function, and take
-        * the best time in cycles as the measurement.
-        */
-       while (time_before(jiffies, now + (1 << MISALIGNED_ACCESS_JIFFIES_LG2))) {
-               start_cycles = get_cycles64();
-               /* Ensure the CSR read can't reorder WRT to the copy. */
-               mb();
-               __riscv_copy_words_unaligned(dst, src, MISALIGNED_COPY_SIZE);
-               /* Ensure the copy ends before the end time is snapped. */
-               mb();
-               end_cycles = get_cycles64();
-               if ((end_cycles - start_cycles) < word_cycles)
-                       word_cycles = end_cycles - start_cycles;
-       }
-       byte_cycles = -1ULL;
-       __riscv_copy_bytes_unaligned(dst, src, MISALIGNED_COPY_SIZE);
-       start_jiffies = jiffies;
-       while ((now = jiffies) == start_jiffies)
-               cpu_relax();
-       while (time_before(jiffies, now + (1 << MISALIGNED_ACCESS_JIFFIES_LG2))) {
-               start_cycles = get_cycles64();
-               mb();
-               __riscv_copy_bytes_unaligned(dst, src, MISALIGNED_COPY_SIZE);
-               mb();
-               end_cycles = get_cycles64();
-               if ((end_cycles - start_cycles) < byte_cycles)
-                       byte_cycles = end_cycles - start_cycles;
-       }
-       preempt_enable();
-       /* Don't divide by zero. */
-       if (!word_cycles || !byte_cycles) {
-               pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n",
-                       cpu);
-               return 0;
-       }
-       if (word_cycles < byte_cycles)
-               speed = RISCV_HWPROBE_MISALIGNED_FAST;
-       ratio = div_u64((byte_cycles * 100), word_cycles);
-       pr_info("cpu%d: Ratio of byte access time to unaligned word access is %d.%02d, unaligned accesses are %s\n",
-               cpu,
-               ratio / 100,
-               ratio % 100,
-               (speed == RISCV_HWPROBE_MISALIGNED_FAST) ? "fast" : "slow");
-       per_cpu(misaligned_access_speed, cpu) = speed;
-       /*
-        * Set the value of fast_misaligned_access of a CPU. These operations
-        * are atomic to avoid race conditions.
-        */
-       if (speed == RISCV_HWPROBE_MISALIGNED_FAST)
-               cpumask_set_cpu(cpu, &fast_misaligned_access);
-       else
-               cpumask_clear_cpu(cpu, &fast_misaligned_access);
-       return 0;
- }
- static void check_unaligned_access_nonboot_cpu(void *param)
- {
-       unsigned int cpu = smp_processor_id();
-       struct page **pages = param;
-       if (smp_processor_id() != 0)
-               check_unaligned_access(pages[cpu]);
- }
- DEFINE_STATIC_KEY_FALSE(fast_misaligned_access_speed_key);
- static void modify_unaligned_access_branches(cpumask_t *mask, int weight)
- {
-       if (cpumask_weight(mask) == weight)
-               static_branch_enable_cpuslocked(&fast_misaligned_access_speed_key);
-       else
-               static_branch_disable_cpuslocked(&fast_misaligned_access_speed_key);
- }
- static void set_unaligned_access_static_branches_except_cpu(int cpu)
- {
-       /*
-        * Same as set_unaligned_access_static_branches, except excludes the
-        * given CPU from the result. When a CPU is hotplugged into an offline
-        * state, this function is called before the CPU is set to offline in
-        * the cpumask, and thus the CPU needs to be explicitly excluded.
-        */
-       cpumask_t fast_except_me;
-       cpumask_and(&fast_except_me, &fast_misaligned_access, cpu_online_mask);
-       cpumask_clear_cpu(cpu, &fast_except_me);
-       modify_unaligned_access_branches(&fast_except_me, num_online_cpus() - 1);
- }
- static void set_unaligned_access_static_branches(void)
- {
-       /*
-        * This will be called after check_unaligned_access_all_cpus so the
-        * result of unaligned access speed for all CPUs will be available.
-        *
-        * To avoid the number of online cpus changing between reading
-        * cpu_online_mask and calling num_online_cpus, cpus_read_lock must be
-        * held before calling this function.
-        */
-       cpumask_t fast_and_online;
-       cpumask_and(&fast_and_online, &fast_misaligned_access, cpu_online_mask);
-       modify_unaligned_access_branches(&fast_and_online, num_online_cpus());
- }
- static int lock_and_set_unaligned_access_static_branch(void)
- {
-       cpus_read_lock();
-       set_unaligned_access_static_branches();
-       cpus_read_unlock();
-       return 0;
- }
- arch_initcall_sync(lock_and_set_unaligned_access_static_branch);
- static int riscv_online_cpu(unsigned int cpu)
- {
-       static struct page *buf;
-       /* We are already set since the last check */
-       if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN)
-               goto exit;
-       buf = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
-       if (!buf) {
-               pr_warn("Allocation failure, not measuring misaligned performance\n");
-               return -ENOMEM;
-       }
-       check_unaligned_access(buf);
-       __free_pages(buf, MISALIGNED_BUFFER_ORDER);
- exit:
-       set_unaligned_access_static_branches();
-       return 0;
- }
- static int riscv_offline_cpu(unsigned int cpu)
- {
-       set_unaligned_access_static_branches_except_cpu(cpu);
-       return 0;
- }
- /* Measure unaligned access on all CPUs present at boot in parallel. */
- static int check_unaligned_access_all_cpus(void)
- {
-       unsigned int cpu;
-       unsigned int cpu_count = num_possible_cpus();
-       struct page **bufs = kzalloc(cpu_count * sizeof(struct page *),
-                                    GFP_KERNEL);
-       if (!bufs) {
-               pr_warn("Allocation failure, not measuring misaligned performance\n");
-               return 0;
-       }
-       /*
-        * Allocate separate buffers for each CPU so there's no fighting over
-        * cache lines.
-        */
-       for_each_cpu(cpu, cpu_online_mask) {
-               bufs[cpu] = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
-               if (!bufs[cpu]) {
-                       pr_warn("Allocation failure, not measuring misaligned performance\n");
-                       goto out;
-               }
-       }
-       /* Check everybody except 0, who stays behind to tend jiffies. */
-       on_each_cpu(check_unaligned_access_nonboot_cpu, bufs, 1);
-       /* Check core 0. */
-       smp_call_on_cpu(0, check_unaligned_access, bufs[0], true);
-       /*
-        * Setup hotplug callbacks for any new CPUs that come online or go
-        * offline.
-        */
-       cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "riscv:online",
-                                 riscv_online_cpu, riscv_offline_cpu);
- out:
-       unaligned_emulation_finish();
-       for_each_cpu(cpu, cpu_online_mask) {
-               if (bufs[cpu])
-                       __free_pages(bufs[cpu], MISALIGNED_BUFFER_ORDER);
-       }
-       kfree(bufs);
-       return 0;
- }
- arch_initcall(check_unaligned_access_all_cpus);
  void riscv_user_isa_enable(void)
  {
        if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_ZICBOZ))
 -              csr_set(CSR_SENVCFG, ENVCFG_CBZE);
 +              csr_set(CSR_ENVCFG, ENVCFG_CBZE);
  }
  
  #ifdef CONFIG_RISCV_ALTERNATIVE
index c4ed7d977f57b2c305e5ecbf2b767fd9b0c175df,cfbe4b840d422d5735ad7ebcd89f2e8efd8dc0a4..d41090fc3203533cc7e40973e3a6cae14da91c47
@@@ -28,7 -28,6 +28,6 @@@
  
  #include <asm/cpufeature.h>
  #include <asm/cpu_ops.h>
- #include <asm/cpufeature.h>
  #include <asm/irq.h>
  #include <asm/mmu_context.h>
  #include <asm/numa.h>
  
  static DECLARE_COMPLETION(cpu_running);
  
 -void __init smp_prepare_boot_cpu(void)
 -{
 -}
 -
  void __init smp_prepare_cpus(unsigned int max_cpus)
  {
        int cpuid;
index 299795341e8a2207dc922373511e31118bbd0f8b,b20f2cb5879f13863edd2bd76d95c8955192f39c..8a327b485b90e7c690d33c92b144b114b998a3a8
@@@ -15,8 -15,6 +15,8 @@@
  void suspend_save_csrs(struct suspend_context *context)
  {
        context->scratch = csr_read(CSR_SCRATCH);
 +      if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_XLINUXENVCFG))
 +              context->envcfg = csr_read(CSR_ENVCFG);
        context->tvec = csr_read(CSR_TVEC);
        context->ie = csr_read(CSR_IE);
  
@@@ -38,8 -36,6 +38,8 @@@
  void suspend_restore_csrs(struct suspend_context *context)
  {
        csr_write(CSR_SCRATCH, context->scratch);
 +      if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_XLINUXENVCFG))
 +              csr_write(CSR_ENVCFG, context->envcfg);
        csr_write(CSR_TVEC, context->tvec);
        csr_write(CSR_IE, context->ie);
  
@@@ -132,4 -128,53 +132,53 @@@ static int __init sbi_system_suspend_in
  }
  
  arch_initcall(sbi_system_suspend_init);
+ static int sbi_suspend_finisher(unsigned long suspend_type,
+                               unsigned long resume_addr,
+                               unsigned long opaque)
+ {
+       struct sbiret ret;
+       ret = sbi_ecall(SBI_EXT_HSM, SBI_EXT_HSM_HART_SUSPEND,
+                       suspend_type, resume_addr, opaque, 0, 0, 0);
+       return (ret.error) ? sbi_err_map_linux_errno(ret.error) : 0;
+ }
+ int riscv_sbi_hart_suspend(u32 state)
+ {
+       if (state & SBI_HSM_SUSP_NON_RET_BIT)
+               return cpu_suspend(state, sbi_suspend_finisher);
+       else
+               return sbi_suspend_finisher(state, 0, 0);
+ }
+ bool riscv_sbi_suspend_state_is_valid(u32 state)
+ {
+       if (state > SBI_HSM_SUSPEND_RET_DEFAULT &&
+           state < SBI_HSM_SUSPEND_RET_PLATFORM)
+               return false;
+       if (state > SBI_HSM_SUSPEND_NON_RET_DEFAULT &&
+           state < SBI_HSM_SUSPEND_NON_RET_PLATFORM)
+               return false;
+       return true;
+ }
+ bool riscv_sbi_hsm_is_supported(void)
+ {
+       /*
+        * The SBI HSM suspend function is only available when:
+        * 1) SBI version is 0.3 or higher
+        * 2) SBI HSM extension is available
+        */
+       if (sbi_spec_version < sbi_mk_version(0, 3) ||
+           !sbi_probe_extension(SBI_EXT_HSM)) {
+               pr_info("HSM suspend not available\n");
+               return false;
+       }
+       return true;
+ }
  #endif /* CONFIG_RISCV_SBI */
diff --combined arch/riscv/lib/csum.c
index 74af3ab520b6d433836930937dd90ffa2e672339,7178e0acfa22841da893fad4ae4079ccf350e44d..7fb12c59e571911e2756ce1c747fd6d4ac30fbd1
@@@ -3,7 -3,7 +3,7 @@@
   * Checksum library
   *
   * Influenced by arch/arm64/lib/csum.c
-  * Copyright (C) 2023 Rivos Inc.
+  * Copyright (C) 2023-2024 Rivos Inc.
   */
  #include <linux/bitops.h>
  #include <linux/compiler.h>
@@@ -53,7 -53,7 +53,7 @@@ __sum16 csum_ipv6_magic(const struct in
                 * support, so nop when Zbb is available and jump when Zbb is
                 * not available.
                 */
 -              asm_volatile_goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
 +              asm goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
                                              RISCV_ISA_EXT_ZBB, 1)
                                  :
                                  :
@@@ -170,7 -170,7 +170,7 @@@ do_csum_with_alignment(const unsigned c
                 * support, so nop when Zbb is available and jump when Zbb is
                 * not available.
                 */
 -              asm_volatile_goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
 +              asm goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
                                              RISCV_ISA_EXT_ZBB, 1)
                                  :
                                  :
                                  : no_zbb);
  
  #ifdef CONFIG_32BIT
 -              asm_volatile_goto(".option push                 \n\
 +              asm_goto_output(".option push                   \n\
                .option arch,+zbb                               \n\
                        rori    %[fold_temp], %[csum], 16       \n\
                        andi    %[offset], %[offset], 1         \n\
  
                return (unsigned short)csum;
  #else /* !CONFIG_32BIT */
 -              asm_volatile_goto(".option push                 \n\
 +              asm_goto_output(".option push                   \n\
                .option arch,+zbb                               \n\
                        rori    %[fold_temp], %[csum], 32       \n\
                        add     %[csum], %[fold_temp], %[csum]  \n\
@@@ -257,7 -257,7 +257,7 @@@ do_csum_no_alignment(const unsigned cha
                 * support, so nop when Zbb is available and jump when Zbb is
                 * not available.
                 */
 -              asm_volatile_goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
 +              asm goto(ALTERNATIVE("j %l[no_zbb]", "nop", 0,
                                              RISCV_ISA_EXT_ZBB, 1)
                                  :
                                  :
@@@ -318,10 -318,7 +318,7 @@@ unsigned int do_csum(const unsigned cha
         * branches. The largest chunk of overlap was delegated into the
         * do_csum_common function.
         */
-       if (static_branch_likely(&fast_misaligned_access_speed_key))
-               return do_csum_no_alignment(buff, len);
-       if (((unsigned long)buff & OFFSET_MASK) == 0)
+       if (has_fast_unaligned_accesses() || (((unsigned long)buff & OFFSET_MASK) == 0))
                return do_csum_no_alignment(buff, len);
  
        return do_csum_with_alignment(buff, len);
diff --combined arch/riscv/mm/init.c
index b5ffb2ef54ad2244ae59598782c3ad3307b5ffe5,c55915554836f1d17225952f5e53148defd216d5..fe8e159394d8eeeeab34f83ae97ffadbec979b77
@@@ -29,6 -29,7 +29,6 @@@
  #include <asm/io.h>
  #include <asm/numa.h>
  #include <asm/pgtable.h>
 -#include <asm/ptdump.h>
  #include <asm/sections.h>
  #include <asm/soc.h>
  #include <asm/tlbflush.h>
@@@ -722,6 -723,8 +722,6 @@@ void mark_rodata_ro(void
        if (IS_ENABLED(CONFIG_64BIT))
                set_kernel_memory(lm_alias(__start_rodata), lm_alias(_data),
                                  set_memory_ro);
 -
 -      debug_checkwx();
  }
  #else
  static __init pgprot_t pgprot_from_va(uintptr_t va)
@@@ -764,6 -767,11 +764,11 @@@ static int __init print_no5lvl(char *p
  }
  early_param("no5lvl", print_no5lvl);
  
+ static void __init set_mmap_rnd_bits_max(void)
+ {
+       mmap_rnd_bits_max = MMAP_VA_BITS - PAGE_SHIFT - 3;
+ }
  /*
   * There is a simple way to determine if 4-level is supported by the
   * underlying hardware: establish 1:1 mapping in 4-level page table mode
@@@ -1078,6 -1086,7 +1083,7 @@@ asmlinkage void __init setup_vm(uintptr
  
  #if defined(CONFIG_64BIT) && !defined(CONFIG_XIP_KERNEL)
        set_satp_mode(dtb_pa);
+       set_mmap_rnd_bits_max();
  #endif
  
        /*
@@@ -1355,7 -1364,7 +1361,7 @@@ static void __init arch_reserve_crashke
        bool high = false;
        int ret;
  
 -      if (!IS_ENABLED(CONFIG_KEXEC_CORE))
 +      if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
                return;
  
        ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
@@@ -1382,10 -1391,6 +1388,10 @@@ void __init misc_mem_init(void
        early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
        arch_numa_init();
        sparse_init();
 +#ifdef CONFIG_SPARSEMEM_VMEMMAP
 +      /* The entire VMEMMAP region has been populated. Flush TLB for this region */
 +      local_flush_tlb_kernel_range(VMEMMAP_START, VMEMMAP_END);
 +#endif
        zone_sizes_init();
        arch_reserve_crashkernel();
        memblock_dump_all();
diff --combined crypto/Kconfig
index 44661c2e30ca5de9387d4c09202a588b6f57e64f,00e4aa16bf2bf7490cf7ab854c3ccf90d06450c3..2903ce19f15cfa5d2c04a193a8352ddcfdceac12
@@@ -1269,11 -1269,10 +1269,11 @@@ config CRYPTO_JITTERENTROP
  
          A non-physical non-deterministic ("true") RNG (e.g., an entropy source
          compliant with NIST SP800-90B) intended to provide a seed to a
 -        deterministic RNG (e.g.  per NIST SP800-90C).
 +        deterministic RNG (e.g., per NIST SP800-90C).
          This RNG does not perform any cryptographic whitening of the generated
 +        random numbers.
  
 -        See https://www.chronox.de/jent.html
 +        See https://www.chronox.de/jent/
  
  if CRYPTO_JITTERENTROPY
  if CRYPTO_FIPS && EXPERT
@@@ -1497,6 -1496,9 +1497,9 @@@ endi
  if PPC
  source "arch/powerpc/crypto/Kconfig"
  endif
+ if RISCV
+ source "arch/riscv/crypto/Kconfig"
+ endif
  if S390
  source "arch/s390/crypto/Kconfig"
  endif
diff --combined drivers/acpi/Kconfig
index 5d1fb83b2d32ec715eb40dc724e297329d78fec8,1606eb622a9ffe2d7015724778035307d5aae1fd..ff1689bb3124dd53a56b275bf2d3075cfa6d9423
@@@ -286,7 -286,7 +286,7 @@@ config ACPI_CPPC_LI
  
  config ACPI_PROCESSOR
        tristate "Processor"
-       depends on X86 || ARM64 || LOONGARCH
+       depends on X86 || ARM64 || LOONGARCH || RISCV
        select ACPI_PROCESSOR_IDLE
        select ACPI_CPU_FREQ_PSS if X86 || LOONGARCH
        select THERMAL
@@@ -449,6 -449,20 +449,6 @@@ config ACPI_HE
          which is used to report some hardware errors notified via
          SCI, mainly the corrected errors.
  
 -config ACPI_CUSTOM_METHOD
 -      tristate "Allow ACPI methods to be inserted/replaced at run time"
 -      depends on DEBUG_FS
 -      help
 -        This debug facility allows ACPI AML methods to be inserted and/or
 -        replaced without rebooting the system. For details refer to:
 -        Documentation/firmware-guide/acpi/method-customizing.rst.
 -
 -        NOTE: This option is security sensitive, because it allows arbitrary
 -        kernel memory to be written to by root (uid=0) users, allowing them
 -        to bypass certain security measures (e.g. if root is not allowed to
 -        load additional kernel modules after boot, this feature may be used
 -        to override that restriction).
 -
  config ACPI_BGRT
        bool "Boottime Graphics Resource Table support"
        depends on EFI && (X86 || ARM64)
  
  config ACPI_REDUCED_HARDWARE_ONLY
        bool "Hardware-reduced ACPI support only" if EXPERT
 -      def_bool n
        help
          This config item changes the way the ACPI code is built.  When this
          option is selected, the kernel will use a specialized version of
index a0ebad77666e305ad0c47a7473832d1a60d082fb,987b3d900a89b809967f200fc002ded5bf0b2715..96b404ce829f31738af74c48b97619737b3e0992
@@@ -3,32 -3,6 +3,6 @@@
  # ARM CPU Frequency scaling drivers
  #
  
- config ACPI_CPPC_CPUFREQ
-       tristate "CPUFreq driver based on the ACPI CPPC spec"
-       depends on ACPI_PROCESSOR
-       select ACPI_CPPC_LIB
-       help
-         This adds a CPUFreq driver which uses CPPC methods
-         as described in the ACPIv5.1 spec. CPPC stands for
-         Collaborative Processor Performance Controls. It
-         is based on an abstract continuous scale of CPU
-         performance values which allows the remote power
-         processor to flexibly optimize for power and
-         performance. CPPC relies on power management firmware
-         support for its operation.
-         If in doubt, say N.
- config ACPI_CPPC_CPUFREQ_FIE
-       bool "Frequency Invariance support for CPPC cpufreq driver"
-       depends on ACPI_CPPC_CPUFREQ && GENERIC_ARCH_TOPOLOGY
-       default y
-       help
-         This extends frequency invariance support in the CPPC cpufreq driver,
-         by using CPPC delivered and reference performance counters.
-         If in doubt, say N.
  config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM
        tristate "Allwinner nvmem based SUN50I CPUFreq driver"
        depends on ARCH_SUNXI
@@@ -173,7 -147,6 +147,7 @@@ config ARM_QCOM_CPUFREQ_NVME
  config ARM_QCOM_CPUFREQ_HW
        tristate "QCOM CPUFreq HW driver"
        depends on ARCH_QCOM || COMPILE_TEST
 +      depends on COMMON_CLK
        help
          Support for the CPUFreq HW driver.
          Some QCOM chipsets have a HW engine to offload the steps
diff --combined drivers/perf/Kconfig
index 54ff5cc17ccdb459bfa430331060abfd68ea6da2,564e813d8c69b2195b84eb54cd43490733fe21de..7526a9e714fa985d79d20b77003483a81f7b60a7
@@@ -86,16 -86,20 +86,30 @@@ config RISCV_PMU_SB
          full perf feature support i.e. counter overflow, privilege mode
          filtering, counter configuration.
  
 +config STARFIVE_STARLINK_PMU
 +      depends on ARCH_STARFIVE || COMPILE_TEST
 +      depends on 64BIT
 +      bool "StarFive StarLink PMU"
 +      help
 +         Provide support for StarLink Performance Monitor Unit.
 +         StarLink Performance Monitor Unit integrates one or more cores with
 +         an L3 memory system. The L3 cache events are added into perf event
 +         subsystem, allowing monitoring of various L3 cache perf events.
 +
+ config ANDES_CUSTOM_PMU
+       bool "Andes custom PMU support"
+       depends on ARCH_RENESAS && RISCV_ALTERNATIVE && RISCV_PMU_SBI
+       default y
+       help
+         The Andes cores implement the PMU overflow extension very
+         similar to the standard Sscofpmf and Smcntrpmf extension.
+         This will patch the overflow and pending CSRs and handle the
+         non-standard behaviour via the regular SBI PMU driver and
+         interface.
+         If you don't know what to do here, say "Y".
  config ARM_PMU_ACPI
        depends on ARM_PMU && ACPI
        def_bool y
index 452aab49db1e8ccc35a6bb0b76661ca7cb6fb71f,bbd6fe021b3a982f62eae7a7c7818c8d080967a9..8cbe6e5f9c39a6f5b585251b02908b8b7309e23d
  #include <linux/of.h>
  #include <linux/cpu_pm.h>
  #include <linux/sched/clock.h>
+ #include <linux/soc/andes/irq.h>
  
  #include <asm/errata_list.h>
  #include <asm/sbi.h>
  #include <asm/cpufeature.h>
  
+ #define ALT_SBI_PMU_OVERFLOW(__ovl)                                   \
+ asm volatile(ALTERNATIVE_2(                                           \
+       "csrr %0, " __stringify(CSR_SSCOUNTOVF),                        \
+       "csrr %0, " __stringify(THEAD_C9XX_CSR_SCOUNTEROF),             \
+               THEAD_VENDOR_ID, ERRATA_THEAD_PMU,                      \
+               CONFIG_ERRATA_THEAD_PMU,                                \
+       "csrr %0, " __stringify(ANDES_CSR_SCOUNTEROF),                  \
+               0, RISCV_ISA_EXT_XANDESPMU,                             \
+               CONFIG_ANDES_CUSTOM_PMU)                                \
+       : "=r" (__ovl) :                                                \
+       : "memory")
+ #define ALT_SBI_PMU_OVF_CLEAR_PENDING(__irq_mask)                     \
+ asm volatile(ALTERNATIVE(                                             \
+       "csrc " __stringify(CSR_IP) ", %0\n\t",                         \
+       "csrc " __stringify(ANDES_CSR_SLIP) ", %0\n\t",                 \
+               0, RISCV_ISA_EXT_XANDESPMU,                             \
+               CONFIG_ANDES_CUSTOM_PMU)                                \
+       : : "r"(__irq_mask)                                             \
+       : "memory")
  #define SYSCTL_NO_USER_ACCESS 0
  #define SYSCTL_USER_ACCESS    1
  #define SYSCTL_LEGACY         2
@@@ -61,6 -83,7 +83,7 @@@ static int sysctl_perf_user_access __re
  static union sbi_pmu_ctr_info *pmu_ctr_list;
  static bool riscv_pmu_use_irq;
  static unsigned int riscv_pmu_irq_num;
+ static unsigned int riscv_pmu_irq_mask;
  static unsigned int riscv_pmu_irq;
  
  /* Cache the available counters in a bitmask */
@@@ -512,7 -535,7 +535,7 @@@ static void pmu_sbi_set_scounteren(voi
  
        if (event->hw.idx != -1)
                csr_write(CSR_SCOUNTEREN,
 -                        csr_read(CSR_SCOUNTEREN) | (1 << pmu_sbi_csr_index(event)));
 +                        csr_read(CSR_SCOUNTEREN) | BIT(pmu_sbi_csr_index(event)));
  }
  
  static void pmu_sbi_reset_scounteren(void *arg)
  
        if (event->hw.idx != -1)
                csr_write(CSR_SCOUNTEREN,
 -                        csr_read(CSR_SCOUNTEREN) & ~(1 << pmu_sbi_csr_index(event)));
 +                        csr_read(CSR_SCOUNTEREN) & ~BIT(pmu_sbi_csr_index(event)));
  }
  
  static void pmu_sbi_ctr_start(struct perf_event *event, u64 ival)
@@@ -694,7 -717,7 +717,7 @@@ static irqreturn_t pmu_sbi_ovf_handler(
  
        event = cpu_hw_evt->events[fidx];
        if (!event) {
-               csr_clear(CSR_SIP, BIT(riscv_pmu_irq_num));
+               ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
                return IRQ_NONE;
        }
  
         * Overflow interrupt pending bit should only be cleared after stopping
         * all the counters to avoid any race condition.
         */
-       csr_clear(CSR_SIP, BIT(riscv_pmu_irq_num));
+       ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
  
        /* No overflow bit is set */
        if (!overflow)
                /* compute hardware counter index */
                hidx = info->csr - CSR_CYCLE;
                /* check if the corresponding bit is set in sscountovf */
 -              if (!(overflow & (1 << hidx)))
 +              if (!(overflow & BIT(hidx)))
                        continue;
  
                /*
                 * Keep a track of overflowed counters so that they can be started
                 * with updated initial value.
                 */
 -              overflowed_ctrs |= 1 << lidx;
 +              overflowed_ctrs |= BIT(lidx);
                hw_evt = &event->hw;
                riscv_pmu_event_update(event);
                perf_sample_data_init(&data, 0, hw_evt->last_period);
@@@ -780,8 -803,7 +803,7 @@@ static int pmu_sbi_starting_cpu(unsigne
  
        if (riscv_pmu_use_irq) {
                cpu_hw_evt->irq = riscv_pmu_irq;
-               csr_clear(CSR_IP, BIT(riscv_pmu_irq_num));
-               csr_set(CSR_IE, BIT(riscv_pmu_irq_num));
+               ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
                enable_percpu_irq(riscv_pmu_irq, IRQ_TYPE_NONE);
        }
  
@@@ -792,7 -814,6 +814,6 @@@ static int pmu_sbi_dying_cpu(unsigned i
  {
        if (riscv_pmu_use_irq) {
                disable_percpu_irq(riscv_pmu_irq);
-               csr_clear(CSR_IE, BIT(riscv_pmu_irq_num));
        }
  
        /* Disable all counters access for user mode now */
@@@ -816,8 -837,14 +837,14 @@@ static int pmu_sbi_setup_irqs(struct ri
                   riscv_cached_mimpid(0) == 0) {
                riscv_pmu_irq_num = THEAD_C9XX_RV_IRQ_PMU;
                riscv_pmu_use_irq = true;
+       } else if (riscv_isa_extension_available(NULL, XANDESPMU) &&
+                  IS_ENABLED(CONFIG_ANDES_CUSTOM_PMU)) {
+               riscv_pmu_irq_num = ANDES_SLI_CAUSE_BASE + ANDES_RV_IRQ_PMOVI;
+               riscv_pmu_use_irq = true;
        }
  
+       riscv_pmu_irq_mask = BIT(riscv_pmu_irq_num % BITS_PER_LONG);
        if (!riscv_pmu_use_irq)
                return -EOPNOTSUPP;
  
diff --combined include/linux/mm.h
index 2c0910bc3e4a2cacca59a9af5b74cf8a114dab03,2488c0c5a2881ead26ab68e8ab32d66c41726b91..0436b919f1c7fc535b30400bf95affc7e4534186
@@@ -36,7 -36,6 +36,7 @@@ struct anon_vma
  struct anon_vma_chain;
  struct user_struct;
  struct pt_regs;
 +struct folio_batch;
  
  extern int sysctl_page_lock_unfairness;
  
@@@ -87,7 -86,7 +87,7 @@@ extern int sysctl_legacy_va_layout
  
  #ifdef CONFIG_HAVE_ARCH_MMAP_RND_BITS
  extern const int mmap_rnd_bits_min;
- extern const int mmap_rnd_bits_max;
+ extern int mmap_rnd_bits_max __ro_after_init;
  extern int mmap_rnd_bits __read_mostly;
  #endif
  #ifdef CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS
@@@ -227,6 -226,7 +227,6 @@@ int overcommit_policy_handler(struct ct
  /* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */
  #define PAGE_ALIGNED(addr)    IS_ALIGNED((unsigned long)(addr), PAGE_SIZE)
  
 -#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
  static inline struct folio *lru_to_folio(struct list_head *head)
  {
        return list_entry((head)->prev, struct folio, lru);
@@@ -391,20 -391,6 +391,20 @@@ extern unsigned int kobjsize(const voi
  # define VM_UFFD_MINOR                VM_NONE
  #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
  
 +/*
 + * This flag is used to connect VFIO to arch specific KVM code. It
 + * indicates that the memory under this VMA is safe for use with any
 + * non-cachable memory type inside KVM. Some VFIO devices, on some
 + * platforms, are thought to be unsafe and can cause machine crashes
 + * if KVM does not lock down the memory type.
 + */
 +#ifdef CONFIG_64BIT
 +#define VM_ALLOW_ANY_UNCACHED_BIT     39
 +#define VM_ALLOW_ANY_UNCACHED         BIT(VM_ALLOW_ANY_UNCACHED_BIT)
 +#else
 +#define VM_ALLOW_ANY_UNCACHED         VM_NONE
 +#endif
 +
  /* Bits set in the VMA until the stack is in its final location */
  #define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY)
  
@@@ -795,11 -781,6 +795,11 @@@ static inline struct vm_area_struct *lo
        return NULL;
  }
  
 +static inline void vma_assert_locked(struct vm_area_struct *vma)
 +{
 +      mmap_assert_locked(vma->vm_mm);
 +}
 +
  static inline void release_fault_lock(struct vm_fault *vmf)
  {
        mmap_read_unlock(vmf->vma->vm_mm);
@@@ -1197,7 -1178,7 +1197,7 @@@ static inline int is_vmalloc_or_module_
   * How many times the entire folio is mapped as a single unit (eg by a
   * PMD or PUD entry).  This is probably not what you want, except for
   * debugging purposes - it does not include PTE-mapped sub-pages; look
 - * at folio_mapcount() or page_mapcount() or total_mapcount() instead.
 + * at folio_mapcount() or page_mapcount() instead.
   */
  static inline int folio_entire_mapcount(struct folio *folio)
  {
@@@ -1257,6 -1238,13 +1257,6 @@@ static inline int folio_mapcount(struc
        return folio_total_mapcount(folio);
  }
  
 -static inline int total_mapcount(struct page *page)
 -{
 -      if (likely(!PageCompound(page)))
 -              return atomic_read(&page->_mapcount) + 1;
 -      return folio_total_mapcount(page_folio(page));
 -}
 -
  static inline bool folio_large_is_mapped(struct folio *folio)
  {
        /*
@@@ -1526,8 -1514,6 +1526,8 @@@ static inline void folio_put_refs(struc
                __folio_put(folio);
  }
  
 +void folios_put_refs(struct folio_batch *folios, unsigned int *refs);
 +
  /*
   * union release_pages_arg - an array of pages or folios
   *
@@@ -1550,19 -1536,18 +1550,19 @@@ void release_pages(release_pages_arg, i
  /**
   * folios_put - Decrement the reference count on an array of folios.
   * @folios: The folios.
 - * @nr: How many folios there are.
   *
 - * Like folio_put(), but for an array of folios.  This is more efficient
 - * than writing the loop yourself as it will optimise the locks which
 - * need to be taken if the folios are freed.
 + * Like folio_put(), but for a batch of folios.  This is more efficient
 + * than writing the loop yourself as it will optimise the locks which need
 + * to be taken if the folios are freed.  The folios batch is returned
 + * empty and ready to be reused for another batch; there is no need to
 + * reinitialise it.
   *
   * Context: May be called in process or interrupt context, but not in NMI
   * context.  May be called while holding a spinlock.
   */
 -static inline void folios_put(struct folio **folios, unsigned int nr)
 +static inline void folios_put(struct folio_batch *folios)
  {
 -      release_pages(folios, nr);
 +      folios_put_refs(folios, NULL);
  }
  
  static inline void put_page(struct page *page)
@@@ -1655,11 -1640,13 +1655,11 @@@ static inline int page_zone_id(struct p
  }
  
  #ifdef NODE_NOT_IN_PAGE_FLAGS
 -extern int page_to_nid(const struct page *page);
 +int page_to_nid(const struct page *page);
  #else
  static inline int page_to_nid(const struct page *page)
  {
 -      struct page *p = (struct page *)page;
 -
 -      return (PF_POISONED_CHECK(p)->flags >> NODES_PGSHIFT) & NODES_MASK;
 +      return (PF_POISONED_CHECK(page)->flags >> NODES_PGSHIFT) & NODES_MASK;
  }
  #endif
  
@@@ -2078,13 -2065,6 +2078,13 @@@ static inline long folio_nr_pages(struc
  #endif
  }
  
 +/* Only hugetlbfs can allocate folios larger than MAX_ORDER */
 +#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
 +#define MAX_FOLIO_NR_PAGES    (1UL << PUD_ORDER)
 +#else
 +#define MAX_FOLIO_NR_PAGES    MAX_ORDER_NR_PAGES
 +#endif
 +
  /*
   * compound_nr() returns the number of pages in this potentially compound
   * page.  compound_nr() can be called on a tail page, and is defined to
@@@ -2615,19 -2595,19 +2615,19 @@@ static inline void dec_mm_counter(struc
        mm_trace_rss_stat(mm, member);
  }
  
 -/* Optimized variant when page is already known not to be PageAnon */
 -static inline int mm_counter_file(struct page *page)
 +/* Optimized variant when folio is already known not to be anon */
 +static inline int mm_counter_file(struct folio *folio)
  {
 -      if (PageSwapBacked(page))
 +      if (folio_test_swapbacked(folio))
                return MM_SHMEMPAGES;
        return MM_FILEPAGES;
  }
  
 -static inline int mm_counter(struct page *page)
 +static inline int mm_counter(struct folio *folio)
  {
 -      if (PageAnon(page))
 +      if (folio_test_anon(folio))
                return MM_ANONPAGES;
 -      return mm_counter_file(page);
 +      return mm_counter_file(folio);
  }
  
  static inline unsigned long get_mm_rss(struct mm_struct *mm)
diff --combined init/Kconfig
index d56d71fe0f87878b5515512ab0ddc7997e322d28,c3994b92333ded7989a672cf0e594896debfad67..aa02aec6aa7d29432f1974003900fce14bf14452
@@@ -89,15 -89,6 +89,15 @@@ config CC_HAS_ASM_GOTO_TIED_OUTPU
        # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
        def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
  
 +config GCC_ASM_GOTO_OUTPUT_WORKAROUND
 +      bool
 +      depends on CC_IS_GCC && CC_HAS_ASM_GOTO_OUTPUT
 +      # Fixed in GCC 14, 13.3, 12.4 and 11.5
 +      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
 +      default y if GCC_VERSION < 110500
 +      default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
 +      default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
 +
  config TOOLS_SUPPORT_RELR
        def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
  
@@@ -115,7 -106,7 +115,7 @@@ config CONSTRUCTOR
        bool
  
  config IRQ_WORK
 -      bool
 +      def_bool y if SMP
  
  config BUILDTIME_TABLE_SORT
        bool
@@@ -876,26 -867,14 +876,26 @@@ config CC_IMPLICIT_FALLTHROUG
        default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
        default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
  
 -# Currently, disable gcc-11+ array-bounds globally.
 +# Currently, disable gcc-10+ array-bounds globally.
  # It's still broken in gcc-13, so no upper bound yet.
 -config GCC11_NO_ARRAY_BOUNDS
 +config GCC10_NO_ARRAY_BOUNDS
        def_bool y
  
  config CC_NO_ARRAY_BOUNDS
        bool
 -      default y if CC_IS_GCC && GCC_VERSION >= 110000 && GCC11_NO_ARRAY_BOUNDS
 +      default y if CC_IS_GCC && GCC_VERSION >= 100000 && GCC10_NO_ARRAY_BOUNDS
 +
 +# Currently, disable -Wstringop-overflow for GCC globally.
 +config GCC_NO_STRINGOP_OVERFLOW
 +      def_bool y
 +
 +config CC_NO_STRINGOP_OVERFLOW
 +      bool
 +      default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
 +
 +config CC_STRINGOP_OVERFLOW
 +      bool
 +      default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
  
  #
  # For architectures that know their GCC __int128 support is sound
@@@ -1466,6 -1445,11 +1466,6 @@@ config SYSCTL_ARCH_UNALIGN_ALLO
  config HAVE_PCSPKR_PLATFORM
        bool
  
 -# interpreter that classic socket filters depend on
 -config BPF
 -      bool
 -      select CRYPTO_LIB_SHA1
 -
  menuconfig EXPERT
        bool "Configure standard kernel features (expert users)"
        # Unhide debug options, to make the on-by-default options visible
@@@ -1499,7 -1483,7 +1499,7 @@@ config MULTIUSE
  
  config SGETMASK_SYSCALL
        bool "sgetmask/ssetmask syscalls support" if EXPERT
 -      def_bool PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
 +      default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
        help
          sys_sgetmask and sys_ssetmask are obsolete system calls
          no longer supported in libc but still enabled by default in some
@@@ -1986,6 -1970,9 +1986,9 @@@ source "kernel/Kconfig.locks
  config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
        bool
  
+ config ARCH_HAS_PREPARE_SYNC_CORE_CMD
+       bool
  config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
        bool
  
diff --combined kernel/sched/core.c
index d44efa0d06112a8b4f022fe450aa7725987dca9b,e4a87bcf28d405407dc3cdbbd2ae3459eb11c30c..7019a40457a6dafd14803896d3cb68a1e26bb2d4
@@@ -1792,6 -1792,7 +1792,6 @@@ static void cpu_util_update_eff(struct 
  #endif
  
  #ifdef CONFIG_SYSCTL
 -#ifdef CONFIG_UCLAMP_TASK
  #ifdef CONFIG_UCLAMP_TASK_GROUP
  static void uclamp_update_root_tg(void)
  {
@@@ -1897,6 -1898,7 +1897,6 @@@ undo
        return result;
  }
  #endif
 -#endif
  
  static int uclamp_validate(struct task_struct *p,
                           const struct sched_attr *attr)
@@@ -2063,7 -2065,7 +2063,7 @@@ static void __init init_uclamp(void
        }
  }
  
 -#else /* CONFIG_UCLAMP_TASK */
 +#else /* !CONFIG_UCLAMP_TASK */
  static inline void uclamp_rq_inc(struct rq *rq, struct task_struct *p) { }
  static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p) { }
  static inline int uclamp_validate(struct task_struct *p,
@@@ -3953,17 -3955,6 +3953,17 @@@ void wake_up_if_idle(int cpu
        }
  }
  
 +bool cpus_equal_capacity(int this_cpu, int that_cpu)
 +{
 +      if (!sched_asym_cpucap_active())
 +              return true;
 +
 +      if (this_cpu == that_cpu)
 +              return true;
 +
 +      return arch_scale_cpu_capacity(this_cpu) == arch_scale_cpu_capacity(that_cpu);
 +}
 +
  bool cpus_share_cache(int this_cpu, int that_cpu)
  {
        if (this_cpu == that_cpu)
@@@ -6647,7 -6638,9 +6647,9 @@@ static void __sched notrace __schedule(
         *     if (signal_pending_state())          if (p->state & @state)
         *
         * Also, the membarrier system call requires a full memory barrier
-        * after coming from user-space, before storing to rq->curr.
+        * after coming from user-space, before storing to rq->curr; this
+        * barrier matches a full barrier in the proximity of the membarrier
+        * system call exit.
         */
        rq_lock(rq, &rf);
        smp_mb__after_spinlock();
                 *
                 * Here are the schemes providing that barrier on the
                 * various architectures:
-                * - mm ? switch_mm() : mmdrop() for x86, s390, sparc, PowerPC.
-                *   switch_mm() rely on membarrier_arch_switch_mm() on PowerPC.
+                * - mm ? switch_mm() : mmdrop() for x86, s390, sparc, PowerPC,
+                *   RISC-V.  switch_mm() relies on membarrier_arch_switch_mm()
+                *   on PowerPC and on RISC-V.
                 * - finish_lock_switch() for weakly-ordered
                 *   architectures where spin_unlock is a full barrier,
                 * - switch_to() for arm64 (weakly-ordered, spin_unlock
                 *   is a RELEASE barrier),
+                *
+                * The barrier matches a full barrier in the proximity of
+                * the membarrier system call entry.
+                *
+                * On RISC-V, this barrier pairing is also needed for the
+                * SYNC_CORE command when switching between processes, cf.
+                * the inline comments in membarrier_arch_switch_mm().
                 */
                ++*switch_count;
  
@@@ -6796,12 -6797,10 +6806,12 @@@ static inline void sched_submit_work(st
  
  static void sched_update_worker(struct task_struct *tsk)
  {
 -      if (tsk->flags & (PF_WQ_WORKER | PF_IO_WORKER)) {
 +      if (tsk->flags & (PF_WQ_WORKER | PF_IO_WORKER | PF_BLOCK_TS)) {
 +              if (tsk->flags & PF_BLOCK_TS)
 +                      blk_plug_invalidate_ts(tsk);
                if (tsk->flags & PF_WQ_WORKER)
                        wq_worker_running(tsk);
 -              else
 +              else if (tsk->flags & PF_IO_WORKER)
                        io_wq_worker_running(tsk);
        }
  }
index 4e715b9b278e7fd7fbea70110f5a829635a4bc01,703e8d80a576d171c410d14117000dd1fc47d2b0..809194cd779f42fa57759b731c52685a14744f83
        | MEMBARRIER_PRIVATE_EXPEDITED_RSEQ_BITMASK                     \
        | MEMBARRIER_CMD_GET_REGISTRATIONS)
  
 +static DEFINE_MUTEX(membarrier_ipi_mutex);
 +#define SERIALIZE_IPI() guard(mutex)(&membarrier_ipi_mutex)
 +
  static void ipi_mb(void *info)
  {
        smp_mb();       /* IPIs should be serializing but paranoid. */
@@@ -254,7 -251,7 +254,7 @@@ static int membarrier_global_expedited(
                return 0;
  
        /*
-        * Matches memory barriers around rq->curr modification in
+        * Matches memory barriers after rq->curr modification in
         * scheduler.
         */
        smp_mb();       /* system call entry is not a mb. */
        if (!zalloc_cpumask_var(&tmpmask, GFP_KERNEL))
                return -ENOMEM;
  
 +      SERIALIZE_IPI();
        cpus_read_lock();
        rcu_read_lock();
        for_each_online_cpu(cpu) {
  
        /*
         * Memory barrier on the caller thread _after_ we finished
-        * waiting for the last IPI. Matches memory barriers around
+        * waiting for the last IPI. Matches memory barriers before
         * rq->curr modification in scheduler.
         */
        smp_mb();       /* exit from system call is not a mb */
@@@ -324,6 -320,7 +324,7 @@@ static int membarrier_private_expedited
                      MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE_READY))
                        return -EPERM;
                ipi_func = ipi_sync_core;
+               prepare_sync_core_cmd(mm);
        } else if (flags == MEMBARRIER_FLAG_RSEQ) {
                if (!IS_ENABLED(CONFIG_RSEQ))
                        return -EINVAL;
                return 0;
  
        /*
-        * Matches memory barriers around rq->curr modification in
+        * Matches memory barriers after rq->curr modification in
         * scheduler.
+        *
+        * On RISC-V, this barrier pairing is also needed for the
+        * SYNC_CORE command when switching between processes, cf.
+        * the inline comments in membarrier_arch_switch_mm().
         */
        smp_mb();       /* system call entry is not a mb. */
  
        if (cpu_id < 0 && !zalloc_cpumask_var(&tmpmask, GFP_KERNEL))
                return -ENOMEM;
  
 +      SERIALIZE_IPI();
        cpus_read_lock();
  
        if (cpu_id >= 0) {
@@@ -420,7 -420,7 +425,7 @@@ out
  
        /*
         * Memory barrier on the caller thread _after_ we finished
-        * waiting for the last IPI. Matches memory barriers around
+        * waiting for the last IPI. Matches memory barriers before
         * rq->curr modification in scheduler.
         */
        smp_mb();       /* exit from system call is not a mb */
@@@ -465,7 -465,6 +470,7 @@@ static int sync_runqueues_membarrier_st
         * between threads which are users of @mm has its membarrier state
         * updated.
         */
 +      SERIALIZE_IPI();
        cpus_read_lock();
        rcu_read_lock();
        for_each_online_cpu(cpu) {
diff --combined mm/mmap.c
index 04da02114c6f992e251f6b52fa10482286947798,8f47011de22e49b35258cc6f1bf3eaa12170c737..6dbda99a47da1c332682c95c03bf3ce6c74f562f
+++ b/mm/mmap.c
@@@ -64,7 -64,7 +64,7 @@@
  
  #ifdef CONFIG_HAVE_ARCH_MMAP_RND_BITS
  const int mmap_rnd_bits_min = CONFIG_ARCH_MMAP_RND_BITS_MIN;
const int mmap_rnd_bits_max = CONFIG_ARCH_MMAP_RND_BITS_MAX;
int mmap_rnd_bits_max __ro_after_init = CONFIG_ARCH_MMAP_RND_BITS_MAX;
  int mmap_rnd_bits __read_mostly = CONFIG_ARCH_MMAP_RND_BITS;
  #endif
  #ifdef CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS
@@@ -105,7 -105,7 +105,7 @@@ void vma_set_page_prot(struct vm_area_s
   * Requires inode->i_mapping->i_mmap_rwsem
   */
  static void __remove_shared_vm_struct(struct vm_area_struct *vma,
 -              struct file *file, struct address_space *mapping)
 +                                    struct address_space *mapping)
  {
        if (vma_is_shared_maywrite(vma))
                mapping_unmap_writable(mapping);
@@@ -126,7 -126,7 +126,7 @@@ void unlink_file_vma(struct vm_area_str
        if (file) {
                struct address_space *mapping = file->f_mapping;
                i_mmap_lock_write(mapping);
 -              __remove_shared_vm_struct(vma, file, mapping);
 +              __remove_shared_vm_struct(vma, mapping);
                i_mmap_unlock_write(mapping);
        }
  }
@@@ -392,30 -392,26 +392,30 @@@ static void __vma_link_file(struct vm_a
        flush_dcache_mmap_unlock(mapping);
  }
  
 +static void vma_link_file(struct vm_area_struct *vma)
 +{
 +      struct file *file = vma->vm_file;
 +      struct address_space *mapping;
 +
 +      if (file) {
 +              mapping = file->f_mapping;
 +              i_mmap_lock_write(mapping);
 +              __vma_link_file(vma, mapping);
 +              i_mmap_unlock_write(mapping);
 +      }
 +}
 +
  static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma)
  {
        VMA_ITERATOR(vmi, mm, 0);
 -      struct address_space *mapping = NULL;
  
        vma_iter_config(&vmi, vma->vm_start, vma->vm_end);
        if (vma_iter_prealloc(&vmi, vma))
                return -ENOMEM;
  
        vma_start_write(vma);
 -
        vma_iter_store(&vmi, vma);
 -
 -      if (vma->vm_file) {
 -              mapping = vma->vm_file->f_mapping;
 -              i_mmap_lock_write(mapping);
 -              __vma_link_file(vma, mapping);
 -              i_mmap_unlock_write(mapping);
 -      }
 -
 +      vma_link_file(vma);
        mm->map_count++;
        validate_mm(mm);
        return 0;
@@@ -523,9 -519,10 +523,9 @@@ static inline void vma_complete(struct 
        }
  
        if (vp->remove && vp->file) {
 -              __remove_shared_vm_struct(vp->remove, vp->file, vp->mapping);
 +              __remove_shared_vm_struct(vp->remove, vp->mapping);
                if (vp->remove2)
 -                      __remove_shared_vm_struct(vp->remove2, vp->file,
 -                                                vp->mapping);
 +                      __remove_shared_vm_struct(vp->remove2, vp->mapping);
        } else if (vp->insert) {
                /*
                 * split_vma has split insert from vma, and needs
@@@ -663,7 -660,9 +663,7 @@@ int vma_expand(struct vma_iterator *vmi
  
        vma_prepare(&vp);
        vma_adjust_trans_huge(vma, start, end, 0);
 -      vma->vm_start = start;
 -      vma->vm_end = end;
 -      vma->vm_pgoff = pgoff;
 +      vma_set_range(vma, start, end, pgoff);
        vma_iter_store(vmi, vma);
  
        vma_complete(&vp, vmi, vma->vm_mm);
@@@ -706,7 -705,9 +706,7 @@@ int vma_shrink(struct vma_iterator *vmi
        vma_adjust_trans_huge(vma, start, end, 0);
  
        vma_iter_clear(vmi);
 -      vma->vm_start = start;
 -      vma->vm_end = end;
 -      vma->vm_pgoff = pgoff;
 +      vma_set_range(vma, start, end, pgoff);
        vma_complete(&vp, vmi, vma->vm_mm);
        return 0;
  }
@@@ -860,15 -861,13 +860,15 @@@ can_vma_merge_after(struct vm_area_stru
   *      area is returned, or the function will return NULL
   */
  static struct vm_area_struct
 -*vma_merge(struct vma_iterator *vmi, struct mm_struct *mm,
 -         struct vm_area_struct *prev, unsigned long addr, unsigned long end,
 -         unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file,
 -         pgoff_t pgoff, struct mempolicy *policy,
 +*vma_merge(struct vma_iterator *vmi, struct vm_area_struct *prev,
 +         struct vm_area_struct *src, unsigned long addr, unsigned long end,
 +         unsigned long vm_flags, pgoff_t pgoff, struct mempolicy *policy,
           struct vm_userfaultfd_ctx vm_userfaultfd_ctx,
           struct anon_vma_name *anon_name)
  {
 +      struct mm_struct *mm = src->vm_mm;
 +      struct anon_vma *anon_vma = src->anon_vma;
 +      struct file *file = src->vm_file;
        struct vm_area_struct *curr, *next, *res;
        struct vm_area_struct *vma, *adjust, *remove, *remove2;
        struct vm_area_struct *anon_dup = NULL;
        } else if (merge_prev) {                        /* case 2 */
                if (curr) {
                        vma_start_write(curr);
 -                      err = dup_anon_vma(prev, curr, &anon_dup);
                        if (end == curr->vm_end) {      /* case 7 */
 +                              /*
 +                               * can_vma_merge_after() assumed we would not be
 +                               * removing prev vma, so it skipped the check
 +                               * for vm_ops->close, but we are removing curr
 +                               */
 +                              if (curr->vm_ops && curr->vm_ops->close)
 +                                      err = -EINVAL;
                                remove = curr;
                        } else {                        /* case 5 */
                                adjust = curr;
                                adj_start = (end - curr->vm_start);
                        }
 +                      if (!err)
 +                              err = dup_anon_vma(prev, curr, &anon_dup);
                }
        } else { /* merge_next */
                vma_start_write(next);
  
        vma_prepare(&vp);
        vma_adjust_trans_huge(vma, vma_start, vma_end, adj_start);
 -
 -      vma->vm_start = vma_start;
 -      vma->vm_end = vma_end;
 -      vma->vm_pgoff = vma_pgoff;
 +      vma_set_range(vma, vma_start, vma_end, vma_pgoff);
  
        if (vma_expanded)
                vma_iter_store(vmi, vma);
@@@ -1831,17 -1825,15 +1831,17 @@@ get_unmapped_area(struct file *file, un
                /*
                 * mmap_region() will call shmem_zero_setup() to create a file,
                 * so use shmem's get_unmapped_area in case it can be huge.
 -               * do_mmap() will clear pgoff, so match alignment.
                 */
 -              pgoff = 0;
                get_area = shmem_get_unmapped_area;
        } else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
                /* Ensures that larger anonymous mappings are THP aligned. */
                get_area = thp_get_unmapped_area;
        }
  
 +      /* Always treat pgoff as zero for anonymous memory. */
 +      if (!file)
 +              pgoff = 0;
 +
        addr = get_area(file, addr, len, pgoff, flags);
        if (IS_ERR_VALUE(addr))
                return addr;
@@@ -2054,6 -2046,7 +2054,6 @@@ static int expand_upwards(struct vm_are
                }
        }
        anon_vma_unlock_write(vma->anon_vma);
 -      khugepaged_enter_vma(vma, vma->vm_flags);
        mas_destroy(&mas);
        validate_mm(mm);
        return error;
@@@ -2147,6 -2140,7 +2147,6 @@@ int expand_downwards(struct vm_area_str
                }
        }
        anon_vma_unlock_write(vma->anon_vma);
 -      khugepaged_enter_vma(vma, vma->vm_flags);
        mas_destroy(&mas);
        validate_mm(mm);
        return error;
@@@ -2436,8 -2430,9 +2436,8 @@@ struct vm_area_struct *vma_modify(struc
        pgoff_t pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT);
        struct vm_area_struct *merged;
  
 -      merged = vma_merge(vmi, vma->vm_mm, prev, start, end, vm_flags,
 -                         vma->anon_vma, vma->vm_file, pgoff, policy,
 -                         uffd_ctx, anon_name);
 +      merged = vma_merge(vmi, prev, vma, start, end, vm_flags,
 +                         pgoff, policy, uffd_ctx, anon_name);
        if (merged)
                return merged;
  
@@@ -2467,8 -2462,9 +2467,8 @@@ static struct vm_area_struc
                   struct vm_area_struct *vma, unsigned long start,
                   unsigned long end, pgoff_t pgoff)
  {
 -      return vma_merge(vmi, vma->vm_mm, prev, start, end, vma->vm_flags,
 -                       vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma),
 -                       vma->vm_userfaultfd_ctx, anon_vma_name(vma));
 +      return vma_merge(vmi, prev, vma, start, end, vma->vm_flags, pgoff,
 +                       vma_policy(vma), vma->vm_userfaultfd_ctx, anon_vma_name(vma));
  }
  
  /*
@@@ -2482,9 -2478,10 +2482,9 @@@ struct vm_area_struct *vma_merge_extend
        pgoff_t pgoff = vma->vm_pgoff + vma_pages(vma);
  
        /* vma is specified as prev, so case 1 or 2 will apply. */
 -      return vma_merge(vmi, vma->vm_mm, vma, vma->vm_end, vma->vm_end + delta,
 -                       vma->vm_flags, vma->anon_vma, vma->vm_file, pgoff,
 -                       vma_policy(vma), vma->vm_userfaultfd_ctx,
 -                       anon_vma_name(vma));
 +      return vma_merge(vmi, vma, vma, vma->vm_end, vma->vm_end + delta,
 +                       vma->vm_flags, pgoff, vma_policy(vma),
 +                       vma->vm_userfaultfd_ctx, anon_vma_name(vma));
  }
  
  /*
@@@ -2811,9 -2808,11 +2811,9 @@@ cannot_expand
        }
  
        vma_iter_config(&vmi, addr, end);
 -      vma->vm_start = addr;
 -      vma->vm_end = end;
 +      vma_set_range(vma, addr, end, pgoff);
        vm_flags_init(vma, vm_flags);
        vma->vm_page_prot = vm_get_page_prot(vm_flags);
 -      vma->vm_pgoff = pgoff;
  
        if (file) {
                vma->vm_file = get_file(file);
        vma_start_write(vma);
        vma_iter_store(&vmi, vma);
        mm->map_count++;
 -      if (vma->vm_file) {
 -              i_mmap_lock_write(vma->vm_file->f_mapping);
 -              if (vma_is_shared_maywrite(vma))
 -                      mapping_allow_writable(vma->vm_file->f_mapping);
 -
 -              flush_dcache_mmap_lock(vma->vm_file->f_mapping);
 -              vma_interval_tree_insert(vma, &vma->vm_file->f_mapping->i_mmap);
 -              flush_dcache_mmap_unlock(vma->vm_file->f_mapping);
 -              i_mmap_unlock_write(vma->vm_file->f_mapping);
 -      }
 +      vma_link_file(vma);
  
        /*
         * vma_merge() calls khugepaged_enter_vma() either, the below
@@@ -3163,7 -3171,9 +3163,7 @@@ static int do_brk_flags(struct vma_iter
                goto unacct_fail;
  
        vma_set_anonymous(vma);
 -      vma->vm_start = addr;
 -      vma->vm_end = addr + len;
 -      vma->vm_pgoff = addr >> PAGE_SHIFT;
 +      vma_set_range(vma, addr, addr + len, addr >> PAGE_SHIFT);
        vm_flags_init(vma, flags);
        vma->vm_page_prot = vm_get_page_prot(flags);
        vma_start_write(vma);
@@@ -3400,7 -3410,9 +3400,7 @@@ struct vm_area_struct *copy_vma(struct 
                new_vma = vm_area_dup(vma);
                if (!new_vma)
                        goto out;
 -              new_vma->vm_start = addr;
 -              new_vma->vm_end = addr + len;
 -              new_vma->vm_pgoff = pgoff;
 +              vma_set_range(new_vma, addr, addr + len, pgoff);
                if (vma_dup_policy(vma, new_vma))
                        goto out_free_vma;
                if (anon_vma_clone(new_vma, vma))
@@@ -3568,7 -3580,9 +3568,7 @@@ static struct vm_area_struct *__install
        if (unlikely(vma == NULL))
                return ERR_PTR(-ENOMEM);
  
 -      vma->vm_start = addr;
 -      vma->vm_end = addr + len;
 -
 +      vma_set_range(vma, addr, addr + len, 0);
        vm_flags_init(vma, (vm_flags | mm->def_flags |
                      VM_DONTEXPAND | VM_SOFTDIRTY) & ~VM_LOCKED_MASK);
        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
@@@ -3852,7 -3866,7 +3852,7 @@@ static int init_user_reserve(void
  
        free_kbytes = K(global_zone_page_state(NR_FREE_PAGES));
  
 -      sysctl_user_reserve_kbytes = min(free_kbytes / 32, 1UL << 17);
 +      sysctl_user_reserve_kbytes = min(free_kbytes / 32, SZ_128K);
        return 0;
  }
  subsys_initcall(init_user_reserve);
@@@ -3873,7 -3887,7 +3873,7 @@@ static int init_admin_reserve(void
  
        free_kbytes = K(global_zone_page_state(NR_FREE_PAGES));
  
 -      sysctl_admin_reserve_kbytes = min(free_kbytes / 32, 1UL << 13);
 +      sysctl_admin_reserve_kbytes = min(free_kbytes / 32, SZ_8K);
        return 0;
  }
  subsys_initcall(init_admin_reserve);
@@@ -3905,12 -3919,12 +3905,12 @@@ static int reserve_mem_notifier(struct 
        case MEM_ONLINE:
                /* Default max is 128MB. Leave alone if modified by operator. */
                tmp = sysctl_user_reserve_kbytes;
 -              if (0 < tmp && tmp < (1UL << 17))
 +              if (tmp > 0 && tmp < SZ_128K)
                        init_user_reserve();
  
                /* Default max is 8MB.  Leave alone if modified by operator. */
                tmp = sysctl_admin_reserve_kbytes;
 -              if (0 < tmp && tmp < (1UL << 13))
 +              if (tmp > 0 && tmp < SZ_8K)
                        init_admin_reserve();
  
                break;