From 87fab8109c82b08d8d6c16942e05a3d50046d255 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 25 Apr 2023 11:37:03 -0500
Subject: [PATCH] merge ti:
 https://github.com/RobertCNelson/ti-linux-kernel/compare/76b3e88d569210a51399e8d8c8babd995af29d11...2c23e6c538c879e380401ae4b236f54020618eaa
 TI SDK: 08.06.00.007 BBDTBS:
 https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/commit/5a6bb10556da9ac2d5d6a06cb16bc324f07d0e0e
 RT: patch-5.10.168-rt83.patch.xz AUFS:
 https://github.com/sfjro/aufs-standalone/commit/e32ddc654f61cb6b91a9977e29bf7a7f3b76c965
 WIRELESS_REGDB:
 https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=7f7a9f7bc6011b072b5427eced1ff19261764e95
 KSMBD:
 https://github.com/cifsd-team/ksmbd/commit/274377cd20807ae91ac81f42ad2823d812289a31
 WPANUSB:
 https://git.beagleboard.org/beagleconnect/linux/wpanusb/-/commit/6aa9bf65b9d88a2c9a111e7b4aed03de2be9413d
 BCFSERIAL:
 https://git.beagleboard.org/beagleconnect/linux/bcfserial/-/commit/db467023bd136c97c2e13c3a8b9e41dbdfafbc66

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 patch.sh                                      |   94 +-
 ...1-backports-brcm80211-from-linux.git.patch |  194 ++-
 .../0001-backports-iio-from-linux.git.patch   | 1232 +----------------
 ...001-backports-it66121-from-linux.git.patch |    6 +-
 .../0001-backports-spi-from-linux.git.patch   |    8 +-
 ...0001-spidev-add-micron-spi-authenta.patch} |   13 +-
 ...0001-backports-wlcore-from-linux.git.patch |    6 +-
 .../cypress/0001-cypress-fmac-patchset.patch  |    6 +-
 patches/defconfig                             |    2 +-
 ...-AM335x-CM3-Power-Managment-Firmware.patch |    6 +-
 .../aufs/0001-merge-aufs-kbuild.patch         |    4 +-
 .../aufs/0002-merge-aufs-base.patch           |   16 +-
 .../aufs/0003-merge-aufs-mmap.patch           |    8 +-
 .../aufs/0004-merge-aufs-standalone.patch     |    6 +-
 .../{ => external}/aufs/0005-merge-aufs.patch |    4 +-
 .../aufs/0006-merge-aufs-rt.patch             |    4 +-
 ...https-git.beagleboard.org-beagleconn.patch |    4 +-
 .../bcfserial/0002-Add-BCFSERIAL-driver.patch |    0
 patches/{ => external}/git/AUFS               |    0
 patches/{ => external}/git/BBDTBS             |    0
 patches/{ => external}/git/BCFSERIAL          |    0
 patches/external/git/KSMBD                    |    1 +
 patches/external/git/RT                       |    1 +
 patches/{ => external}/git/TI_AMX3_CM3        |    0
 patches/{ => external}/git/WIRELESS_REGDB     |    0
 patches/{ => external}/git/WPANUSB            |    0
 ...bd-https-github.com-cifsd-team-ksmbd.patch |  374 ++---
 .../ksmbd/0002-wire-up-ksmbd.patch            |    0
 ...01-merge-CONFIG_PREEMPT_RT-Patch-Set.patch |  411 +++---
 ...eless-regdb-regulatory-database-file.patch |    4 +-
 ...tps-git.beagleboard.org-beagleconnec.patch |    4 +-
 .../wpanusb/0002-Add-WPANUSB-driver.patch     |    0
 patches/git/KSMBD                             |    1 -
 patches/git/RT                                |    1 -
 patches/ref_omap2plus_defconfig               |    3 +-
 ...-BeagleBoard.org-Device-Tree-Changes.patch |    4 +-
 patches/ti_sdk_am3x_release_defconfig         |    2 +-
 patches/ti_sdk_dra7x_release_defconfig        |    2 +-
 repo_maintenance/push-bb.org.sh               |   32 +-
 repo_maintenance/push-kernel-n-test.sh        |   46 +-
 repo_maintenance/push-n-tag-release.sh        |   40 +-
 repo_maintenance/push-ti-merge.sh             |   32 +-
 version.sh                                    |   15 +-
 43 files changed, 819 insertions(+), 1767 deletions(-)
 rename patches/backports/spidev/{0001-backports-spidev-from-linux.git.patch => 0001-spidev-add-micron-spi-authenta.patch} (65%)
 rename patches/{ => external}/aufs/0001-merge-aufs-kbuild.patch (89%)
 rename patches/{ => external}/aufs/0002-merge-aufs-base.patch (95%)
 rename patches/{ => external}/aufs/0003-merge-aufs-mmap.patch (98%)
 rename patches/{ => external}/aufs/0004-merge-aufs-standalone.patch (98%)
 rename patches/{ => external}/aufs/0005-merge-aufs.patch (99%)
 rename patches/{ => external}/aufs/0006-merge-aufs-rt.patch (87%)
 rename patches/{ => external}/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch (99%)
 rename patches/{ => external}/bcfserial/0002-Add-BCFSERIAL-driver.patch (100%)
 rename patches/{ => external}/git/AUFS (100%)
 rename patches/{ => external}/git/BBDTBS (100%)
 rename patches/{ => external}/git/BCFSERIAL (100%)
 create mode 100644 patches/external/git/KSMBD
 create mode 100644 patches/external/git/RT
 rename patches/{ => external}/git/TI_AMX3_CM3 (100%)
 rename patches/{ => external}/git/WIRELESS_REGDB (100%)
 rename patches/{ => external}/git/WPANUSB (100%)
 rename patches/{ => external}/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch (99%)
 rename patches/{ => external}/ksmbd/0002-wire-up-ksmbd.patch (100%)
 rename patches/{ => external}/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch (98%)
 rename patches/{ => external}/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch (98%)
 rename patches/{ => external}/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch (99%)
 rename patches/{ => external}/wpanusb/0002-Add-WPANUSB-driver.patch (100%)
 delete mode 100644 patches/git/KSMBD
 delete mode 100644 patches/git/RT

diff --git a/patch.sh b/patch.sh
index 851b5fded..3dca7853d 100644
--- a/patch.sh
+++ b/patch.sh
@@ -156,7 +156,7 @@ aufs () {
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: aufs-standalone' -s
 
-		${git_bin} format-patch -4 -o ../patches/aufs/
+		${git_bin} format-patch -4 -o ../patches/external/aufs/
 
 		cd ../
 		if [ -d ./aufs-standalone ] ; then
@@ -187,8 +187,8 @@ aufs () {
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: aufs-rt' -s
 
-		${git_bin} format-patch -6 -o ../patches/aufs/
-		echo "AUFS: https://github.com/sfjro/aufs-standalone/commit/${aufs_hash}" > ../patches/git/AUFS
+		${git_bin} format-patch -6 -o ../patches/external/aufs/
+		echo "AUFS: https://github.com/sfjro/aufs-standalone/commit/${aufs_hash}" > ../patches/external/git/AUFS
 
 		rm -rf ../aufs-standalone/ || true
 
@@ -196,19 +196,19 @@ aufs () {
 
 		start_cleanup
 
-		${git} "${DIR}/patches/aufs/0001-merge-aufs-kbuild.patch"
-		${git} "${DIR}/patches/aufs/0002-merge-aufs-base.patch"
-		${git} "${DIR}/patches/aufs/0003-merge-aufs-mmap.patch"
-		${git} "${DIR}/patches/aufs/0004-merge-aufs-standalone.patch"
-		${git} "${DIR}/patches/aufs/0005-merge-aufs.patch"
-		${git} "${DIR}/patches/aufs/0006-merge-aufs-rt.patch"
+		${git} "${DIR}/patches/external/aufs/0001-merge-aufs-kbuild.patch"
+		${git} "${DIR}/patches/external/aufs/0002-merge-aufs-base.patch"
+		${git} "${DIR}/patches/external/aufs/0003-merge-aufs-mmap.patch"
+		${git} "${DIR}/patches/external/aufs/0004-merge-aufs-standalone.patch"
+		${git} "${DIR}/patches/external/aufs/0005-merge-aufs.patch"
+		${git} "${DIR}/patches/external/aufs/0006-merge-aufs-rt.patch"
 
-		wdir="aufs"
+		wdir="external/aufs"
 		number=6
 		cleanup
 	fi
 
-	dir 'aufs'
+	dir 'external/aufs'
 }
 
 wpanusb () {
@@ -231,8 +231,8 @@ wpanusb () {
 
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: wpanusb: https://git.beagleboard.org/beagleconnect/linux/wpanusb' -m "https://git.beagleboard.org/beagleconnect/linux/wpanusb/-/commit/${wpanusb_hash}" -s
-		${git_bin} format-patch -1 -o ../patches/wpanusb/
-		echo "WPANUSB: https://git.beagleboard.org/beagleconnect/linux/wpanusb/-/commit/${wpanusb_hash}" > ../patches/git/WPANUSB
+		${git_bin} format-patch -1 -o ../patches/external/wpanusb/
+		echo "WPANUSB: https://git.beagleboard.org/beagleconnect/linux/wpanusb/-/commit/${wpanusb_hash}" > ../patches/external/git/WPANUSB
 
 		rm -rf ../wpanusb/ || true
 
@@ -240,15 +240,15 @@ wpanusb () {
 
 		start_cleanup
 
-		${git} "${DIR}/patches/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch"
+		${git} "${DIR}/patches/external/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch"
 
-		wdir="wpanusb"
+		wdir="external/wpanusb"
 		number=1
 		cleanup
 
 		exit 2
 	fi
-	dir 'wpanusb'
+	dir 'external/wpanusb'
 }
 
 bcfserial () {
@@ -270,8 +270,8 @@ bcfserial () {
 
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: bcfserial: https://git.beagleboard.org/beagleconnect/linux/bcfserial.git' -m "https://git.beagleboard.org/beagleconnect/linux/bcfserial/-/commit/${bcfserial_hash}" -s
-		${git_bin} format-patch -1 -o ../patches/bcfserial/
-		echo "BCFSERIAL: https://git.beagleboard.org/beagleconnect/linux/bcfserial/-/commit/${bcfserial_hash}" > ../patches/git/BCFSERIAL
+		${git_bin} format-patch -1 -o ../patches/external/bcfserial/
+		echo "BCFSERIAL: https://git.beagleboard.org/beagleconnect/linux/bcfserial/-/commit/${bcfserial_hash}" > ../patches/external/git/BCFSERIAL
 
 		rm -rf ../bcfserial/ || true
 
@@ -279,15 +279,15 @@ bcfserial () {
 
 		start_cleanup
 
-		${git} "${DIR}/patches/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch"
+		${git} "${DIR}/patches/external/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch"
 
-		wdir="bcfserial"
+		wdir="external/bcfserial"
 		number=1
 		cleanup
 
 		exit 2
 	fi
-	dir 'bcfserial'
+	dir 'external/bcfserial'
 }
 
 ksmbd () {
@@ -311,8 +311,8 @@ ksmbd () {
 
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: ksmbd: https://github.com/cifsd-team/ksmbd' -m "https://github.com/cifsd-team/ksmbd/commit/${ksmbd_hash}" -s
-		${git_bin} format-patch -1 -o ../patches/ksmbd/
-		echo "KSMBD: https://github.com/cifsd-team/ksmbd/commit/${ksmbd_hash}" > ../patches/git/KSMBD
+		${git_bin} format-patch -1 -o ../patches/external/ksmbd/
+		echo "KSMBD: https://github.com/cifsd-team/ksmbd/commit/${ksmbd_hash}" > ../patches/external/git/KSMBD
 
 		rm -rf ../ksmbd/ || true
 
@@ -320,15 +320,15 @@ ksmbd () {
 
 		start_cleanup
 
-		${git} "${DIR}/patches/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch"
+		${git} "${DIR}/patches/external/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch"
 
-		wdir="ksmbd"
+		wdir="external/ksmbd"
 		number=1
 		cleanup
 
 		exit 2
 	fi
-	dir 'ksmbd'
+	dir 'external/ksmbd'
 }
 
 rt_cleanup () {
@@ -349,13 +349,13 @@ rt () {
 		rm -f localversion-rt
 		${git_bin} add .
 		${git_bin} commit -a -m 'merge: CONFIG_PREEMPT_RT Patch Set' -m "patch-${rt_patch}.patch.xz" -s
-		${git_bin} format-patch -1 -o ../patches/rt/
-		echo "RT: patch-${rt_patch}.patch.xz" > ../patches/git/RT
+		${git_bin} format-patch -1 -o ../patches/external/rt/
+		echo "RT: patch-${rt_patch}.patch.xz" > ../patches/external/git/RT
 
 		exit 2
 	fi
 
-	dir 'rt'
+	dir 'external/rt'
 }
 
 wireless_regdb () {
@@ -367,7 +367,7 @@ wireless_regdb () {
 			rm -rf ./wireless-regdb || true
 		fi
 
-		${git_bin} clone git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git --depth=1
+		${git_bin} clone https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git --depth=1
 		cd ./wireless-regdb
 			wireless_regdb_hash=$(git rev-parse HEAD)
 		cd -
@@ -380,8 +380,8 @@ wireless_regdb () {
 		${git_bin} add -f ./firmware/regulatory.*
 		${git_bin} commit -a -m 'Add wireless-regdb regulatory database file' -m "https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=${wireless_regdb_hash}" -s
 
-		${git_bin} format-patch -1 -o ../patches/wireless_regdb/
-		echo "WIRELESS_REGDB: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=${wireless_regdb_hash}" > ../patches/git/WIRELESS_REGDB
+		${git_bin} format-patch -1 -o ../patches/external/wireless_regdb/
+		echo "WIRELESS_REGDB: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=${wireless_regdb_hash}" > ../patches/external/git/WIRELESS_REGDB
 
 		rm -rf ../wireless-regdb/ || true
 
@@ -389,14 +389,14 @@ wireless_regdb () {
 
 		start_cleanup
 
-		${git} "${DIR}/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch"
+		${git} "${DIR}/patches/external/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch"
 
-		wdir="wireless_regdb"
+		wdir="external/wireless_regdb"
 		number=1
 		cleanup
 	fi
 
-	dir 'wireless_regdb'
+	dir 'external/wireless_regdb'
 }
 
 ti_pm_firmware () {
@@ -421,7 +421,7 @@ ti_pm_firmware () {
 		${git_bin} add -f ./firmware/am*
 		${git_bin} commit -a -m 'Add AM335x CM3 Power Managment Firmware' -m "http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=${ti_amx3_cm3_hash}" -s
 		${git_bin} format-patch -1 -o ../patches/drivers/ti/firmware/
-		echo "TI_AMX3_CM3: http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=${ti_amx3_cm3_hash}" > ../patches/git/TI_AMX3_CM3
+		echo "TI_AMX3_CM3: http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=${ti_amx3_cm3_hash}" > ../patches/external/git/TI_AMX3_CM3
 
 		rm -rf ../ti-amx3-cm3-pm-firmware/ || true
 
@@ -497,7 +497,7 @@ beagleboard_dtbs () {
 		${git_bin} add -f include/dt-bindings/
 		${git_bin} commit -a -m "Add BeagleBoard.org Device Tree Changes" -m "https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/tree/${branch}" -m "https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/commit/${git_hash}" -s
 		${git_bin} format-patch -1 -o ../patches/soc/ti/beagleboard_dtbs/
-		echo "BBDTBS: https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/commit/${git_hash}" > ../patches/git/BBDTBS
+		echo "BBDTBS: https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/commit/${git_hash}" > ../patches/external/git/BBDTBS
 
 		rm -rf ../${work_dir}/ || true
 
@@ -581,22 +581,9 @@ backports () {
 		patch_backports
 	fi
 
-	backport_tag="v5.13.19"
-
-	subsystem="spidev"
-	#regenerate="enable"
-	if [ "x${regenerate}" = "xenable" ] ; then
-		pre_backports
-
-		cp -v ~/linux-src/drivers/spi/spidev.c ./drivers/spi/spidev.c
-
-		post_backports
-		exit 2
-	else
-		patch_backports
-	fi
+	dir 'backports/spidev'
 
-	backport_tag="v5.10.169"
+	backport_tag="v5.10.178"
 
 	subsystem="spi"
 	#regenerate="enable"
@@ -611,7 +598,7 @@ backports () {
 		patch_backports
 	fi
 
-	backport_tag="v5.10.177"
+	backport_tag="v5.10.178"
 
 	subsystem="iio"
 	#regenerate="enable"
@@ -622,7 +609,6 @@ backports () {
 		cp -rv ~/linux-src/include/uapi/linux/iio/* ./include/uapi/linux/iio/
 		cp -rv ~/linux-src/drivers/iio/* ./drivers/iio/
 		cp -rv ~/linux-src/drivers/staging/iio/* ./drivers/staging/iio/
-		cp -v ~/linux-src/include/linux/interrupt.h ./include/linux/
 
 		post_backports
 		exit 2
diff --git a/patches/backports/brcm80211/0001-backports-brcm80211-from-linux.git.patch b/patches/backports/brcm80211/0001-backports-brcm80211-from-linux.git.patch
index 5e9140a1a..fae892312 100644
--- a/patches/backports/brcm80211/0001-backports-brcm80211-from-linux.git.patch
+++ b/patches/backports/brcm80211/0001-backports-brcm80211-from-linux.git.patch
@@ -1,6 +1,6 @@
-From 1a5e3034bfd1e96fcc5bf196c15b029cc738827d Mon Sep 17 00:00:00 2001
+From fbd2865acbea1ca5c222067c9d579853397295e8 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:51:45 -0600
+Date: Tue, 25 Apr 2023 11:34:42 -0500
 Subject: [PATCH] backports: brcm80211: from: linux.git
 
 Reference: v5.10.9
@@ -8,15 +8,15 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
  .../broadcom/brcm80211/brcmfmac/bcmsdh.c      |   8 +-
  .../broadcom/brcm80211/brcmfmac/bus.h         |  19 +-
- .../broadcom/brcm80211/brcmfmac/cfg80211.c    |  44 ++---
+ .../broadcom/brcm80211/brcmfmac/cfg80211.c    |  61 ++----
  .../broadcom/brcm80211/brcmfmac/core.c        |  45 +++--
  .../broadcom/brcm80211/brcmfmac/dmi.c         |  42 ----
- .../broadcom/brcm80211/brcmfmac/firmware.c    |   2 -
+ .../broadcom/brcm80211/brcmfmac/firmware.c    |   7 -
  .../broadcom/brcm80211/brcmfmac/fweh.c        |   4 -
- .../broadcom/brcm80211/brcmfmac/pcie.c        |  77 +++++---
+ .../broadcom/brcm80211/brcmfmac/pcie.c        |  83 +++++---
  .../broadcom/brcm80211/brcmfmac/pcie.h        |   5 +
  .../broadcom/brcm80211/brcmfmac/pno.c         |  12 +-
- .../broadcom/brcm80211/brcmfmac/sdio.c        |   3 +-
+ .../broadcom/brcm80211/brcmfmac/sdio.c        |   4 +-
  .../broadcom/brcm80211/brcmfmac/usb.c         |   8 +-
  .../broadcom/brcm80211/brcmsmac/mac80211_if.c |   8 +-
  include/net/cfg80211.h                        |   6 +-
@@ -24,12 +24,12 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  net/mac80211/aead_api.c                       |   5 +-
  net/mac80211/aes_gmac.c                       |   5 +-
  net/mac80211/agg-rx.c                         |   5 +-
- net/mac80211/agg-tx.c                         |  24 +--
+ net/mac80211/agg-tx.c                         |  30 +--
  net/mac80211/airtime.c                        |   3 -
  net/mac80211/cfg.c                            |  36 +---
  net/mac80211/chan.c                           |   7 +-
  net/mac80211/debugfs.c                        |  44 +++--
- net/mac80211/driver-ops.c                     |   5 +-
+ net/mac80211/driver-ops.c                     |   8 +-
  net/mac80211/driver-ops.h                     |   5 +-
  net/mac80211/ibss.c                           |   6 -
  net/mac80211/ieee80211_i.h                    |  52 ++---
@@ -58,13 +58,13 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  net/wireless/mlme.c                           |  26 ++-
  net/wireless/nl80211.c                        |  56 ++----
  net/wireless/pmsr.c                           |  16 +-
- net/wireless/reg.c                            |  17 +-
+ net/wireless/reg.c                            |  21 +-
  net/wireless/scan.c                           | 125 ++++--------
  net/wireless/sme.c                            |   2 +-
  net/wireless/util.c                           |  25 +--
  net/wireless/wext-core.c                      |   5 +-
  net/wireless/wext-spy.c                       |  14 +-
- 58 files changed, 494 insertions(+), 950 deletions(-)
+ 58 files changed, 497 insertions(+), 989 deletions(-)
 
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
 index b6d0bc73923f..f9ebb98b0e3c 100644
@@ -120,10 +120,20 @@ index 3f5da3bb6aa5..08f9d47f2e5c 100644
  
  #endif /* BRCMFMAC_BUS_H */
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-index c2b6e5c966d0..0ee421f30aa2 100644
+index 0a069bc7f156..0ee421f30aa2 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -2767,9 +2767,8 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
+@@ -90,9 +90,6 @@
+ #define BRCMF_ASSOC_PARAMS_FIXED_SIZE \
+ 	(sizeof(struct brcmf_assoc_params_le) - sizeof(u16))
+ 
+-#define BRCMF_MAX_CHANSPEC_LIST \
+-	(BRCMF_DCMD_MEDLEN / sizeof(__le32) - 1)
+-
+ static bool check_vif_up(struct brcmf_cfg80211_vif *vif)
+ {
+ 	if (!test_bit(BRCMF_VIF_STATUS_READY, &vif->sme_state)) {
+@@ -2770,9 +2767,8 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
  	struct brcmf_sta_info_le sta_info_le;
  	u32 sta_flags;
  	u32 is_tdls_peer;
@@ -135,7 +145,7 @@ index c2b6e5c966d0..0ee421f30aa2 100644
  	int rssi;
  	u32 i;
  
-@@ -2835,27 +2834,25 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
+@@ -2838,27 +2834,25 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
  			sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES);
  			sinfo->rx_bytes = le64_to_cpu(sta_info_le.rx_tot_bytes);
  		}
@@ -178,7 +188,7 @@ index c2b6e5c966d0..0ee421f30aa2 100644
  		} else if (test_bit(BRCMF_VIF_STATUS_CONNECTED,
  			&ifp->vif->sme_state)) {
  			memset(&scb_val, 0, sizeof(scb_val));
-@@ -5614,8 +5611,7 @@ static bool brcmf_is_linkup(struct brcmf_cfg80211_vif *vif,
+@@ -5617,8 +5611,7 @@ static bool brcmf_is_linkup(struct brcmf_cfg80211_vif *vif,
  	return false;
  }
  
@@ -188,7 +198,7 @@ index c2b6e5c966d0..0ee421f30aa2 100644
  {
  	u32 event = e->event_code;
  	u16 flags = e->flags;
-@@ -5624,8 +5620,6 @@ static bool brcmf_is_linkdown(struct brcmf_cfg80211_vif *vif,
+@@ -5627,8 +5620,6 @@ static bool brcmf_is_linkdown(struct brcmf_cfg80211_vif *vif,
  	    (event == BRCMF_E_DISASSOC_IND) ||
  	    ((event == BRCMF_E_LINK) && (!(flags & BRCMF_EVENT_MSG_LINK)))) {
  		brcmf_dbg(CONN, "Processing link down\n");
@@ -197,7 +207,7 @@ index c2b6e5c966d0..0ee421f30aa2 100644
  		return true;
  	}
  	return false;
-@@ -6073,7 +6067,7 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
+@@ -6076,7 +6067,7 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
  		} else
  			brcmf_bss_connect_done(cfg, ndev, e, true);
  		brcmf_net_setcarrier(ifp, true);
@@ -206,6 +216,34 @@ index c2b6e5c966d0..0ee421f30aa2 100644
  		brcmf_dbg(CONN, "Linkdown\n");
  		if (!brcmf_is_ibssmode(ifp->vif) &&
  		    test_bit(BRCMF_VIF_STATUS_CONNECTED,
+@@ -6462,13 +6453,6 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
+ 			band->channels[i].flags = IEEE80211_CHAN_DISABLED;
+ 
+ 	total = le32_to_cpu(list->count);
+-	if (total > BRCMF_MAX_CHANSPEC_LIST) {
+-		bphy_err(drvr, "Invalid count of channel Spec. (%u)\n",
+-			 total);
+-		err = -EINVAL;
+-		goto fail_pbuf;
+-	}
+-
+ 	for (i = 0; i < total; i++) {
+ 		ch.chspec = (u16)le32_to_cpu(list->element[i]);
+ 		cfg->d11inf.decchspec(&ch);
+@@ -6614,13 +6598,6 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
+ 		band = cfg_to_wiphy(cfg)->bands[NL80211_BAND_2GHZ];
+ 		list = (struct brcmf_chanspec_list *)pbuf;
+ 		num_chan = le32_to_cpu(list->count);
+-		if (num_chan > BRCMF_MAX_CHANSPEC_LIST) {
+-			bphy_err(drvr, "Invalid count of channel Spec. (%u)\n",
+-				 num_chan);
+-			kfree(pbuf);
+-			return -EINVAL;
+-		}
+-
+ 		for (i = 0; i < num_chan; i++) {
+ 			ch.chspec = (u16)le32_to_cpu(list->element[i]);
+ 			cfg->d11inf.decchspec(&ch);
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
 index c8e1d505f7b5..3dd28f5fef19 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -354,7 +392,7 @@ index 0af452dca766..4aa2561934d7 100644
  };
  
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
-index a2b8d9171af2..d821a4758f8c 100644
+index 060889bf6d05..d821a4758f8c 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
 @@ -207,8 +207,6 @@ static int brcmf_init_nvram_parser(struct nvram_parser *nvp,
@@ -366,6 +404,18 @@ index a2b8d9171af2..d821a4758f8c 100644
  	/* Alloc for extra 0 byte + roundup by 4 + length field */
  	size += 1 + 3 + sizeof(u32);
  	nvp->nvram = kzalloc(size, GFP_KERNEL);
+@@ -703,11 +701,6 @@ brcmf_fw_alloc_request(u32 chip, u32 chiprev,
+ 	u32 i, j;
+ 	char end = '\0';
+ 
+-	if (chiprev >= BITS_PER_TYPE(u32)) {
+-		brcmf_err("Invalid chip revision %u\n", chiprev);
+-		return NULL;
+-	}
+-
+ 	for (i = 0; i < table_size; i++) {
+ 		if (mapping_table[i].chipid == chip &&
+ 		    mapping_table[i].revmask & BIT(chiprev))
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
 index 1285d3685c4f..430d2cca98b3 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
@@ -382,7 +432,7 @@ index 1285d3685c4f..430d2cca98b3 100644
  		/* convert event message */
  		emsg_be = &event->emsg;
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
-index 61febc9bfa14..d8db0dbcfe09 100644
+index 721d587425c7..d8db0dbcfe09 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
 @@ -12,7 +12,6 @@
@@ -441,7 +491,27 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  static void
  brcmf_pcie_copy_dev_tomem(struct brcmf_pciedev_info *devinfo, u32 mem_offset,
  			  void *dstaddr, u32 len)
-@@ -1306,18 +1346,6 @@ static void brcmf_pcie_down(struct device *dev)
+@@ -618,7 +658,7 @@ static int brcmf_pcie_exit_download_state(struct brcmf_pciedev_info *devinfo,
+ 	}
+ 
+ 	if (!brcmf_chip_set_active(devinfo->ci, resetintr))
+-		return -EIO;
++		return -EINVAL;
+ 	return 0;
+ }
+ 
+@@ -1109,10 +1149,6 @@ static int brcmf_pcie_init_ringbuffers(struct brcmf_pciedev_info *devinfo)
+ 				BRCMF_NROF_H2D_COMMON_MSGRINGS;
+ 		max_completionrings = BRCMF_NROF_D2H_COMMON_MSGRINGS;
+ 	}
+-	if (max_flowrings > 512) {
+-		brcmf_err(bus, "invalid max_flowrings(%d)\n", max_flowrings);
+-		return -EIO;
+-	}
+ 
+ 	if (devinfo->dma_idx_sz != 0) {
+ 		bufsz = (max_submissionrings + max_completionrings) *
+@@ -1310,18 +1346,6 @@ static void brcmf_pcie_down(struct device *dev)
  {
  }
  
@@ -460,7 +530,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  
  static int brcmf_pcie_tx(struct device *dev, struct sk_buff *skb)
  {
-@@ -1426,7 +1454,6 @@ static int brcmf_pcie_reset(struct device *dev)
+@@ -1430,7 +1454,6 @@ static int brcmf_pcie_reset(struct device *dev)
  }
  
  static const struct brcmf_bus_ops brcmf_pcie_bus_ops = {
@@ -468,7 +538,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  	.txdata = brcmf_pcie_tx,
  	.stop = brcmf_pcie_down,
  	.txctl = brcmf_pcie_tx_ctlpkt,
-@@ -1534,8 +1561,8 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
+@@ -1538,8 +1561,8 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
  		return err;
  
  	brcmf_dbg(PCIE, "Download FW %s\n", devinfo->fw_name);
@@ -479,7 +549,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  
  	resetintr = get_unaligned_le32(fw->data);
  	release_firmware(fw);
-@@ -1549,7 +1576,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
+@@ -1553,7 +1576,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
  		brcmf_dbg(PCIE, "Download NVRAM %s\n", devinfo->nvram_name);
  		address = devinfo->ci->rambase + devinfo->ci->ramsize -
  			  nvram_len;
@@ -488,7 +558,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  		brcmf_fw_nvram_free(nvram);
  	} else {
  		brcmf_dbg(PCIE, "No matching NVRAM file found %s\n",
-@@ -1748,8 +1775,6 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
+@@ -1752,8 +1775,6 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
  	ret = brcmf_chip_get_raminfo(devinfo->ci);
  	if (ret) {
  		brcmf_err(bus, "Failed to get RAM info\n");
@@ -497,7 +567,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  		goto fail;
  	}
  
-@@ -1799,6 +1824,9 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
+@@ -1803,6 +1824,9 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
  
  	init_waitqueue_head(&devinfo->mbdata_resp_wait);
  
@@ -507,7 +577,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  	ret = brcmf_attach(&devinfo->pdev->dev);
  	if (ret)
  		goto fail;
-@@ -2045,7 +2073,7 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev)
+@@ -2049,7 +2073,7 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev)
  
  	err = brcmf_pcie_probe(pdev, NULL);
  	if (err)
@@ -516,7 +586,7 @@ index 61febc9bfa14..d8db0dbcfe09 100644
  
  	return err;
  }
-@@ -2110,10 +2138,15 @@ static struct pci_driver brcmf_pciedrvr = {
+@@ -2114,10 +2138,15 @@ static struct pci_driver brcmf_pciedrvr = {
  };
  
  
@@ -580,7 +650,7 @@ index d0a7465be586..fabfbb0b40b0 100644
  				       sizeof(pfn_mac));
  	if (err)
 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
-index 9929e90866f0..59c2b2b6027d 100644
+index 3c0d5c68eaca..59c2b2b6027d 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
 @@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype {
@@ -592,7 +662,15 @@ index 9929e90866f0..59c2b2b6027d 100644
  
  /* SDIO Pad drive strength to select value mappings */
  struct sdiod_drive_str {
-@@ -4157,6 +4157,7 @@ static int brcmf_sdio_bus_reset(struct device *dev)
+@@ -3401,7 +3401,6 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus,
+ 	/* Take arm out of reset */
+ 	if (!brcmf_chip_set_active(bus->ci, rstvec)) {
+ 		brcmf_err("error getting out of ARM core reset\n");
+-		bcmerror = -EIO;
+ 		goto err;
+ 	}
+ 
+@@ -4158,6 +4157,7 @@ static int brcmf_sdio_bus_reset(struct device *dev)
  	if (ret) {
  		brcmf_err("Failed to probe after sdio device reset: ret %d\n",
  			  ret);
@@ -774,7 +852,7 @@ index 6ef8ded4ec76..cd4cf84a7f99 100644
  		return;
  
 diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
-index 4b4ab1961068..b37c8a983d88 100644
+index 92e5812daf89..b37c8a983d88 100644
 --- a/net/mac80211/agg-tx.c
 +++ b/net/mac80211/agg-tx.c
 @@ -9,7 +9,7 @@
@@ -822,15 +900,37 @@ index 4b4ab1961068..b37c8a983d88 100644
  				     buf_size, tid_tx->timeout);
  
  	WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
-@@ -523,7 +523,6 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
+@@ -491,7 +491,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
+ {
+ 	struct tid_ampdu_tx *tid_tx;
+ 	struct ieee80211_local *local = sta->local;
+-	struct ieee80211_sub_if_data *sdata;
++	struct ieee80211_sub_if_data *sdata = sta->sdata;
+ 	struct ieee80211_ampdu_params params = {
+ 		.sta = &sta->sta,
+ 		.action = IEEE80211_AMPDU_TX_START,
+@@ -521,10 +521,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
+ 	 */
+ 	synchronize_net();
  
+-	sdata = sta->sdata;
  	params.ssn = sta->tid_seq[tid] >> 4;
  	ret = drv_ampdu_action(local, sdata, &params);
 -	tid_tx->ssn = params.ssn;
  	if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
  		return;
  	} else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
-@@ -626,14 +625,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
+@@ -535,9 +533,6 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
+ 		 */
+ 		set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state);
+ 	} else if (ret) {
+-		if (!sdata)
+-			return;
+-
+ 		ht_dbg(sdata,
+ 		       "BA request denied - HW unavailable for %pM tid %d\n",
+ 		       sta->sta.addr, tid);
+@@ -630,14 +625,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
  		return -EINVAL;
  	}
  
@@ -845,7 +945,7 @@ index 4b4ab1961068..b37c8a983d88 100644
  	/*
  	 * 802.11n-2009 11.5.1.1: If the initiating STA is an HT STA, is a
  	 * member of an IBSS, and has no other existing Block Ack agreement
-@@ -898,7 +889,6 @@ void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
+@@ -902,7 +889,6 @@ void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
  {
  	struct ieee80211_sub_if_data *sdata = sta->sdata;
  	bool send_delba = false;
@@ -853,7 +953,7 @@ index 4b4ab1961068..b37c8a983d88 100644
  
  	ht_dbg(sdata, "Stopping Tx BA session for %pM tid %d\n",
  	       sta->sta.addr, tid);
-@@ -916,14 +906,10 @@ void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
+@@ -920,14 +906,10 @@ void ieee80211_stop_tx_ba_cb(struct sta_info *sta, int tid,
  		send_delba = true;
  
  	ieee80211_remove_tid_tx(sta, tid);
@@ -1115,7 +1215,7 @@ index de5cd3818690..90470392fdaa 100644
  	if (buf[0] == '0' && buf[1] == '\0')
  		local->force_tx_status = 0;
 diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
-index 48322e45e7dd..c9a8a2433e8a 100644
+index 120bd9cdf7df..c9a8a2433e8a 100644
 --- a/net/mac80211/driver-ops.c
 +++ b/net/mac80211/driver-ops.c
 @@ -125,11 +125,8 @@ int drv_sta_state(struct ieee80211_local *local,
@@ -1131,6 +1231,16 @@ index 48322e45e7dd..c9a8a2433e8a 100644
  	} else if (old_state == IEEE80211_STA_ASSOC &&
  		   new_state == IEEE80211_STA_AUTH) {
  		drv_sta_remove(local, sdata, &sta->sta);
+@@ -331,9 +328,6 @@ int drv_ampdu_action(struct ieee80211_local *local,
+ 
+ 	might_sleep();
+ 
+-	if (!sdata)
+-		return -EIO;
+-
+ 	sdata = get_bss_sdata(sdata);
+ 	if (!check_sdata_in_driver(sdata))
+ 		return -EIO;
 diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
 index a172f69c7112..bcdfd19a596b 100644
 --- a/net/mac80211/driver-ops.h
@@ -3461,7 +3571,7 @@ index a817d8e3e4b3..a95c79d18349 100644
  EXPORT_SYMBOL_GPL(cfg80211_pmsr_complete);
  
 diff --git a/net/wireless/reg.c b/net/wireless/reg.c
-index a1e64d967bd3..a04fdfb35f07 100644
+index 90297264d8ae..a04fdfb35f07 100644
 --- a/net/wireless/reg.c
 +++ b/net/wireless/reg.c
 @@ -787,8 +787,6 @@ static int __init load_builtin_regdb_keys(void)
@@ -3511,6 +3621,18 @@ index a1e64d967bd3..a04fdfb35f07 100644
  }
  
  void wiphy_regulatory_deregister(struct wiphy *wiphy)
+@@ -4185,10 +4174,8 @@ static int __init regulatory_init_db(void)
+ 		return -EINVAL;
+ 
+ 	err = load_builtin_regdb_keys();
+-	if (err) {
+-		platform_device_unregister(reg_pdev);
++	if (err)
+ 		return err;
+-	}
+ 
+ 	/* We always try to get an update for the static regdomain */
+ 	err = regulatory_hint_core(cfg80211_world_regdom->alpha2);
 diff --git a/net/wireless/scan.c b/net/wireless/scan.c
 index d09dabae5627..3409f37d838b 100644
 --- a/net/wireless/scan.c
@@ -3930,5 +4052,5 @@ index b379a0371653..33bef22e44e9 100644
  	/* Send event to user space */
  	wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold);
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/backports/iio/0001-backports-iio-from-linux.git.patch b/patches/backports/iio/0001-backports-iio-from-linux.git.patch
index b22d93962..e2010968e 100644
--- a/patches/backports/iio/0001-backports-iio-from-linux.git.patch
+++ b/patches/backports/iio/0001-backports-iio-from-linux.git.patch
@@ -1,67 +1,18 @@
-From b419b73eaa752611f75dcb36093347fd223cac7f Mon Sep 17 00:00:00 2001
+From 17316688df9e6960c40a7d52f1092e81ab51a35a Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:09:44 -0500
+Date: Tue, 25 Apr 2023 11:31:41 -0500
 Subject: [PATCH] backports: iio: from: linux.git
 
-Reference: v5.10.177
+Reference: v5.10.178
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
- drivers/iio/accel/adis16201.c           |   1 +
- drivers/iio/accel/adis16209.c           |   1 +
- drivers/iio/accel/hid-sensor-accel-3d.c |   1 +
- drivers/iio/accel/mma9551_core.c        |  10 ++-
- drivers/iio/adc/ad_sigma_delta.c        |   8 +-
- drivers/iio/adc/berlin2-adc.c           |   4 +-
- drivers/iio/adc/stm32-dfsdm-adc.c       |   1 +
- drivers/iio/adc/ti-adc128s052.c         |  14 +--
- drivers/iio/adc/twl6030-gpadc.c         |  32 +++++++
- drivers/iio/gyro/adis16136.c            |   1 +
- drivers/iio/gyro/adis16260.c            |   1 +
- drivers/iio/imu/adis.c                  |  98 +++++++++++----------
- drivers/iio/imu/adis16400.c             |   1 +
- drivers/iio/imu/adis16460.c             |   5 +-
- drivers/iio/imu/adis16475.c             |   6 +-
- drivers/iio/imu/adis16480.c             |   1 +
- drivers/iio/imu/adis_buffer.c           |  10 +--
- drivers/iio/imu/adis_trigger.c          |  20 +++--
- drivers/iio/imu/fxos8700_core.c         | 111 +++++++++++++++++++-----
- drivers/iio/temperature/ltc2983.c       |  10 +--
- drivers/staging/iio/accel/adis16203.c   |   1 +
- drivers/staging/iio/accel/adis16240.c   |   1 +
- include/linux/iio/imu/adis.h            |  63 +++++++++-----
- include/linux/interrupt.h               |   4 +
- 24 files changed, 278 insertions(+), 127 deletions(-)
+ drivers/iio/accel/mma9551_core.c | 10 ++++++++--
+ drivers/iio/adc/ad7791.c         |  2 +-
+ drivers/iio/adc/ti-ads7950.c     |  1 +
+ drivers/iio/dac/cio-dac.c        |  4 ++--
+ drivers/iio/light/cm32181.c      | 12 ++++++++++++
+ 5 files changed, 24 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/iio/accel/adis16201.c b/drivers/iio/accel/adis16201.c
-index 84bbdfd2f2ba..b4ae4f86da3e 100644
---- a/drivers/iio/accel/adis16201.c
-+++ b/drivers/iio/accel/adis16201.c
-@@ -304,3 +304,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16201 Dual-Axis Digital Inclinometer and Accelerometer");
- MODULE_LICENSE("GPL v2");
- MODULE_ALIAS("spi:adis16201");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/accel/adis16209.c b/drivers/iio/accel/adis16209.c
-index 4a841aec6268..e6e465f397d9 100644
---- a/drivers/iio/accel/adis16209.c
-+++ b/drivers/iio/accel/adis16209.c
-@@ -314,3 +314,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16209 Dual-Axis Digital Inclinometer and Accelerometer");
- MODULE_LICENSE("GPL v2");
- MODULE_ALIAS("spi:adis16209");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
-index f05840d17fb7..8d929a4f9110 100644
---- a/drivers/iio/accel/hid-sensor-accel-3d.c
-+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
-@@ -277,6 +277,7 @@ static int accel_3d_capture_sample(struct hid_sensor_hub_device *hsdev,
- 			hid_sensor_convert_timestamp(
- 					&accel_state->common_attributes,
- 					*(int64_t *)raw_data);
-+		ret = 0;
- 	break;
- 	default:
- 		break;
 diff --git a/drivers/iio/accel/mma9551_core.c b/drivers/iio/accel/mma9551_core.c
 index 666e7a04a7d7..9bb5c2fea08c 100644
 --- a/drivers/iio/accel/mma9551_core.c
@@ -94,1127 +45,76 @@ index 666e7a04a7d7..9bb5c2fea08c 100644
  }
  EXPORT_SYMBOL(mma9551_read_status_word);
  
-diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
-index 3a6f239d4acc..496cb2b26bfd 100644
---- a/drivers/iio/adc/ad_sigma_delta.c
-+++ b/drivers/iio/adc/ad_sigma_delta.c
-@@ -280,10 +280,10 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
- 	unsigned int data_reg;
- 	int ret = 0;
- 
--	if (iio_buffer_enabled(indio_dev))
--		return -EBUSY;
-+	ret = iio_device_claim_direct_mode(indio_dev);
-+	if (ret)
-+		return ret;
- 
--	mutex_lock(&indio_dev->mlock);
- 	ad_sigma_delta_set_channel(sigma_delta, chan->address);
- 
- 	spi_bus_lock(sigma_delta->spi->master);
-@@ -322,7 +322,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
- 	ad_sigma_delta_set_mode(sigma_delta, AD_SD_MODE_IDLE);
- 	sigma_delta->bus_locked = false;
- 	spi_bus_unlock(sigma_delta->spi->master);
--	mutex_unlock(&indio_dev->mlock);
-+	iio_device_release_direct_mode(indio_dev);
- 
- 	if (ret)
- 		return ret;
-diff --git a/drivers/iio/adc/berlin2-adc.c b/drivers/iio/adc/berlin2-adc.c
-index 8b04b95b7b7a..fa2c87946e16 100644
---- a/drivers/iio/adc/berlin2-adc.c
-+++ b/drivers/iio/adc/berlin2-adc.c
-@@ -289,8 +289,10 @@ static int berlin2_adc_probe(struct platform_device *pdev)
- 	int ret;
- 
- 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*priv));
--	if (!indio_dev)
-+	if (!indio_dev) {
-+		of_node_put(parent_np);
- 		return -ENOMEM;
-+	}
- 
- 	priv = iio_priv(indio_dev);
- 	platform_set_drvdata(pdev, indio_dev);
-diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
-index 9234f14167b7..171d73efb2f8 100644
---- a/drivers/iio/adc/stm32-dfsdm-adc.c
-+++ b/drivers/iio/adc/stm32-dfsdm-adc.c
-@@ -1521,6 +1521,7 @@ static const struct of_device_id stm32_dfsdm_adc_match[] = {
- 	},
- 	{}
+diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c
+index d57ad966e17c..f3502f12653b 100644
+--- a/drivers/iio/adc/ad7791.c
++++ b/drivers/iio/adc/ad7791.c
+@@ -253,7 +253,7 @@ static const struct ad_sigma_delta_info ad7791_sigma_delta_info = {
+ 	.has_registers = true,
+ 	.addr_shift = 4,
+ 	.read_mask = BIT(3),
+-	.irq_flags = IRQF_TRIGGER_LOW,
++	.irq_flags = IRQF_TRIGGER_FALLING,
  };
-+MODULE_DEVICE_TABLE(of, stm32_dfsdm_adc_match);
- 
- static int stm32_dfsdm_adc_probe(struct platform_device *pdev)
- {
-diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
-index 83c1ae07b3e9..8618ae7bc067 100644
---- a/drivers/iio/adc/ti-adc128s052.c
-+++ b/drivers/iio/adc/ti-adc128s052.c
-@@ -193,13 +193,13 @@ static int adc128_remove(struct spi_device *spi)
- }
- 
- static const struct of_device_id adc128_of_match[] = {
--	{ .compatible = "ti,adc128s052", },
--	{ .compatible = "ti,adc122s021", },
--	{ .compatible = "ti,adc122s051", },
--	{ .compatible = "ti,adc122s101", },
--	{ .compatible = "ti,adc124s021", },
--	{ .compatible = "ti,adc124s051", },
--	{ .compatible = "ti,adc124s101", },
-+	{ .compatible = "ti,adc128s052", .data = (void*)0L, },
-+	{ .compatible = "ti,adc122s021", .data = (void*)1L, },
-+	{ .compatible = "ti,adc122s051", .data = (void*)1L, },
-+	{ .compatible = "ti,adc122s101", .data = (void*)1L, },
-+	{ .compatible = "ti,adc124s021", .data = (void*)2L, },
-+	{ .compatible = "ti,adc124s051", .data = (void*)2L, },
-+	{ .compatible = "ti,adc124s101", .data = (void*)2L, },
- 	{ /* sentinel */ },
- };
- MODULE_DEVICE_TABLE(of, adc128_of_match);
-diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
-index 256177b15c51..024bdc1ef77e 100644
---- a/drivers/iio/adc/twl6030-gpadc.c
-+++ b/drivers/iio/adc/twl6030-gpadc.c
-@@ -57,6 +57,18 @@
- #define TWL6030_GPADCS				BIT(1)
- #define TWL6030_GPADCR				BIT(0)
- 
-+#define USB_VBUS_CTRL_SET			0x04
-+#define USB_ID_CTRL_SET				0x06
-+
-+#define TWL6030_MISC1				0xE4
-+#define VBUS_MEAS				0x01
-+#define ID_MEAS					0x01
-+
-+#define VAC_MEAS                0x04
-+#define VBAT_MEAS               0x02
-+#define BB_MEAS                 0x01
-+
-+
- /**
-  * struct twl6030_chnl_calib - channel calibration
-  * @gain:		slope coefficient for ideal curve
-@@ -927,6 +939,26 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
- 		return ret;
- 	}
- 
-+	ret = twl_i2c_write_u8(TWL_MODULE_USB, VBUS_MEAS, USB_VBUS_CTRL_SET);
-+	if (ret < 0) {
-+		dev_err(dev, "failed to wire up inputs\n");
-+		return ret;
-+	}
-+
-+	ret = twl_i2c_write_u8(TWL_MODULE_USB, ID_MEAS, USB_ID_CTRL_SET);
-+	if (ret < 0) {
-+		dev_err(dev, "failed to wire up inputs\n");
-+		return ret;
-+	}
-+
-+	ret = twl_i2c_write_u8(TWL6030_MODULE_ID0,
-+				VBAT_MEAS | BB_MEAS | VAC_MEAS,
-+				TWL6030_MISC1);
-+	if (ret < 0) {
-+		dev_err(dev, "failed to wire up inputs\n");
-+		return ret;
-+	}
-+
- 	indio_dev->name = DRIVER_NAME;
- 	indio_dev->info = &twl6030_gpadc_iio_info;
- 	indio_dev->modes = INDIO_DIRECT_MODE;
-diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
-index a11ae9db0d11..74db8edb4283 100644
---- a/drivers/iio/gyro/adis16136.c
-+++ b/drivers/iio/gyro/adis16136.c
-@@ -599,3 +599,4 @@ module_spi_driver(adis16136_driver);
- MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
- MODULE_DESCRIPTION("Analog Devices ADIS16133/ADIS16135/ADIS16136 gyroscope driver");
- MODULE_LICENSE("GPL v2");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/gyro/adis16260.c b/drivers/iio/gyro/adis16260.c
-index e7c9a3e31c45..1e45d93de5b7 100644
---- a/drivers/iio/gyro/adis16260.c
-+++ b/drivers/iio/gyro/adis16260.c
-@@ -438,3 +438,4 @@ module_spi_driver(adis16260_driver);
- MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16260/5 Digital Gyroscope Sensor");
- MODULE_LICENSE("GPL v2");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
-index 715eef81bc24..e9821814afec 100644
---- a/drivers/iio/imu/adis.c
-+++ b/drivers/iio/imu/adis.c
-@@ -34,8 +34,8 @@
-  * @value: The value to write to device (up to 4 bytes)
-  * @size: The size of the @value (in bytes)
-  */
--int __adis_write_reg(struct adis *adis, unsigned int reg,
--	unsigned int value, unsigned int size)
-+int __adis_write_reg(struct adis *adis, unsigned int reg, unsigned int value,
-+		     unsigned int size)
- {
- 	unsigned int page = reg / ADIS_PAGE_SIZE;
- 	int ret, i;
-@@ -118,14 +118,14 @@ int __adis_write_reg(struct adis *adis, unsigned int reg,
- 	ret = spi_sync(adis->spi, &msg);
- 	if (ret) {
- 		dev_err(&adis->spi->dev, "Failed to write register 0x%02X: %d\n",
--				reg, ret);
-+			reg, ret);
- 	} else {
- 		adis->current_page = page;
- 	}
- 
- 	return ret;
- }
--EXPORT_SYMBOL_GPL(__adis_write_reg);
-+EXPORT_SYMBOL_NS_GPL(__adis_write_reg, IIO_ADISLIB);
- 
- /**
-  * __adis_read_reg() - read N bytes from register (unlocked version)
-@@ -134,8 +134,8 @@ EXPORT_SYMBOL_GPL(__adis_write_reg);
-  * @val: The value read back from the device
-  * @size: The size of the @val buffer
-  */
--int __adis_read_reg(struct adis *adis, unsigned int reg,
--	unsigned int *val, unsigned int size)
-+int __adis_read_reg(struct adis *adis, unsigned int reg, unsigned int *val,
-+		    unsigned int size)
- {
- 	unsigned int page = reg / ADIS_PAGE_SIZE;
- 	struct spi_message msg;
-@@ -205,12 +205,12 @@ int __adis_read_reg(struct adis *adis, unsigned int reg,
- 	ret = spi_sync(adis->spi, &msg);
- 	if (ret) {
- 		dev_err(&adis->spi->dev, "Failed to read register 0x%02X: %d\n",
--				reg, ret);
-+			reg, ret);
- 		return ret;
--	} else {
--		adis->current_page = page;
- 	}
- 
-+	adis->current_page = page;
-+
- 	switch (size) {
- 	case 4:
- 		*val = get_unaligned_be32(adis->rx);
-@@ -222,7 +222,7 @@ int __adis_read_reg(struct adis *adis, unsigned int reg,
- 
- 	return ret;
- }
--EXPORT_SYMBOL_GPL(__adis_read_reg);
-+EXPORT_SYMBOL_NS_GPL(__adis_read_reg, IIO_ADISLIB);
- /**
-  * __adis_update_bits_base() - ADIS Update bits function - Unlocked version
-  * @adis: The adis device
-@@ -247,17 +247,17 @@ int __adis_update_bits_base(struct adis *adis, unsigned int reg, const u32 mask,
- 
- 	return __adis_write_reg(adis, reg, __val, size);
- }
--EXPORT_SYMBOL_GPL(__adis_update_bits_base);
-+EXPORT_SYMBOL_NS_GPL(__adis_update_bits_base, IIO_ADISLIB);
- 
- #ifdef CONFIG_DEBUG_FS
- 
--int adis_debugfs_reg_access(struct iio_dev *indio_dev,
--	unsigned int reg, unsigned int writeval, unsigned int *readval)
-+int adis_debugfs_reg_access(struct iio_dev *indio_dev, unsigned int reg,
-+			    unsigned int writeval, unsigned int *readval)
- {
- 	struct adis *adis = iio_device_get_drvdata(indio_dev);
- 
- 	if (readval) {
--		uint16_t val16;
-+		u16 val16;
- 		int ret;
- 
- 		ret = adis_read_reg_16(adis, reg, &val16);
-@@ -265,36 +265,41 @@ int adis_debugfs_reg_access(struct iio_dev *indio_dev,
- 			*readval = val16;
- 
- 		return ret;
--	} else {
--		return adis_write_reg_16(adis, reg, writeval);
- 	}
-+
-+	return adis_write_reg_16(adis, reg, writeval);
- }
--EXPORT_SYMBOL(adis_debugfs_reg_access);
-+EXPORT_SYMBOL_NS(adis_debugfs_reg_access, IIO_ADISLIB);
- 
- #endif
- 
- /**
-- * adis_enable_irq() - Enable or disable data ready IRQ
-+ * __adis_enable_irq() - Enable or disable data ready IRQ (unlocked)
-  * @adis: The adis device
-  * @enable: Whether to enable the IRQ
-  *
-  * Returns 0 on success, negative error code otherwise
-  */
--int adis_enable_irq(struct adis *adis, bool enable)
-+int __adis_enable_irq(struct adis *adis, bool enable)
- {
--	int ret = 0;
--	uint16_t msc;
-+	int ret;
-+	u16 msc;
- 
--	mutex_lock(&adis->state_lock);
-+	if (adis->data->enable_irq)
-+		return adis->data->enable_irq(adis, enable);
- 
--	if (adis->data->enable_irq) {
--		ret = adis->data->enable_irq(adis, enable);
--		goto out_unlock;
-+	if (adis->data->unmasked_drdy) {
-+		if (enable)
-+			enable_irq(adis->spi->irq);
-+		else
-+			disable_irq(adis->spi->irq);
-+
-+		return 0;
- 	}
- 
- 	ret = __adis_read_reg_16(adis, adis->data->msc_ctrl_reg, &msc);
- 	if (ret)
--		goto out_unlock;
-+		return ret;
- 
- 	msc |= ADIS_MSC_CTRL_DATA_RDY_POL_HIGH;
- 	msc &= ~ADIS_MSC_CTRL_DATA_RDY_DIO2;
-@@ -303,13 +308,9 @@ int adis_enable_irq(struct adis *adis, bool enable)
- 	else
- 		msc &= ~ADIS_MSC_CTRL_DATA_RDY_EN;
- 
--	ret = __adis_write_reg_16(adis, adis->data->msc_ctrl_reg, msc);
--
--out_unlock:
--	mutex_unlock(&adis->state_lock);
--	return ret;
-+	return __adis_write_reg_16(adis, adis->data->msc_ctrl_reg, msc);
- }
--EXPORT_SYMBOL(adis_enable_irq);
-+EXPORT_SYMBOL_NS(__adis_enable_irq, IIO_ADISLIB);
- 
- /**
-  * __adis_check_status() - Check the device for error conditions (unlocked)
-@@ -319,7 +320,7 @@ EXPORT_SYMBOL(adis_enable_irq);
-  */
- int __adis_check_status(struct adis *adis)
- {
--	uint16_t status;
-+	u16 status;
- 	int ret;
- 	int i;
- 
-@@ -341,7 +342,7 @@ int __adis_check_status(struct adis *adis)
- 
- 	return -EIO;
- }
--EXPORT_SYMBOL_GPL(__adis_check_status);
-+EXPORT_SYMBOL_NS_GPL(__adis_check_status, IIO_ADISLIB);
- 
- /**
-  * __adis_reset() - Reset the device (unlocked version)
-@@ -355,7 +356,7 @@ int __adis_reset(struct adis *adis)
- 	const struct adis_timeout *timeouts = adis->data->timeouts;
- 
- 	ret = __adis_write_reg_8(adis, adis->data->glob_cmd_reg,
--			ADIS_GLOB_CMD_SW_RESET);
-+				 ADIS_GLOB_CMD_SW_RESET);
- 	if (ret) {
- 		dev_err(&adis->spi->dev, "Failed to reset device: %d\n", ret);
- 		return ret;
-@@ -365,7 +366,7 @@ int __adis_reset(struct adis *adis)
- 
- 	return 0;
- }
--EXPORT_SYMBOL_GPL(__adis_reset);
-+EXPORT_SYMBOL_NS_GPL(__adis_reset, IIO_ADIS_LIB);
- 
- static int adis_self_test(struct adis *adis)
- {
-@@ -411,7 +412,7 @@ int __adis_initial_startup(struct adis *adis)
- {
- 	const struct adis_timeout *timeouts = adis->data->timeouts;
- 	struct gpio_desc *gpio;
--	uint16_t prod_id;
-+	u16 prod_id;
- 	int ret;
- 
- 	/* check if the device has rst pin low */
-@@ -420,7 +421,7 @@ int __adis_initial_startup(struct adis *adis)
- 		return PTR_ERR(gpio);
- 
- 	if (gpio) {
--		msleep(10);
-+		usleep_range(10, 12);
- 		/* bring device out of reset */
- 		gpiod_set_value_cansleep(gpio, 0);
- 		msleep(timeouts->reset_ms);
-@@ -434,7 +435,13 @@ int __adis_initial_startup(struct adis *adis)
- 	if (ret)
- 		return ret;
- 
--	adis_enable_irq(adis, false);
-+	/*
-+	 * don't bother calling this if we can't unmask the IRQ as in this case
-+	 * the IRQ is most likely not yet requested and we will request it
-+	 * with 'IRQF_NO_AUTOEN' anyways.
-+	 */
-+	if (!adis->data->unmasked_drdy)
-+		__adis_enable_irq(adis, false);
- 
- 	if (!adis->data->prod_id_reg)
- 		return 0;
-@@ -450,7 +457,7 @@ int __adis_initial_startup(struct adis *adis)
- 
- 	return 0;
- }
--EXPORT_SYMBOL_GPL(__adis_initial_startup);
-+EXPORT_SYMBOL_NS_GPL(__adis_initial_startup, IIO_ADISLIB);
- 
- /**
-  * adis_single_conversion() - Performs a single sample conversion
-@@ -468,7 +475,8 @@ EXPORT_SYMBOL_GPL(__adis_initial_startup);
-  * a error bit in the channels raw value set error_mask to 0.
-  */
- int adis_single_conversion(struct iio_dev *indio_dev,
--	const struct iio_chan_spec *chan, unsigned int error_mask, int *val)
-+			   const struct iio_chan_spec *chan,
-+			   unsigned int error_mask, int *val)
- {
- 	struct adis *adis = iio_device_get_drvdata(indio_dev);
- 	unsigned int uval;
-@@ -477,7 +485,7 @@ int adis_single_conversion(struct iio_dev *indio_dev,
- 	mutex_lock(&adis->state_lock);
- 
- 	ret = __adis_read_reg(adis, chan->address, &uval,
--			chan->scan_type.storagebits / 8);
-+			      chan->scan_type.storagebits / 8);
- 	if (ret)
- 		goto err_unlock;
- 
-@@ -497,7 +505,7 @@ int adis_single_conversion(struct iio_dev *indio_dev,
- 	mutex_unlock(&adis->state_lock);
- 	return ret;
- }
--EXPORT_SYMBOL_GPL(adis_single_conversion);
-+EXPORT_SYMBOL_NS_GPL(adis_single_conversion, IIO_ADISLIB);
- 
- /**
-  * adis_init() - Initialize adis device structure
-@@ -512,7 +520,7 @@ EXPORT_SYMBOL_GPL(adis_single_conversion);
-  * called.
-  */
- int adis_init(struct adis *adis, struct iio_dev *indio_dev,
--	struct spi_device *spi, const struct adis_data *data)
-+	      struct spi_device *spi, const struct adis_data *data)
- {
- 	if (!data || !data->timeouts) {
- 		dev_err(&spi->dev, "No config data or timeouts not defined!\n");
-@@ -534,7 +542,7 @@ int adis_init(struct adis *adis, struct iio_dev *indio_dev,
- 
- 	return 0;
- }
--EXPORT_SYMBOL_GPL(adis_init);
-+EXPORT_SYMBOL_NS_GPL(adis_init, IIO_ADISLIB);
- 
- MODULE_LICENSE("GPL");
- MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
-diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c
-index 4aff16466da0..c5255116954a 100644
---- a/drivers/iio/imu/adis16400.c
-+++ b/drivers/iio/imu/adis16400.c
-@@ -1252,3 +1252,4 @@ module_spi_driver(adis16400_driver);
- MODULE_AUTHOR("Manuel Stahl <manuel.stahl@iis.fraunhofer.de>");
- MODULE_DESCRIPTION("Analog Devices ADIS16400/5 IMU SPI driver");
- MODULE_LICENSE("GPL v2");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c
-index 74a161e39733..a28143a19d3a 100644
---- a/drivers/iio/imu/adis16460.c
-+++ b/drivers/iio/imu/adis16460.c
-@@ -403,12 +403,12 @@ static int adis16460_probe(struct spi_device *spi)
- 	if (ret)
- 		return ret;
- 
-+	/* We cannot mask the interrupt, so ensure it isn't auto enabled */
-+	st->adis.irq_flag |= IRQF_NO_AUTOEN;
- 	ret = devm_adis_setup_buffer_and_trigger(&st->adis, indio_dev, NULL);
- 	if (ret)
- 		return ret;
- 
--	adis16460_enable_irq(&st->adis, 0);
--
- 	ret = __adis_initial_startup(&st->adis);
- 	if (ret)
- 		return ret;
-@@ -447,3 +447,4 @@ module_spi_driver(adis16460_driver);
- MODULE_AUTHOR("Dragos Bogdan <dragos.bogdan@analog.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16460 IMU driver");
- MODULE_LICENSE("GPL");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
-index 3c4e4deb8760..aed1cf3bfa13 100644
---- a/drivers/iio/imu/adis16475.c
-+++ b/drivers/iio/imu/adis16475.c
-@@ -1196,6 +1196,9 @@ static int adis16475_config_irq_pin(struct adis16475 *st)
- 		return -EINVAL;
- 	}
- 
-+	/* We cannot mask the interrupt so ensure it's not enabled at request */
-+	st->adis.irq_flag |= IRQF_NO_AUTOEN;
-+
- 	val = ADIS16475_MSG_CTRL_DR_POL(polarity);
- 	ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
- 				 ADIS16475_MSG_CTRL_DR_POL_MASK, val);
-@@ -1300,8 +1303,6 @@ static int adis16475_probe(struct spi_device *spi)
- 	if (ret)
- 		return ret;
- 
--	adis16475_enable_irq(&st->adis, false);
--
- 	ret = devm_iio_device_register(&spi->dev, indio_dev);
- 	if (ret)
- 		return ret;
-@@ -1323,3 +1324,4 @@ module_spi_driver(adis16475_driver);
- MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16475 IMU driver");
- MODULE_LICENSE("GPL");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
-index dfe86c589325..c6a3d9a04fce 100644
---- a/drivers/iio/imu/adis16480.c
-+++ b/drivers/iio/imu/adis16480.c
-@@ -1340,3 +1340,4 @@ module_spi_driver(adis16480_driver);
- MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
- MODULE_DESCRIPTION("Analog Devices ADIS16480 IMU driver");
- MODULE_LICENSE("GPL v2");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/iio/imu/adis_buffer.c b/drivers/iio/imu/adis_buffer.c
-index 175af154e443..7cc1145910f6 100644
---- a/drivers/iio/imu/adis_buffer.c
-+++ b/drivers/iio/imu/adis_buffer.c
-@@ -20,7 +20,7 @@
- #include <linux/iio/imu/adis.h>
- 
- static int adis_update_scan_mode_burst(struct iio_dev *indio_dev,
--	const unsigned long *scan_mask)
-+				       const unsigned long *scan_mask)
- {
- 	struct adis *adis = iio_device_get_drvdata(indio_dev);
- 	unsigned int burst_length, burst_max_length;
-@@ -63,7 +63,7 @@ static int adis_update_scan_mode_burst(struct iio_dev *indio_dev,
- }
- 
- int adis_update_scan_mode(struct iio_dev *indio_dev,
--	const unsigned long *scan_mask)
-+			  const unsigned long *scan_mask)
- {
- 	struct adis *adis = iio_device_get_drvdata(indio_dev);
- 	const struct iio_chan_spec *chan;
-@@ -120,7 +120,7 @@ int adis_update_scan_mode(struct iio_dev *indio_dev,
- 
- 	return 0;
- }
--EXPORT_SYMBOL_GPL(adis_update_scan_mode);
-+EXPORT_SYMBOL_NS_GPL(adis_update_scan_mode, IIO_ADISLIB);
- 
- static irqreturn_t adis_trigger_handler(int irq, void *p)
- {
-@@ -149,7 +149,7 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
- 	}
- 
- 	iio_push_to_buffers_with_timestamp(indio_dev, adis->buffer,
--		pf->timestamp);
-+					   pf->timestamp);
- 
- 	iio_trigger_notify_done(indio_dev->trig);
  
-@@ -202,5 +202,5 @@ devm_adis_setup_buffer_and_trigger(struct adis *adis, struct iio_dev *indio_dev,
- 	return devm_add_action_or_reset(&adis->spi->dev, adis_buffer_cleanup,
- 					adis);
- }
--EXPORT_SYMBOL_GPL(devm_adis_setup_buffer_and_trigger);
-+EXPORT_SYMBOL_NS_GPL(devm_adis_setup_buffer_and_trigger, IIO_ADISLIB);
- 
-diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c
-index 64e0ba51cb18..80adfa58e50c 100644
---- a/drivers/iio/imu/adis_trigger.c
-+++ b/drivers/iio/imu/adis_trigger.c
-@@ -15,8 +15,7 @@
- #include <linux/iio/trigger.h>
- #include <linux/iio/imu/adis.h>
- 
--static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig,
--						bool state)
-+static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig, bool state)
- {
- 	struct adis *adis = iio_trigger_get_drvdata(trig);
- 
-@@ -36,18 +35,23 @@ static void adis_trigger_setup(struct adis *adis)
- 
- static int adis_validate_irq_flag(struct adis *adis)
- {
-+	unsigned long direction = adis->irq_flag & IRQF_TRIGGER_MASK;
-+
-+	/* We cannot mask the interrupt so ensure it's not enabled at request */
-+	if (adis->data->unmasked_drdy)
-+		adis->irq_flag |= IRQF_NO_AUTOEN;
- 	/*
- 	 * Typically this devices have data ready either on the rising edge or
- 	 * on the falling edge of the data ready pin. This checks enforces that
- 	 * one of those is set in the drivers... It defaults to
--	 * IRQF_TRIGGER_RISING for backward compatibility wiht devices that
-+	 * IRQF_TRIGGER_RISING for backward compatibility with devices that
- 	 * don't support changing the pin polarity.
- 	 */
--	if (!adis->irq_flag) {
--		adis->irq_flag = IRQF_TRIGGER_RISING;
-+	if (direction == IRQF_TRIGGER_NONE) {
-+		adis->irq_flag |= IRQF_TRIGGER_RISING;
- 		return 0;
--	} else if (adis->irq_flag != IRQF_TRIGGER_RISING &&
--		   adis->irq_flag != IRQF_TRIGGER_FALLING) {
-+	} else if (direction != IRQF_TRIGGER_RISING &&
-+		   direction != IRQF_TRIGGER_FALLING) {
- 		dev_err(&adis->spi->dev, "Invalid IRQ mask: %08lx\n",
- 			adis->irq_flag);
+ static int ad7791_read_raw(struct iio_dev *indio_dev,
+diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c
+index a2b83f0bd526..d4583b76f1fe 100644
+--- a/drivers/iio/adc/ti-ads7950.c
++++ b/drivers/iio/adc/ti-ads7950.c
+@@ -634,6 +634,7 @@ static int ti_ads7950_probe(struct spi_device *spi)
+ 	st->chip.label = dev_name(&st->spi->dev);
+ 	st->chip.parent = &st->spi->dev;
+ 	st->chip.owner = THIS_MODULE;
++	st->chip.can_sleep = true;
+ 	st->chip.base = -1;
+ 	st->chip.ngpio = TI_ADS7950_NUM_GPIOS;
+ 	st->chip.get_direction = ti_ads7950_get_direction;
+diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c
+index 95813569f394..77a6916b3d6c 100644
+--- a/drivers/iio/dac/cio-dac.c
++++ b/drivers/iio/dac/cio-dac.c
+@@ -66,8 +66,8 @@ static int cio_dac_write_raw(struct iio_dev *indio_dev,
+ 	if (mask != IIO_CHAN_INFO_RAW)
  		return -EINVAL;
-@@ -88,5 +92,5 @@ int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
- 
- 	return devm_iio_trigger_register(&adis->spi->dev, adis->trig);
- }
--EXPORT_SYMBOL_GPL(devm_adis_probe_trigger);
-+EXPORT_SYMBOL_NS_GPL(devm_adis_probe_trigger, IIO_ADISLIB);
- 
-diff --git a/drivers/iio/imu/fxos8700_core.c b/drivers/iio/imu/fxos8700_core.c
-index ab288186f36e..04d3778fcc15 100644
---- a/drivers/iio/imu/fxos8700_core.c
-+++ b/drivers/iio/imu/fxos8700_core.c
-@@ -10,6 +10,7 @@
- #include <linux/regmap.h>
- #include <linux/acpi.h>
- #include <linux/bitops.h>
-+#include <linux/bitfield.h>
- 
- #include <linux/iio/iio.h>
- #include <linux/iio/sysfs.h>
-@@ -144,9 +145,8 @@
- #define FXOS8700_NVM_DATA_BNK0      0xa7
- 
- /* Bit definitions for FXOS8700_CTRL_REG1 */
--#define FXOS8700_CTRL_ODR_MSK       0x38
- #define FXOS8700_CTRL_ODR_MAX       0x00
--#define FXOS8700_CTRL_ODR_MIN       GENMASK(4, 3)
-+#define FXOS8700_CTRL_ODR_MSK       GENMASK(5, 3)
- 
- /* Bit definitions for FXOS8700_M_CTRL_REG1 */
- #define FXOS8700_HMS_MASK           GENMASK(1, 0)
-@@ -320,7 +320,7 @@ static enum fxos8700_sensor fxos8700_to_sensor(enum iio_chan_type iio_type)
- 	switch (iio_type) {
- 	case IIO_ACCEL:
- 		return FXOS8700_ACCEL;
--	case IIO_ANGL_VEL:
-+	case IIO_MAGN:
- 		return FXOS8700_MAGN;
- 	default:
- 		return -EINVAL;
-@@ -345,15 +345,35 @@ static int fxos8700_set_active_mode(struct fxos8700_data *data,
- static int fxos8700_set_scale(struct fxos8700_data *data,
- 			      enum fxos8700_sensor t, int uscale)
- {
--	int i;
-+	int i, ret, val;
-+	bool active_mode;
- 	static const int scale_num = ARRAY_SIZE(fxos8700_accel_scale);
- 	struct device *dev = regmap_get_device(data->regmap);
- 
- 	if (t == FXOS8700_MAGN) {
--		dev_err(dev, "Magnetometer scale is locked at 1200uT\n");
-+		dev_err(dev, "Magnetometer scale is locked at 0.001Gs\n");
- 		return -EINVAL;
- 	}
- 
-+	/*
-+	 * When device is in active mode, it failed to set an ACCEL
-+	 * full-scale range(2g/4g/8g) in FXOS8700_XYZ_DATA_CFG.
-+	 * This is not align with the datasheet, but it is a fxos8700
-+	 * chip behavier. Set the device in standby mode before setting
-+	 * an ACCEL full-scale range.
-+	 */
-+	ret = regmap_read(data->regmap, FXOS8700_CTRL_REG1, &val);
-+	if (ret)
-+		return ret;
-+
-+	active_mode = val & FXOS8700_ACTIVE;
-+	if (active_mode) {
-+		ret = regmap_write(data->regmap, FXOS8700_CTRL_REG1,
-+				   val & ~FXOS8700_ACTIVE);
-+		if (ret)
-+			return ret;
-+	}
-+
- 	for (i = 0; i < scale_num; i++)
- 		if (fxos8700_accel_scale[i].uscale == uscale)
- 			break;
-@@ -361,8 +381,12 @@ static int fxos8700_set_scale(struct fxos8700_data *data,
- 	if (i == scale_num)
- 		return -EINVAL;
- 
--	return regmap_write(data->regmap, FXOS8700_XYZ_DATA_CFG,
-+	ret = regmap_write(data->regmap, FXOS8700_XYZ_DATA_CFG,
- 			    fxos8700_accel_scale[i].bits);
-+	if (ret)
-+		return ret;
-+	return regmap_write(data->regmap, FXOS8700_CTRL_REG1,
-+				  active_mode);
- }
- 
- static int fxos8700_get_scale(struct fxos8700_data *data,
-@@ -372,7 +396,7 @@ static int fxos8700_get_scale(struct fxos8700_data *data,
- 	static const int scale_num = ARRAY_SIZE(fxos8700_accel_scale);
- 
- 	if (t == FXOS8700_MAGN) {
--		*uscale = 1200; /* Magnetometer is locked at 1200uT */
-+		*uscale = 1000; /* Magnetometer is locked at 0.001Gs */
- 		return 0;
- 	}
- 
-@@ -394,22 +418,61 @@ static int fxos8700_get_data(struct fxos8700_data *data, int chan_type,
- 			     int axis, int *val)
- {
- 	u8 base, reg;
-+	s16 tmp;
- 	int ret;
--	enum fxos8700_sensor type = fxos8700_to_sensor(chan_type);
  
--	base = type ? FXOS8700_OUT_X_MSB : FXOS8700_M_OUT_X_MSB;
-+	/*
-+	 * Different register base addresses varies with channel types.
-+	 * This bug hasn't been noticed before because using an enum is
-+	 * really hard to read. Use an a switch statement to take over that.
-+	 */
-+	switch (chan_type) {
-+	case IIO_ACCEL:
-+		base = FXOS8700_OUT_X_MSB;
-+		break;
-+	case IIO_MAGN:
-+		base = FXOS8700_M_OUT_X_MSB;
-+		break;
-+	default:
-+		return -EINVAL;
-+	}
- 
- 	/* Block read 6 bytes of device output registers to avoid data loss */
- 	ret = regmap_bulk_read(data->regmap, base, data->buf,
--			       FXOS8700_DATA_BUF_SIZE);
-+			       sizeof(data->buf));
- 	if (ret)
- 		return ret;
- 
- 	/* Convert axis to buffer index */
- 	reg = axis - IIO_MOD_X;
- 
-+	/*
-+	 * Convert to native endianness. The accel data and magn data
-+	 * are signed, so a forced type conversion is needed.
-+	 */
-+	tmp = be16_to_cpu(data->buf[reg]);
-+
-+	/*
-+	 * ACCEL output data registers contain the X-axis, Y-axis, and Z-axis
-+	 * 14-bit left-justified sample data and MAGN output data registers
-+	 * contain the X-axis, Y-axis, and Z-axis 16-bit sample data. Apply
-+	 * a signed 2 bits right shift to the readback raw data from ACCEL
-+	 * output data register and keep that from MAGN sensor as the origin.
-+	 * Value should be extended to 32 bit.
-+	 */
-+	switch (chan_type) {
-+	case IIO_ACCEL:
-+		tmp = tmp >> 2;
-+		break;
-+	case IIO_MAGN:
-+		/* Nothing to do */
-+		break;
-+	default:
-+		return -EINVAL;
-+	}
-+
- 	/* Convert to native endianness */
--	*val = sign_extend32(be16_to_cpu(data->buf[reg]), 15);
-+	*val = sign_extend32(tmp, 15);
- 
- 	return 0;
- }
-@@ -445,10 +508,9 @@ static int fxos8700_set_odr(struct fxos8700_data *data, enum fxos8700_sensor t,
- 	if (i >= odr_num)
+-	/* DAC can only accept up to a 16-bit value */
+-	if ((unsigned int)val > 65535)
++	/* DAC can only accept up to a 12-bit value */
++	if ((unsigned int)val > 4095)
  		return -EINVAL;
  
--	return regmap_update_bits(data->regmap,
--				  FXOS8700_CTRL_REG1,
--				  FXOS8700_CTRL_ODR_MSK + FXOS8700_ACTIVE,
--				  fxos8700_odr[i].bits << 3 | active_mode);
-+	val &= ~FXOS8700_CTRL_ODR_MSK;
-+	val |= FIELD_PREP(FXOS8700_CTRL_ODR_MSK, fxos8700_odr[i].bits) | FXOS8700_ACTIVE;
-+	return regmap_write(data->regmap, FXOS8700_CTRL_REG1, val);
- }
- 
- static int fxos8700_get_odr(struct fxos8700_data *data, enum fxos8700_sensor t,
-@@ -461,7 +523,7 @@ static int fxos8700_get_odr(struct fxos8700_data *data, enum fxos8700_sensor t,
- 	if (ret)
- 		return ret;
- 
--	val &= FXOS8700_CTRL_ODR_MSK;
-+	val = FIELD_GET(FXOS8700_CTRL_ODR_MSK, val);
- 
- 	for (i = 0; i < odr_num; i++)
- 		if (val == fxos8700_odr[i].bits)
-@@ -526,7 +588,7 @@ static IIO_CONST_ATTR(in_accel_sampling_frequency_available,
- static IIO_CONST_ATTR(in_magn_sampling_frequency_available,
- 		      "1.5625 6.25 12.5 50 100 200 400 800");
- static IIO_CONST_ATTR(in_accel_scale_available, "0.000244 0.000488 0.000976");
--static IIO_CONST_ATTR(in_magn_scale_available, "0.000001200");
-+static IIO_CONST_ATTR(in_magn_scale_available, "0.001000");
- 
- static struct attribute *fxos8700_attrs[] = {
- 	&iio_const_attr_in_accel_sampling_frequency_available.dev_attr.attr,
-@@ -592,14 +654,19 @@ static int fxos8700_chip_init(struct fxos8700_data *data, bool use_spi)
- 	if (ret)
- 		return ret;
- 
--	/* Max ODR (800Hz individual or 400Hz hybrid), active mode */
--	ret = regmap_write(data->regmap, FXOS8700_CTRL_REG1,
--			   FXOS8700_CTRL_ODR_MAX | FXOS8700_ACTIVE);
-+	/*
-+	 * Set max full-scale range (+/-8G) for ACCEL sensor in chip
-+	 * initialization then activate the device.
-+	 */
-+	ret = regmap_write(data->regmap, FXOS8700_XYZ_DATA_CFG, MODE_8G);
- 	if (ret)
- 		return ret;
- 
--	/* Set for max full-scale range (+/-8G) */
--	return regmap_write(data->regmap, FXOS8700_XYZ_DATA_CFG, MODE_8G);
-+	/* Max ODR (800Hz individual or 400Hz hybrid), active mode */
-+	return regmap_update_bits(data->regmap, FXOS8700_CTRL_REG1,
-+				FXOS8700_CTRL_ODR_MSK | FXOS8700_ACTIVE,
-+				FIELD_PREP(FXOS8700_CTRL_ODR_MSK, FXOS8700_CTRL_ODR_MAX) |
-+				FXOS8700_ACTIVE);
- }
- 
- static void fxos8700_chip_uninit(void *data)
-diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
-index 8306daa77908..b2ae2d2c7eef 100644
---- a/drivers/iio/temperature/ltc2983.c
-+++ b/drivers/iio/temperature/ltc2983.c
-@@ -205,6 +205,7 @@ struct ltc2983_data {
- 	 * Holds the converted temperature
- 	 */
- 	__be32 temp ____cacheline_aligned;
-+	__be32 chan_val;
+ 	priv->chan_out_states[chan->channel] = val;
+diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
+index 97649944f1df..c14a630dd683 100644
+--- a/drivers/iio/light/cm32181.c
++++ b/drivers/iio/light/cm32181.c
+@@ -429,6 +429,14 @@ static const struct iio_info cm32181_info = {
+ 	.attrs			= &cm32181_attribute_group,
  };
  
- struct ltc2983_sensor {
-@@ -309,19 +310,18 @@ static int __ltc2983_fault_handler(const struct ltc2983_data *st,
- 	return 0;
- }
- 
--static int __ltc2983_chan_assign_common(const struct ltc2983_data *st,
-+static int __ltc2983_chan_assign_common(struct ltc2983_data *st,
- 					const struct ltc2983_sensor *sensor,
- 					u32 chan_val)
- {
- 	u32 reg = LTC2983_CHAN_START_ADDR(sensor->chan);
--	__be32 __chan_val;
- 
- 	chan_val |= LTC2983_CHAN_TYPE(sensor->type);
- 	dev_dbg(&st->spi->dev, "Assign reg:0x%04X, val:0x%08X\n", reg,
- 		chan_val);
--	__chan_val = cpu_to_be32(chan_val);
--	return regmap_bulk_write(st->regmap, reg, &__chan_val,
--				 sizeof(__chan_val));
-+	st->chan_val = cpu_to_be32(chan_val);
-+	return regmap_bulk_write(st->regmap, reg, &st->chan_val,
-+				 sizeof(st->chan_val));
- }
- 
- static int __ltc2983_chan_custom_sensor_assign(struct ltc2983_data *st,
-diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
-index b68304da288b..7be44ff2c943 100644
---- a/drivers/staging/iio/accel/adis16203.c
-+++ b/drivers/staging/iio/accel/adis16203.c
-@@ -318,3 +318,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
- MODULE_DESCRIPTION("Analog Devices ADIS16203 Programmable 360 Degrees Inclinometer");
- MODULE_LICENSE("GPL v2");
- MODULE_ALIAS("spi:adis16203");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio/accel/adis16240.c
-index 5064adce5f58..dbbbf81207f9 100644
---- a/drivers/staging/iio/accel/adis16240.c
-+++ b/drivers/staging/iio/accel/adis16240.c
-@@ -445,3 +445,4 @@ MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
- MODULE_DESCRIPTION("Analog Devices Programmable Impact Sensor and Recorder");
- MODULE_LICENSE("GPL v2");
- MODULE_ALIAS("spi:adis16240");
-+MODULE_IMPORT_NS(IIO_ADISLIB);
-diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h
-index 04e96d688ba9..5f45b785e794 100644
---- a/include/linux/iio/imu/adis.h
-+++ b/include/linux/iio/imu/adis.h
-@@ -32,6 +32,7 @@ struct adis_timeout {
- 	u16 sw_reset_ms;
- 	u16 self_test_ms;
- };
-+
- /**
-  * struct adis_data - ADIS chip variant specific data
-  * @read_delay: SPI delay for read operations in us
-@@ -45,10 +46,11 @@ struct adis_timeout {
-  * @self_test_mask: Bitmask of supported self-test operations
-  * @self_test_reg: Register address to request self test command
-  * @self_test_no_autoclear: True if device's self-test needs clear of ctrl reg
-- * @status_error_msgs: Array of error messgaes
-+ * @status_error_msgs: Array of error messages
-  * @status_error_mask: Bitmask of errors supported by the device
-  * @timeouts: Chip specific delays
-  * @enable_irq: Hook for ADIS devices that have a special IRQ enable/disable
-+ * @unmasked_drdy: True for devices that cannot mask/unmask the data ready pin
-  * @has_paging: True if ADIS device has paged registers
-  * @burst_reg_cmd:	Register command that triggers burst
-  * @burst_len:		Burst size in the SPI RX buffer. If @burst_max_len is defined,
-@@ -77,6 +79,7 @@ struct adis_data {
- 	unsigned int status_error_mask;
- 
- 	int (*enable_irq)(struct adis *adis, bool enable);
-+	bool unmasked_drdy;
- 
- 	bool has_paging;
- 
-@@ -126,12 +129,12 @@ struct adis {
- 	unsigned long		irq_flag;
- 	void			*buffer;
- 
--	uint8_t			tx[10] ____cacheline_aligned;
--	uint8_t			rx[4];
-+	u8			tx[10] ____cacheline_aligned;
-+	u8			rx[4];
- };
- 
- int adis_init(struct adis *adis, struct iio_dev *indio_dev,
--	struct spi_device *spi, const struct adis_data *data);
-+	      struct spi_device *spi, const struct adis_data *data);
- int __adis_reset(struct adis *adis);
- 
- /**
-@@ -152,9 +155,9 @@ static inline int adis_reset(struct adis *adis)
- }
- 
- int __adis_write_reg(struct adis *adis, unsigned int reg,
--	unsigned int val, unsigned int size);
-+		     unsigned int val, unsigned int size);
- int __adis_read_reg(struct adis *adis, unsigned int reg,
--	unsigned int *val, unsigned int size);
-+		    unsigned int *val, unsigned int size);
- 
- /**
-  * __adis_write_reg_8() - Write single byte to a register (unlocked)
-@@ -163,7 +166,7 @@ int __adis_read_reg(struct adis *adis, unsigned int reg,
-  * @value: The value to write
-  */
- static inline int __adis_write_reg_8(struct adis *adis, unsigned int reg,
--	uint8_t val)
-+				     u8 val)
- {
- 	return __adis_write_reg(adis, reg, val, 1);
- }
-@@ -175,7 +178,7 @@ static inline int __adis_write_reg_8(struct adis *adis, unsigned int reg,
-  * @value: Value to be written
-  */
- static inline int __adis_write_reg_16(struct adis *adis, unsigned int reg,
--	uint16_t val)
-+				      u16 val)
- {
- 	return __adis_write_reg(adis, reg, val, 2);
- }
-@@ -187,7 +190,7 @@ static inline int __adis_write_reg_16(struct adis *adis, unsigned int reg,
-  * @value: Value to be written
-  */
- static inline int __adis_write_reg_32(struct adis *adis, unsigned int reg,
--	uint32_t val)
-+				      u32 val)
- {
- 	return __adis_write_reg(adis, reg, val, 4);
- }
-@@ -199,7 +202,7 @@ static inline int __adis_write_reg_32(struct adis *adis, unsigned int reg,
-  * @val: The value read back from the device
-  */
- static inline int __adis_read_reg_16(struct adis *adis, unsigned int reg,
--	uint16_t *val)
-+				     u16 *val)
- {
- 	unsigned int tmp;
- 	int ret;
-@@ -218,7 +221,7 @@ static inline int __adis_read_reg_16(struct adis *adis, unsigned int reg,
-  * @val: The value read back from the device
-  */
- static inline int __adis_read_reg_32(struct adis *adis, unsigned int reg,
--	uint32_t *val)
-+				     u32 *val)
- {
- 	unsigned int tmp;
- 	int ret;
-@@ -238,7 +241,7 @@ static inline int __adis_read_reg_32(struct adis *adis, unsigned int reg,
-  * @size: The size of the @value (in bytes)
-  */
- static inline int adis_write_reg(struct adis *adis, unsigned int reg,
--	unsigned int val, unsigned int size)
-+				 unsigned int val, unsigned int size)
- {
- 	int ret;
- 
-@@ -257,7 +260,7 @@ static inline int adis_write_reg(struct adis *adis, unsigned int reg,
-  * @size: The size of the @val buffer
-  */
- static int adis_read_reg(struct adis *adis, unsigned int reg,
--	unsigned int *val, unsigned int size)
-+			 unsigned int *val, unsigned int size)
- {
- 	int ret;
- 
-@@ -275,7 +278,7 @@ static int adis_read_reg(struct adis *adis, unsigned int reg,
-  * @value: The value to write
-  */
- static inline int adis_write_reg_8(struct adis *adis, unsigned int reg,
--	uint8_t val)
-+				   u8 val)
- {
- 	return adis_write_reg(adis, reg, val, 1);
- }
-@@ -287,7 +290,7 @@ static inline int adis_write_reg_8(struct adis *adis, unsigned int reg,
-  * @value: Value to be written
-  */
- static inline int adis_write_reg_16(struct adis *adis, unsigned int reg,
--	uint16_t val)
-+				    u16 val)
- {
- 	return adis_write_reg(adis, reg, val, 2);
- }
-@@ -299,7 +302,7 @@ static inline int adis_write_reg_16(struct adis *adis, unsigned int reg,
-  * @value: Value to be written
-  */
- static inline int adis_write_reg_32(struct adis *adis, unsigned int reg,
--	uint32_t val)
-+				    u32 val)
- {
- 	return adis_write_reg(adis, reg, val, 4);
- }
-@@ -311,7 +314,7 @@ static inline int adis_write_reg_32(struct adis *adis, unsigned int reg,
-  * @val: The value read back from the device
-  */
- static inline int adis_read_reg_16(struct adis *adis, unsigned int reg,
--	uint16_t *val)
-+				   u16 *val)
- {
- 	unsigned int tmp;
- 	int ret;
-@@ -330,7 +333,7 @@ static inline int adis_read_reg_16(struct adis *adis, unsigned int reg,
-  * @val: The value read back from the device
-  */
- static inline int adis_read_reg_32(struct adis *adis, unsigned int reg,
--	uint32_t *val)
-+				   u32 *val)
- {
- 	unsigned int tmp;
- 	int ret;
-@@ -401,9 +404,20 @@ static inline int adis_update_bits_base(struct adis *adis, unsigned int reg,
- 		__adis_update_bits_base(adis, reg, mask, val, 2));	\
- })
- 
--int adis_enable_irq(struct adis *adis, bool enable);
- int __adis_check_status(struct adis *adis);
- int __adis_initial_startup(struct adis *adis);
-+int __adis_enable_irq(struct adis *adis, bool enable);
-+
-+static inline int adis_enable_irq(struct adis *adis, bool enable)
++static void cm32181_unregister_dummy_client(void *data)
 +{
-+	int ret;
-+
-+	mutex_lock(&adis->state_lock);
-+	ret = __adis_enable_irq(adis, enable);
-+	mutex_unlock(&adis->state_lock);
++	struct i2c_client *client = data;
 +
-+	return ret;
++	/* Unregister the dummy client */
++	i2c_unregister_device(client);
 +}
- 
- static inline int adis_check_status(struct adis *adis)
++
+ static int cm32181_probe(struct i2c_client *client)
  {
-@@ -429,8 +443,8 @@ static inline int adis_initial_startup(struct adis *adis)
- }
- 
- int adis_single_conversion(struct iio_dev *indio_dev,
--	const struct iio_chan_spec *chan, unsigned int error_mask,
--	int *val);
-+			   const struct iio_chan_spec *chan,
-+			   unsigned int error_mask, int *val);
- 
- #define ADIS_VOLTAGE_CHAN(addr, si, chan, name, info_all, bits) { \
- 	.type = IIO_VOLTAGE, \
-@@ -479,7 +493,7 @@ int adis_single_conversion(struct iio_dev *indio_dev,
- 	.modified = 1, \
- 	.channel2 = IIO_MOD_ ## mod, \
- 	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
--		 info_sep, \
-+		 (info_sep), \
- 	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
- 	.info_mask_shared_by_all = info_all, \
- 	.address = (addr), \
-@@ -513,7 +527,7 @@ devm_adis_setup_buffer_and_trigger(struct adis *adis, struct iio_dev *indio_dev,
- int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev);
- 
- int adis_update_scan_mode(struct iio_dev *indio_dev,
--	const unsigned long *scan_mask);
-+			  const unsigned long *scan_mask);
- 
- #else /* CONFIG_IIO_BUFFER */
- 
-@@ -537,7 +551,8 @@ static inline int devm_adis_probe_trigger(struct adis *adis,
- #ifdef CONFIG_DEBUG_FS
- 
- int adis_debugfs_reg_access(struct iio_dev *indio_dev,
--	unsigned int reg, unsigned int writeval, unsigned int *readval);
-+			    unsigned int reg, unsigned int writeval,
-+			    unsigned int *readval);
- 
- #else
- 
-diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
-index ee8299eb1f52..0652b4858ba6 100644
---- a/include/linux/interrupt.h
-+++ b/include/linux/interrupt.h
-@@ -61,6 +61,9 @@
-  *                interrupt handler after suspending interrupts. For system
-  *                wakeup devices users need to implement wakeup detection in
-  *                their interrupt handlers.
-+ * IRQF_NO_AUTOEN - Don't enable IRQ or NMI automatically when users request it.
-+ *                Users will enable it explicitly by enable_irq() or enable_nmi()
-+ *                later.
-  */
- #define IRQF_SHARED		0x00000080
- #define IRQF_PROBE_SHARED	0x00000100
-@@ -74,6 +77,7 @@
- #define IRQF_NO_THREAD		0x00010000
- #define IRQF_EARLY_RESUME	0x00020000
- #define IRQF_COND_SUSPEND	0x00040000
-+#define IRQF_NO_AUTOEN		0x00080000
- 
- #define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
+ 	struct device *dev = &client->dev;
+@@ -458,6 +466,10 @@ static int cm32181_probe(struct i2c_client *client)
+ 		client = i2c_acpi_new_device(dev, 1, &board_info);
+ 		if (IS_ERR(client))
+ 			return PTR_ERR(client);
++
++		ret = devm_add_action_or_reset(dev, cm32181_unregister_dummy_client, client);
++		if (ret)
++			return ret;
+ 	}
  
+ 	cm32181 = iio_priv(indio_dev);
 -- 
 2.39.2
 
diff --git a/patches/backports/it66121/0001-backports-it66121-from-linux.git.patch b/patches/backports/it66121/0001-backports-it66121-from-linux.git.patch
index 212d8887b..231e84a4c 100644
--- a/patches/backports/it66121/0001-backports-it66121-from-linux.git.patch
+++ b/patches/backports/it66121/0001-backports-it66121-from-linux.git.patch
@@ -1,6 +1,6 @@
-From 632fcc39608e8e7ef8ffd39a242263b8d8df6de5 Mon Sep 17 00:00:00 2001
+From 5ca380bee773379905c0578582d3c5c54d0b5a46 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:50:13 -0600
+Date: Tue, 25 Apr 2023 11:33:04 -0500
 Subject: [PATCH] backports: it66121: from: linux.git
 
 Reference: v5.19.17
@@ -1679,5 +1679,5 @@ index 000000000000..448c58e60c11
 +MODULE_DESCRIPTION("IT66121 HDMI transmitter driver");
 +MODULE_LICENSE("GPL v2");
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/backports/spi/0001-backports-spi-from-linux.git.patch b/patches/backports/spi/0001-backports-spi-from-linux.git.patch
index 0dd6eb40a..99398dc96 100644
--- a/patches/backports/spi/0001-backports-spi-from-linux.git.patch
+++ b/patches/backports/spi/0001-backports-spi-from-linux.git.patch
@@ -1,9 +1,9 @@
-From fc39493d75fd5ee99dd61eff2c3cafaf6b0bbd10 Mon Sep 17 00:00:00 2001
+From d5d3fe8639c56bd032afaa388acc5d8f1ab01a9c Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:49:21 -0600
+Date: Tue, 25 Apr 2023 11:29:57 -0500
 Subject: [PATCH] backports: spi: from: linux.git
 
-Reference: v5.10.169
+Reference: v5.10.178
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
  drivers/spi/spi-omap2-mcspi.c | 156 +++++++++++++++++++++++-----------
@@ -276,5 +276,5 @@ index fe4723e96cac..3596bbe4b776 100644
  				  omap2_mcspi_irq_handler, 0, pdev->name,
  				  mcspi);
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/backports/spidev/0001-backports-spidev-from-linux.git.patch b/patches/backports/spidev/0001-spidev-add-micron-spi-authenta.patch
similarity index 65%
rename from patches/backports/spidev/0001-backports-spidev-from-linux.git.patch
rename to patches/backports/spidev/0001-spidev-add-micron-spi-authenta.patch
index 4e850fd2d..15d0c860a 100644
--- a/patches/backports/spidev/0001-backports-spidev-from-linux.git.patch
+++ b/patches/backports/spidev/0001-spidev-add-micron-spi-authenta.patch
@@ -1,19 +1,18 @@
-From 6f5c254f918d3e69b5983df84d6fb90efb1bf9c1 Mon Sep 17 00:00:00 2001
+From 3559000251396ce17c79aceee8f971c9d9a59c13 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:48:33 -0600
-Subject: [PATCH] backports: spidev: from: linux.git
+Date: Tue, 25 Apr 2023 11:25:42 -0500
+Subject: [PATCH] spidev: add micron,spi-authenta
 
-Reference: v5.13.19
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
  drivers/spi/spidev.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
-index 859910ec8d9f..f56e0e975a46 100644
+index aee960a7d7f9..e0d1d073f573 100644
 --- a/drivers/spi/spidev.c
 +++ b/drivers/spi/spidev.c
-@@ -682,6 +682,8 @@ static const struct of_device_id spidev_dt_ids[] = {
+@@ -691,6 +691,8 @@ static const struct of_device_id spidev_dt_ids[] = {
  	{ .compatible = "lwn,bk4" },
  	{ .compatible = "dh,dhcom-board" },
  	{ .compatible = "menlo,m53cpld" },
@@ -23,5 +22,5 @@ index 859910ec8d9f..f56e0e975a46 100644
  };
  MODULE_DEVICE_TABLE(of, spidev_dt_ids);
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/backports/wlcore/0001-backports-wlcore-from-linux.git.patch b/patches/backports/wlcore/0001-backports-wlcore-from-linux.git.patch
index 60b3a1aa3..11b380a50 100644
--- a/patches/backports/wlcore/0001-backports-wlcore-from-linux.git.patch
+++ b/patches/backports/wlcore/0001-backports-wlcore-from-linux.git.patch
@@ -1,6 +1,6 @@
-From ddab41b79a0137f224519031592731e589058606 Mon Sep 17 00:00:00 2001
+From 0c8bb7a586386a2bf08bce7f113dd806340c53f7 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:47:46 -0600
+Date: Tue, 25 Apr 2023 11:20:59 -0500
 Subject: [PATCH] backports: wlcore: from: linux.git
 
 Reference: v5.13.19
@@ -183,5 +183,5 @@ index 7ac1814182ba..5cf0379b88b6 100644
  	ssize_t len;
  	int ret;
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/cypress/0001-cypress-fmac-patchset.patch b/patches/cypress/0001-cypress-fmac-patchset.patch
index 781925179..95869b6cf 100644
--- a/patches/cypress/0001-cypress-fmac-patchset.patch
+++ b/patches/cypress/0001-cypress-fmac-patchset.patch
@@ -1,6 +1,6 @@
-From 944d0fcc0de6f80fc3f2455f3e09f504872ea2dc Mon Sep 17 00:00:00 2001
+From c95077521cf22d01ef99c8ef93ef7ae1bd125cda Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:51:45 -0600
+Date: Tue, 25 Apr 2023 11:34:42 -0500
 Subject: [PATCH] cypress fmac patchset
 
 v5.10.9-2022_0909
@@ -10708,5 +10708,5 @@ index 38df713f2e2e..a7dc5df5d368 100644
  	spin_lock_irqsave(&wdev->event_lock, flags);
  	list_add_tail(&ev->list, &wdev->event_list);
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/defconfig b/patches/defconfig
index 569890a59..3fed84110 100644
--- a/patches/defconfig
+++ b/patches/defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.10.162 Kernel Configuration
+# Linux/arm 5.10.168 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 10.4.0"
 CONFIG_CC_IS_GCC=y
diff --git a/patches/drivers/ti/firmware/0001-Add-AM335x-CM3-Power-Managment-Firmware.patch b/patches/drivers/ti/firmware/0001-Add-AM335x-CM3-Power-Managment-Firmware.patch
index 4a335b9c0..b1053e2f5 100644
--- a/patches/drivers/ti/firmware/0001-Add-AM335x-CM3-Power-Managment-Firmware.patch
+++ b/patches/drivers/ti/firmware/0001-Add-AM335x-CM3-Power-Managment-Firmware.patch
@@ -1,6 +1,6 @@
-From 317001a8a9d679994721f146c478b52bd7106fdf Mon Sep 17 00:00:00 2001
+From 46e7504a92ea663bd231cd2a00d481494ced83bc Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Mon, 21 Jun 2021 10:38:10 -0500
+Date: Tue, 25 Apr 2023 11:12:58 -0500
 Subject: [PATCH] Add AM335x CM3 Power Managment Firmware
 
 http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=fb484c5e54f2e31cf0a338d2927a06a2870bcc2c
@@ -1041,5 +1041,5 @@ literal 0
 HcmV?d00001
 
 -- 
-2.30.2
+2.39.2
 
diff --git a/patches/aufs/0001-merge-aufs-kbuild.patch b/patches/external/aufs/0001-merge-aufs-kbuild.patch
similarity index 89%
rename from patches/aufs/0001-merge-aufs-kbuild.patch
rename to patches/external/aufs/0001-merge-aufs-kbuild.patch
index 0b85f85ac..e3e405dce 100644
--- a/patches/aufs/0001-merge-aufs-kbuild.patch
+++ b/patches/external/aufs/0001-merge-aufs-kbuild.patch
@@ -1,6 +1,6 @@
-From 8405188804c9b7644b637af222b0b01bc5a74f9a Mon Sep 17 00:00:00 2001
+From 07723a8275aca36456fa30b45de3442f6e3a0e69 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:49 -0500
+Date: Tue, 25 Apr 2023 10:43:39 -0500
 Subject: [PATCH 1/6] merge: aufs-kbuild
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
diff --git a/patches/aufs/0002-merge-aufs-base.patch b/patches/external/aufs/0002-merge-aufs-base.patch
similarity index 95%
rename from patches/aufs/0002-merge-aufs-base.patch
rename to patches/external/aufs/0002-merge-aufs-base.patch
index 5e28628ba..20d4dc124 100644
--- a/patches/aufs/0002-merge-aufs-base.patch
+++ b/patches/external/aufs/0002-merge-aufs-base.patch
@@ -1,6 +1,6 @@
-From 4c178274a4f52d3f8eb0409175d9063d5edf26d3 Mon Sep 17 00:00:00 2001
+From 1e1c0594614e9fd2fceecfdc254af477bfb69b1c Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:50 -0500
+Date: Tue, 25 Apr 2023 10:43:39 -0500
 Subject: [PATCH 2/6] merge: aufs-base
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
@@ -19,7 +19,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  11 files changed, 64 insertions(+), 8 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index c3d78f54af4c..6421e02429e5 100644
+index c94d3cc03eb9..8f5fb3a2b183 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -3007,6 +3007,19 @@ F:	include/linux/audit.h
@@ -152,10 +152,10 @@ index 866d5c2367b2..55b535626208 100644
  	int ret;
  
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index ebfc0b2b4969..d8e557b8dc09 100644
+index 74e19bccbf73..2cf42d3ee36b 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -1332,6 +1332,7 @@ extern void fasync_free(struct fasync_struct *);
+@@ -1338,6 +1338,7 @@ extern void fasync_free(struct fasync_struct *);
  /* can be called from interrupts */
  extern void kill_fasync(struct fasync_struct **, int, int);
  
@@ -163,7 +163,7 @@ index ebfc0b2b4969..d8e557b8dc09 100644
  extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
  extern int f_setown(struct file *filp, unsigned long arg, int force);
  extern void f_delown(struct file *filp);
-@@ -1851,6 +1852,7 @@ struct file_operations {
+@@ -1857,6 +1858,7 @@ struct file_operations {
  	ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
  	unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
  	int (*check_flags)(int);
@@ -171,7 +171,7 @@ index ebfc0b2b4969..d8e557b8dc09 100644
  	int (*flock) (struct file *, int, struct file_lock *);
  	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
  	ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
-@@ -2339,6 +2341,7 @@ extern int current_umask(void);
+@@ -2345,6 +2347,7 @@ extern int current_umask(void);
  extern void ihold(struct inode * inode);
  extern void iput(struct inode *);
  extern int generic_update_time(struct inode *, struct timespec64 *, int);
@@ -179,7 +179,7 @@ index ebfc0b2b4969..d8e557b8dc09 100644
  
  /* /sys/fs */
  extern struct kobject *fs_kobj;
-@@ -2575,6 +2578,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
+@@ -2581,6 +2584,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
  }
  
  void emergency_thaw_all(void);
diff --git a/patches/aufs/0003-merge-aufs-mmap.patch b/patches/external/aufs/0003-merge-aufs-mmap.patch
similarity index 98%
rename from patches/aufs/0003-merge-aufs-mmap.patch
rename to patches/external/aufs/0003-merge-aufs-mmap.patch
index f303e480e..ce578245b 100644
--- a/patches/aufs/0003-merge-aufs-mmap.patch
+++ b/patches/external/aufs/0003-merge-aufs-mmap.patch
@@ -1,6 +1,6 @@
-From 2896a5bfda36338b296b3dc712dcabcb146e7603 Mon Sep 17 00:00:00 2001
+From 3f6d648d433d857253f1bd87a023fcbff526005c Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:50 -0500
+Date: Tue, 25 Apr 2023 10:43:40 -0500
 Subject: [PATCH 3/6] merge: aufs-mmap
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
@@ -50,7 +50,7 @@ index 13452b32e2bd..38acccfef9d4 100644
  		ino = inode->i_ino;
  	}
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 8b75a04836b6..042f5c9f7414 100644
+index 39b1038076c3..97ec318111cb 100644
 --- a/fs/proc/task_mmu.c
 +++ b/fs/proc/task_mmu.c
 @@ -280,7 +280,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
@@ -65,7 +65,7 @@ index 8b75a04836b6..042f5c9f7414 100644
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
  		pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1885,7 +1888,7 @@ static int show_numa_map(struct seq_file *m, void *v)
+@@ -1883,7 +1886,7 @@ static int show_numa_map(struct seq_file *m, void *v)
  	struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
  	struct vm_area_struct *vma = v;
  	struct numa_maps *md = &numa_priv->md;
diff --git a/patches/aufs/0004-merge-aufs-standalone.patch b/patches/external/aufs/0004-merge-aufs-standalone.patch
similarity index 98%
rename from patches/aufs/0004-merge-aufs-standalone.patch
rename to patches/external/aufs/0004-merge-aufs-standalone.patch
index 77fda551e..faa4c7a49 100644
--- a/patches/aufs/0004-merge-aufs-standalone.patch
+++ b/patches/external/aufs/0004-merge-aufs-standalone.patch
@@ -1,6 +1,6 @@
-From 2cdee9067c1b047a4f2b084fa95b3b327b1916e8 Mon Sep 17 00:00:00 2001
+From 3c797537dccaeaccb617f484d49e917e9a12788d Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:50 -0500
+Date: Tue, 25 Apr 2023 10:43:40 -0500
 Subject: [PATCH 4/6] merge: aufs-standalone
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
@@ -169,7 +169,7 @@ index 55b535626208..c13ac0fbac31 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/fs/xattr.c b/fs/xattr.c
-index cd7a563e8bcd..7d989d57b0f0 100644
+index 5a03eaadf029..bddcc717dc39 100644
 --- a/fs/xattr.c
 +++ b/fs/xattr.c
 @@ -360,6 +360,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
diff --git a/patches/aufs/0005-merge-aufs.patch b/patches/external/aufs/0005-merge-aufs.patch
similarity index 99%
rename from patches/aufs/0005-merge-aufs.patch
rename to patches/external/aufs/0005-merge-aufs.patch
index 995fcb7df..25d6bbb17 100644
--- a/patches/aufs/0005-merge-aufs.patch
+++ b/patches/external/aufs/0005-merge-aufs.patch
@@ -1,6 +1,6 @@
-From 9faeba845c4120e36d49830fa5d152530806bdb6 Mon Sep 17 00:00:00 2001
+From d5566659f880136f0f3d3987b47de9b494bcb6d9 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:51 -0500
+Date: Tue, 25 Apr 2023 10:43:42 -0500
 Subject: [PATCH 5/6] merge: aufs
 
 https://github.com/sfjro/aufs-standalone/commit/e32ddc654f61cb6b91a9977e29bf7a7f3b76c965
diff --git a/patches/aufs/0006-merge-aufs-rt.patch b/patches/external/aufs/0006-merge-aufs-rt.patch
similarity index 87%
rename from patches/aufs/0006-merge-aufs-rt.patch
rename to patches/external/aufs/0006-merge-aufs-rt.patch
index f9ee9ccf5..668a41c36 100644
--- a/patches/aufs/0006-merge-aufs-rt.patch
+++ b/patches/external/aufs/0006-merge-aufs-rt.patch
@@ -1,6 +1,6 @@
-From b1a9d2552a52093f65b1fed6d31ad0c423537ff1 Mon Sep 17 00:00:00 2001
+From fdb5b083dda6ec99cdcc067f5f45ec908aad60cf Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:03:52 -0500
+Date: Tue, 25 Apr 2023 10:43:42 -0500
 Subject: [PATCH 6/6] merge: aufs-rt
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
diff --git a/patches/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch b/patches/external/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch
similarity index 99%
rename from patches/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch
rename to patches/external/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch
index 97ff63b00..2879ecfa8 100644
--- a/patches/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch
+++ b/patches/external/bcfserial/0001-merge-bcfserial-https-git.beagleboard.org-beagleconn.patch
@@ -1,6 +1,6 @@
-From 14c68357c5536e69a7c058437b96d945df70d3c5 Mon Sep 17 00:00:00 2001
+From 3eedf99ae93a5a71eb0bb5575d36233c47f4869c Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:05:08 -0500
+Date: Tue, 25 Apr 2023 10:48:22 -0500
 Subject: [PATCH] merge: bcfserial:
  https://git.beagleboard.org/beagleconnect/linux/bcfserial.git
 
diff --git a/patches/bcfserial/0002-Add-BCFSERIAL-driver.patch b/patches/external/bcfserial/0002-Add-BCFSERIAL-driver.patch
similarity index 100%
rename from patches/bcfserial/0002-Add-BCFSERIAL-driver.patch
rename to patches/external/bcfserial/0002-Add-BCFSERIAL-driver.patch
diff --git a/patches/git/AUFS b/patches/external/git/AUFS
similarity index 100%
rename from patches/git/AUFS
rename to patches/external/git/AUFS
diff --git a/patches/git/BBDTBS b/patches/external/git/BBDTBS
similarity index 100%
rename from patches/git/BBDTBS
rename to patches/external/git/BBDTBS
diff --git a/patches/git/BCFSERIAL b/patches/external/git/BCFSERIAL
similarity index 100%
rename from patches/git/BCFSERIAL
rename to patches/external/git/BCFSERIAL
diff --git a/patches/external/git/KSMBD b/patches/external/git/KSMBD
new file mode 100644
index 000000000..0e851d25d
--- /dev/null
+++ b/patches/external/git/KSMBD
@@ -0,0 +1 @@
+KSMBD: https://github.com/cifsd-team/ksmbd/commit/274377cd20807ae91ac81f42ad2823d812289a31
diff --git a/patches/external/git/RT b/patches/external/git/RT
new file mode 100644
index 000000000..34406d5b4
--- /dev/null
+++ b/patches/external/git/RT
@@ -0,0 +1 @@
+RT: patch-5.10.168-rt83.patch.xz
diff --git a/patches/git/TI_AMX3_CM3 b/patches/external/git/TI_AMX3_CM3
similarity index 100%
rename from patches/git/TI_AMX3_CM3
rename to patches/external/git/TI_AMX3_CM3
diff --git a/patches/git/WIRELESS_REGDB b/patches/external/git/WIRELESS_REGDB
similarity index 100%
rename from patches/git/WIRELESS_REGDB
rename to patches/external/git/WIRELESS_REGDB
diff --git a/patches/git/WPANUSB b/patches/external/git/WPANUSB
similarity index 100%
rename from patches/git/WPANUSB
rename to patches/external/git/WPANUSB
diff --git a/patches/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch b/patches/external/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch
similarity index 99%
rename from patches/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch
rename to patches/external/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch
index 8918c58f5..f8cb63033 100644
--- a/patches/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch
+++ b/patches/external/ksmbd/0001-merge-ksmbd-https-github.com-cifsd-team-ksmbd.patch
@@ -1,9 +1,9 @@
-From 8b630e4854a5c307caf2454237f8c369a61a8e43 Mon Sep 17 00:00:00 2001
+From 8463c55313258cd464bde0b1358bd389e0de4157 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:05:48 -0500
+Date: Tue, 25 Apr 2023 10:52:05 -0500
 Subject: [PATCH] merge: ksmbd: https://github.com/cifsd-team/ksmbd
 
-https://github.com/cifsd-team/ksmbd/commit/9699755c5b6fac62168318932e57e50ba5fbcdca
+https://github.com/cifsd-team/ksmbd/commit/274377cd20807ae91ac81f42ad2823d812289a31
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
  fs/ksmbd/Kconfig                        |   79 +
@@ -14,7 +14,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  fs/ksmbd/auth.c                         | 1542 ++++
  fs/ksmbd/auth.h                         |   85 +
  fs/ksmbd/build_ksmbd.sh                 |  177 +
- fs/ksmbd/connection.c                   |  463 ++
+ fs/ksmbd/connection.c                   |  459 ++
  fs/ksmbd/connection.h                   |  211 +
  fs/ksmbd/crypto_ctx.c                   |  282 +
  fs/ksmbd/crypto_ctx.h                   |   74 +
@@ -45,17 +45,17 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  fs/ksmbd/ntlmssp.h                      |  169 +
  fs/ksmbd/oplock.c                       | 1994 +++++
  fs/ksmbd/oplock.h                       |  138 +
- fs/ksmbd/server.c                       |  630 ++
+ fs/ksmbd/server.c                       |  627 ++
  fs/ksmbd/server.h                       |   71 +
  fs/ksmbd/smb1misc.c                     |  297 +
- fs/ksmbd/smb1ops.c                      |   93 +
- fs/ksmbd/smb1pdu.c                      | 8519 ++++++++++++++++++++++
- fs/ksmbd/smb1pdu.h                      | 1629 +++++
+ fs/ksmbd/smb1ops.c                      |   89 +
+ fs/ksmbd/smb1pdu.c                      | 8516 ++++++++++++++++++++++
+ fs/ksmbd/smb1pdu.h                      | 1631 +++++
  fs/ksmbd/smb2misc.c                     |  445 ++
  fs/ksmbd/smb2ops.c                      |  367 +
- fs/ksmbd/smb2pdu.c                      | 8806 +++++++++++++++++++++++
- fs/ksmbd/smb2pdu.h                      | 1712 +++++
- fs/ksmbd/smb_common.c                   |  756 ++
+ fs/ksmbd/smb2pdu.c                      | 8785 +++++++++++++++++++++++
+ fs/ksmbd/smb2pdu.h                      | 1713 +++++
+ fs/ksmbd/smb_common.c                   |  825 +++
  fs/ksmbd/smb_common.h                   |  513 ++
  fs/ksmbd/smbacl.c                       | 1505 ++++
  fs/ksmbd/smbacl.h                       |  283 +
@@ -71,12 +71,12 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  fs/ksmbd/unicode.c                      |  402 ++
  fs/ksmbd/unicode.h                      |  361 +
  fs/ksmbd/uniupr.h                       |  268 +
- fs/ksmbd/vfs.c                          | 2537 +++++++
+ fs/ksmbd/vfs.c                          | 2544 +++++++
  fs/ksmbd/vfs.h                          |  243 +
- fs/ksmbd/vfs_cache.c                    |  762 ++
+ fs/ksmbd/vfs_cache.c                    |  766 ++
  fs/ksmbd/vfs_cache.h                    |  184 +
  fs/ksmbd/xattr.h                        |  122 +
- 70 files changed, 46875 insertions(+)
+ 70 files changed, 46923 insertions(+)
  create mode 100644 fs/ksmbd/Kconfig
  create mode 100644 fs/ksmbd/Makefile
  create mode 100644 fs/ksmbd/README.md
@@ -2689,10 +2689,10 @@ index 000000000000..4b10f0417d84
 +main $1
 diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c
 new file mode 100644
-index 000000000000..8be6ec0aa21c
+index 000000000000..b152854fe3ed
 --- /dev/null
 +++ b/fs/ksmbd/connection.c
-@@ -0,0 +1,463 @@
+@@ -0,0 +1,459 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <namjae.jeon@protocolfreedom.org>
@@ -2817,19 +2817,15 @@ index 000000000000..8be6ec0aa21c
 +	struct smb2_hdr *hdr = work->request_buf;
 +
 +	if (hdr->ProtocolId == SMB2_PROTO_NUMBER) {
-+		if (conn->ops->get_cmd_val(work) != SMB2_CANCEL_HE) {
++		if (conn->ops->get_cmd_val(work) != SMB2_CANCEL_HE)
 +			requests_queue = &conn->requests;
-+			work->synchronous = true;
-+		}
 +	} else {
 +		if (conn->ops->get_cmd_val(work) != SMB_COM_NT_CANCEL)
 +			requests_queue = &conn->requests;
 +	}
 +#else
-+	if (conn->ops->get_cmd_val(work) != SMB2_CANCEL_HE) {
++	if (conn->ops->get_cmd_val(work) != SMB2_CANCEL_HE)
 +		requests_queue = &conn->requests;
-+		work->synchronous = true;
-+	}
 +#endif
 +
 +	if (requests_queue) {
@@ -2851,14 +2847,14 @@ index 000000000000..8be6ec0aa21c
 +
 +	if (!work->multiRsp)
 +		atomic_dec(&conn->req_running);
-+	spin_lock(&conn->request_lock);
 +	if (!work->multiRsp) {
++		spin_lock(&conn->request_lock);
 +		list_del_init(&work->request_entry);
-+		if (!work->synchronous)
-+			list_del_init(&work->async_request_entry);
++		spin_unlock(&conn->request_lock);
++		if (work->asynchronous)
++			release_async_work(work);
 +		ret = 0;
 +	}
-+	spin_unlock(&conn->request_lock);
 +
 +	wake_up_all(&conn->req_running_q);
 +	return ret;
@@ -3755,7 +3751,7 @@ index 000000000000..61f057559ead
 +AUTOINSTALL="yes"
 diff --git a/fs/ksmbd/glob.h b/fs/ksmbd/glob.h
 new file mode 100644
-index 000000000000..41e920fdcb93
+index 000000000000..9bbd90431cc1
 --- /dev/null
 +++ b/fs/ksmbd/glob.h
 @@ -0,0 +1,58 @@
@@ -3773,7 +3769,7 @@ index 000000000000..41e920fdcb93
 +#include "unicode.h"
 +#include "vfs_cache.h"
 +
-+#define KSMBD_VERSION	"3.4.7"
++#define KSMBD_VERSION	"3.4.8"
 +
 +extern int ksmbd_debug_types;
 +
@@ -4574,7 +4570,7 @@ index 000000000000..14b9caebf7a4
 +}
 diff --git a/fs/ksmbd/ksmbd_work.h b/fs/ksmbd/ksmbd_work.h
 new file mode 100644
-index 000000000000..3234f2cf6327
+index 000000000000..f8ae6144c0ae
 --- /dev/null
 +++ b/fs/ksmbd/ksmbd_work.h
 @@ -0,0 +1,117 @@
@@ -4648,7 +4644,7 @@ index 000000000000..3234f2cf6327
 +	/* Request is encrypted */
 +	bool                            encrypted:1;
 +	/* Is this SYNC or ASYNC ksmbd_work */
-+	bool                            synchronous:1;
++	bool                            asynchronous:1;
 +	bool                            need_invalidate_rkey:1;
 +
 +	unsigned int                    remote_key;
@@ -10606,10 +10602,10 @@ index 000000000000..68cdaf405e2d
 +#endif /* __KSMBD_OPLOCK_H */
 diff --git a/fs/ksmbd/server.c b/fs/ksmbd/server.c
 new file mode 100644
-index 000000000000..faab09507007
+index 000000000000..b0ff252897d1
 --- /dev/null
 +++ b/fs/ksmbd/server.c
-@@ -0,0 +1,630 @@
+@@ -0,0 +1,627 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -10901,10 +10897,7 @@ index 000000000000..faab09507007
 +	work->request_buf = conn->request_buf;
 +	conn->request_buf = NULL;
 +
-+	if (ksmbd_init_smb_server(work)) {
-+		ksmbd_free_work_struct(work);
-+		return -EINVAL;
-+	}
++	ksmbd_init_smb_server(work);
 +
 +	ksmbd_conn_enqueue_request(work);
 +	atomic_inc(&conn->r_count);
@@ -11622,10 +11615,10 @@ index 000000000000..e29581d9280e
 +}
 diff --git a/fs/ksmbd/smb1ops.c b/fs/ksmbd/smb1ops.c
 new file mode 100644
-index 000000000000..b1e2aac1c140
+index 000000000000..26b27b9f5ff7
 --- /dev/null
 +++ b/fs/ksmbd/smb1ops.c
-@@ -0,0 +1,93 @@
+@@ -0,0 +1,89 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -11708,23 +11701,19 @@ index 000000000000..b1e2aac1c140
 + *			command dispatcher
 + * @conn:	connection instance
 + */
-+int init_smb1_server(struct ksmbd_conn *conn)
++void init_smb1_server(struct ksmbd_conn *conn)
 +{
-+	if (!conn)
-+		return -EINVAL;
-+
 +	conn->vals = &smb1_server_values;
 +	conn->ops = &smb1_server_ops;
 +	conn->cmds = smb1_server_cmds;
 +	conn->max_cmds = ARRAY_SIZE(smb1_server_cmds);
-+	return 0;
 +}
 diff --git a/fs/ksmbd/smb1pdu.c b/fs/ksmbd/smb1pdu.c
 new file mode 100644
-index 000000000000..8610e58f34f3
+index 000000000000..880031386262
 --- /dev/null
 +++ b/fs/ksmbd/smb1pdu.c
-@@ -0,0 +1,8519 @@
+@@ -0,0 +1,8516 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -12046,9 +12035,6 @@ index 000000000000..8610e58f34f3
 +	/* setting CifsExiting here may race with start_tcp_sess */
 +	ksmbd_conn_set_need_reconnect(work);
 +
-+	ksmbd_free_user(sess->user);
-+	sess->user = NULL;
-+
 +	ksmbd_conn_wait_idle(conn);
 +
 +	ksmbd_tree_conn_session_logoff(sess);
@@ -20246,10 +20232,10 @@ index 000000000000..8610e58f34f3
 +}
 diff --git a/fs/ksmbd/smb1pdu.h b/fs/ksmbd/smb1pdu.h
 new file mode 100644
-index 000000000000..e2bba1f0f324
+index 000000000000..e470c8e94e68
 --- /dev/null
 +++ b/fs/ksmbd/smb1pdu.h
-@@ -0,0 +1,1629 @@
+@@ -0,0 +1,1631 @@
 +/* SPDX-License-Identifier: GPL-2.0-or-later */
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -21833,7 +21819,9 @@ index 000000000000..e2bba1f0f324
 +	__le16 ByteCount;        /* bct = 0 */
 +} __packed;
 +
-+extern int init_smb1_server(struct ksmbd_conn *conn);
++#ifdef CONFIG_SMB_INSECURE_SERVER
++extern void init_smb1_server(struct ksmbd_conn *conn);
++#endif
 +
 +/* function prototypes */
 +extern int init_smb_rsp_hdr(struct ksmbd_work *work);
@@ -22705,10 +22693,10 @@ index 000000000000..8c26b11c33bb
 +}
 diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
 new file mode 100644
-index 000000000000..0527ae73c0a4
+index 000000000000..8560e4344af0
 --- /dev/null
 +++ b/fs/ksmbd/smb2pdu.c
-@@ -0,0 +1,8806 @@
+@@ -0,0 +1,8785 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -22724,6 +22712,10 @@ index 000000000000..0527ae73c0a4
 +#include <linux/falloc.h>
 +#include <linux/crc32.h>
 +#include <linux/mount.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++#include <linux/filelock.h>
++#endif
 +
 +#include "glob.h"
 +#include "smb2pdu.h"
@@ -22941,12 +22933,6 @@ index 000000000000..0527ae73c0a4
 +	struct smb2_negotiate_rsp *rsp;
 +	struct ksmbd_conn *conn = work->conn;
 +
-+	if (conn->need_neg == false)
-+		return -EINVAL;
-+	if (!(conn->dialect >= SMB20_PROT_ID &&
-+	      conn->dialect <= SMB311_PROT_ID))
-+		return -EINVAL;
-+
 +	*(__be32 *)work->response_buf =
 +		cpu_to_be32(conn->vals->header_size);
 +
@@ -23214,12 +23200,6 @@ index 000000000000..0527ae73c0a4
 +	rsp_hdr->SessionId = rcv_hdr->SessionId;
 +	memcpy(rsp_hdr->Signature, rcv_hdr->Signature, 16);
 +
-+	work->synchronous = true;
-+	if (work->async_id) {
-+		ksmbd_release_id(&conn->async_ida, work->async_id);
-+		work->async_id = 0;
-+	}
-+
 +	return 0;
 +}
 +
@@ -23362,7 +23342,7 @@ index 000000000000..0527ae73c0a4
 +		pr_err("Failed to alloc async message id\n");
 +		return id;
 +	}
-+	work->synchronous = false;
++	work->asynchronous = true;
 +	work->async_id = id;
 +	rsp_hdr->Id.AsyncId = cpu_to_le64(id);
 +
@@ -23382,6 +23362,24 @@ index 000000000000..0527ae73c0a4
 +	return 0;
 +}
 +
++void release_async_work(struct ksmbd_work *work)
++{
++	struct ksmbd_conn *conn = work->conn;
++
++	spin_lock(&conn->request_lock);
++	list_del_init(&work->async_request_entry);
++	spin_unlock(&conn->request_lock);
++
++	work->asynchronous = 0;
++	work->cancel_fn = NULL;
++	kfree(work->cancel_argv);
++	work->cancel_argv = NULL;
++	if (work->async_id) {
++		ksmbd_release_id(&conn->async_ida, work->async_id);
++		work->async_id = 0;
++	}
++}
++
 +void smb2_send_interim_resp(struct ksmbd_work *work, __le32 status)
 +{
 +	struct smb2_hdr *rsp_hdr;
@@ -23465,19 +23463,6 @@ index 000000000000..0527ae73c0a4
 +	pneg_ctxt->Ciphers[0] = cipher_type;
 +}
 +
-+static void build_compression_ctxt(struct smb2_compression_ctx *pneg_ctxt,
-+				   __le16 comp_algo)
-+{
-+	pneg_ctxt->ContextType = SMB2_COMPRESSION_CAPABILITIES;
-+	pneg_ctxt->DataLength =
-+		cpu_to_le16(sizeof(struct smb2_compression_ctx)
-+			- sizeof(struct smb2_neg_context));
-+	pneg_ctxt->Reserved = cpu_to_le32(0);
-+	pneg_ctxt->CompressionAlgorithmCount = cpu_to_le16(1);
-+	pneg_ctxt->Reserved1 = cpu_to_le32(0);
-+	pneg_ctxt->CompressionAlgorithms[0] = comp_algo;
-+}
-+
 +static void build_sign_cap_ctxt(struct smb2_signing_capabilities *pneg_ctxt,
 +				__le16 sign_algo)
 +{
@@ -23517,7 +23502,7 @@ index 000000000000..0527ae73c0a4
 +				  struct smb2_negotiate_rsp *rsp,
 +				  void *smb2_buf_len)
 +{
-+	char *pneg_ctxt = (char *)rsp +
++	char * const pneg_ctxt = (char *)rsp +
 +			le32_to_cpu(rsp->NegotiateContextOffset);
 +	int neg_ctxt_cnt = 1;
 +	int ctxt_size;
@@ -23526,61 +23511,46 @@ index 000000000000..0527ae73c0a4
 +		    "assemble SMB2_PREAUTH_INTEGRITY_CAPABILITIES context\n");
 +	build_preauth_ctxt((struct smb2_preauth_neg_context *)pneg_ctxt,
 +			   conn->preauth_info->Preauth_HashId);
-+	rsp->NegotiateContextCount = cpu_to_le16(neg_ctxt_cnt);
 +	inc_rfc1001_len(smb2_buf_len, AUTH_GSS_PADDING);
 +	ctxt_size = sizeof(struct smb2_preauth_neg_context);
-+	/* Round to 8 byte boundary */
-+	pneg_ctxt += round_up(sizeof(struct smb2_preauth_neg_context), 8);
 +
 +	if (conn->cipher_type) {
++		/* Round to 8 byte boundary */
 +		ctxt_size = round_up(ctxt_size, 8);
 +		ksmbd_debug(SMB,
 +			    "assemble SMB2_ENCRYPTION_CAPABILITIES context\n");
-+		build_encrypt_ctxt((struct smb2_encryption_neg_context *)pneg_ctxt,
++		build_encrypt_ctxt((struct smb2_encryption_neg_context *)
++				   (pneg_ctxt + ctxt_size),
 +				   conn->cipher_type);
-+		rsp->NegotiateContextCount = cpu_to_le16(++neg_ctxt_cnt);
++		neg_ctxt_cnt++;
 +		ctxt_size += sizeof(struct smb2_encryption_neg_context) + 2;
-+		/* Round to 8 byte boundary */
-+		pneg_ctxt +=
-+			round_up(sizeof(struct smb2_encryption_neg_context) + 2,
-+				 8);
 +	}
 +
-+	if (conn->compress_algorithm) {
-+		ctxt_size = round_up(ctxt_size, 8);
-+		ksmbd_debug(SMB,
-+			    "assemble SMB2_COMPRESSION_CAPABILITIES context\n");
-+		/* Temporarily set to SMB3_COMPRESS_NONE */
-+		build_compression_ctxt((struct smb2_compression_ctx *)pneg_ctxt,
-+				       conn->compress_algorithm);
-+		rsp->NegotiateContextCount = cpu_to_le16(++neg_ctxt_cnt);
-+		ctxt_size += sizeof(struct smb2_compression_ctx) + 2;
-+		/* Round to 8 byte boundary */
-+		pneg_ctxt += round_up(sizeof(struct smb2_compression_ctx) + 2,
-+				      8);
-+	}
++	/* compression context not yet supported */
++	WARN_ON(conn->compress_algorithm != SMB3_COMPRESS_NONE);
 +
 +	if (conn->posix_ext_supported) {
 +		ctxt_size = round_up(ctxt_size, 8);
 +		ksmbd_debug(SMB,
 +			    "assemble SMB2_POSIX_EXTENSIONS_AVAILABLE context\n");
-+		build_posix_ctxt((struct smb2_posix_neg_context *)pneg_ctxt);
-+		rsp->NegotiateContextCount = cpu_to_le16(++neg_ctxt_cnt);
++		build_posix_ctxt((struct smb2_posix_neg_context *)
++				 (pneg_ctxt + ctxt_size));
++		neg_ctxt_cnt++;
 +		ctxt_size += sizeof(struct smb2_posix_neg_context);
-+		/* Round to 8 byte boundary */
-+		pneg_ctxt += round_up(sizeof(struct smb2_posix_neg_context), 8);
 +	}
 +
 +	if (conn->signing_negotiated) {
 +		ctxt_size = round_up(ctxt_size, 8);
 +		ksmbd_debug(SMB,
 +			    "assemble SMB2_SIGNING_CAPABILITIES context\n");
-+		build_sign_cap_ctxt((struct smb2_signing_capabilities *)pneg_ctxt,
++		build_sign_cap_ctxt((struct smb2_signing_capabilities *)
++				    (pneg_ctxt + ctxt_size),
 +				    conn->signing_algorithm);
-+		rsp->NegotiateContextCount = cpu_to_le16(++neg_ctxt_cnt);
++		neg_ctxt_cnt++;
 +		ctxt_size += sizeof(struct smb2_signing_capabilities) + 2;
 +	}
 +
++	rsp->NegotiateContextCount = cpu_to_le16(neg_ctxt_cnt);
 +	inc_rfc1001_len(smb2_buf_len, ctxt_size);
 +}
 +
@@ -29899,13 +29869,9 @@ index 000000000000..0527ae73c0a4
 +
 +				ksmbd_vfs_posix_lock_wait(flock);
 +
-+				spin_lock(&work->conn->request_lock);
 +				spin_lock(&fp->f_lock);
 +				list_del(&work->fp_entry);
-+				work->cancel_fn = NULL;
-+				kfree(argv);
 +				spin_unlock(&fp->f_lock);
-+				spin_unlock(&work->conn->request_lock);
 +
 +				if (work->state != KSMBD_WORK_ACTIVE) {
 +					list_del(&smb_lock->llist);
@@ -29923,6 +29889,7 @@ index 000000000000..0527ae73c0a4
 +						work->send_no_response = 1;
 +						goto out;
 +					}
++
 +					init_smb2_rsp_hdr(work);
 +					smb2_set_err_rsp(work);
 +					rsp->hdr.Status =
@@ -29935,7 +29902,7 @@ index 000000000000..0527ae73c0a4
 +				spin_lock(&work->conn->llist_lock);
 +				list_del(&smb_lock->clist);
 +				spin_unlock(&work->conn->llist_lock);
-+
++				release_async_work(work);
 +				goto retry;
 +			} else if (!rc) {
 +				spin_lock(&work->conn->llist_lock);
@@ -31517,10 +31484,10 @@ index 000000000000..0527ae73c0a4
 +}
 diff --git a/fs/ksmbd/smb2pdu.h b/fs/ksmbd/smb2pdu.h
 new file mode 100644
-index 000000000000..7a380d1eeafe
+index 000000000000..de32dadd97ca
 --- /dev/null
 +++ b/fs/ksmbd/smb2pdu.h
-@@ -0,0 +1,1712 @@
+@@ -0,0 +1,1713 @@
 +/* SPDX-License-Identifier: GPL-2.0-or-later */
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -33187,6 +33154,7 @@ index 000000000000..7a380d1eeafe
 +struct file_lock *smb_flock_init(struct file *f);
 +int setup_async_work(struct ksmbd_work *work, void (*fn)(void **),
 +		     void **arg);
++void release_async_work(struct ksmbd_work *work);
 +void smb2_send_interim_resp(struct ksmbd_work *work, __le32 status);
 +struct channel *lookup_chann_list(struct ksmbd_session *sess,
 +				  struct ksmbd_conn *conn);
@@ -33235,10 +33203,10 @@ index 000000000000..7a380d1eeafe
 +#endif	/* _SMB2PDU_H */
 diff --git a/fs/ksmbd/smb_common.c b/fs/ksmbd/smb_common.c
 new file mode 100644
-index 000000000000..d279ab716ff8
+index 000000000000..767892ab4f83
 --- /dev/null
 +++ b/fs/ksmbd/smb_common.c
-@@ -0,0 +1,756 @@
+@@ -0,0 +1,825 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2018 Samsung Electronics Co., Ltd.
@@ -33560,31 +33528,121 @@ index 000000000000..d279ab716ff8
 +	return BAD_PROT_ID;
 +}
 +
-+#define SMB_COM_NEGOTIATE	0x72
-+int ksmbd_init_smb_server(struct ksmbd_work *work)
++#ifndef CONFIG_SMB_INSECURE_SERVER
++#define SMB_COM_NEGOTIATE_EX	0x0
++
++/**
++ * get_smb1_cmd_val() - get smb command value from smb header
++ * @work:	smb work containing smb header
++ *
++ * Return:      smb command value
++ */
++static u16 get_smb1_cmd_val(struct ksmbd_work *work)
++{
++	return SMB_COM_NEGOTIATE_EX;
++}
++
++/**
++ * init_smb1_rsp_hdr() - initialize smb negotiate response header
++ * @work:	smb work containing smb request
++ *
++ * Return:      0 on success, otherwise -EINVAL
++ */
++static int init_smb1_rsp_hdr(struct ksmbd_work *work)
++{
++	struct smb_hdr *rsp_hdr = (struct smb_hdr *)work->response_buf;
++	struct smb_hdr *rcv_hdr = (struct smb_hdr *)work->request_buf;
++
++	/*
++	 * Remove 4 byte direct TCP header.
++	 */
++	*(__be32 *)work->response_buf =
++		cpu_to_be32(sizeof(struct smb_hdr) - 4);
++
++	rsp_hdr->Command = SMB_COM_NEGOTIATE;
++	*(__le32 *)rsp_hdr->Protocol = SMB1_PROTO_NUMBER;
++	rsp_hdr->Flags = SMBFLG_RESPONSE;
++	rsp_hdr->Flags2 = SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS |
++		SMBFLG2_EXT_SEC | SMBFLG2_IS_LONG_NAME;
++	rsp_hdr->Pid = rcv_hdr->Pid;
++	rsp_hdr->Mid = rcv_hdr->Mid;
++	return 0;
++}
++
++/**
++ * smb1_check_user_session() - check for valid session for a user
++ * @work:	smb work containing smb request buffer
++ *
++ * Return:      0 on success, otherwise error
++ */
++static int smb1_check_user_session(struct ksmbd_work *work)
++{
++	unsigned int cmd = work->conn->ops->get_cmd_val(work);
++
++	if (cmd == SMB_COM_NEGOTIATE_EX)
++		return 0;
++
++	return -EINVAL;
++}
++
++/**
++ * smb1_allocate_rsp_buf() - allocate response buffer for a command
++ * @work:	smb work containing smb request
++ *
++ * Return:      0 on success, otherwise -ENOMEM
++ */
++static int smb1_allocate_rsp_buf(struct ksmbd_work *work)
++{
++	work->response_buf = kmalloc(MAX_CIFS_SMALL_BUFFER_SIZE,
++			GFP_KERNEL | __GFP_ZERO);
++	work->response_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
++
++	if (!work->response_buf) {
++		pr_err("Failed to allocate %u bytes buffer\n",
++				MAX_CIFS_SMALL_BUFFER_SIZE);
++		return -ENOMEM;
++	}
++
++	return 0;
++}
++
++static struct smb_version_ops smb1_server_ops = {
++	.get_cmd_val = get_smb1_cmd_val,
++	.init_rsp_hdr = init_smb1_rsp_hdr,
++	.allocate_rsp_buf = smb1_allocate_rsp_buf,
++	.check_user_session = smb1_check_user_session,
++};
++
++static int smb1_negotiate(struct ksmbd_work *work)
++{
++	return ksmbd_smb_negotiate_common(work, SMB_COM_NEGOTIATE);
++}
++
++static struct smb_version_cmds smb1_server_cmds[1] = {
++	[SMB_COM_NEGOTIATE_EX]	= { .proc = smb1_negotiate, },
++};
++
++static void init_smb1_server(struct ksmbd_conn *conn)
++{
++	conn->ops = &smb1_server_ops;
++	conn->cmds = smb1_server_cmds;
++	conn->max_cmds = ARRAY_SIZE(smb1_server_cmds);
++}
++#endif
++
++void ksmbd_init_smb_server(struct ksmbd_work *work)
 +{
 +	struct ksmbd_conn *conn = work->conn;
-+#ifdef CONFIG_SMB_INSECURE_SERVER
-+	void *buf = work->request_buf;
 +	__le32 proto;
-+#endif
 +
 +	if (conn->need_neg == false)
-+		return 0;
++		return;
 +
-+#ifdef CONFIG_SMB_INSECURE_SERVER
-+	proto = *(__le32 *)((struct smb_hdr *)buf)->Protocol;
++	proto = *(__le32 *)((struct smb_hdr *)work->request_buf)->Protocol;
 +	if (proto == SMB1_PROTO_NUMBER)
 +		init_smb1_server(conn);
 +	else
 +		init_smb3_11_server(conn);
-+#else
-+	init_smb3_11_server(conn);
-+#endif
-+
-+	if (conn->ops->get_cmd_val(work) != SMB_COM_NEGOTIATE)
-+		conn->need_neg = false;
-+	return 0;
 +}
 +
 +int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, int info_level,
@@ -33731,24 +33789,14 @@ index 000000000000..d279ab716ff8
 +#ifndef CONFIG_SMB_INSECURE_SERVER
 +static int smb_handle_negotiate(struct ksmbd_work *work)
 +{
-+	struct smb_negotiate_unsupported_rsp *neg_rsp = work->response_buf;
++	struct smb_negotiate_rsp *neg_rsp = work->response_buf;
 +
 +	ksmbd_debug(SMB, "Unsupported SMB1 protocol\n");
 +
-+	/*
-+	 * Remove 4 byte direct TCP header, add 1 byte wc, 2 byte bcc
-+	 * and 2 byte DialectIndex.
-+	 */
-+	*(__be32 *)work->response_buf =
-+		cpu_to_be32(sizeof(struct smb_hdr) - 4 + 2 + 2);
++	/* Add 2 byte bcc and 2 byte DialectIndex. */
++	inc_rfc1001_len(work->response_buf, 4);
 +	neg_rsp->hdr.Status.CifsError = STATUS_SUCCESS;
 +
-+	neg_rsp->hdr.Command = SMB_COM_NEGOTIATE;
-+	*(__le32 *)neg_rsp->hdr.Protocol = SMB1_PROTO_NUMBER;
-+	neg_rsp->hdr.Flags = SMBFLG_RESPONSE;
-+	neg_rsp->hdr.Flags2 = SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS |
-+		SMBFLG2_EXT_SEC | SMBFLG2_IS_LONG_NAME;
-+
 +	neg_rsp->hdr.WordCount = 1;
 +	neg_rsp->DialectIndex = cpu_to_le16(work->conn->dialect);
 +	neg_rsp->ByteCount = 0;
@@ -33766,23 +33814,12 @@ index 000000000000..d279ab716ff8
 +	ksmbd_debug(SMB, "conn->dialect 0x%x\n", conn->dialect);
 +
 +	if (command == SMB2_NEGOTIATE_HE) {
-+		struct smb2_hdr *smb2_hdr = smb2_get_msg(work->request_buf);
-+
-+		if (smb2_hdr->ProtocolId != SMB2_PROTO_NUMBER) {
-+			ksmbd_debug(SMB, "Downgrade to SMB1 negotiation\n");
-+			command = SMB_COM_NEGOTIATE;
-+		}
-+	}
-+
-+	if (command == SMB2_NEGOTIATE_HE) {
 +		ret = smb2_handle_negotiate(work);
-+		init_smb2_neg_rsp(work);
 +		return ret;
 +	}
 +
 +	if (command == SMB_COM_NEGOTIATE) {
 +		if (__smb2_negotiate(conn)) {
-+			conn->need_neg = true;
 +			init_smb3_11_server(conn);
 +			init_smb2_neg_rsp(work);
 +			ksmbd_debug(SMB, "Upgrade to SMB2 negotiation\n");
@@ -33997,7 +34034,7 @@ index 000000000000..d279ab716ff8
 +}
 diff --git a/fs/ksmbd/smb_common.h b/fs/ksmbd/smb_common.h
 new file mode 100644
-index 000000000000..9542eb769d85
+index 000000000000..81e6702a9245
 --- /dev/null
 +++ b/fs/ksmbd/smb_common.h
 @@ -0,0 +1,513 @@
@@ -34473,7 +34510,7 @@ index 000000000000..9542eb769d85
 +
 +int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count);
 +
-+int ksmbd_init_smb_server(struct ksmbd_work *work);
++void ksmbd_init_smb_server(struct ksmbd_work *work);
 +
 +bool ksmbd_pdu_size_has_room(unsigned int pdu);
 +
@@ -43567,10 +43604,10 @@ index 000000000000..26583b776897
 +#endif /* __KSMBD_UNIUPR_H */
 diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c
 new file mode 100644
-index 000000000000..4115b3c8f688
+index 000000000000..2fc7c6ac112f
 --- /dev/null
 +++ b/fs/ksmbd/vfs.c
-@@ -0,0 +1,2537 @@
+@@ -0,0 +1,2544 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + *   Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -43579,10 +43616,13 @@ index 000000000000..4115b3c8f688
 +
 +#include <linux/kernel.h>
 +#include <linux/fs.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++#include <linux/filelock.h>
++#endif
 +#include <linux/uaccess.h>
 +#include <linux/backing-dev.h>
 +#include <linux/writeback.h>
-+#include <linux/version.h>
 +#include <linux/xattr.h>
 +#include <linux/falloc.h>
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
@@ -43938,7 +43978,11 @@ index 000000000000..4115b3c8f688
 +			    unsigned char type)
 +{
 +	struct file_lock *flock;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
++	struct file_lock_context *ctx = locks_inode_context(file_inode(filp));
++#else
 +	struct file_lock_context *ctx = file_inode(filp)->i_flctx;
++#endif
 +	int error = 0;
 +
 +	if (!ctx || list_empty_careful(&ctx->flc_posix))
@@ -46359,10 +46403,10 @@ index 000000000000..24f483ad4c6a
 +#endif /* __KSMBD_VFS_H__ */
 diff --git a/fs/ksmbd/vfs_cache.c b/fs/ksmbd/vfs_cache.c
 new file mode 100644
-index 000000000000..90a56f8147f3
+index 000000000000..fab9736f5893
 --- /dev/null
 +++ b/fs/ksmbd/vfs_cache.c
-@@ -0,0 +1,762 @@
+@@ -0,0 +1,766 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + * Copyright (C) 2016 Namjae Jeon <linkinjeon@kernel.org>
@@ -46370,6 +46414,10 @@ index 000000000000..90a56f8147f3
 + */
 +
 +#include <linux/fs.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++#include <linux/filelock.h>
++#endif
 +#include <linux/slab.h>
 +#include <linux/vmalloc.h>
 +
diff --git a/patches/ksmbd/0002-wire-up-ksmbd.patch b/patches/external/ksmbd/0002-wire-up-ksmbd.patch
similarity index 100%
rename from patches/ksmbd/0002-wire-up-ksmbd.patch
rename to patches/external/ksmbd/0002-wire-up-ksmbd.patch
diff --git a/patches/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch b/patches/external/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch
similarity index 98%
rename from patches/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch
rename to patches/external/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch
index 55dc937a1..a3bdedc58 100644
--- a/patches/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch
+++ b/patches/external/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch
@@ -1,9 +1,9 @@
-From e8bc10b228afe70f7147c44ac04b672efcadde68 Mon Sep 17 00:00:00 2001
+From 493317752cdb485ce74ec4ec62c9fa938d047c63 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Sat, 25 Feb 2023 12:44:22 -0600
+Date: Tue, 25 Apr 2023 10:56:13 -0500
 Subject: [PATCH] merge: CONFIG_PREEMPT_RT Patch Set
 
-patch-5.10.162-rt79.patch.xz
+patch-5.10.168-rt83.patch.xz
 
 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
 ---
@@ -29,7 +29,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  arch/arm/include/asm/irq.h                    |    2 +
  arch/arm/include/asm/kmap_types.h             |   10 -
  arch/arm/include/asm/spinlock_types.h         |    4 -
- arch/arm/include/asm/thread_info.h            |    4 +
+ arch/arm/include/asm/thread_info.h            |    5 +-
  arch/arm/kernel/asm-offsets.c                 |    1 +
  arch/arm/kernel/entry-armv.S                  |   19 +-
  arch/arm/kernel/entry-common.S                |    1 +
@@ -314,7 +314,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  kernel/entry/common.c                         |   14 +-
  kernel/exit.c                                 |    2 +-
  kernel/fork.c                                 |   27 +-
- kernel/futex.c                                |   87 +-
+ kernel/futex/core.c                           |   87 +-
  kernel/irq/manage.c                           |    6 +-
  kernel/irq/spurious.c                         |    8 +
  kernel/irq_work.c                             |  135 +-
@@ -330,7 +330,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  kernel/locking/rtmutex.h                      |    7 -
  kernel/locking/rtmutex_common.h               |   36 +-
  kernel/locking/rwlock-rt.c                    |  334 ++++
- kernel/locking/rwsem-rt.c                     |  317 ++++
+ kernel/locking/rwsem-rt.c                     |  317 +++
  kernel/locking/rwsem.c                        |    6 +
  kernel/locking/spinlock.c                     |    7 +
  kernel/locking/spinlock_debug.c               |    5 +
@@ -338,13 +338,13 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  kernel/panic.c                                |   33 +-
  kernel/printk/Makefile                        |    1 -
  kernel/printk/internal.h                      |   74 -
- kernel/printk/printk.c                        | 1688 +++++++++--------
- kernel/printk/printk_safe.c                   |  422 -----
+ kernel/printk/printk.c                        | 1694 +++++++++--------
+ kernel/printk/printk_safe.c                   |  422 ----
  kernel/ptrace.c                               |   32 +-
  kernel/rcu/Kconfig                            |    4 +-
  kernel/rcu/tree.c                             |    4 +-
  kernel/rcu/update.c                           |    4 +-
- kernel/sched/core.c                           | 1269 ++++++++++---
+ kernel/sched/core.c                           | 1269 +++++++++---
  kernel/sched/cpudeadline.c                    |    4 +-
  kernel/sched/cpupri.c                         |    4 +-
  kernel/sched/cputime.c                        |   36 +-
@@ -415,7 +415,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  net/sched/sch_generic.c                       |   10 +
  net/sunrpc/svc_xprt.c                         |    4 +-
  net/xfrm/xfrm_state.c                         |    3 +-
- 408 files changed, 9172 insertions(+), 5204 deletions(-)
+ 408 files changed, 9178 insertions(+), 5205 deletions(-)
  delete mode 100644 arch/alpha/include/asm/kmap_types.h
  delete mode 100644 arch/arc/include/asm/kmap_types.h
  delete mode 100644 arch/arm/include/asm/kmap_types.h
@@ -679,10 +679,10 @@ index fb3ff76c3e73..3b2b1479fd0f 100644
  		read-side critical sections.  It also permits
  		spinlocks blocking while in RCU read-side critical
 diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
-index f577c29f2093..549535c51c31 100644
+index eb437d659f2c..73687c3a81b4 100644
 --- a/Documentation/admin-guide/kernel-parameters.txt
 +++ b/Documentation/admin-guide/kernel-parameters.txt
-@@ -4141,6 +4141,10 @@
+@@ -4174,6 +4174,10 @@
  			value, meaning that RCU_SOFTIRQ is used by default.
  			Specify rcutree.use_softirq=0 to use rcuc kthreads.
  
@@ -693,7 +693,7 @@ index f577c29f2093..549535c51c31 100644
  	rcutree.rcu_fanout_exact= [KNL]
  			Disable autobalancing of the rcu_node combining
  			tree.  This is used by rcutorture, and might
-@@ -4519,6 +4523,13 @@
+@@ -4552,6 +4556,13 @@
  			only normal grace-period primitives.  No effect
  			on CONFIG_TINY_RCU kernels.
  
@@ -1254,7 +1254,7 @@ index 5976958647fe..a37c0803954b 100644
  
  typedef struct {
 diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
-index eb7ce2747eb0..115c719a1ffc 100644
+index fcccf35f5cf9..3b981ad0c322 100644
 --- a/arch/arm/include/asm/thread_info.h
 +++ b/arch/arm/include/asm/thread_info.h
 @@ -46,6 +46,7 @@ struct cpu_context_save {
@@ -1265,15 +1265,19 @@ index eb7ce2747eb0..115c719a1ffc 100644
  	mm_segment_t		addr_limit;	/* address limit */
  	struct task_struct	*task;		/* main task structure */
  	__u32			cpu;		/* cpu */
-@@ -138,6 +139,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
- #define TIF_SYSCALL_TRACEPOINT	6	/* syscall tracepoint instrumentation */
- #define TIF_SECCOMP		7	/* seccomp syscall filtering active */
- #define TIF_NOTIFY_SIGNAL	8	/* signal notifications exist */
-+#define TIF_NEED_RESCHED_LAZY	9
+@@ -134,6 +135,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
+ #define TIF_NOTIFY_RESUME	2	/* callback before returning to user */
+ #define TIF_UPROBE		3	/* breakpointed or singlestepping */
+ #define TIF_NOTIFY_SIGNAL	4	/* signal notifications exist */
++#define TIF_NEED_RESCHED_LAZY	5
  
  #define TIF_USING_IWMMXT	17
  #define TIF_MEMDIE		18	/* is terminating due to OOM killer */
-@@ -146,6 +148,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
+@@ -143,10 +145,10 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
+ #define TIF_SYSCALL_TRACEPOINT	22	/* syscall tracepoint instrumentation */
+ #define TIF_SECCOMP		23	/* seccomp syscall filtering active */
+ 
+-
  #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
  #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
  #define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
@@ -1281,7 +1285,7 @@ index eb7ce2747eb0..115c719a1ffc 100644
  #define _TIF_UPROBE		(1 << TIF_UPROBE)
  #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
-@@ -163,6 +166,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
+@@ -164,6 +166,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
   */
  #define _TIF_WORK_MASK		(_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
  				 _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
@@ -1442,7 +1446,7 @@ index d20d7af02d10..0e0a3abd8174 100644
  	return va + (pa_offset >> (32 - PAGE_SHIFT));
  #else
 diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
-index efa402025031..59487ee9fd61 100644
+index af5177801fb1..1de016008e2e 100644
 --- a/arch/arm/mm/fault.c
 +++ b/arch/arm/mm/fault.c
 @@ -400,6 +400,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
@@ -3349,7 +3353,7 @@ index 1d20f0f77a92..7e0a497a36ee 100644
  			       struct cpu_accounting_data *acct)
  {
 diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
-index 069d451240fa..8eaa8c240a2d 100644
+index 5e5a2448ae79..75a6c83299ad 100644
 --- a/arch/powerpc/kernel/traps.c
 +++ b/arch/powerpc/kernel/traps.c
 @@ -170,7 +170,6 @@ extern void panic_flush_kmsg_start(void)
@@ -3641,10 +3645,10 @@ index 245f1f8df656..f05555dde8e7 100644
  }
  
 diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
-index 5559edf36756..d62b8e053d4c 100644
+index 2872b66d9fec..0918ab137728 100644
 --- a/arch/powerpc/xmon/xmon.c
 +++ b/arch/powerpc/xmon/xmon.c
-@@ -3005,7 +3005,7 @@ print_address(unsigned long addr)
+@@ -3002,7 +3002,7 @@ print_address(unsigned long addr)
  static void
  dump_log_buf(void)
  {
@@ -3653,7 +3657,7 @@ index 5559edf36756..d62b8e053d4c 100644
  	unsigned char buf[128];
  	size_t len;
  
-@@ -3017,9 +3017,9 @@ dump_log_buf(void)
+@@ -3014,9 +3014,9 @@ dump_log_buf(void)
  	catch_memory_errors = 1;
  	sync();
  
@@ -3894,7 +3898,7 @@ index 5717c7cbdd97..5db7af565dec 100644
  static inline void handle_one_irq(unsigned int irq)
  {
 diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
-index 9c3d32b80038..f5beecdac693 100644
+index 4efffc18c851..be15e41489b2 100644
 --- a/arch/sh/kernel/traps.c
 +++ b/arch/sh/kernel/traps.c
 @@ -186,7 +186,7 @@ BUILD_TRAP_HANDLER(nmi)
@@ -5723,7 +5727,7 @@ index b99e1941c52c..dc4c0a0a5129 100644
  static ssize_t tpm_dev_transmit(struct tpm_chip *chip, struct tpm_space *space,
  				u8 *buf, size_t bufsiz)
 diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
-index 4ed6e660273a..c2bd0d40b5fc 100644
+index 14fad16d371f..f9a4ac20f86e 100644
 --- a/drivers/char/tpm/tpm_tis.c
 +++ b/drivers/char/tpm/tpm_tis.c
 @@ -50,6 +50,31 @@ static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *da
@@ -5758,7 +5762,7 @@ index 4ed6e660273a..c2bd0d40b5fc 100644
  static int interrupts = -1;
  module_param(interrupts, int, 0444);
  MODULE_PARM_DESC(interrupts, "Enable interrupts");
-@@ -169,7 +194,7 @@ static int tpm_tcg_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len,
+@@ -170,7 +195,7 @@ static int tpm_tcg_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len,
  	struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
  
  	while (len--)
@@ -5767,7 +5771,7 @@ index 4ed6e660273a..c2bd0d40b5fc 100644
  
  	return 0;
  }
-@@ -196,7 +221,7 @@ static int tpm_tcg_write32(struct tpm_tis_data *data, u32 addr, u32 value)
+@@ -197,7 +222,7 @@ static int tpm_tcg_write32(struct tpm_tis_data *data, u32 addr, u32 value)
  {
  	struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
  
@@ -5799,7 +5803,7 @@ index 9811c40956e5..17c9d825188b 100644
  	if (!test_and_set_bit_lock(0, &ctx->flushing_completions)) {
  		context_tasklet((unsigned long)&ctx->context);
 diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
-index 70be9c87fb67..311e3c0689e7 100644
+index 332739f3eded..8589df0e8c1f 100644
 --- a/drivers/firmware/efi/efi.c
 +++ b/drivers/firmware/efi/efi.c
 @@ -66,7 +66,7 @@ struct mm_struct efi_mm = {
@@ -7059,7 +7063,7 @@ index 4353443b89d8..03e2569da934 100644
  	/*
  	 * Since this function is called with IRQ locks held, can't
 diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
-index 0f9274960dc6..dc97e4f1f4ad 100644
+index 30afcbbe1f86..4ae5b8152ece 100644
 --- a/drivers/scsi/fcoe/fcoe.c
 +++ b/drivers/scsi/fcoe/fcoe.c
 @@ -1452,11 +1452,11 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
@@ -7595,10 +7599,10 @@ index 1f231fcda657..0901c5baec99 100644
  		uart_parse_options(options, &baud, &parity, &bits, &flow);
  	else if (probe)
 diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
-index 9900ee3f9068..8b4d408b903d 100644
+index 348d4b2a391a..4a462f104aab 100644
 --- a/drivers/tty/serial/amba-pl011.c
 +++ b/drivers/tty/serial/amba-pl011.c
-@@ -2199,18 +2199,24 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
+@@ -2211,18 +2211,24 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
  {
  	struct uart_amba_port *uap = amba_ports[co->index];
  	unsigned int old_cr = 0, new_cr;
@@ -7627,7 +7631,7 @@ index 9900ee3f9068..8b4d408b903d 100644
  
  	/*
  	 *	First save the CR then disable the interrupts
-@@ -2236,8 +2242,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
+@@ -2248,8 +2254,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
  		pl011_write(old_cr, uap, REG_CR);
  
  	if (locked)
@@ -8103,10 +8107,10 @@ index 2fbf0ad30eaa..3b11de6b5d59 100644
  		if (IS_ERR(child))
  			goto end_instantiate;
 diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
-index 070d2df8ab9c..a1a964b631d7 100644
+index cd7c6c4af83a..d612bde00cf9 100644
 --- a/fs/proc/proc_sysctl.c
 +++ b/fs/proc/proc_sysctl.c
-@@ -683,7 +683,7 @@ static bool proc_sys_fill_cache(struct file *file,
+@@ -684,7 +684,7 @@ static bool proc_sys_fill_cache(struct file *file,
  
  	child = d_lookup(dir, &qname);
  	if (!child) {
@@ -8406,7 +8410,7 @@ index 46c42479f950..b902af13d05f 100644
  
  /**
 diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
-index ce1cf42740bf..3f24ec0ae778 100644
+index 6cd2a92daf20..ab602b95dfd0 100644
 --- a/include/linux/eventfd.h
 +++ b/include/linux/eventfd.h
 @@ -14,6 +14,7 @@
@@ -8444,7 +8448,7 @@ index ce1cf42740bf..3f24ec0ae778 100644
  
  #endif
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index d8e557b8dc09..733e493ed8f4 100644
+index 2cf42d3ee36b..f2e66cd934d8 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
 @@ -699,7 +699,7 @@ struct inode {
@@ -8734,7 +8738,7 @@ index 000000000000..f9bc6acd3679
 +
 +#endif
 diff --git a/include/linux/highmem.h b/include/linux/highmem.h
-index 14e6202ce47f..f597830f26b4 100644
+index b25df1f8d48d..7a3c6d4b79d8 100644
 --- a/include/linux/highmem.h
 +++ b/include/linux/highmem.h
 @@ -11,217 +11,137 @@
@@ -9063,10 +9067,10 @@ index 14e6202ce47f..f597830f26b4 100644
  #ifndef clear_user_highpage
  static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
 diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
-index ee8299eb1f52..7545a2f18560 100644
+index 0652b4858ba6..7f185482ea22 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
-@@ -560,7 +560,7 @@ struct softirq_action
+@@ -564,7 +564,7 @@ struct softirq_action
  asmlinkage void do_softirq(void);
  asmlinkage void __do_softirq(void);
  
@@ -9075,7 +9079,7 @@ index ee8299eb1f52..7545a2f18560 100644
  void do_softirq_own_stack(void);
  #else
  static inline void do_softirq_own_stack(void)
-@@ -654,26 +654,21 @@ enum
+@@ -658,26 +658,21 @@ enum
  	TASKLET_STATE_RUN	/* Tasklet is running (SMP only) */
  };
  
@@ -9110,7 +9114,7 @@ index ee8299eb1f52..7545a2f18560 100644
  #endif
  
  extern void __tasklet_schedule(struct tasklet_struct *t);
-@@ -698,6 +693,17 @@ static inline void tasklet_disable_nosync(struct tasklet_struct *t)
+@@ -702,6 +697,17 @@ static inline void tasklet_disable_nosync(struct tasklet_struct *t)
  	smp_mb__after_atomic();
  }
  
@@ -9331,7 +9335,7 @@ index 3ed4e8771b64..a437b2e70d37 100644
  	defined(CONFIG_PREEMPT_TRACER)
   extern void stop_critical_timings(void);
 diff --git a/include/linux/kernel.h b/include/linux/kernel.h
-index a42c18910a9c..da3b69b71b36 100644
+index 55b98d400afb..89bf7a2a9e14 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
 @@ -205,6 +205,7 @@ extern int _cond_resched(void);
@@ -9654,7 +9658,7 @@ index 3f02b818625e..1b8ae034946f 100644
 +
 +#endif
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index ed87c1ba3cf9..e5d62e1ab29b 100644
+index eb520ff64470..bcc78f7b5e37 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
 @@ -12,6 +12,7 @@
@@ -11181,7 +11185,7 @@ index b256f9c65661..ebf6c515a7b2 100644
  /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
  static inline int valid_signal(unsigned long sig)
 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 07bf2e217a87..62041dd084c0 100644
+index ced1454081ec..69a8df981b82 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
 @@ -295,6 +295,7 @@ struct sk_buff_head {
@@ -11192,7 +11196,7 @@ index 07bf2e217a87..62041dd084c0 100644
  };
  
  struct sk_buff;
-@@ -1920,6 +1921,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list)
+@@ -1925,6 +1926,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list)
  	__skb_queue_head_init(list);
  }
  
@@ -12202,7 +12206,7 @@ index 69e4161462fb..3168a358b222 100644
  
  	spinlock_t xfrm_policy_lock;
 diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
-index e7e8c318925d..cd61c39bf9a8 100644
+index 61cd19ee51f4..1077af75fc59 100644
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
 @@ -10,6 +10,7 @@
@@ -12721,7 +12725,7 @@ index 89ca9b61aa0d..753dc346520a 100644
  		/* if @may_sleep, play nice and yield if necessary */
  		if (may_sleep && (need_resched() ||
 diff --git a/kernel/cpu.c b/kernel/cpu.c
-index 3c9ee966c56a..c2d3e40d7c1b 100644
+index 008b50da2224..65daa7ec0f23 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -1668,7 +1668,7 @@ static struct cpuhp_step cpuhp_hp_states[] = {
@@ -12831,10 +12835,10 @@ index 09f58853f692..cdf97ea30b4c 100644
  	}
  }
 diff --git a/kernel/exit.c b/kernel/exit.c
-index 8989e1d1f79b..46c582d48cd5 100644
+index bacdaf980933..b86f388d3e64 100644
 --- a/kernel/exit.c
 +++ b/kernel/exit.c
-@@ -152,7 +152,7 @@ static void __exit_signal(struct task_struct *tsk)
+@@ -199,7 +199,7 @@ static void __exit_signal(struct task_struct *tsk)
  	 * Do this under ->siglock, we can race with another thread
  	 * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
  	 */
@@ -12916,10 +12920,10 @@ index 467b4f45f22d..13ec331ccd3c 100644
  
  	p->utime = p->stime = p->gtime = 0;
  #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
-diff --git a/kernel/futex.c b/kernel/futex.c
-index 98a6e1b80bfe..b2b275bc1958 100644
---- a/kernel/futex.c
-+++ b/kernel/futex.c
+diff --git a/kernel/futex/core.c b/kernel/futex/core.c
+index 8dd0bc50ac36..8056aa077a76 100644
+--- a/kernel/futex/core.c
++++ b/kernel/futex/core.c
 @@ -1498,6 +1498,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	struct task_struct *new_owner;
  	bool postunlock = false;
@@ -13086,7 +13090,7 @@ index 98a6e1b80bfe..b2b275bc1958 100644
  			ret = 0;
  
 diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
-index 3cb29835632f..c9a7ff7728e8 100644
+index 437b073dc487..430fee2814f9 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
 @@ -1201,6 +1201,8 @@ static int irq_thread(void *data)
@@ -13107,7 +13111,7 @@ index 3cb29835632f..c9a7ff7728e8 100644
  	/*
  	 * We keep the reference to the task struct even if
  	 * the thread dies to avoid that the interrupt code
-@@ -2749,7 +2749,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state);
+@@ -2756,7 +2756,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state);
   *	This call sets the internal irqchip state of an interrupt,
   *	depending on the value of @which.
   *
@@ -16156,10 +16160,10 @@ index 1b019cbca594..c20782f07643 100644
  	return ret;
  }
 diff --git a/kernel/panic.c b/kernel/panic.c
-index 332736a72a58..a14e2f5a9f55 100644
+index bc39e2b27d31..aa36078657be 100644
 --- a/kernel/panic.c
 +++ b/kernel/panic.c
-@@ -177,12 +177,28 @@ static void panic_print_sys_info(void)
+@@ -244,6 +244,7 @@ void check_panic_on_warn(const char *origin)
  void panic(const char *fmt, ...)
  {
  	static char buf[1024];
@@ -16167,8 +16171,9 @@ index 332736a72a58..a14e2f5a9f55 100644
  	va_list args;
  	long i, i_next = 0, len;
  	int state = 0;
- 	int old_cpu, this_cpu;
- 	bool _crash_kexec_post_notifiers = crash_kexec_post_notifiers;
+@@ -260,6 +261,21 @@ void panic(const char *fmt, ...)
+ 		panic_on_warn = 0;
+ 	}
  
 +	console_verbose();
 +	pr_emerg("Kernel panic - not syncing:\n");
@@ -16188,7 +16193,7 @@ index 332736a72a58..a14e2f5a9f55 100644
  	/*
  	 * Disable local interrupts. This will prevent panic_smp_self_stop
  	 * from deadlocking the first cpu that invokes the panic, since
-@@ -213,24 +229,13 @@ void panic(const char *fmt, ...)
+@@ -290,24 +306,13 @@ void panic(const char *fmt, ...)
  	if (old_cpu != PANIC_CPU_INVALID && old_cpu != this_cpu)
  		panic_smp_self_stop();
  
@@ -16213,7 +16218,7 @@ index 332736a72a58..a14e2f5a9f55 100644
  	/*
  	 * If kgdb is enabled, give it a chance to run before we stop all
  	 * the other CPUs or else we won't be able to debug processes left
-@@ -247,7 +252,6 @@ void panic(const char *fmt, ...)
+@@ -324,7 +329,6 @@ void panic(const char *fmt, ...)
  	 * Bypass the panic_cpu check and call __crash_kexec directly.
  	 */
  	if (!_crash_kexec_post_notifiers) {
@@ -16221,7 +16226,7 @@ index 332736a72a58..a14e2f5a9f55 100644
  		__crash_kexec(NULL);
  
  		/*
-@@ -271,8 +275,6 @@ void panic(const char *fmt, ...)
+@@ -348,8 +352,6 @@ void panic(const char *fmt, ...)
  	 */
  	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
  
@@ -16230,7 +16235,7 @@ index 332736a72a58..a14e2f5a9f55 100644
  	kmsg_dump(KMSG_DUMP_PANIC);
  
  	/*
-@@ -542,9 +544,11 @@ static u64 oops_id;
+@@ -619,9 +621,11 @@ static u64 oops_id;
  
  static int init_oops_id(void)
  {
@@ -16242,7 +16247,7 @@ index 332736a72a58..a14e2f5a9f55 100644
  		oops_id++;
  
  	return 0;
-@@ -555,6 +559,7 @@ static void print_oops_end_marker(void)
+@@ -632,6 +636,7 @@ static void print_oops_end_marker(void)
  {
  	init_oops_id();
  	pr_warn("---[ end trace %016llx ]---\n", (unsigned long long)oops_id);
@@ -16341,7 +16346,7 @@ index 3a8fd491758c..000000000000
 -static inline bool printk_percpu_data_ready(void) { return false; }
 -#endif /* CONFIG_PRINTK */
 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
-index 17a310dcb6d9..d2205872304d 100644
+index 17a310dcb6d9..64747c72fbea 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
 @@ -44,6 +44,9 @@
@@ -17631,7 +17636,7 @@ index 17a310dcb6d9..d2205872304d 100644
  
  /**
   * printk - print a kernel message
-@@ -2106,38 +2153,158 @@ asmlinkage __visible int printk(const char *fmt, ...)
+@@ -2106,38 +2153,162 @@ asmlinkage __visible int printk(const char *fmt, ...)
  }
  EXPORT_SYMBOL(printk);
  
@@ -17652,10 +17657,7 @@ index 17a310dcb6d9..d2205872304d 100644
 +	size_t len;
 +	int error;
 +	u64 seq;
- 
--#define LOG_LINE_MAX		0
--#define PREFIX_MAX		0
--#define printk_time		false
++
 +	if (con->flags & CON_EXTENDED) {
 +		ext_text = kmalloc(CONSOLE_EXT_LOG_MAX, GFP_KERNEL);
 +		if (!ext_text)
@@ -17666,27 +17668,28 @@ index 17a310dcb6d9..d2205872304d 100644
 +	if (!text || !dropped_text)
 +		goto out;
  
--#define prb_read_valid(rb, seq, r)	false
--#define prb_first_valid_seq(rb)		0
+-#define LOG_LINE_MAX		0
+-#define PREFIX_MAX		0
+-#define printk_time		false
 +	if (con->flags & CON_EXTENDED)
 +		write_text = ext_text;
 +	else
 +		write_text = text;
  
+-#define prb_read_valid(rb, seq, r)	false
+-#define prb_first_valid_seq(rb)		0
++	seq = atomic64_read(&con->printk_seq);
+ 
 -static u64 syslog_seq;
 -static u64 console_seq;
 -static u64 exclusive_console_stop_seq;
 -static unsigned long console_dropped;
-+	seq = atomic64_read(&con->printk_seq);
-+
 +	prb_rec_init_rd(&r, &info, text, LOG_LINE_MAX + PREFIX_MAX);
 +
 +	for (;;) {
 +		error = wait_event_interruptible(log_wait,
 +				prb_read_valid(prb, seq, &r) || kthread_should_stop());
- 
--static size_t record_print_text(const struct printk_record *r,
--				bool syslog, bool time)
++
 +		if (kthread_should_stop())
 +			break;
 +
@@ -17745,7 +17748,9 @@ index 17a310dcb6d9..d2205872304d 100644
 +			printk_delay(r.info->level);
 +
 +		atomic64_cmpxchg_relaxed(&con->printk_seq, printk_seq, seq);
-+
+ 
+-static size_t record_print_text(const struct printk_record *r,
+-				bool syslog, bool time)
 +		console_unlock();
 +	}
 +out:
@@ -17762,6 +17767,10 @@ index 17a310dcb6d9..d2205872304d 100644
 +static void start_printk_kthread(struct console *con)
  {
 -	return 0;
++	/* No need to start a printing thread if the console cannot print. */
++	if (!con->write)
++		return;
++
 +	con->thread = kthread_run(printk_kthread_func, con,
 +				  "pr/%s%d", con->name, con->index);
 +	if (IS_ERR(con->thread)) {
@@ -17814,7 +17823,7 @@ index 17a310dcb6d9..d2205872304d 100644
  
  #endif /* CONFIG_PRINTK */
  
-@@ -2382,34 +2549,6 @@ int is_console_locked(void)
+@@ -2382,34 +2553,6 @@ int is_console_locked(void)
  }
  EXPORT_SYMBOL(is_console_locked);
  
@@ -17849,7 +17858,7 @@ index 17a310dcb6d9..d2205872304d 100644
  /**
   * console_unlock - unlock the console system
   *
-@@ -2426,142 +2565,14 @@ static inline int can_use_console(void)
+@@ -2426,142 +2569,14 @@ static inline int can_use_console(void)
   */
  void console_unlock(void)
  {
@@ -17992,7 +18001,7 @@ index 17a310dcb6d9..d2205872304d 100644
  }
  EXPORT_SYMBOL(console_unlock);
  
-@@ -2611,23 +2622,20 @@ void console_unblank(void)
+@@ -2611,23 +2626,20 @@ void console_unblank(void)
   */
  void console_flush_on_panic(enum con_flush_mode mode)
  {
@@ -18026,7 +18035,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	console_unlock();
  }
  
-@@ -2762,7 +2770,6 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
+@@ -2762,7 +2774,6 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
   */
  void register_console(struct console *newcon)
  {
@@ -18034,7 +18043,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	struct console *bcon = NULL;
  	int err;
  
-@@ -2786,6 +2793,8 @@ void register_console(struct console *newcon)
+@@ -2786,6 +2797,8 @@ void register_console(struct console *newcon)
  		}
  	}
  
@@ -18043,7 +18052,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	if (console_drivers && console_drivers->flags & CON_BOOT)
  		bcon = console_drivers;
  
-@@ -2827,8 +2836,10 @@ void register_console(struct console *newcon)
+@@ -2827,8 +2840,10 @@ void register_console(struct console *newcon)
  	 * the real console are the same physical device, it's annoying to
  	 * see the beginning boot messages twice
  	 */
@@ -18055,7 +18064,7 @@ index 17a310dcb6d9..d2205872304d 100644
  
  	/*
  	 *	Put this console in the list - keep the
-@@ -2850,26 +2861,12 @@ void register_console(struct console *newcon)
+@@ -2850,26 +2865,12 @@ void register_console(struct console *newcon)
  	if (newcon->flags & CON_EXTENDED)
  		nr_ext_console_drivers++;
  
@@ -18088,7 +18097,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	console_unlock();
  	console_sysfs_notify();
  
-@@ -2943,6 +2940,9 @@ int unregister_console(struct console *console)
+@@ -2943,6 +2944,9 @@ int unregister_console(struct console *console)
  	console_unlock();
  	console_sysfs_notify();
  
@@ -18098,7 +18107,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	if (console->exit)
  		res = console->exit(console);
  
-@@ -3025,6 +3025,15 @@ static int __init printk_late_init(void)
+@@ -3025,6 +3029,15 @@ static int __init printk_late_init(void)
  			unregister_console(con);
  		}
  	}
@@ -18114,7 +18123,7 @@ index 17a310dcb6d9..d2205872304d 100644
  	ret = cpuhp_setup_state_nocalls(CPUHP_PRINTK_DEAD, "printk:dead", NULL,
  					console_cpu_notify);
  	WARN_ON(ret < 0);
-@@ -3040,7 +3049,6 @@ late_initcall(printk_late_init);
+@@ -3040,7 +3053,6 @@ late_initcall(printk_late_init);
   * Delayed printk version, for scheduler-internal messages:
   */
  #define PRINTK_PENDING_WAKEUP	0x01
@@ -18122,7 +18131,7 @@ index 17a310dcb6d9..d2205872304d 100644
  
  static DEFINE_PER_CPU(int, printk_pending);
  
-@@ -3048,14 +3056,8 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work)
+@@ -3048,14 +3060,8 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work)
  {
  	int pending = __this_cpu_xchg(printk_pending, 0);
  
@@ -18138,7 +18147,7 @@ index 17a310dcb6d9..d2205872304d 100644
  }
  
  static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = {
-@@ -3076,25 +3078,10 @@ void wake_up_klogd(void)
+@@ -3076,25 +3082,10 @@ void wake_up_klogd(void)
  	preempt_enable();
  }
  
@@ -18167,7 +18176,7 @@ index 17a310dcb6d9..d2205872304d 100644
  }
  
  int printk_deferred(const char *fmt, ...)
-@@ -3233,8 +3220,26 @@ EXPORT_SYMBOL_GPL(kmsg_dump_reason_str);
+@@ -3233,8 +3224,26 @@ EXPORT_SYMBOL_GPL(kmsg_dump_reason_str);
   */
  void kmsg_dump(enum kmsg_dump_reason reason)
  {
@@ -18195,7 +18204,7 @@ index 17a310dcb6d9..d2205872304d 100644
  
  	rcu_read_lock();
  	list_for_each_entry_rcu(dumper, &dump_list, list) {
-@@ -3252,25 +3257,18 @@ void kmsg_dump(enum kmsg_dump_reason reason)
+@@ -3252,25 +3261,18 @@ void kmsg_dump(enum kmsg_dump_reason reason)
  			continue;
  
  		/* initialize iterator with data about the stored records */
@@ -18226,7 +18235,7 @@ index 17a310dcb6d9..d2205872304d 100644
   * @syslog: include the "<4>" prefixes
   * @line: buffer to copy the line to
   * @size: maximum size of the buffer
-@@ -3284,11 +3282,9 @@ void kmsg_dump(enum kmsg_dump_reason reason)
+@@ -3284,11 +3286,9 @@ void kmsg_dump(enum kmsg_dump_reason reason)
   *
   * A return value of FALSE indicates that there are no more records to
   * read.
@@ -18240,7 +18249,7 @@ index 17a310dcb6d9..d2205872304d 100644
  {
  	struct printk_info info;
  	unsigned int line_count;
-@@ -3298,16 +3294,16 @@ bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog,
+@@ -3298,16 +3298,16 @@ bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog,
  
  	prb_rec_init_rd(&r, &info, line, size);
  
@@ -18260,7 +18269,7 @@ index 17a310dcb6d9..d2205872304d 100644
  					 &info, &line_count)) {
  			goto out;
  		}
-@@ -3316,48 +3312,18 @@ bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog,
+@@ -3316,48 +3316,18 @@ bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog,
  
  	}
  
@@ -18311,7 +18320,7 @@ index 17a310dcb6d9..d2205872304d 100644
   * @syslog: include the "<4>" prefixes
   * @buf: buffer to copy the line to
   * @size: maximum size of the buffer
-@@ -3374,116 +3340,256 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_line);
+@@ -3374,116 +3344,258 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_line);
   * A return value of FALSE indicates that there are no more records to
   * read.
   */
@@ -18492,33 +18501,41 @@ index 17a310dcb6d9..d2205872304d 100644
 + * lock, this function succeeds immediately. If lock is locked by another
 + * processor, this function spins until the calling processor becomes the
 + * owner.
-+ *
+  *
+- * The function is similar to kmsg_dump_rewind(), but grabs no locks.
 + * It is safe to call this function from any context and state.
-+ */
+  */
+-void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper)
 +static void prb_lock(struct prb_cpulock *cpu_lock, unsigned int *cpu_store)
-+{
+ {
+-	dumper->cur_seq = clear_seq;
+-	dumper->next_seq = prb_next_seq(prb);
 +	for (;;) {
 +		if (__prb_trylock(cpu_lock, cpu_store))
 +			break;
 +		cpu_relax();
 +	}
-+}
-+
+ }
+ 
+-/**
+- * kmsg_dump_rewind - reset the iterator
+- * @dumper: registered kmsg dumper
 +/*
 + * prb_unlock: Perform a processor-reentrant spin unlock.
 + * @cpu_lock: A pointer to the lock object.
 + * @cpu_store: A "flags" object storing lock status information.
   *
-- * The function is similar to kmsg_dump_rewind(), but grabs no locks.
+- * Reset the dumper's iterator so that kmsg_dump_get_line() and
+- * kmsg_dump_get_buffer() can be called again and used multiple
+- * times within the same dumper.dump() callback.
 + * Release the lock. The calling processor must be the owner of the lock.
 + *
 + * It is safe to call this function from any context and state.
   */
--void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper)
+-void kmsg_dump_rewind(struct kmsg_dumper *dumper)
 +static void prb_unlock(struct prb_cpulock *cpu_lock, unsigned int cpu_store)
  {
--	dumper->cur_seq = clear_seq;
--	dumper->next_seq = prb_next_seq(prb);
+-	unsigned long flags;
 +	unsigned long *flags;
 +	unsigned int cpu;
 +
@@ -18529,10 +18546,15 @@ index 17a310dcb6d9..d2205872304d 100644
 +		flags = per_cpu_ptr(cpu_lock->irqflags, cpu);
 +		local_irq_restore(*flags);
 +	}
-+
+ 
+-	logbuf_lock_irqsave(flags);
+-	kmsg_dump_rewind_nolock(dumper);
+-	logbuf_unlock_irqrestore(flags);
 +	put_cpu();
-+}
-+
+ }
+-EXPORT_SYMBOL_GPL(kmsg_dump_rewind);
+ 
+-#endif
 +DECLARE_STATIC_PRINTKRB_CPULOCK(printk_cpulock);
 +
 +void console_atomic_lock(unsigned int *flags)
@@ -18555,16 +18577,11 @@ index 17a310dcb6d9..d2205872304d 100644
 +		while (ms--)
 +			udelay(1000);
 +	}
- }
- 
- /**
-- * kmsg_dump_rewind - reset the iterator
-- * @dumper: registered kmsg dumper
++}
++
++/**
 + * pr_flush() - Wait for printing threads to catch up.
-  *
-- * Reset the dumper's iterator so that kmsg_dump_get_line() and
-- * kmsg_dump_get_buffer() can be called again and used multiple
-- * times within the same dumper.dump() callback.
++ *
 + * @timeout_ms:        The maximum time (in ms) to wait.
 + * @reset_on_progress: Reset the timeout if forward progress is seen.
 + *
@@ -18576,11 +18593,9 @@ index 17a310dcb6d9..d2205872304d 100644
 + *
 + * Context: Any context.
 + * Return: true if all enabled printers are caught up.
-  */
--void kmsg_dump_rewind(struct kmsg_dumper *dumper)
++ */
 +bool pr_flush(int timeout_ms, bool reset_on_progress)
- {
--	unsigned long flags;
++{
 +	int remaining = timeout_ms;
 +	struct console *con;
 +	u64 last_diff = 0;
@@ -18588,17 +18603,11 @@ index 17a310dcb6d9..d2205872304d 100644
 +	u64 printk_seq;
 +	u64 diff;
 +	u64 seq;
- 
--	logbuf_lock_irqsave(flags);
--	kmsg_dump_rewind_nolock(dumper);
--	logbuf_unlock_irqrestore(flags);
--}
--EXPORT_SYMBOL_GPL(kmsg_dump_rewind);
++
 +	may_sleep = (preemptible() &&
 +		     !in_softirq() &&
 +		     system_state >= SYSTEM_RUNNING);
- 
--#endif
++
 +	seq = prb_next_seq(prb);
 +
 +	for (;;) {
@@ -18607,6 +18616,8 @@ index 17a310dcb6d9..d2205872304d 100644
 +		for_each_console(con) {
 +			if (!(con->flags & CON_ENABLED))
 +				continue;
++			if (!con->write && !con->write_atomic)
++				continue;
 +			printk_seq = atomic64_read(&con->printk_seq);
 +			if (printk_seq < seq)
 +				diff += seq - printk_seq;
@@ -19135,7 +19146,7 @@ index cd6e11403f1b..0c71197857f6 100644
  	  This option boosts the priority of preempted RCU readers that
  	  block the current preemptible RCU grace period for too long.
 diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
-index b10d6bcea77d..f48cf609195e 100644
+index 9cce4e13af41..44dcf73cba48 100644
 --- a/kernel/rcu/tree.c
 +++ b/kernel/rcu/tree.c
 @@ -100,8 +100,10 @@ static struct rcu_state rcu_state = {
@@ -19167,7 +19178,7 @@ index 849f0aa99333..dd94a602a6d2 100644
  
  #ifdef CONFIG_DEBUG_LOCK_ALLOC
 diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index a875bc59804e..7dad81355ce1 100644
+index 1303a2607f1f..af2690f9d8ac 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
 @@ -65,7 +65,11 @@ const_debug unsigned int sysctl_sched_features =
@@ -20441,7 +20452,7 @@ index a875bc59804e..7dad81355ce1 100644
  	preempt_enable();
  
  	if (current->set_child_tid)
-@@ -4425,7 +5060,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
+@@ -4424,7 +5059,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
   *
   * WARNING: must be called with preemption disabled!
   */
@@ -20450,7 +20461,7 @@ index a875bc59804e..7dad81355ce1 100644
  {
  	struct task_struct *prev, *next;
  	unsigned long *switch_count;
-@@ -4478,7 +5113,7 @@ static void __sched notrace __schedule(bool preempt)
+@@ -4477,7 +5112,7 @@ static void __sched notrace __schedule(bool preempt)
  	 *  - ptrace_{,un}freeze_traced() can change ->state underneath us.
  	 */
  	prev_state = prev->state;
@@ -20459,7 +20470,7 @@ index a875bc59804e..7dad81355ce1 100644
  		if (signal_pending_state(prev_state, prev)) {
  			prev->state = TASK_RUNNING;
  		} else {
-@@ -4513,6 +5148,7 @@ static void __sched notrace __schedule(bool preempt)
+@@ -4512,6 +5147,7 @@ static void __sched notrace __schedule(bool preempt)
  
  	next = pick_next_task(rq, prev, &rf);
  	clear_tsk_need_resched(prev);
@@ -20467,7 +20478,7 @@ index a875bc59804e..7dad81355ce1 100644
  	clear_preempt_need_resched();
  
  	if (likely(prev != next)) {
-@@ -4538,6 +5174,7 @@ static void __sched notrace __schedule(bool preempt)
+@@ -4537,6 +5173,7 @@ static void __sched notrace __schedule(bool preempt)
  		 */
  		++*switch_count;
  
@@ -20475,7 +20486,7 @@ index a875bc59804e..7dad81355ce1 100644
  		psi_sched_switch(prev, next, !task_on_rq_queued(prev));
  
  		trace_sched_switch(preempt, prev, next);
-@@ -4546,10 +5183,11 @@ static void __sched notrace __schedule(bool preempt)
+@@ -4545,10 +5182,11 @@ static void __sched notrace __schedule(bool preempt)
  		rq = context_switch(rq, prev, next, &rf);
  	} else {
  		rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP);
@@ -20490,7 +20501,7 @@ index a875bc59804e..7dad81355ce1 100644
  }
  
  void __noreturn do_task_dead(void)
-@@ -4560,7 +5198,7 @@ void __noreturn do_task_dead(void)
+@@ -4559,7 +5197,7 @@ void __noreturn do_task_dead(void)
  	/* Tell freezer to ignore us: */
  	current->flags |= PF_NOFREEZE;
  
@@ -20499,7 +20510,7 @@ index a875bc59804e..7dad81355ce1 100644
  	BUG();
  
  	/* Avoid "noreturn function does return" - but don't continue if BUG() is a NOP: */
-@@ -4593,9 +5231,6 @@ static inline void sched_submit_work(struct task_struct *tsk)
+@@ -4592,9 +5230,6 @@ static inline void sched_submit_work(struct task_struct *tsk)
  		preempt_enable_no_resched();
  	}
  
@@ -20509,7 +20520,7 @@ index a875bc59804e..7dad81355ce1 100644
  	/*
  	 * If we are going to sleep and we have plugged IO queued,
  	 * make sure to submit it to avoid deadlocks.
-@@ -4621,7 +5256,7 @@ asmlinkage __visible void __sched schedule(void)
+@@ -4620,7 +5255,7 @@ asmlinkage __visible void __sched schedule(void)
  	sched_submit_work(tsk);
  	do {
  		preempt_disable();
@@ -20518,7 +20529,7 @@ index a875bc59804e..7dad81355ce1 100644
  		sched_preempt_enable_no_resched();
  	} while (need_resched());
  	sched_update_worker(tsk);
-@@ -4649,7 +5284,7 @@ void __sched schedule_idle(void)
+@@ -4648,7 +5283,7 @@ void __sched schedule_idle(void)
  	 */
  	WARN_ON_ONCE(current->state);
  	do {
@@ -20527,7 +20538,7 @@ index a875bc59804e..7dad81355ce1 100644
  	} while (need_resched());
  }
  
-@@ -4702,7 +5337,7 @@ static void __sched notrace preempt_schedule_common(void)
+@@ -4701,7 +5336,7 @@ static void __sched notrace preempt_schedule_common(void)
  		 */
  		preempt_disable_notrace();
  		preempt_latency_start(1);
@@ -20536,7 +20547,7 @@ index a875bc59804e..7dad81355ce1 100644
  		preempt_latency_stop(1);
  		preempt_enable_no_resched_notrace();
  
-@@ -4713,6 +5348,30 @@ static void __sched notrace preempt_schedule_common(void)
+@@ -4712,6 +5347,30 @@ static void __sched notrace preempt_schedule_common(void)
  	} while (need_resched());
  }
  
@@ -20567,7 +20578,7 @@ index a875bc59804e..7dad81355ce1 100644
  #ifdef CONFIG_PREEMPTION
  /*
   * This is the entry point to schedule() from in-kernel preemption
-@@ -4726,12 +5385,26 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)
+@@ -4725,12 +5384,26 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)
  	 */
  	if (likely(!preemptible()))
  		return;
@@ -20595,7 +20606,7 @@ index a875bc59804e..7dad81355ce1 100644
  /**
   * preempt_schedule_notrace - preempt_schedule called by tracing
   *
-@@ -4753,6 +5426,9 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
+@@ -4752,6 +5425,9 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
  	if (likely(!preemptible()))
  		return;
  
@@ -20605,7 +20616,7 @@ index a875bc59804e..7dad81355ce1 100644
  	do {
  		/*
  		 * Because the function tracer can trace preempt_count_sub()
-@@ -4775,7 +5451,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
+@@ -4774,7 +5450,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
  		 * an infinite recursion.
  		 */
  		prev_ctx = exception_enter();
@@ -20614,7 +20625,7 @@ index a875bc59804e..7dad81355ce1 100644
  		exception_exit(prev_ctx);
  
  		preempt_latency_stop(1);
-@@ -4804,7 +5480,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
+@@ -4803,7 +5479,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
  	do {
  		preempt_disable();
  		local_irq_enable();
@@ -20623,7 +20634,7 @@ index a875bc59804e..7dad81355ce1 100644
  		local_irq_disable();
  		sched_preempt_enable_no_resched();
  	} while (need_resched());
-@@ -4970,9 +5646,11 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
+@@ -4969,9 +5645,11 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
  out_unlock:
  	/* Avoid rq from going away on us: */
  	preempt_disable();
@@ -20637,7 +20648,7 @@ index a875bc59804e..7dad81355ce1 100644
  	preempt_enable();
  }
  #else
-@@ -5215,6 +5893,7 @@ static int __sched_setscheduler(struct task_struct *p,
+@@ -5214,6 +5892,7 @@ static int __sched_setscheduler(struct task_struct *p,
  	int oldpolicy = -1, policy = attr->sched_policy;
  	int retval, oldprio, newprio, queued, running;
  	const struct sched_class *prev_class;
@@ -20645,7 +20656,7 @@ index a875bc59804e..7dad81355ce1 100644
  	struct rq_flags rf;
  	int reset_on_fork;
  	int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
-@@ -5457,6 +6136,7 @@ static int __sched_setscheduler(struct task_struct *p,
+@@ -5456,6 +6135,7 @@ static int __sched_setscheduler(struct task_struct *p,
  
  	/* Avoid rq from going away on us: */
  	preempt_disable();
@@ -20653,7 +20664,7 @@ index a875bc59804e..7dad81355ce1 100644
  	task_rq_unlock(rq, p, &rf);
  
  	if (pi) {
-@@ -5465,7 +6145,7 @@ static int __sched_setscheduler(struct task_struct *p,
+@@ -5464,7 +6144,7 @@ static int __sched_setscheduler(struct task_struct *p,
  	}
  
  	/* Run balance callbacks after we've adjusted the PI chain: */
@@ -20662,7 +20673,7 @@ index a875bc59804e..7dad81355ce1 100644
  	preempt_enable();
  
  	return 0;
-@@ -5960,7 +6640,7 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
+@@ -5959,7 +6639,7 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
  	}
  #endif
  again:
@@ -20671,7 +20682,7 @@ index a875bc59804e..7dad81355ce1 100644
  
  	if (!retval) {
  		cpuset_cpus_allowed(p, cpus_allowed);
-@@ -6536,7 +7216,7 @@ void __init init_idle(struct task_struct *idle, int cpu)
+@@ -6535,7 +7215,7 @@ void __init init_idle(struct task_struct *idle, int cpu)
  	 *
  	 * And since this is boot we can forgo the serialization.
  	 */
@@ -20680,7 +20691,7 @@ index a875bc59804e..7dad81355ce1 100644
  #endif
  	/*
  	 * We're having a chicken and egg problem, even though we are
-@@ -6563,7 +7243,9 @@ void __init init_idle(struct task_struct *idle, int cpu)
+@@ -6562,7 +7242,9 @@ void __init init_idle(struct task_struct *idle, int cpu)
  
  	/* Set the preempt count _outside_ the spinlocks! */
  	init_idle_preempt_count(idle, cpu);
@@ -20691,7 +20702,7 @@ index a875bc59804e..7dad81355ce1 100644
  	/*
  	 * The idle tasks have their own, simple scheduling class:
  	 */
-@@ -6673,6 +7355,7 @@ void sched_setnuma(struct task_struct *p, int nid)
+@@ -6672,6 +7354,7 @@ void sched_setnuma(struct task_struct *p, int nid)
  #endif /* CONFIG_NUMA_BALANCING */
  
  #ifdef CONFIG_HOTPLUG_CPU
@@ -20699,7 +20710,7 @@ index a875bc59804e..7dad81355ce1 100644
  /*
   * Ensure that the idle task is using init_mm right before its CPU goes
   * offline.
-@@ -6692,119 +7375,126 @@ void idle_task_exit(void)
+@@ -6691,119 +7374,126 @@ void idle_task_exit(void)
  	/* finish_cpu(), as ran on the BP, will clean up the active_mm state */
  }
  
@@ -20916,7 +20927,7 @@ index a875bc59804e..7dad81355ce1 100644
  #endif /* CONFIG_HOTPLUG_CPU */
  
  void set_rq_online(struct rq *rq)
-@@ -6892,6 +7582,8 @@ int sched_cpu_activate(unsigned int cpu)
+@@ -6891,6 +7581,8 @@ int sched_cpu_activate(unsigned int cpu)
  	struct rq *rq = cpu_rq(cpu);
  	struct rq_flags rf;
  
@@ -20925,7 +20936,7 @@ index a875bc59804e..7dad81355ce1 100644
  #ifdef CONFIG_SCHED_SMT
  	/*
  	 * When going up, increment the number of cores with SMT present.
-@@ -6927,6 +7619,8 @@ int sched_cpu_activate(unsigned int cpu)
+@@ -6926,6 +7618,8 @@ int sched_cpu_activate(unsigned int cpu)
  
  int sched_cpu_deactivate(unsigned int cpu)
  {
@@ -20934,7 +20945,7 @@ index a875bc59804e..7dad81355ce1 100644
  	int ret;
  
  	set_cpu_active(cpu, false);
-@@ -6939,6 +7633,16 @@ int sched_cpu_deactivate(unsigned int cpu)
+@@ -6938,6 +7632,16 @@ int sched_cpu_deactivate(unsigned int cpu)
  	 */
  	synchronize_rcu();
  
@@ -20951,7 +20962,7 @@ index a875bc59804e..7dad81355ce1 100644
  #ifdef CONFIG_SCHED_SMT
  	/*
  	 * When going down, decrement the number of cores with SMT present.
-@@ -6952,6 +7656,7 @@ int sched_cpu_deactivate(unsigned int cpu)
+@@ -6951,6 +7655,7 @@ int sched_cpu_deactivate(unsigned int cpu)
  
  	ret = cpuset_cpu_inactive(cpu);
  	if (ret) {
@@ -20959,7 +20970,7 @@ index a875bc59804e..7dad81355ce1 100644
  		set_cpu_active(cpu, true);
  		return ret;
  	}
-@@ -6975,6 +7680,41 @@ int sched_cpu_starting(unsigned int cpu)
+@@ -6974,6 +7679,41 @@ int sched_cpu_starting(unsigned int cpu)
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
@@ -21001,7 +21012,7 @@ index a875bc59804e..7dad81355ce1 100644
  int sched_cpu_dying(unsigned int cpu)
  {
  	struct rq *rq = cpu_rq(cpu);
-@@ -6984,12 +7724,7 @@ int sched_cpu_dying(unsigned int cpu)
+@@ -6983,12 +7723,7 @@ int sched_cpu_dying(unsigned int cpu)
  	sched_tick_stop(cpu);
  
  	rq_lock_irqsave(rq, &rf);
@@ -21015,7 +21026,7 @@ index a875bc59804e..7dad81355ce1 100644
  	rq_unlock_irqrestore(rq, &rf);
  
  	calc_load_migrate(rq);
-@@ -7196,6 +7931,9 @@ void __init sched_init(void)
+@@ -7195,6 +7930,9 @@ void __init sched_init(void)
  
  		rq_csd_init(rq, &rq->nohz_csd, nohz_csd_func);
  #endif
@@ -21025,7 +21036,7 @@ index a875bc59804e..7dad81355ce1 100644
  #endif /* CONFIG_SMP */
  		hrtick_rq_init(rq);
  		atomic_set(&rq->nr_iowait, 0);
-@@ -7236,7 +7974,7 @@ void __init sched_init(void)
+@@ -7235,7 +7973,7 @@ void __init sched_init(void)
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  static inline int preempt_count_equals(int preempt_offset)
  {
@@ -21034,7 +21045,7 @@ index a875bc59804e..7dad81355ce1 100644
  
  	return (nested == preempt_offset);
  }
-@@ -7333,6 +8071,39 @@ void __cant_sleep(const char *file, int line, int preempt_offset)
+@@ -7332,6 +8070,39 @@ void __cant_sleep(const char *file, int line, int preempt_offset)
  	add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
  }
  EXPORT_SYMBOL_GPL(__cant_sleep);
@@ -21334,10 +21345,10 @@ index aaf98771f935..92dd1b222cea 100644
  
  	.task_tick		= task_tick_dl,
 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
-index bca0efc03a51..58f4840e4194 100644
+index c39d2fc3f994..c6cba5cab0bd 100644
 --- a/kernel/sched/fair.c
 +++ b/kernel/sched/fair.c
-@@ -4407,7 +4407,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
+@@ -4531,7 +4531,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
  	ideal_runtime = sched_slice(cfs_rq, curr);
  	delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
  	if (delta_exec > ideal_runtime) {
@@ -21346,7 +21357,7 @@ index bca0efc03a51..58f4840e4194 100644
  		/*
  		 * The current task ran long enough, ensure it doesn't get
  		 * re-elected due to buddy favours.
-@@ -4431,7 +4431,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
+@@ -4555,7 +4555,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
  		return;
  
  	if (delta > ideal_runtime)
@@ -21355,7 +21366,7 @@ index bca0efc03a51..58f4840e4194 100644
  }
  
  static void
-@@ -4574,7 +4574,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
+@@ -4698,7 +4698,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
  	 * validating it and just reschedule.
  	 */
  	if (queued) {
@@ -21364,7 +21375,7 @@ index bca0efc03a51..58f4840e4194 100644
  		return;
  	}
  	/*
-@@ -4711,7 +4711,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec)
+@@ -4835,7 +4835,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec)
  	 * hierarchy can be throttled
  	 */
  	if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr))
@@ -21373,7 +21384,7 @@ index bca0efc03a51..58f4840e4194 100644
  }
  
  static __always_inline
-@@ -5446,7 +5446,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
+@@ -5570,7 +5570,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
  
  		if (delta < 0) {
  			if (rq->curr == p)
@@ -21382,7 +21393,7 @@ index bca0efc03a51..58f4840e4194 100644
  			return;
  		}
  		hrtick_start(rq, delta);
-@@ -7029,7 +7029,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
+@@ -7153,7 +7153,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
  	return;
  
  preempt:
@@ -21391,7 +21402,7 @@ index bca0efc03a51..58f4840e4194 100644
  	/*
  	 * Only set the backward buddy when the current task is still
  	 * on the rq. This can happen when a wakeup gets interleaved
-@@ -10789,7 +10789,7 @@ static void task_fork_fair(struct task_struct *p)
+@@ -10913,7 +10913,7 @@ static void task_fork_fair(struct task_struct *p)
  		 * 'current' within the tree based on its new key value.
  		 */
  		swap(curr->vruntime, se->vruntime);
@@ -21400,7 +21411,7 @@ index bca0efc03a51..58f4840e4194 100644
  	}
  
  	se->vruntime -= cfs_rq->min_vruntime;
-@@ -10816,7 +10816,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio)
+@@ -10940,7 +10940,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio)
  	 */
  	if (rq->curr == p) {
  		if (p->prio > oldprio)
@@ -22767,7 +22778,7 @@ index e87e638c31bd..a4fdc7cfb723 100644
  		ret = try_to_del_timer_sync(timer);
  
 diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
-index 15a376f85e09..59ac048e1be4 100644
+index ab912cc60760..a95a2027eefd 100644
 --- a/kernel/trace/blktrace.c
 +++ b/kernel/trace/blktrace.c
 @@ -72,17 +72,17 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action,
@@ -22834,7 +22845,7 @@ index 15a376f85e09..59ac048e1be4 100644
  		}
  	}
 diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
-index 146771d6d007..c52c6c6dcb08 100644
+index 8637eab2986e..5cacd6bb90f4 100644
 --- a/kernel/trace/trace.c
 +++ b/kernel/trace/trace.c
 @@ -176,7 +176,7 @@ static union trace_eval_map_item *trace_eval_maps;
@@ -23388,7 +23399,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  }
  
  void
-@@ -6688,7 +6697,6 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
+@@ -6701,7 +6710,6 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
  	enum event_trigger_type tt = ETT_NONE;
  	struct trace_buffer *buffer;
  	struct print_entry *entry;
@@ -23396,7 +23407,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  	ssize_t written;
  	int size;
  	int len;
-@@ -6708,7 +6716,6 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
+@@ -6721,7 +6729,6 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
  
  	BUILD_BUG_ON(TRACE_BUF_SIZE >= PAGE_SIZE);
  
@@ -23404,7 +23415,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  	size = sizeof(*entry) + cnt + 2; /* add '\0' and possible '\n' */
  
  	/* If less than "<faulted>", then make sure we can still add that */
-@@ -6717,7 +6724,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
+@@ -6730,7 +6737,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
  
  	buffer = tr->array_buffer.buffer;
  	event = __trace_buffer_lock_reserve(buffer, TRACE_PRINT, size,
@@ -23413,7 +23424,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  	if (unlikely(!event))
  		/* Ring buffer disabled, return as if not open for write */
  		return -EBADF;
-@@ -6769,7 +6776,6 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf,
+@@ -6782,7 +6789,6 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf,
  	struct ring_buffer_event *event;
  	struct trace_buffer *buffer;
  	struct raw_data_entry *entry;
@@ -23421,7 +23432,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  	ssize_t written;
  	int size;
  	int len;
-@@ -6791,14 +6797,13 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf,
+@@ -6804,14 +6810,13 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf,
  
  	BUILD_BUG_ON(TRACE_BUF_SIZE >= PAGE_SIZE);
  
@@ -23437,7 +23448,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  	if (!event)
  		/* Ring buffer disabled, return as if not open for write */
  		return -EBADF;
-@@ -9355,7 +9360,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
+@@ -9365,7 +9370,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
  	tracing_off();
  
  	local_irq_save(flags);
@@ -23445,7 +23456,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  
  	/* Simulate the iterator */
  	trace_init_global_iter(&iter);
-@@ -9435,7 +9439,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
+@@ -9445,7 +9449,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
  		atomic_dec(&per_cpu_ptr(iter.array_buffer->data, cpu)->disabled);
  	}
  	atomic_dec(&dump_running);
@@ -23454,7 +23465,7 @@ index 146771d6d007..c52c6c6dcb08 100644
  }
  EXPORT_SYMBOL_GPL(ftrace_dump);
 diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
-index 8d67f7f44840..bfb9fe2ed9d5 100644
+index 37f616bf5fa9..3bb6ee32a6e7 100644
 --- a/kernel/trace/trace.h
 +++ b/kernel/trace/trace.h
 @@ -136,25 +136,6 @@ struct kretprobe_trace_entry_head {
@@ -24304,7 +24315,7 @@ index 84582bf1ed5f..7221ae0b4c47 100644
  
  void mmio_trace_mapping(struct mmiotrace_map *map)
 diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
-index 000e9dc224c6..bc24ae8e3613 100644
+index b3ee8d9b6b62..7a5850902144 100644
 --- a/kernel/trace/trace_output.c
 +++ b/kernel/trace/trace_output.c
 @@ -441,6 +441,7 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
@@ -24706,7 +24717,7 @@ index 0cc2a62e88f9..f446c8eef3f3 100644
  
  		/*
 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
-index 4aed8abb2022..75b403ac39ca 100644
+index 19c28a34c5f1..62c77769a955 100644
 --- a/lib/Kconfig.debug
 +++ b/lib/Kconfig.debug
 @@ -1370,7 +1370,7 @@ config DEBUG_ATOMIC_SLEEP
@@ -24757,10 +24768,10 @@ index fb22fb266f93..c3c76b833384 100644
 +}
 +EXPORT_SYMBOL(cpumask_any_distribute);
 diff --git a/lib/debugobjects.c b/lib/debugobjects.c
-index 9e14ae02306b..083882a3cf2f 100644
+index 71bdc167a9ee..e5ab016ca28a 100644
 --- a/lib/debugobjects.c
 +++ b/lib/debugobjects.c
-@@ -557,7 +557,10 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
+@@ -564,7 +564,10 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
  	struct debug_obj *obj;
  	unsigned long flags;
  
@@ -25651,7 +25662,7 @@ index c62d997c8ca1..0fe7cf6d5eaa 100644
  	css_put(&memcg->css);
  }
 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index a56f2b9df5a0..f6e1dce184a1 100644
+index 1fd41b91a1a8..3760a06932a6 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
 @@ -61,6 +61,7 @@
@@ -26004,7 +26015,7 @@ index a56f2b9df5a0..f6e1dce184a1 100644
  	return NULL;
  }
  
-@@ -8812,7 +8882,7 @@ void zone_pcp_reset(struct zone *zone)
+@@ -8815,7 +8885,7 @@ void zone_pcp_reset(struct zone *zone)
  	struct per_cpu_pageset *pset;
  
  	/* avoid races with drain_pages()  */
@@ -26013,7 +26024,7 @@ index a56f2b9df5a0..f6e1dce184a1 100644
  	if (zone->pageset != &boot_pageset) {
  		for_each_online_cpu(cpu) {
  			pset = per_cpu_ptr(zone->pageset, cpu);
-@@ -8821,7 +8891,7 @@ void zone_pcp_reset(struct zone *zone)
+@@ -8824,7 +8894,7 @@ void zone_pcp_reset(struct zone *zone)
  		free_percpu(zone->pageset);
  		zone->pageset = &boot_pageset;
  	}
@@ -27549,7 +27560,7 @@ index 43abbb5e2727..4594a843aee9 100644
  config BQL
  	bool
 diff --git a/net/core/dev.c b/net/core/dev.c
-index 34b5aab42b91..38af77ac810b 100644
+index 37bb60a7e97e..779f3339da66 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
 @@ -221,14 +221,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)
@@ -27669,7 +27680,7 @@ index 34b5aab42b91..38af77ac810b 100644
  }
  EXPORT_SYMBOL(__napi_schedule);
  
-@@ -10965,6 +10973,7 @@ static int dev_cpu_dead(unsigned int oldcpu)
+@@ -10957,6 +10965,7 @@ static int dev_cpu_dead(unsigned int oldcpu)
  
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
@@ -27677,7 +27688,7 @@ index 34b5aab42b91..38af77ac810b 100644
  
  #ifdef CONFIG_RPS
  	remsd = oldsd->rps_ipi_list;
-@@ -10978,7 +10987,7 @@ static int dev_cpu_dead(unsigned int oldcpu)
+@@ -10970,7 +10979,7 @@ static int dev_cpu_dead(unsigned int oldcpu)
  		netif_rx_ni(skb);
  		input_queue_head_incr(oldsd);
  	}
@@ -27686,7 +27697,7 @@ index 34b5aab42b91..38af77ac810b 100644
  		netif_rx_ni(skb);
  		input_queue_head_incr(oldsd);
  	}
-@@ -11294,7 +11303,7 @@ static int __init net_dev_init(void)
+@@ -11286,7 +11295,7 @@ static int __init net_dev_init(void)
  
  		INIT_WORK(flush, flush_backlog);
  
@@ -27809,10 +27820,10 @@ index 9dcc514ca491..6e4488cdcd14 100644
  }
  EXPORT_SYMBOL(lock_sock_fast);
 diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
-index d8ffe4114385..8e01a188eb36 100644
+index 54e2309315eb..ca72dffaa71d 100644
 --- a/net/sched/sch_api.c
 +++ b/net/sched/sch_api.c
-@@ -1265,7 +1265,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,
+@@ -1270,7 +1270,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,
  		rcu_assign_pointer(sch->stab, stab);
  	}
  	if (tca[TCA_RATE]) {
@@ -27890,5 +27901,5 @@ index fdbd56ed4bd5..7464e37e7ae6 100644
  
  out_byspi:
 -- 
-2.39.1
+2.39.2
 
diff --git a/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch b/patches/external/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
similarity index 98%
rename from patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
rename to patches/external/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
index d38674de1..e86e17f46 100644
--- a/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
+++ b/patches/external/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
@@ -1,6 +1,6 @@
-From c21b6a360e1ec679f852b6b617e8bc3b5dc7babe Mon Sep 17 00:00:00 2001
+From c689551e57ccbfd1b1e0f32fe87ce32d18bd80cc Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:06:23 -0500
+Date: Tue, 25 Apr 2023 10:59:18 -0500
 Subject: [PATCH] Add wireless-regdb regulatory database file
 
 https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=7f7a9f7bc6011b072b5427eced1ff19261764e95
diff --git a/patches/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch b/patches/external/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch
similarity index 99%
rename from patches/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch
rename to patches/external/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch
index 5d501e5fb..6b6d29c18 100644
--- a/patches/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch
+++ b/patches/external/wpanusb/0001-merge-wpanusb-https-git.beagleboard.org-beagleconnec.patch
@@ -1,6 +1,6 @@
-From 6ec296d1eaf540f99b72644531538d00ec973003 Mon Sep 17 00:00:00 2001
+From 3fda2c1c31792b2024819e4f1f85908dfe61ef9c Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:04:29 -0500
+Date: Tue, 25 Apr 2023 10:45:29 -0500
 Subject: [PATCH] merge: wpanusb:
  https://git.beagleboard.org/beagleconnect/linux/wpanusb
 
diff --git a/patches/wpanusb/0002-Add-WPANUSB-driver.patch b/patches/external/wpanusb/0002-Add-WPANUSB-driver.patch
similarity index 100%
rename from patches/wpanusb/0002-Add-WPANUSB-driver.patch
rename to patches/external/wpanusb/0002-Add-WPANUSB-driver.patch
diff --git a/patches/git/KSMBD b/patches/git/KSMBD
deleted file mode 100644
index 5ad16e3c6..000000000
--- a/patches/git/KSMBD
+++ /dev/null
@@ -1 +0,0 @@
-KSMBD: https://github.com/cifsd-team/ksmbd/commit/9699755c5b6fac62168318932e57e50ba5fbcdca
diff --git a/patches/git/RT b/patches/git/RT
deleted file mode 100644
index 05c2bb1ad..000000000
--- a/patches/git/RT
+++ /dev/null
@@ -1 +0,0 @@
-RT: patch-5.10.162-rt79.patch.xz
diff --git a/patches/ref_omap2plus_defconfig b/patches/ref_omap2plus_defconfig
index 0fa6aae96..e14b1ec67 100644
--- a/patches/ref_omap2plus_defconfig
+++ b/patches/ref_omap2plus_defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.10.162 Kernel Configuration
+# Linux/arm 5.10.168 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 10.4.0"
 CONFIG_CC_IS_GCC=y
@@ -4068,7 +4068,6 @@ CONFIG_DRM_TI_TPD12S015=m
 # CONFIG_DRM_PL111 is not set
 # CONFIG_DRM_TVE200 is not set
 # CONFIG_DRM_LIMA is not set
-# CONFIG_DRM_PANFROST is not set
 # CONFIG_DRM_MCDE is not set
 # CONFIG_DRM_TIDSS is not set
 # CONFIG_DRM_LEGACY is not set
diff --git a/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-Device-Tree-Changes.patch b/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-Device-Tree-Changes.patch
index d615f3a7c..09bb37ba2 100644
--- a/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-Device-Tree-Changes.patch
+++ b/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-Device-Tree-Changes.patch
@@ -1,6 +1,6 @@
-From 537ff95c7744eccea41f883e21a25d947d8cc65d Mon Sep 17 00:00:00 2001
+From baee0a2a1e8d39b27e8773f7178eb5af92020299 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Thu, 6 Apr 2023 19:07:04 -0500
+Date: Tue, 25 Apr 2023 11:14:41 -0500
 Subject: [PATCH] Add BeagleBoard.org Device Tree Changes
 
 https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/tree/v5.10.x-ti-unified
diff --git a/patches/ti_sdk_am3x_release_defconfig b/patches/ti_sdk_am3x_release_defconfig
index 4690fae9e..0ea73db8a 100644
--- a/patches/ti_sdk_am3x_release_defconfig
+++ b/patches/ti_sdk_am3x_release_defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.10.162 Kernel Configuration
+# Linux/arm 5.10.168 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 10.4.0"
 CONFIG_CC_IS_GCC=y
diff --git a/patches/ti_sdk_dra7x_release_defconfig b/patches/ti_sdk_dra7x_release_defconfig
index 507239d36..93cf22a73 100644
--- a/patches/ti_sdk_dra7x_release_defconfig
+++ b/patches/ti_sdk_dra7x_release_defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.10.162 Kernel Configuration
+# Linux/arm 5.10.168 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 10.4.0"
 CONFIG_CC_IS_GCC=y
diff --git a/repo_maintenance/push-bb.org.sh b/repo_maintenance/push-bb.org.sh
index 2d50fe610..f96a949ec 100755
--- a/repo_maintenance/push-bb.org.sh
+++ b/repo_maintenance/push-bb.org.sh
@@ -6,36 +6,36 @@ wfile=$(mktemp /tmp/builder.XXXXXXXXX)
 echo "Working on temp $wfile ..."
 
 cat_files () {
-	if [ -f ../patches/git/AUFS ] ; then
-		cat ../patches/git/AUFS >> ${wfile}
+	if [ -f ../patches/external/git/BBDTBS ] ; then
+		cat ../patches/external/git/BBDTBS >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/BBDTBS ] ; then
-		cat ../patches/git/BBDTBS >> ${wfile}
+	if [ -f ../patches/external/git/RT ] ; then
+		cat ../patches/external/git/RT >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/RT ] ; then
-		cat ../patches/git/RT >> ${wfile}
+	if [ -f ../patches/external/git/AUFS ] ; then
+		cat ../patches/external/git/AUFS >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/TI_AMX3_CM3 ] ; then
-		cat ../patches/git/TI_AMX3_CM3 >> ${wfile}
+	if [ -f ../patches/external/git/WIRELESS_REGDB ] ; then
+		cat ../patches/external/git/WIRELESS_REGDB >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/WPANUSB ] ; then
-		cat ../patches/git/WPANUSB >> ${wfile}
+	if [ -f ../patches/external/git/KSMBD ] ; then
+		cat ../patches/external/git/KSMBD >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/BCFSERIAL ] ; then
-		cat ../patches/git/BCFSERIAL >> ${wfile}
+	if [ -f ../patches/externalgit/TI_AMX3_CM3 ] ; then
+		cat ../patches/externalgit/TI_AMX3_CM3 >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/WIRELESS_REGDB ] ; then
-		cat ../patches/git/WIRELESS_REGDB >> ${wfile}
+	if [ -f ../patches/external/git/WPANUSB ] ; then
+		cat ../patches/external/git/WPANUSB >> ${wfile}
 	fi
 
-	if [ -f ../patches/git/KSMBD ] ; then
-		cat ../patches/git/KSMBD >> ${wfile}
+	if [ -f ../patches/external/git/BCFSERIAL ] ; then
+		cat ../patches/external/git/BCFSERIAL >> ${wfile}
 	fi
 }
 
diff --git a/repo_maintenance/push-kernel-n-test.sh b/repo_maintenance/push-kernel-n-test.sh
index 98ca4fcc5..64f002347 100755
--- a/repo_maintenance/push-kernel-n-test.sh
+++ b/repo_maintenance/push-kernel-n-test.sh
@@ -6,44 +6,36 @@ wfile=$(mktemp /tmp/builder.XXXXXXXXX)
 echo "Working on temp $wfile ..."
 
 cat_files () {
-	if [ -f ./patches/git/AUFS ] ; then
-		cat ./patches/git/AUFS >> ${wfile}
+	if [ -f ./patches/external/git/BBDTBS ] ; then
+		cat ./patches/external/git/BBDTBS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BBDTBS ] ; then
-		cat ./patches/git/BBDTBS >> ${wfile}
+	if [ -f ./patches/external/git/RT ] ; then
+		cat ./patches/external/git/RT >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/CAN-ISOTP ] ; then
-		cat ./patches/git/CAN-ISOTP >> ${wfile}
+	if [ -f ./patches/external/git/AUFS ] ; then
+		cat ./patches/external/git/AUFS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/RT ] ; then
-		cat ./patches/git/RT >> ${wfile}
+	if [ -f ./patches/external/git/WIRELESS_REGDB ] ; then
+		cat ./patches/external/git/WIRELESS_REGDB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/TI_AMX3_CM3 ] ; then
-		cat ./patches/git/TI_AMX3_CM3 >> ${wfile}
+	if [ -f ./patches/external/git/KSMBD ] ; then
+		cat ./patches/external/git/KSMBD >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WIREGUARD ] ; then
-		cat ./patches/git/WIREGUARD >> ${wfile}
+	if [ -f ./patches/externalgit/TI_AMX3_CM3 ] ; then
+		cat ./patches/externalgit/TI_AMX3_CM3 >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WPANUSB ] ; then
-		cat ./patches/git/WPANUSB >> ${wfile}
+	if [ -f ./patches/external/git/WPANUSB ] ; then
+		cat ./patches/external/git/WPANUSB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BCFSERIAL ] ; then
-		cat ./patches/git/BCFSERIAL >> ${wfile}
-	fi
-
-	if [ -f ./patches/git/WIRELESS_REGDB ] ; then
-		cat ./patches/git/WIRELESS_REGDB >> ${wfile}
-	fi
-
-	if [ -f ./patches/git/KSMBD ] ; then
-		cat ./patches/git/KSMBD >> ${wfile}
+	if [ -f ./patches/external/git/BCFSERIAL ] ; then
+		cat ./patches/external/git/BCFSERIAL >> ${wfile}
 	fi
 }
 
@@ -64,10 +56,10 @@ if [ -e ${DIR}/version.sh ]; then
 		exit
 	fi
 
-	if [ -f ./patches/git/RT ] ; then
-		echo "kernel v${KERNEL_TAG} rebase with rt: v${KERNEL_REL}${kernel_rt}" > ${wfile}
+	if [ -f ./patches/external/git/RT ] ; then
+		echo "kernel v${KERNEL_TAG}${BUILD} rebase external git projects and rt: v${KERNEL_REL}${kernel_rt}" > ${wfile}
 	else
-		echo "kernel v${KERNEL_TAG} rebase" > ${wfile}
+		echo "kernel v${KERNEL_TAG}${BUILD} rebase external git projects" > ${wfile}
 	fi
 	if [ "${TISDK}" ] ; then
 		echo "TI SDK: ${TISDK}" >> ${wfile}
diff --git a/repo_maintenance/push-n-tag-release.sh b/repo_maintenance/push-n-tag-release.sh
index a7bc8642d..e8d5b851b 100755
--- a/repo_maintenance/push-n-tag-release.sh
+++ b/repo_maintenance/push-n-tag-release.sh
@@ -26,44 +26,36 @@ wfile=$(mktemp /tmp/builder.XXXXXXXXX)
 echo "Working on temp $wfile ..."
 
 cat_files () {
-	if [ -f ./patches/git/AUFS ] ; then
-		cat ./patches/git/AUFS >> ${wfile}
+	if [ -f ./patches/external/git/BBDTBS ] ; then
+		cat ./patches/external/git/BBDTBS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BBDTBS ] ; then
-		cat ./patches/git/BBDTBS >> ${wfile}
+	if [ -f ./patches/external/git/RT ] ; then
+		cat ./patches/external/git/RT >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/CAN-ISOTP ] ; then
-		cat ./patches/git/CAN-ISOTP >> ${wfile}
+	if [ -f ./patches/external/git/AUFS ] ; then
+		cat ./patches/external/git/AUFS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/RT ] ; then
-		cat ./patches/git/RT >> ${wfile}
+	if [ -f ./patches/external/git/WIRELESS_REGDB ] ; then
+		cat ./patches/external/git/WIRELESS_REGDB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/TI_AMX3_CM3 ] ; then
-		cat ./patches/git/TI_AMX3_CM3 >> ${wfile}
+	if [ -f ./patches/external/git/KSMBD ] ; then
+		cat ./patches/external/git/KSMBD >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WIREGUARD ] ; then
-		cat ./patches/git/WIREGUARD >> ${wfile}
+	if [ -f ./patches/external/git/TI_AMX3_CM3 ] ; then
+		cat ./patches/git/external/TI_AMX3_CM3 >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WPANUSB ] ; then
-		cat ./patches/git/WPANUSB >> ${wfile}
+	if [ -f ./patches/external/git/WPANUSB ] ; then
+		cat ./patches/external/git/WPANUSB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BCFSERIAL ] ; then
-		cat ./patches/git/BCFSERIAL >> ${wfile}
-	fi
-
-	if [ -f ./patches/git/WIRELESS_REGDB ] ; then
-		cat ./patches/git/WIRELESS_REGDB >> ${wfile}
-	fi
-
-	if [ -f ./patches/git/KSMBD ] ; then
-		cat ./patches/git/KSMBD >> ${wfile}
+	if [ -f ./patches/external/git/BCFSERIAL ] ; then
+		cat ./patches/external/git/BCFSERIAL >> ${wfile}
 	fi
 }
 
diff --git a/repo_maintenance/push-ti-merge.sh b/repo_maintenance/push-ti-merge.sh
index 1a654b4d9..36ace901a 100755
--- a/repo_maintenance/push-ti-merge.sh
+++ b/repo_maintenance/push-ti-merge.sh
@@ -6,36 +6,36 @@ wfile=$(mktemp /tmp/builder.XXXXXXXXX)
 echo "Working on temp $wfile ..."
 
 cat_files () {
-	if [ -f ./patches/git/AUFS ] ; then
-		cat ./patches/git/AUFS >> ${wfile}
+	if [ -f ./patches/external/git/BBDTBS ] ; then
+		cat ./patches/external/git/BBDTBS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BBDTBS ] ; then
-		cat ./patches/git/BBDTBS >> ${wfile}
+	if [ -f ./patches/external/git/RT ] ; then
+		cat ./patches/external/git/RT >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/RT ] ; then
-		cat ./patches/git/RT >> ${wfile}
+	if [ -f ./patches/external/git/AUFS ] ; then
+		cat ./patches/external/git/AUFS >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/TI_AMX3_CM3 ] ; then
-		cat ./patches/git/TI_AMX3_CM3 >> ${wfile}
+	if [ -f ./patches/external/git/WIRELESS_REGDB ] ; then
+		cat ./patches/external/git/WIRELESS_REGDB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WPANUSB ] ; then
-		cat ./patches/git/WPANUSB >> ${wfile}
+	if [ -f ./patches/external/git/KSMBD ] ; then
+		cat ./patches/external/git/KSMBD >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/BCFSERIAL ] ; then
-		cat ./patches/git/BCFSERIAL >> ${wfile}
+	if [ -f ./patches/externalgit/TI_AMX3_CM3 ] ; then
+		cat ./patches/externalgit/TI_AMX3_CM3 >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/WIRELESS_REGDB ] ; then
-		cat ./patches/git/WIRELESS_REGDB >> ${wfile}
+	if [ -f ./patches/external/git/WPANUSB ] ; then
+		cat ./patches/external/git/WPANUSB >> ${wfile}
 	fi
 
-	if [ -f ./patches/git/KSMBD ] ; then
-		cat ./patches/git/KSMBD >> ${wfile}
+	if [ -f ./patches/external/git/BCFSERIAL ] ; then
+		cat ./patches/external/git/BCFSERIAL >> ${wfile}
 	fi
 }
 
diff --git a/version.sh b/version.sh
index a27a7228e..b4143d6be 100644
--- a/version.sh
+++ b/version.sh
@@ -42,10 +42,10 @@ toolchain="gcc_10_arm"
 
 #Kernel
 KERNEL_REL=5.10
-KERNEL_TAG=${KERNEL_REL}.162
-kernel_rt=".162-rt79"
+KERNEL_TAG=${KERNEL_REL}.168
+kernel_rt=".168-rt83"
 #Kernel Build
-BUILD=${build_prefix}59
+BUILD=${build_prefix}59.1
 
 #v6.X-rcX + upto SHA
 #prev_KERNEL_SHA=""
@@ -56,10 +56,13 @@ BRANCH="${branch_prefix}${KERNEL_REL}${branch_postfix}"
 
 DISTRO=xross
 
-ti_git_old_release="73f2f2bba715b5cada420f2fb34bb43d185248f2"
-ti_git_new_release="76b3e88d569210a51399e8d8c8babd995af29d11"
-TISDK="08.06.00.006"
+ti_git_old_release="76b3e88d569210a51399e8d8c8babd995af29d11"
+ti_git_new_release="2c23e6c538c879e380401ae4b236f54020618eaa"
+TISDK="08.06.00.007"
 
+#https://git.ti.com/gitweb?p=ti-linux-kernel/ti-linux-kernel.git;a=tag;h=refs/tags/08.06.00.007
+#https://git.ti.com/gitweb?p=ti-linux-kernel/ti-linux-kernel.git;a=commit;h=2c23e6c538c879e380401ae4b236f54020618eaa
+#
 #https://git.ti.com/gitweb?p=ti-linux-kernel/ti-linux-kernel.git;a=tag;h=refs/tags/08.06.00.006
 #https://git.ti.com/gitweb?p=ti-linux-kernel/ti-linux-kernel.git;a=commit;h=76b3e88d569210a51399e8d8c8babd995af29d11
 #
-- 
GitLab