subtree updates

meta-security: ddf301c45c..5c2379f4bc:
  Armin Kuster (2):
        samhain: Update to 4.4.10
        layer.conf: Insert addpylib declaration

  John Edward Broadbent (1):
        libhoth_git.bb:SRCREV bump 1622e8a04..d769296220d

meta-openembedded: 0474e0b870..829dcb63f0:
  Alexander Stein (2):
        libcamera: Allow overwriting default pipelines and IPA
        libcamera: Simplify pipeline configuration

  Christophe Vu-Brugier (1):
        exfatprogs: upgrade 1.2.0 -> 1.2.1

  Denys Zagorui (2):
        bpftool: Fix externalsrc support
        bpftool: return do_configure dependency

  Joe Slater (2):
        bats: use baselib
        libgpiod: modify test 'gpioset: toggle (continuous)'

  Johannes Kauffmann (2):
        open62541: rename encryption PACKAGECONFIG
        open62541: add OpenSSL as crypto provider

  Khem Raj (52):
        gerbera: Fix build with fmt 10+
        mpd: Fix build with clang-16
        ptest-packagelists-meta-oe: Remove nodejs ptests for rv32/rv64
        libpeas: Fix reference to TMPDIR in tests
        lirc: Define SH_PATH=/bin/sh
        libwebsockets: Fix reference to TMPDIR
        mce-inject: Pass CFLAGS to make
        mcelog: Upgrade to 194
        xrdb: Pass target CPP location to configure
        mce-test: Update to latest
        mce-test: Pass CFLAGS to make
        ippool: Port to using ppp 2.5.x
        ippool: Enable systemd service on install
        libtraceevent: Delete
        meta-oe-ptests: Add mcelog to PTESTS_FAST_META_OE
        ptest-packagelists-meta-python: Add python3-pylint to PTESTS_FAST_META_PYTHON
        oscam: Upgrade to 11718
        oscam: Fix buildpaths in generated sources
        lockfile-progs: Pass DEBUG_PREFIX_MAP options
        tvheadend: Upgrade to latest master
        nbdkit: Remove buildpaths from binaries
        system-config-printer: Delete __pycache__ files
        dovecot: Upgrade to 2.3.20
        dovecot: Do not install dovecot-config
        mpv: Remove references to builddir from mpv binary
        libnice: Remove buildpaths from binaries
        curlpp: Remove references to buildpaths e.g. TMPDIR
        unbound: Remove references to buildpaths
        fftw: Check for TOOLCHAIN_OPTIONS to be non-empty before sed ops
        aom: Upgrade to 3.6.1
        aom: Pass nasm flags via toochain.cmake
        uml-utilities: Fix references to TMPDIR
        openct: Fix buildpaths being emitted into generated types.h
        babeld: Upgrade to 1.12.2
        nautilus: Fix buildpath QA errors
        minifi-cpp: Remove references to buildpaths in generated files
        freerdp: Fix reference to TMPDIR in libfreerdp2.so
        vlc: Remove WORKDIR from CONFIGURE_LINE definition
        system-config-printer: Check for gobject-introspection as well in distro features
        packagegroup-xfce-extended: Blueman also needs gobject introspection distro feature
        remmina: Fix buildpaths QA warnings
        cgdb: Fix buildpaths emitted into cgdb binary
        ibus: Point python interpreter to target location
        eog: Fix absolute src paths in generated files
        gimp: Fix buildpaths in binaries and scripts
        libgphoto2: Edit out sysroot from CC variable in configure
        tracker: Point TOP_SRCDIR to target path
        vlan: Pass CFLAGS via CCFLAGS
        sgpio: Pass CFLAGS to make
        x265: Pass --debug-prefix-map to nasm
        ipmiutil: Upgrade to 3.1.9
        ipmiutil: Pass --enable-useflags

  Marek Vasut (1):
        lvgl: lvgl-demo-fb: Switch to CMake and add DRM and SDL support

  Markus Volk (7):
        evince: edit include path for debug package
        pipewire: update 0.3.70 -> 0.3.71
        dav1d: update 1.1.0 -> 1.2.0
        gnome-control-center: update 43.2 -> 44.1
        mutter: update 43.1 -> 44.1
        gnome-shell: update 43.2 -> 44.1
        fluidsynth: update 2.2.6 -> 2.3.2

  Martin Jansa (20):
        libsquish: remove unused 0001-makefile-Add-LIBDIR.patch
        meta-python: remove unused patches from python2 recipes
        python3-pybind11: remove unused 0001-Do-not-strip-binaries.patch
        python3-anyjson: remove unused files
        monkey: remove unused patch file
        gnome-terminal: remove unused patch file
        geary: remove unused patch files
        ndpi: remove unused CVE-2021-36082.patch
        soci: remove unused soci_libdir.patch
        cyrus-sasl: remove unused patch file
        plymouth: remove unused patch file
        glibmm: remove unused remove-examples.patch
        opencv: remove unused patch file
        libiio: remove unused patch file
        libinih: remove unused patch file
        beep: remove unused linux-input.patch
        paho-mqtt-c: remove unused patch file
        tigervnc: remove unused patch file
        fbida: remove unused use-jpeg-turbo.patch
        graphviz: remove unused patch files

  Martin Siegumfeldt (1):
        libiio: update to version 0.24

  Mingli Yu (1):
        php: Link with libatomic on rv64

  Peter Bergin (6):
        redis-plus-plus: clean up recipe and make use of packageconfig
        redis-plus-plus: introduce fix for library detection
        redis-plus-plus: uprev to 1.3.8
        hiredis: uprev to 1.1.0
        hiredis: change dependency to redis
        hiredis: add ptest

  Ross Burton (38):
        libblockdev: add PACKAGECONFIG for tools
        libblockdev: clean up DEPENDS
        glade: add autoconf-archive-native DEPENDS
        python3-kivy: depend on gobject-introspection-data DISTRO_FEATURE
        vte9: add missing dependency on glib-2.0-native
        libgxim: add autoconf-archive-native DEPENDS
        gnome-common: add autoconf-archive RDEPENDS
        graphviz: no longer needs intltool-native
        libpeas: depend on gobject-introspection-data
        system-config-printer: clean up DEPENDS
        imsettings: add missing DEPENDS on autoconf-archive-native
        python3-pyatspi: make dependent on gobject-introspection-data being enabled
        gnome-menu: remove redundant dependencies
        hplip: build against libusb1
        hplip: remove redundant FILES:${PN}-dbg
        gutenprint: rewrite recipe and update
        gutenprint: match ownership on /etc/cups
        python3-pydbus-manager: remove obsolete recipe
        python3-pydbus: remove obsolete recipe
        firewalld: add features_check on gobject-introspection-data
        blueman: add features_check on gobject-introspection-data
        networkd-dispatcher: add features_check on gobject-introspection-data
        python3-asyncio-glib: add features_check on gobject-introspection-data
        eog: requires gobject-introspection-data DISTRO_FEATURE
        grilo-plugins: add PACKAGECONFIG for tracker
        packagegroup-meta-oe.bb: only build libpeas if gobject-introspection is enabled
        libpeas: requires gobject-introspection-data DISTRO_FEATURE
        gnome-desktop: gobject-introspection is not in fact mandatory
        gnome-photos: requires gobject-introspection-data DISTRO_FEATURE
        geoclue: the library doesn't need gobject-introspection
        nautilus: requires gobject-introspection-data DISTRO_FEATURE
        packagegroup-xfce-extended: only build catfish and panel-profies if G-I enabled
        python3-blivetgui: requires gobject-introspection-data DISTRO_FEATURE
        xfce4-whiskermenu-plugin: don't forcibly recommend a menu editor
        catfish: requires gobject-introspection-data DISTRO_FEATURE
        menulibre: requires gobject-introspection-data DISTRO_FEATURE
        xfce4-panel-profiles: requires gobject-introspection-data DISTRO_FEATURE
        networkmanager: add dependency on pyhthon3-pygobject-native

  Sanjay Chitroda (1):
        gnulib: Update recipe name to 2018-12-18

  Thomas Perrot (1):
        networkmanager: Turn ppp support into a packageconfig option

  Wang Mingyu (43):
        fmt: upgrade 9.1.0 -> 10.0.0
        spdlog: fix build error for master fmt
        mpd: fix build error when fmt updated
        gensio: upgrade 2.6.4 -> 2.6.5
        ctags: upgrade 6.0.20230507.0 -> 6.0.20230521.0
        libirecovery: upgrade 1.0.1 -> 1.1.0
        hidapi: upgrade 0.13.1 -> 0.14.0
        double-conversion: upgrade 3.2.1 -> 3.3.0
        adw-gtk3: upgrade 4.6 -> 4.7
        gnome-terminal: upgrade 3.48.0 -> 3.48.1
        grilo: upgrade 0.3.15 -> 0.3.16
        lldpd: upgrade 1.0.16 -> 1.0.17
        f2fs-tools: upgrade 1.15.0 -> 1.16.0
        dbus-cxx: upgrade 2.3.1 -> 2.4.0
        mailcap: upgrade 2.1.53 -> 2.1.54
        c-ares: upgrade 1.19.0 -> 1.19.1
        fetchmail: upgrade 6.4.23 -> 6.4.37
        python3-flask-restful: upgrade 0.3.9 -> 0.3.10
        python3-dominate: upgrade 2.7.0 -> 2.8.0
        python3-antlr4-runtime: upgrade 4.12.0 -> 4.13.0
        python3-coverage: upgrade 7.2.5 -> 7.2.6
        python3-imageio: upgrade 2.28.1 -> 2.29.0
        ostree: upgrade 2023.2 -> 2023.3
        python3-asgiref: upgrade 3.6.0 -> 3.7.1
        python3-can: upgrade 4.2.0 -> 4.2.1
        python3-u-msgpack-python: upgrade 2.7.2 -> 2.8.0
        python3-astroid: upgrade 2.15.4 -> 2.15.5
        python3-protobuf: upgrade 4.23.0 -> 4.23.1
        python3-pulsectl: upgrade 23.5.1 -> 23.5.2
        python3-django: upgrade 4.1.7 -> 4.2.1
        python3-google-auth: upgrade 2.18.0 -> 2.18.1
        python3-pytest-xdist: upgrade 3.3.0 -> 3.3.1
        python3-sqlalchemy: upgrade 2.0.13 -> 2.0.15
        python3-xlsxwriter: upgrade 3.1.0 -> 3.1.1
        python3-websocket-client: upgrade 1.5.1 -> 1.5.2
        zchunk: upgrade 1.3.0 -> 1.3.1
        python3-stevedore: upgrade 5.0.0 -> 5.1.0
        python3-sentry-sdk: upgrade 1.22.2 -> 1.24.0
        rdma-core: upgrade 45.0 -> 46.0
        valijson: upgrade 1.0 -> 1.0.1
        python3-tzlocal: upgrade 4.3 -> 5.0.1
        python3-xmlschema: upgrade 2.2.3 -> 2.3.0
        setxkbmap: upgrade 1.3.3 -> 1.3.4

  Xiangyu Chen (2):
        Revert "pahole: fix native package build error"
        libbpf: installing uapi headers for native package

  Zhang Xiao (1):
        dhcp-relay: dev subpackage conflicts with bind-dev

  richardhb (1):
        python3-bleak: add recipe

  ricoheller (3):
        python3-dbus-fast: add recipe
        python3-aioredis: add recipe
        mbpoll: add recipe

poky: 35e5d29a7d..76494f2b66:
  Alexander Kanavin (23):
        glib-2.0: upgrade 2.74.6 -> 2.76.2
        ppp: upgrade 2.4.9 -> 2.5.0
        ovmf: update 202211 -> 202302
        btrfs-tools: update 6.1.3 -> 6.3
        erofs-utils: update 1.5 -> 1.6
        llvm: update 15.0.7 -> 16.0.3
        perlcross: update 1.4 -> 1.4.1
        perl: update 5.36.0 -> 5.36.1
        rpm: update 4.18.0 -> 4.18.1
        less: update 608 -> 633
        librsvf: update 2.54.5 -> 2.56.0
        libva: update 2.16 -> 2.18
        cryptodev: remove unneeded patch
        gpgme: update 1.18.0 -> 1.20.0
        libatomic-ops: update 7.6.14 -> 7.8.0
        libgcrypt: update 1.10.1 -> 1.10.2
        libgpg-error: update 1.46 -> 1.47
        createrepo-c: update 0.20.1 -> 0.21.1
        elfutils: update 0.188 -> 0.189
        meson: update 1.0.1 ->1.1.0
        gdb: trim python support RDEPENDS
        gdb: enable python PACKAGECONFIG
        valgrind: update 3.20.0 -> 3.21.0

  Antonin Godard (1):
        archiver: move exclusion logic in a dedicated function

  Anuj Mittal (4):
        gsettings-desktop-schemas: upgrade 43.0 -> 44.0
        harfbuzz: upgrade 7.1.0 -> 7.3.0
        libevdev: upgrade 1.13.0 -> 1.13.1
        libsoup: upgrade 3.4.0 -> 3.4.2

  Arno Baumfalk (1):
        bitbake: fetch2/npm: evaluate PATH before patching HOME

  Bartosz Golaszewski (17):
        python3-attrs: unify RDEPENDS
        python3-attrs: don't use PYTHON_PN
        python3-attrs: add missing run-time dependencies
        python3-certifi: add missing run-time dependencies
        python3-hypothesis: fix run-time dependencies
        python3-tomli: add missing run-time dependencies
        python3-pathspec: add missing run-time dependencies
        python3-installer: add missing run-time dependencies
        python3-sphinx-rtd-theme: add missing run-time dependencies
        python3-setuptools-rust: fix RDEPENDS and allow target build
        python3-pyproject-hooks: add missing run-time dependencies
        python3-pycryptodome: don't use PYTHON_PN
        python3-pycryptodome: add missing run-time dependencies
        python3-pygobject: add missing run-time dependencies
        python3-manifest: cgitb: new package
        python3-manifest: zipapp: new package
        python3-manifest: turtle: new package

  Bergin, Peter (1):
        bitbake: lib/bb/tests/fetch.py: set initial branch

  Chen Qi (2):
        oe-buildenv-internal: remove path from previous project
        staging.bbclass: do not add extend_recipe_sysroot to prefuncs of prepare_recipe_sysroot

  Chi Xu (1):
        expect: Add ptest support

  Deepthi Hemraj (1):
        binutils: stable 2.40 branch updates

  Denys Dmytriyenko (2):
        grep: upgrade 3.10 -> 3.11
        xz: upgrade 5.4.2 -> 5.4.3

  Eero Aaltonen (1):
        avahi: fix D-Bus introspection

  Frieder Schrempf (1):
        psmisc: Set ALTERNATIVE for pstree to resolve conflict with busybox

  Geoff Parker (1):
        libwebp: add BBCLASSEXTEND

  Kai Kang (1):
        pm-utils: fix multilib conflictions

  Khem Raj (8):
        llvm: Enable RISCV support
        llvm,mesa: Drop MESA_LLVM_RELEASE
        systemd: Drop a backport
        go: Upgrade 1.20.1 -> 1.20.4
        go: Use -no-pie to build target cgo
        gcc: Upgrade to GCC 13.1 release
        bitbake.conf: Add -fcanon-prefix-map to DEBUG_PREFIX_MAP
        perf: Fix build with gcc-13

  Leon Anavi (1):
        wic: Add argument --hidden to default imager

  Lorenzo Arena (1):
        conf: add nice level to the hash config ignred variables

  Martin Jansa (11):
        kernel-devicetree: make shell scripts posix compliant
        go.bbclass: don't use test to check output from ls
        image-live.bbclass: respect IMAGE_MACHINE_SUFFIX
        binutils: package static libs from gprofng
        rpm: drop unused 0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
        libx11: remove unused patch and FILESEXTRAPATHS
        qemu: remove unused qemu-7.0.0-glibc-2.36.patch
        minicom: remove unused patch files
        inetutils: remove unused patch files
        libgloss: remove unused patch file
        kmod: remove unused ptest.patch

  Max Krummenacher (4):
        libtraceevent: import from meta-openembedded
        libtraceevent: fix qa issue reference to tmpdir
        perf: make pkg-config available
        perf: add libtraceevent packageconfig

  Mikko Rapeli (3):
        qemurunner: support serial console login via qemu stdout
        qemurunner: avoid leaking server_socket
        qemurunner: add boot logs to do_testimage task logs in real time

  Pavel Zhukov (1):
        lib/terminal.py: Add urxvt terminal

  Peter Kjellerstedt (5):
        glib-2.0: Avoid having g_futex_simple() inadvertently modify errno
        musl: Correct SRC_URI
        xf86-video-intel: Use the HTTPS protocol to fetch the Git repositories
        bitbake: fetch2/crate: Simplify extraction of crate names and versions from URIs
        bitbake: fetch2/crate: Correct unpack for a crate that matches the recipe name

  Qiu Tingting (1):
        e2fsprogs: Fix error SRCDIR when using usrmerge DISTRO_FEATURES

  Randolph Sapp (2):
        package: enable recursion on file globs
        kernel-devicetree: recursively search for dtbs

  Randy MacLeod (1):
        vim: upgrade 9.0.1429 -> 9.0.1527

  Ranjitsinh Rathod (1):
        kmscube: Correct DEPENDS to avoid overwrite

  Richard Purdie (9):
        bitbake: cooker: Fix/improve collections handling
        bitbake: fetch2: Clarify different localpaths functions
        bitbake: fetch2/local: Add debug to include chosen path
        bitbake.conf: Empty SRC_URI for code parser cache handling
        bitbake: cooker: Add FILE_LAYERNAME variable containing the layername for a recipe
        linux-yocto: Drop 5.15 support
        lttng-tools: Add patch to fix gcc 13 test issue
        glib-2.0: Fix TMPDIR mismatch test failures
        linux-yocto: Drop 5.15 support

  Robert Joslyn (1):
        curl: Update from 8.0.1 to 8.1.0

  Ross Burton (23):
        cpio: upgrade to 2.14
        gnutls: add PACKAGECONFIG for DANE
        gnutls: add PACKAGECONFIG options for certification compression
        gnutls: use system libtasn1
        gnutls: clean up ptest compilation
        gnutls: remove use of argp-standalone for musl
        glib-networking: fix LICENSE statement
        glib-networking: add gnomeproxy PACKAGECONFIG
        glib-networking add environment variable proxy PACKAGECONFIG
        qemu: add PACKAGECONFIG for debuginfo support
        meta: depend on autoconf-archive-native, not autoconf-archive
        gobject-introspection: always DEPEND on gobject-introspection-native
        python3-pygobject: remove explicit gobject-introspection DEPENDS
        gconf: remove explicit gobject-introspection DEPENDS
        gi-docgen.bbclass: depends on gobject-introspection-data being enabled
        python3-pygobject: mandate gobject-introspection-data DISTRO_FEATURE
        gstreamer1.0-python: mandate gobject-introspection-data DISTRO_FEATURE
        python3-gitdb: remove python3-async dependency
        python3-async: remove recipe
        libcheck: add ghetto automake output
        libnl: clean up ptest
        libcomps: clean up DEPENDS
        gdbm: improve run-ptest

  Sudip Mukherjee (2):
        dhcpcd: upgrade to v10.0.1
        libxi: upgrade to v1.8.1

  Thomas Roos (2):
        oeqa: adding selftest-hello and use it to speed up tests
        oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo

  Tom Hochstein (1):
        piglit: Add missing glslang dependencies

  Trevor Gamblin (2):
        python3-hatchling: upgrade 1.14.1 -> 1.17.0
        python3-trove-classifiers: upgrade 2023.4.29 -> 2023.5.2

  Wang Mingyu (1):
        iso-codes: upgrade 4.13.0 -> 4.15.0

meta-raspberrypi: 928bb234bb..9240ea91ca:
  Zachary T Welch (1):
        machines: simplify MACHINEOVERRIDES definitions

meta-arm: f9d80e1a14..5cbe3041be:
  Clément Péron (5):
        arm/lib: pass the PATH to fvp runner
        scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
        runfvp: make fvp runner to hold the config
        fvp: runner: execute fvp process in the same working directory as fvpconf
        runfvp: update filepath in fvpconf to relative path

  Jon Mason (2):
        arm-bsp/tc1: use latest kernel and u-boot
        arm-bsp/tc1: re-enable signed kernel image

  Ross Burton (2):
        arm/lib/fvp: remove redundant trailing commas
        arm-bsp/fvp-base: remove u-boot version pinning

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If7df9ee24ecd0b574eeb9ca799dd15d915d4ec42
diff --git a/meta-arm/documentation/runfvp.md b/meta-arm/documentation/runfvp.md
index 01b1369..b3c6467 100644
--- a/meta-arm/documentation/runfvp.md
+++ b/meta-arm/documentation/runfvp.md
@@ -64,7 +64,7 @@
 Parameters passed to the FVP with the `--parameter`/`-C` option.  These are expressed as variable flags so individual parameters can be altered easily. For example:
 
 ```
-FVP_CONFIG[bp.flashloader0.fname] = "${DEPLOY_DIR_IMAGE}/fip-fvp.bin"
+FVP_CONFIG[bp.flashloader0.fname] = "fip-fvp.bin"
 ```
 
 ### `FVP_DATA`
@@ -72,8 +72,8 @@
 Specify raw data to load at the specified address, passed to the FVP with the `--data` option.  This is a space-separated list of parameters in the format `[INST=]FILE@[MEMSPACE:]ADDRESS`. For example:
 
 ```
-FVP_DATA = "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/Image@0x80080000 \
-            cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x83000000"
+FVP_DATA = "cluster0.cpu0=Image@0x80080000 \
+            cluster0.cpu0=fvp-base-revc.dtb@0x83000000"
 ```
 
 ### `FVP_APPLICATIONS`
@@ -81,7 +81,7 @@
 Applications to load on the cores, passed to the FVP with the `--application` option.  These are expressed as variable flags with the flag name being the instance and flag value the filename, for example:
 
 ```
-FVP_APPLICATIONS[cluster0] = "${DEPLOY_DIR_IMAGE}/linux-system.axf"
+FVP_APPLICATIONS[cluster0] = "linux-system.axf"
 ```
 
 Note that symbols are not allowed in flag names, so if you need to use a wildcard in the instance then you'll need to use `FVP_EXTRA_ARGS` and `--application` directly.
diff --git a/meta-arm/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
index 03577b8..6623651 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
+++ b/meta-arm/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
@@ -17,7 +17,7 @@
 FVP_CONSOLE ?= "host_terminal_0"
 
 # FVP Parameters
-FVP_CONFIG[se.trustedBootROMloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1.bin"
+FVP_CONFIG[se.trustedBootROMloader.fname] ?= "bl1.bin"
 FVP_CONFIG[board.xnvm_size] ?= "64"
 FVP_CONFIG[se.trustedSRAM_config] ?= "6"
 FVP_CONFIG[se.BootROM_config] ?= "3"
@@ -32,10 +32,10 @@
 FVP_CONFIG[se.cryptocell.USER_OTP_FILTERING_DISABLE] ?= "1"
 
 # Boot image
-FVP_DATA ?= "board.flash0=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic@0x68000000"
+FVP_DATA ?= "board.flash0=${IMAGE_NAME}.rootfs.wic@0x68000000"
 
 # External system (cortex-M3)
-FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/es_flashfw.bin"
+FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] ?= "es_flashfw.bin"
 
 # FVP Terminals
 FVP_TERMINALS[host.host_terminal_0] ?= "Normal World Console"
diff --git a/meta-arm/meta-arm-bsp/conf/machine/corstone500.conf b/meta-arm/meta-arm-bsp/conf/machine/corstone500.conf
index a599660..c13c86c 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/corstone500.conf
+++ b/meta-arm/meta-arm-bsp/conf/machine/corstone500.conf
@@ -38,8 +38,8 @@
 
 FVP_PROVIDER ?= "fvp-corstone500-native"
 FVP_EXE ?= "FVP_Corstone-500"
-FVP_CONFIG[board.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1.bin"
-FVP_DATA ?= "css.cluster.cpu0=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic.nopt@0x80000000"
+FVP_CONFIG[board.flashloader0.fname] ?= "bl1.bin"
+FVP_DATA ?= "css.cluster.cpu0=${IMAGE_NAME}.rootfs.wic.nopt@0x80000000"
 FVP_CONSOLE ?= "terminal_0"
 FVP_TERMINALS[css.terminal_0] ?= "console"
 FVP_TERMINALS[css.terminal_1] ?= ""
diff --git a/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf
index bc29e88..39d6e68 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf
+++ b/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf
@@ -9,8 +9,6 @@
 
 TUNE_FEATURES = "aarch64"
 
-PREFERRED_VERSION_u-boot ?= "2023.01"
-
 # FVP u-boot configuration
 UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
 
diff --git a/meta-arm/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf b/meta-arm/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf
index 0c2ea12..62c9cbd 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf
+++ b/meta-arm/meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf
@@ -34,7 +34,7 @@
 TEST_TARGET_IP ?= "127.0.0.1:8022"
 TEST_SERVER_IP ?= "127.0.1.1"
 
-FVP_EXTRA_ARGS = "-a cluster0*=${DEPLOY_DIR_IMAGE}/linux-system.axf"
+FVP_EXTRA_ARGS = "-a cluster0*=linux-system.axf"
 FVP_PROVIDER ?= "fvp-base-r-aem-native"
 FVP_EXE ?= "FVP_BaseR_AEMv8R"
 FVP_CONSOLE ?= "terminal_0"
@@ -50,7 +50,7 @@
 FVP_CONFIG[bp.virtio_net.secure_accesses] = "1"
 FVP_CONFIG[bp.virtio_rng.enabled] ?= "1"
 FVP_CONFIG[bp.virtio_rng.secure_accesses] = "1"
-FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic"
+FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.rootfs.wic"
 FVP_CONFIG[bp.virtioblockdevice.secure_accesses] = "1"
 FVP_CONFIG[cache_state_modelled] ?= "0"
 FVP_CONFIG[cci400.force_on_from_start] = "1"
diff --git a/meta-arm/meta-arm-bsp/conf/machine/include/fvp-common.inc b/meta-arm/meta-arm-bsp/conf/machine/include/fvp-common.inc
index 233c734..47b7ffc 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/include/fvp-common.inc
+++ b/meta-arm/meta-arm-bsp/conf/machine/include/fvp-common.inc
@@ -33,15 +33,15 @@
 # Tell testimage to connect to localhost:8022, and forward that to SSH in the FVP.
 FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] = "8022=22"
 FVP_CONFIG[cache_state_modelled] ?= "0"
-FVP_CONFIG[bp.secureflashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-fvp.bin"
-FVP_CONFIG[bp.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip-fvp.bin"
-FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic"
+FVP_CONFIG[bp.secureflashloader.fname] ?= "bl1-fvp.bin"
+FVP_CONFIG[bp.flashloader0.fname] ?= "fip-fvp.bin"
+FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.rootfs.wic"
 # Set the baseline to ARMv8.4, as the default is 8.0.
 FVP_CONFIG[cluster0.has_arm_v8-4] = "1"
 FVP_CONFIG[cluster1.has_arm_v8-4] = "1"
 FVP_CONSOLE ?= "terminal_0"
-FVP_DATA ?= "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}@0x80080000 \
-             cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x8fc00000"
+FVP_DATA ?= "cluster0.cpu0=${KERNEL_IMAGETYPE}@0x80080000 \
+             cluster0.cpu0=fvp-base-revc.dtb@0x8fc00000"
 FVP_TERMINALS[bp.terminal_0] ?= "Console"
 FVP_TERMINALS[bp.terminal_1] ?= ""
 FVP_TERMINALS[bp.terminal_2] ?= ""
diff --git a/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc b/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc
index f7a1cfa..75bfea0 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc
+++ b/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc
@@ -6,13 +6,23 @@
 
 # Das U-boot
 UBOOT_MACHINE ?= "total_compute_defconfig"
-PREFERRED_VERSION_u-boot ?= "2022.04"
 UBOOT_RD_LOADADDRESS = "0x88000000"
 UBOOT_RD_ENTRYPOINT = "0x88000000"
 UBOOT_LOADADDRESS = "0x80080000"
 UBOOT_ENTRYPOINT = "0x80080000"
+# Below options will generate a key to sign the kernel Image and INITRAMFS_IMAGE
+# according to the default parameters of kernel-fitimage.bbclass. If the user
+# would prefer to use their own keys, disable the key generation using the
+# FIT_GENERATE_KEYS parameter and specify the location of the keys using the
+# below paramters.
+UBOOT_SIGN_ENABLE = "1"
+UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb"
+UBOOT_SIGN_KEYNAME = "dev_key"
+UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}/keys"
+FIT_GENERATE_KEYS = "1"
+FIT_SIGN_INDIVIDUAL = "1"
 
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 
 # OP-TEE
 PREFERRED_VERSION_optee-os ?= "3.18%"
diff --git a/meta-arm/meta-arm-bsp/conf/machine/tc1.conf b/meta-arm/meta-arm-bsp/conf/machine/tc1.conf
index f99bfd2..5f68cc7 100644
--- a/meta-arm/meta-arm-bsp/conf/machine/tc1.conf
+++ b/meta-arm/meta-arm-bsp/conf/machine/tc1.conf
@@ -14,9 +14,9 @@
 FVP_EXE ?= "FVP_TC1"
 
 # FVP Parameters
-FVP_CONFIG[css.scp.ROMloader.fname] ?= "${DEPLOY_DIR_IMAGE}/scp_romfw.bin"
-FVP_CONFIG[css.trustedBootROMloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-tc.bin"
-FVP_CONFIG[board.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip_gpt-tc.bin"
+FVP_CONFIG[css.scp.ROMloader.fname] ?= "scp_romfw.bin"
+FVP_CONFIG[css.trustedBootROMloader.fname] ?= "bl1-tc.bin"
+FVP_CONFIG[board.flashloader0.fname] ?= "fip_gpt-tc.bin"
 
 #FVP_CONFIG[board.hostbridge.userNetworking] ?= "true"
 #FVP_CONFIG[board.hostbridge.userNetPorts] ?= "8022=22"
@@ -28,4 +28,4 @@
 FVP_TERMINALS[soc.terminal_s1] ?= "Console"
 
 # Boot image
-FVP_DATA ?= "board.dram=${DEPLOY_DIR_IMAGE}/fitImage-core-image-minimal-tc1-tc1@0x20000000"
+FVP_DATA ?= "board.dram=fitImage-core-image-minimal-tc1-tc1@0x20000000"
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0001-arm-total_compute-update-secure-dram-size.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0001-arm-total_compute-update-secure-dram-size.patch
deleted file mode 100644
index 85b14b0..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0001-arm-total_compute-update-secure-dram-size.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f7c24393604e45012447b16aaa95eb5e7224ba07 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Tue, 12 Apr 2022 12:43:49 +0100
-Subject: [PATCH] arm: total_compute: update secure dram size
-
-Update secure DRAM size as it is increased by 64MB for additional
-secure partitions.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Id8ce99c7a5330d3c28d473009c4db04141e6fa4d
-Upstream-Status: Pending [Not submitted to upstream yet]
----
- include/configs/total_compute.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h
-index 0324b1e1b217..62bdb4f6a3ae 100644
---- a/include/configs/total_compute.h
-+++ b/include/configs/total_compute.h
-@@ -23,8 +23,8 @@
- 
- /* Physical Memory Map */
- #define PHYS_SDRAM_1		0x80000000
--/* Top 48MB reserved for secure world use */
--#define DRAM_SEC_SIZE		0x03000000
-+/* Top 112MB reserved for secure world use */
-+#define DRAM_SEC_SIZE		0x07000000
- #define PHYS_SDRAM_1_SIZE	0x80000000 - DRAM_SEC_SIZE
- #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
- 
--- 
-2.30.2
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0002-arm_ffa-introducing-Arm-FF-A-low-level-driver.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0002-arm_ffa-introducing-Arm-FF-A-low-level-driver.patch
deleted file mode 100644
index 7749858..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0002-arm_ffa-introducing-Arm-FF-A-low-level-driver.patch
+++ /dev/null
@@ -1,2611 +0,0 @@
-From 42fd69fb5ec0c441b3d31ec544ed03bedab28d45 Mon Sep 17 00:00:00 2001
-From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-Date: Tue, 16 Nov 2021 12:34:52 +0000
-Subject: [PATCH 2/7] arm_ffa: introducing Arm FF-A low-level driver
-
-This driver implements Arm Firmware Framework for Armv8-A on u-boot
-
-The Firmware Framework for Arm A-profile processors (FF-A)
-describes interfaces (ABIs) that standardize communication
-between the Secure World and Normal World leveraging TrustZone
-technology.
-
-This driver is based on FF-A specification v1.0 and uses SMC32
-calling convention.
-
-FF-A specification:
-
-https://developer.arm.com/documentation/den0077/a/?lang=en
-
-The driver provides helper FF-A interfaces for user layers.
-These helper functions allow clients to pass data and select the
-FF-A function to use for the communication with secure world.
-
-Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
-Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/uboot/patch/20220801172053.20163-4-abdellatif.elkhlifi@arm.com/]
----
- MAINTAINERS                      |    8 +
- arch/arm/cpu/armv8/smccc-call.S  |   27 +
- arch/arm/lib/asm-offsets.c       |    6 +
- common/board_r.c                 |    6 +
- drivers/Kconfig                  |    2 +
- drivers/Makefile                 |    1 +
- drivers/arm-ffa/Kconfig          |   26 +
- drivers/arm-ffa/Makefile         |    3 +
- drivers/arm-ffa/arm-ffa-uclass.c |   67 ++
- drivers/arm-ffa/arm_ffa_prv.h    |  199 ++++
- drivers/arm-ffa/core.c           | 1484 ++++++++++++++++++++++++++++++
- include/arm_ffa.h                |  191 ++++
- include/arm_ffa_helper.h         |   45 +
- include/dm/uclass-id.h           |    1 +
- include/linux/arm-smccc.h        |   28 +-
- lib/Kconfig                      |    1 +
- lib/Makefile                     |    1 +
- lib/arm-ffa/Kconfig              |    6 +
- lib/arm-ffa/Makefile             |    8 +
- lib/arm-ffa/arm_ffa_helper.c     |  188 ++++
- lib/efi_loader/efi_boottime.c    |   17 +
- 21 files changed, 2314 insertions(+), 1 deletion(-)
- create mode 100644 drivers/arm-ffa/Kconfig
- create mode 100644 drivers/arm-ffa/Makefile
- create mode 100644 drivers/arm-ffa/arm-ffa-uclass.c
- create mode 100644 drivers/arm-ffa/arm_ffa_prv.h
- create mode 100644 drivers/arm-ffa/core.c
- create mode 100644 include/arm_ffa.h
- create mode 100644 include/arm_ffa_helper.h
- create mode 100644 lib/arm-ffa/Kconfig
- create mode 100644 lib/arm-ffa/Makefile
- create mode 100644 lib/arm-ffa/arm_ffa_helper.c
-
-diff --git a/MAINTAINERS b/MAINTAINERS
-index 96582fc677..14307e6da6 100644
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -232,6 +232,14 @@ F:	board/CZ.NIC/
- F:	configs/turris_*_defconfig
- F:	include/configs/turris_*.h
- 
-+ARM FF-A
-+M:	Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+S:	Maintained
-+F:	drivers/arm-ffa/
-+F:	include/arm_ffa.h
-+F:	include/arm_ffa_helper.h
-+F:	lib/arm-ffa/
-+
- ARM FREESCALE IMX
- M:	Stefano Babic <sbabic@denx.de>
- M:	Fabio Estevam <festevam@gmail.com>
-diff --git a/arch/arm/cpu/armv8/smccc-call.S b/arch/arm/cpu/armv8/smccc-call.S
-index dc92b28777..ffc39c9fef 100644
---- a/arch/arm/cpu/armv8/smccc-call.S
-+++ b/arch/arm/cpu/armv8/smccc-call.S
-@@ -1,6 +1,8 @@
- /* SPDX-License-Identifier: GPL-2.0 */
- /*
-  * Copyright (c) 2015, Linaro Limited
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-  */
- #include <linux/linkage.h>
- #include <linux/arm-smccc.h>
-@@ -45,3 +47,28 @@ ENDPROC(__arm_smccc_smc)
- ENTRY(__arm_smccc_hvc)
- 	SMCCC	hvc
- ENDPROC(__arm_smccc_hvc)
-+
-+#if (IS_ENABLED(CONFIG_ARM_FFA_TRANSPORT))
-+
-+	.macro FFASMCCC instr
-+	.cfi_startproc
-+	\instr	#0
-+	ldr	x9, [sp]
-+	stp	x0, x1, [x9, #ARM_SMCCC_RES_X0_OFFS]
-+	stp	x2, x3, [x9, #ARM_SMCCC_RES_X2_OFFS]
-+	stp	x4, x5, [x9, #ARM_SMCCC_RES_X4_OFFS]
-+	stp	x6, x7, [x9, #ARM_SMCCC_RES_X6_OFFS]
-+	ret
-+	.cfi_endproc
-+	.endm
-+
-+/*
-+ * void arm_ffa_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
-+ *		  unsigned long a3, unsigned long a4, unsigned long a5,
-+ *		  unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
-+ */
-+ENTRY(__arm_ffa_smccc_smc)
-+	FFASMCCC	smc
-+ENDPROC(__arm_ffa_smccc_smc)
-+
-+#endif
-diff --git a/arch/arm/lib/asm-offsets.c b/arch/arm/lib/asm-offsets.c
-index 22fd541f9a..45eca83a47 100644
---- a/arch/arm/lib/asm-offsets.c
-+++ b/arch/arm/lib/asm-offsets.c
-@@ -9,6 +9,8 @@
-  * generate asm statements containing #defines,
-  * compile this file to assembler, and then extract the
-  * #defines from the assembly-language output.
-+ *
-+ * (C) Copyright 2021 ARM Limited
-  */
- 
- #include <common.h>
-@@ -115,6 +117,10 @@ int main(void)
- #ifdef CONFIG_ARM_SMCCC
- 	DEFINE(ARM_SMCCC_RES_X0_OFFS, offsetof(struct arm_smccc_res, a0));
- 	DEFINE(ARM_SMCCC_RES_X2_OFFS, offsetof(struct arm_smccc_res, a2));
-+#if (IS_ENABLED(CONFIG_ARM_FFA_TRANSPORT))
-+	DEFINE(ARM_SMCCC_RES_X4_OFFS, offsetof(struct arm_smccc_res, a4));
-+	DEFINE(ARM_SMCCC_RES_X6_OFFS, offsetof(struct arm_smccc_res, a6));
-+#endif
- 	DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
- 	DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
- #endif
-diff --git a/common/board_r.c b/common/board_r.c
-index c24d9b4e22..af20f38b10 100644
---- a/common/board_r.c
-+++ b/common/board_r.c
-@@ -61,6 +61,9 @@
- #include <wdt.h>
- #include <asm-generic/gpio.h>
- #include <efi_loader.h>
-+#ifdef CONFIG_ARM_FFA_TRANSPORT
-+#include <arm_ffa_helper.h>
-+#endif
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -770,6 +773,9 @@ static init_fnc_t init_sequence_r[] = {
- 	INIT_FUNC_WATCHDOG_RESET
- 	initr_net,
- #endif
-+#ifdef CONFIG_ARM_FFA_TRANSPORT
-+	ffa_helper_init_device,
-+#endif
- #ifdef CONFIG_POST
- 	initr_post,
- #endif
-diff --git a/drivers/Kconfig b/drivers/Kconfig
-index b26ca8cf70..e83c23789d 100644
---- a/drivers/Kconfig
-+++ b/drivers/Kconfig
-@@ -6,6 +6,8 @@ source "drivers/core/Kconfig"
- 
- source "drivers/adc/Kconfig"
- 
-+source "drivers/arm-ffa/Kconfig"
-+
- source "drivers/ata/Kconfig"
- 
- source "drivers/axi/Kconfig"
-diff --git a/drivers/Makefile b/drivers/Makefile
-index 4e7cf28440..6671d2a604 100644
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -107,6 +107,7 @@ obj-y += iommu/
- obj-y += smem/
- obj-y += thermal/
- obj-$(CONFIG_TEE) += tee/
-+obj-$(CONFIG_ARM_FFA_TRANSPORT) += arm-ffa/
- obj-y += axi/
- obj-y += ufs/
- obj-$(CONFIG_W1) += w1/
-diff --git a/drivers/arm-ffa/Kconfig b/drivers/arm-ffa/Kconfig
-new file mode 100644
-index 0000000000..d71444c1fa
---- /dev/null
-+++ b/drivers/arm-ffa/Kconfig
-@@ -0,0 +1,26 @@
-+# SPDX-License-Identifier: GPL-2.0
-+
-+config ARM_FFA_TRANSPORT
-+	bool "Enable Arm Firmware Framework for Armv8-A driver"
-+	depends on DM && ARM64
-+	select ARM_SMCCC
-+	select LIB_UUID
-+	select ARM_FFA_TRANSPORT_HELPERS
-+	select CMD_ARMFFA
-+	help
-+	  The Firmware Framework for Arm A-profile processors (FF-A)
-+	  describes interfaces (ABIs) that standardize communication
-+	  between the Secure World and Normal World leveraging TrustZone
-+	  technology.
-+
-+	  This driver is based on FF-A specification v1.0 and uses SMC32
-+	  calling convention.
-+
-+	  FF-A specification:
-+
-+	  https://developer.arm.com/documentation/den0077/a/?lang=en
-+
-+	  In u-boot FF-A design, the Secure World is considered as one
-+	  entity to communicate with. FF-A communication is handled by
-+	  one device and one instance. This device takes care of
-+	  all the interactions between Normal world and Secure World.
-diff --git a/drivers/arm-ffa/Makefile b/drivers/arm-ffa/Makefile
-new file mode 100644
-index 0000000000..9fb5bea522
---- /dev/null
-+++ b/drivers/arm-ffa/Makefile
-@@ -0,0 +1,3 @@
-+# SPDX-License-Identifier: GPL-2.0+
-+
-+obj-y += arm-ffa-uclass.o core.o
-diff --git a/drivers/arm-ffa/arm-ffa-uclass.c b/drivers/arm-ffa/arm-ffa-uclass.c
-new file mode 100644
-index 0000000000..43f6066281
---- /dev/null
-+++ b/drivers/arm-ffa/arm-ffa-uclass.c
-@@ -0,0 +1,67 @@
-+// SPDX-License-Identifier: GPL-2.0+
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <arm_ffa.h>
-+#include <errno.h>
-+#include <log.h>
-+#include <asm/global_data.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+UCLASS_DRIVER(ffa) = {
-+	.name		= "ffa",
-+	.id		= UCLASS_FFA,
-+};
-+
-+/**
-+ * ffa_get_invoke_func - performs a call to the FF-A driver dispatcher
-+ * @func_id:	The FF-A function to be used
-+ * @func_data:  Pointer to the FF-A function arguments
-+ *				container structure. This also includes
-+ *				pointers to the returned data needed by
-+ *				clients.
-+ *
-+ * This runtime function passes the FF-A function ID and its arguments to
-+ * the FF-A driver dispatcher.
-+ * This function is called by the FF-A helper functions.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int __ffa_runtime ffa_get_invoke_func(u32 func_id, struct ffa_interface_data *func_data)
-+{
-+	if (!ffa_device_get_ops()->invoke_func)
-+		return -EINVAL;
-+
-+	return ffa_device_get_ops()->invoke_func(func_id, func_data);
-+}
-+
-+/**
-+ * ffa_init_device - probes the arm_ffa device
-+ *
-+ * This boot time function makes sure the arm_ffa device is probed
-+ * and ready for use.
-+ * This function is called automatically at initcalls
-+ * level (after u-boot relocation).
-+ *
-+ * Arm FF-A transport is implemented through a single u-boot
-+ * device (arm_ffa). So, there is only one device belonging to UCLASS_FFA.
-+ * All FF-A clients should use the arm_ffa device to use the FF-A
-+ * transport.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int ffa_init_device(void)
-+{
-+	ffa_dbg("[%s]", __func__);
-+
-+	return ffa_get_device();
-+}
-diff --git a/drivers/arm-ffa/arm_ffa_prv.h b/drivers/arm-ffa/arm_ffa_prv.h
-new file mode 100644
-index 0000000000..38ea4ba83e
---- /dev/null
-+++ b/drivers/arm-ffa/arm_ffa_prv.h
-@@ -0,0 +1,199 @@
-+/* SPDX-License-Identifier: GPL-2.0+ */
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#ifndef __ARM_FFA_PRV_H
-+#define __ARM_FFA_PRV_H
-+
-+#include <arm_ffa.h>
-+#include <linux/bitfield.h>
-+#include <linux/bitops.h>
-+
-+/*
-+ * This header is private. It is exclusively used by the FF-A driver
-+ */
-+
-+/* FF-A driver version definitions */
-+
-+#define MAJOR_VERSION_MASK		GENMASK(30, 16)
-+#define MINOR_VERSION_MASK		GENMASK(15, 0)
-+#define GET_FFA_MAJOR_VERSION(x)		\
-+				((u16)(FIELD_GET(MAJOR_VERSION_MASK, (x))))
-+#define GET_FFA_MINOR_VERSION(x)		\
-+				((u16)(FIELD_GET(MINOR_VERSION_MASK, (x))))
-+#define PACK_VERSION_INFO(major, minor)			\
-+	(FIELD_PREP(MAJOR_VERSION_MASK, (major)) |	\
-+	 FIELD_PREP(MINOR_VERSION_MASK, (minor)))
-+
-+#define FFA_MAJOR_VERSION		(1)
-+#define FFA_MINOR_VERSION		(0)
-+#define FFA_VERSION_1_0		\
-+			PACK_VERSION_INFO(FFA_MAJOR_VERSION, FFA_MINOR_VERSION)
-+
-+/* Endpoint ID mask (u-boot endpoint ID) */
-+
-+#define GET_SELF_ENDPOINT_ID_MASK		GENMASK(15, 0)
-+#define GET_SELF_ENDPOINT_ID(x)		\
-+			((u16)(FIELD_GET(GET_SELF_ENDPOINT_ID_MASK, (x))))
-+
-+#define PREP_SELF_ENDPOINT_ID_MASK		GENMASK(31, 16)
-+#define PREP_SELF_ENDPOINT_ID(x)		\
-+			((u16)(FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x))))
-+
-+/* Partition endpoint ID mask  (partition with which u-boot communicates with) */
-+
-+#define PREP_PART_ENDPOINT_ID_MASK		GENMASK(15, 0)
-+#define PREP_PART_ENDPOINT_ID(x)		\
-+			((u16)(FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x))))
-+
-+/* The FF-A SMC function prototype definition */
-+
-+typedef void (*invoke_ffa_fn_t)(unsigned long a0, unsigned long a1,
-+			unsigned long a2, unsigned long a3, unsigned long a4,
-+			unsigned long a5, unsigned long a6, unsigned long a7,
-+			struct arm_smccc_res *res);
-+
-+/**
-+ * enum ffa_conduit - Arm FF-A conduits supported by the Arm FF-A driver
-+ * Currently only SMC32 is supported.
-+ */
-+enum ffa_conduit {
-+	FFA_CONDUIT_SMC = 0,
-+};
-+
-+/**
-+ * FFA_DECLARE_ARGS - FF-A functions local variables
-+ * @a0-a7:	local variables used to set registers x0-x7
-+ * @res:	the structure hosting the FF-A function return data
-+ *
-+ * A helper macro for declaring local variables for the FF-A functions  arguments.
-+ * The x0-x7 registers are used to exchange data with the secure world.
-+ * But, only the bottom 32-bit of thes registers contains the data.
-+ */
-+#define FFA_DECLARE_ARGS \
-+	unsigned long a0 = 0; \
-+	unsigned long a1 = 0; \
-+	unsigned long a2 = 0; \
-+	unsigned long a3 = 0; \
-+	unsigned long a4 = 0; \
-+	unsigned long a5 = 0; \
-+	unsigned long a6 = 0; \
-+	unsigned long a7 = 0; \
-+	struct arm_smccc_res res = {0}
-+
-+/* FF-A error codes */
-+#define FFA_ERR_STAT_NOT_SUPPORTED				(-1)
-+#define FFA_ERR_STAT_INVALID_PARAMETERS				(-2)
-+#define FFA_ERR_STAT_NO_MEMORY				(-3)
-+#define FFA_ERR_STAT_BUSY				(-4)
-+#define FFA_ERR_STAT_INTERRUPTED				(-5)
-+#define FFA_ERR_STAT_DENIED				(-6)
-+#define FFA_ERR_STAT_RETRY				(-7)
-+#define FFA_ERR_STAT_ABORTED				(-8)
-+
-+/**
-+ * struct ffa_features_desc - FF-A functions features
-+ * @func_id:	FF-A function
-+ * @field1:	features read from register w2
-+ * @field2:	features read from register w3
-+ *
-+ * Data structure describing the features of the  FF-A functions queried by
-+ * FFA_FEATURES
-+ */
-+struct ffa_features_desc {
-+	u32 func_id;
-+	u32 field1;
-+	u32 field2;
-+};
-+
-+/**
-+ * enum ffa_rxtx_buf_sizes - minimum sizes supported
-+ * for the RX/TX buffers
-+ */
-+enum ffa_rxtx_buf_sizes {
-+	RXTX_4K,
-+	RXTX_64K,
-+	RXTX_16K
-+};
-+
-+/*
-+ * Number of the FF-A interfaces features descriptors
-+ * currently only FFA_RXTX_MAP descriptor is supported
-+ */
-+#define FFA_FEATURE_DESC_CNT (1)
-+
-+/**
-+ * struct ffa_pdata - platform data for the arm_ffa device
-+ * @conduit: The FF-A conduit used
-+ *
-+ * Platform data structure read from the device tree
-+ */
-+struct ffa_pdata {
-+	enum ffa_conduit conduit;
-+};
-+
-+/**
-+ * struct ffa_rxtxpair - structure hosting the RX/TX buffers physical addresses
-+ * @rxbuf:	physical address of the RX buffer
-+ * @txbuf:	physical address of the TX buffer
-+ *
-+ * Data structure hosting the physical addresses of the mapped RX/TX buffers
-+ * These physical address are used by the FF-A functions that use the RX/TX buffers
-+ */
-+struct ffa_rxtxpair {
-+	u64 rxbuf; /* physical address */
-+	u64 txbuf; /* physical address */
-+};
-+
-+/**
-+ * struct ffa_partition_desc - the secure partition descriptor
-+ * @info:	partition information
-+ * @UUID:	UUID
-+ *
-+ * Each partition has its descriptor containing the partitions information and the UUID
-+ */
-+struct ffa_partition_desc {
-+	struct ffa_partition_info info;
-+	union ffa_partition_uuid UUID;
-+};
-+
-+/**
-+ * struct ffa_partitions - descriptors for all secure partitions
-+ * @count:	The number of partitions descriptors
-+ * @descs	The partitions descriptors table
-+ *
-+ * This data structure contains the partitions descriptors table
-+ */
-+struct ffa_partitions {
-+	u32 count;
-+	struct ffa_partition_desc *descs; /* virtual address */
-+};
-+
-+/**
-+ * struct ffa_prvdata - the driver private data structure
-+ *
-+ * @dev:	The arm_ffa device under u-boot driver model
-+ * @fwk_version:	FF-A framework version
-+ * @id:	u-boot endpoint ID
-+ * @partitions:	The partitions descriptors structure
-+ * @pair:	The RX/TX buffers pair
-+ * @conduit:	The selected conduit
-+ * @invoke_ffa_fn:	The function executing the FF-A function
-+ * @features:	Table of the FF-A functions having features
-+ *
-+ * The driver data structure hosting all resident data.
-+ */
-+struct ffa_prvdata {
-+	struct udevice *dev;
-+	u32 fwk_version;
-+	u16 id;
-+	struct ffa_partitions partitions;
-+	struct ffa_rxtxpair pair;
-+	enum ffa_conduit conduit;
-+	invoke_ffa_fn_t invoke_ffa_fn;
-+	struct ffa_features_desc features[FFA_FEATURE_DESC_CNT];
-+};
-+
-+#endif
-diff --git a/drivers/arm-ffa/core.c b/drivers/arm-ffa/core.c
-new file mode 100644
-index 0000000000..98e2d2fa17
---- /dev/null
-+++ b/drivers/arm-ffa/core.c
-@@ -0,0 +1,1484 @@
-+// SPDX-License-Identifier: GPL-2.0+
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#include "arm_ffa_prv.h"
-+#include <asm/global_data.h>
-+#include <asm/io.h>
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <linux/errno.h>
-+#include <linux/sizes.h>
-+#include <log.h>
-+#include <malloc.h>
-+#include <mapmem.h>
-+#include <string.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+/**
-+ * The device private data structure containing all the resident
-+ * data read from secure world
-+ */
-+struct ffa_prvdata __ffa_runtime_data ffa_priv_data = {0};
-+
-+/*
-+ * Driver functions
-+ */
-+
-+/**
-+ * ffa_get_device - probes the arm_ffa device
-+ *
-+ * This boot time function makes sure the arm_ffa device is probed
-+ * and ready for use. This is done using uclass_get_device.
-+ * The arm_ffa driver belongs to UCLASS_FFA.
-+ * This function should be called before using the driver.
-+ *
-+ * Arm FF-A transport is implemented through a single u-boot
-+ * device (arm_ffa). So, there is only one device belonging to UCLASS_FFA.
-+ * All FF-A clients should use the arm_ffa device to use the FF-A
-+ * transport.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int ffa_get_device(void)
-+{
-+	int ret;
-+	int devnum = 0;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (ffa_priv_data.dev)
-+		return FFA_ERR_STAT_SUCCESS;
-+
-+	/*
-+	 * searching and probing the device
-+	 */
-+	ret = uclass_get_device(UCLASS_FFA, devnum, &ffa_priv_data.dev);
-+	if (ret) {
-+		ffa_err("can not find the device");
-+		ffa_priv_data.dev = NULL;
-+		return -ENODEV;
-+	}
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_get_version - FFA_VERSION handler function
-+ *
-+ * This is the boot time function that implements FFA_VERSION FF-A function
-+ * to get from the secure world the FF-A framework version
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_get_version(void)
-+{
-+	u16 major, minor;
-+
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_VERSION;
-+	a1 = FFA_VERSION_1_0;
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	if (res.a0 == FFA_ERR_STAT_NOT_SUPPORTED) {
-+		ffa_err("A Firmware Framework implementation does not exist");
-+		return -EOPNOTSUPP;
-+	}
-+
-+	major = GET_FFA_MAJOR_VERSION(res.a0);
-+	minor = GET_FFA_MINOR_VERSION(res.a0);
-+
-+	ffa_info("FF-A driver %d.%d\nFF-A framework %d.%d",
-+		 FFA_MAJOR_VERSION, FFA_MINOR_VERSION, major, minor);
-+
-+	if ((major == FFA_MAJOR_VERSION && minor >= FFA_MINOR_VERSION)) {
-+		ffa_info("Versions are compatible ");
-+
-+		ffa_priv_data.fwk_version = res.a0;
-+
-+		return FFA_ERR_STAT_SUCCESS;
-+	}
-+
-+	ffa_info("Versions are incompatible ");
-+	return -EPROTONOSUPPORT;
-+}
-+
-+/**
-+ * ffa_get_endpoint_id - FFA_ID_GET handler function
-+ *
-+ * This is the boot time function that implements FFA_ID_GET FF-A function
-+ * to get from the secure world u-boot endpoint ID
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_get_endpoint_id(void)
-+{
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_ID_GET;
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		if (((int)res.a2) == FFA_ERR_STAT_NOT_SUPPORTED) {
-+			ffa_err("This function is not implemented at this FF-A instance");
-+			return -EOPNOTSUPP;
-+		}
-+
-+		ffa_err("Undefined error code (%d)", ((int)res.a2));
-+		return -EINVAL;
-+	}
-+	case FFA_SUCCESS:
-+	{
-+		ffa_priv_data.id = GET_SELF_ENDPOINT_ID(res.a2);
-+		ffa_info("endpoint ID is %u", ffa_priv_data.id);
-+
-+		return FFA_ERR_STAT_SUCCESS;
-+	}
-+	default:
-+	{
-+		ffa_err("Undefined response function (0x%lx)", res.a0);
-+		return -EINVAL;
-+	}
-+	}
-+}
-+
-+/**
-+ * ffa_get_features_desc - returns the features descriptor of the specified
-+ *						FF-A function
-+ * @func_id:	the FF-A function which the features are to be retrieved
-+ *
-+ * This is a boot time function that searches the features descriptor of the
-+ * specified FF-A function
-+ *
-+ * Return:
-+ *
-+ * When found, the address of the features descriptor is returned. Otherwise, NULL.
-+ */
-+static struct ffa_features_desc *ffa_get_features_desc(u32 func_id)
-+{
-+	u32 desc_idx;
-+
-+	/*
-+	 * search for the descriptor of the selected FF-A interface
-+	 */
-+	for (desc_idx = 0; desc_idx < FFA_FEATURE_DESC_CNT ; desc_idx++)
-+		if (ffa_priv_data.features[desc_idx].func_id == func_id)
-+			return &ffa_priv_data.features[desc_idx];
-+
-+	return NULL;
-+}
-+
-+/**
-+ * ffa_get_rxtx_map_features - FFA_FEATURES handler function with FFA_RXTX_MAP
-+ *							argument
-+ *
-+ * This is the boot time function that implements FFA_FEATURES FF-A function
-+ * to retrieve the FFA_RXTX_MAP features
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_get_rxtx_map_features(void)
-+{
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_FEATURES;
-+	a1 = FFA_RXTX_MAP;
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		if (((int)res.a2) == FFA_ERR_STAT_NOT_SUPPORTED) {
-+			ffa_err("FFA_RXTX_MAP is not implemented at this FF-A instance");
-+			return -EOPNOTSUPP;
-+		}
-+
-+		ffa_err("Undefined error code (%d)", ((int)res.a2));
-+		return -EINVAL;
-+	}
-+	case FFA_SUCCESS:
-+	{
-+		u32 desc_idx;
-+
-+		/*
-+		 * search for an empty descriptor
-+		 */
-+		for (desc_idx = 0; desc_idx < FFA_FEATURE_DESC_CNT ; desc_idx++)
-+			if (!ffa_priv_data.features[desc_idx].func_id) {
-+				/*
-+				 * populate the descriptor with
-+				 * the interface features data
-+				 */
-+				ffa_priv_data.features[desc_idx].func_id =
-+					FFA_RXTX_MAP;
-+				ffa_priv_data.features[desc_idx].field1 =
-+					res.a2;
-+
-+				ffa_info("FFA_RXTX_MAP features data 0x%lx",
-+					 res.a2);
-+
-+				return FFA_ERR_STAT_SUCCESS;
-+			}
-+
-+		ffa_err("Cannot save FFA_RXTX_MAP features data. Descriptors table full");
-+		return -ENOBUFS;
-+	}
-+	default:
-+	{
-+		ffa_err("Undefined response function (0x%lx)",
-+			res.a0);
-+		return -EINVAL;
-+	}
-+	}
-+}
-+
-+/**
-+ * ffa_get_rxtx_buffers_pages_cnt - reads from the features data descriptors
-+ *						the minimum number of pages in each of the RX/TX
-+ *						buffers
-+ * @buf_4k_pages: Pointer to the minimum number of pages
-+ *
-+ * This is the boot time function that  returns the minimum number of pages
-+ *  in each of the RX/TX buffers
-+ *
-+ * Return:
-+ *
-+ * buf_4k_pages points to the returned number of pages
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_get_rxtx_buffers_pages_cnt(size_t *buf_4k_pages)
-+{
-+	struct ffa_features_desc *desc = NULL;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!buf_4k_pages)
-+		return -EINVAL;
-+
-+	desc = ffa_get_features_desc(FFA_RXTX_MAP);
-+	if (!desc)
-+		return -EINVAL;
-+
-+	ffa_dbg("FFA_RXTX_MAP descriptor found");
-+
-+	switch (desc->field1) {
-+	case RXTX_4K:
-+		*buf_4k_pages = 1;
-+		break;
-+	case RXTX_16K:
-+		*buf_4k_pages = 4;
-+		break;
-+	case RXTX_64K:
-+		*buf_4k_pages = 16;
-+		break;
-+	default:
-+		ffa_err("RX/TX buffer size not supported");
-+		return -EINVAL;
-+	}
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_free_rxtx_buffers - frees the RX/TX buffers
-+ * @buf_4k_pages: the minimum number of pages in each of the RX/TX
-+ *			  buffers
-+ *
-+ * This is the boot time function used to free the RX/TX buffers
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_free_rxtx_buffers(size_t buf_4k_pages)
-+{
-+	efi_status_t free_rxbuf_ret, free_txbuf_ret;
-+
-+	ffa_info("Freeing RX/TX buffers");
-+
-+	free_rxbuf_ret = efi_free_pages(ffa_priv_data.pair.rxbuf, buf_4k_pages);
-+	free_txbuf_ret = efi_free_pages(ffa_priv_data.pair.txbuf, buf_4k_pages);
-+
-+	if (free_rxbuf_ret != EFI_SUCCESS || free_txbuf_ret != EFI_SUCCESS) {
-+		ffa_err("Failed to free RX/TX buffers (rx: %lu , tx: %lu)",
-+			free_rxbuf_ret,
-+			free_txbuf_ret);
-+		return -EINVAL;
-+	}
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_alloc_rxtx_buffers - allocates the RX/TX buffers
-+ * @buf_4k_pages: the minimum number of pages in each of the RX/TX
-+ *			  buffers
-+ *
-+ * This is the boot time function used by ffa_map_rxtx_buffers to allocate
-+ * the RX/TX buffers before mapping them
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_alloc_rxtx_buffers(size_t buf_4k_pages)
-+{
-+	ffa_dbg("[%s]", __func__);
-+
-+#if CONFIG_IS_ENABLED(EFI_LOADER)
-+
-+	efi_status_t efi_ret;
-+	void *virt_txbuf;
-+	void *virt_rxbuf;
-+
-+	ffa_info("Using %lu 4KB page(s) for RX/TX buffers size",
-+		 buf_4k_pages);
-+
-+	efi_ret = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES,
-+				     EFI_BOOT_SERVICES_DATA,
-+				     buf_4k_pages,
-+				     &ffa_priv_data.pair.rxbuf);
-+
-+	if (efi_ret != EFI_SUCCESS) {
-+		ffa_priv_data.pair.rxbuf = 0;
-+		ffa_err("Failure to allocate RX buffer (EFI error: 0x%lx)",
-+			efi_ret);
-+
-+		return -ENOBUFS;
-+	}
-+
-+	ffa_info("RX buffer at phys 0x%llx",
-+		 ffa_priv_data.pair.rxbuf);
-+
-+	/*
-+	 * convert the RX buffer physical address to virtual address
-+	 */
-+	virt_rxbuf = (void *)map_sysmem((phys_addr_t)ffa_priv_data.pair.rxbuf, 0);
-+
-+	/*
-+	 * make sure the buffer is clean before use
-+	 */
-+	memset(virt_rxbuf, 0, buf_4k_pages * SZ_4K);
-+
-+	unmap_sysmem(virt_rxbuf);
-+
-+	efi_ret = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES,
-+				     EFI_RUNTIME_SERVICES_DATA,
-+				     buf_4k_pages,
-+				     &ffa_priv_data.pair.txbuf);
-+
-+	if (efi_ret != EFI_SUCCESS) {
-+		ffa_dbg("FFA_RXTX_MAP: freeing RX buffer");
-+		efi_free_pages(ffa_priv_data.pair.rxbuf, buf_4k_pages);
-+		ffa_priv_data.pair.rxbuf = 0;
-+		ffa_priv_data.pair.txbuf = 0;
-+		ffa_err("Failure to allocate the TX buffer (EFI error: 0x%lx)"
-+			, efi_ret);
-+
-+		return -ENOBUFS;
-+	}
-+
-+	ffa_info("TX buffer at phys 0x%llx",
-+		 ffa_priv_data.pair.txbuf);
-+
-+	/*
-+	 * convert the TX buffer physical address to virtual address
-+	 */
-+	virt_txbuf = (void *)map_sysmem((phys_addr_t)ffa_priv_data.pair.txbuf, 0);
-+
-+	/*
-+	 * make sure the buffer is clean before use
-+	 */
-+	memset(virt_txbuf, 0, buf_4k_pages * SZ_4K);
-+
-+	unmap_sysmem(virt_txbuf);
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+
-+#else
-+	return -ENOBUFS;
-+#endif
-+}
-+
-+/**
-+ * ffa_map_rxtx_buffers - FFA_RXTX_MAP handler function
-+ * @buf_4k_pages: the minimum number of pages in each of the RX/TX
-+ *			  buffers
-+ *
-+ * This is the boot time function that implements FFA_RXTX_MAP FF-A function
-+ * to map the RX/TX buffers
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_map_rxtx_buffers(size_t buf_4k_pages)
-+{
-+	int ret;
-+
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	ret = ffa_alloc_rxtx_buffers(buf_4k_pages);
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	a0 = FFA_RXTX_MAP;
-+	a1 = ffa_priv_data.pair.txbuf;
-+	a2 = ffa_priv_data.pair.rxbuf;
-+	a3 = buf_4k_pages;
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		switch (((int)res.a2)) {
-+		case FFA_ERR_STAT_INVALID_PARAMETERS:
-+			ffa_err("One or more fields in input parameters is incorrectly encoded");
-+			ret = -EPERM;
-+			break;
-+		case FFA_ERR_STAT_NO_MEMORY:
-+			ffa_err("Not enough memory");
-+			ret = -ENOMEM;
-+			break;
-+		case FFA_ERR_STAT_DENIED:
-+			ffa_err("Buffer pair already registered");
-+			ret = -EACCES;
-+			break;
-+		case FFA_ERR_STAT_NOT_SUPPORTED:
-+			ffa_err("This function is not implemented at this FF-A instance");
-+			ret = -EOPNOTSUPP;
-+			break;
-+		default:
-+			ffa_err("Undefined error (%d)",
-+				((int)res.a2));
-+			ret = -EINVAL;
-+		}
-+		break;
-+	}
-+	case FFA_SUCCESS:
-+		ffa_info("RX/TX buffers mapped");
-+		return FFA_ERR_STAT_SUCCESS;
-+	default:
-+		ffa_err("Undefined response function (0x%lx)",
-+			res.a0);
-+		ret = -EINVAL;
-+	}
-+
-+	ffa_free_rxtx_buffers(buf_4k_pages);
-+
-+	return ret;
-+}
-+
-+/**
-+ * ffa_unmap_rxtx_buffers - FFA_RXTX_UNMAP handler function
-+ *
-+ * This is the boot time function that implements FFA_RXTX_UNMAP FF-A function
-+ * to unmap the RX/TX buffers
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_unmap_rxtx_buffers(void)
-+{
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_RXTX_UNMAP;
-+	a1 = PREP_SELF_ENDPOINT_ID(ffa_priv_data.id);
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		if (((int)res.a2) == FFA_ERR_STAT_NOT_SUPPORTED)
-+			panic("[FFA] FFA_RXTX_UNMAP is not implemented at this FF-A instance\n");
-+		else if (((int)res.a2) == FFA_ERR_STAT_INVALID_PARAMETERS)
-+			panic("[FFA] There is no buffer pair registered on behalf of the caller\n");
-+		else
-+			panic("[FFA] Undefined error (%d)\n", ((int)res.a2));
-+	}
-+	case FFA_SUCCESS:
-+	{
-+		size_t buf_4k_pages = 0;
-+		int ret;
-+
-+		ret = ffa_get_rxtx_buffers_pages_cnt(&buf_4k_pages);
-+		if (ret != FFA_ERR_STAT_SUCCESS)
-+			panic("[FFA] RX/TX buffers unmapped but failure in getting pages count\n");
-+
-+		ret = ffa_free_rxtx_buffers(buf_4k_pages);
-+		if (ret != FFA_ERR_STAT_SUCCESS)
-+			panic("[FFA] RX/TX buffers unmapped but failure in freeing the memory\n");
-+
-+		ffa_info("RX/TX buffers unmapped and memory freed");
-+
-+		return FFA_ERR_STAT_SUCCESS;
-+	}
-+	default:
-+		panic("[FFA] Undefined response function (0x%lx)", res.a0);
-+	}
-+}
-+
-+/**
-+ * ffa_release_rx_buffer - FFA_RX_RELEASE handler function
-+ *
-+ * This is the boot time function that invokes FFA_RX_RELEASE FF-A function
-+ * to release the ownership of the RX buffer
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_release_rx_buffer(void)
-+{
-+	FFA_DECLARE_ARGS;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_RX_RELEASE;
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		if (((int)res.a2) == FFA_ERR_STAT_NOT_SUPPORTED)
-+			panic("[FFA] FFA_RX_RELEASE is not implemented at this FF-A instance\n");
-+		else if (((int)res.a2) == FFA_ERR_STAT_DENIED)
-+			panic("[FFA] Caller did not have ownership of the RX buffer\n");
-+		else
-+			panic("[FFA] Undefined error (%d)\n", ((int)res.a2));
-+	}
-+	case FFA_SUCCESS:
-+		ffa_info("RX buffer released");
-+		return FFA_ERR_STAT_SUCCESS;
-+
-+	default:
-+		panic("[FFA] Undefined response function (0x%lx)\n", res.a0);
-+	}
-+}
-+
-+/**
-+ * ffa_uuid_are_identical - checks whether two given UUIDs are identical
-+ * @uuid1: first UUID
-+ * @uuid2: second UUID
-+ *
-+ * This is a boot time function used by ffa_read_partitions_info to search
-+ * for a UUID in the partitions descriptors table
-+ *
-+ * Return:
-+ *
-+ * 1 when UUIDs match. Otherwise, 0
-+ */
-+int ffa_uuid_are_identical(const union ffa_partition_uuid *uuid1,
-+			   const union ffa_partition_uuid *uuid2)
-+{
-+	if (!uuid1 || !uuid2)
-+		return 0;
-+
-+	return (!memcmp(uuid1, uuid2, sizeof(union ffa_partition_uuid)));
-+}
-+
-+/**
-+ * ffa_read_partitions_info - reads the data queried by FFA_PARTITION_INFO_GET
-+ *							and saves it in the private structure
-+ * @count: The number of partitions queried
-+ * @part_uuid: Pointer to the partition(s) UUID
-+ *
-+ * This is the boot time function that reads the partitions information
-+ * returned by the FFA_PARTITION_INFO_GET and saves it in the private
-+ * data structure.
-+ *
-+ * Return:
-+ *
-+ * The private data structure is updated with the partition(s) information
-+ * FFA_ERR_STAT_SUCCESS is returned on success. Otherwise, failure
-+ */
-+static int ffa_read_partitions_info(u32 count, union ffa_partition_uuid *part_uuid)
-+{
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!count) {
-+		ffa_err("No partition detected");
-+		return -ENODATA;
-+	}
-+
-+	ffa_info("Reading partitions data from the RX buffer");
-+
-+#if CONFIG_IS_ENABLED(EFI_LOADER)
-+
-+	if (!part_uuid) {
-+		/*
-+		 * querying information of all partitions
-+		 */
-+		u64 data_pages;
-+		u64 data_bytes;
-+		efi_status_t efi_ret;
-+		size_t buf_4k_pages = 0;
-+		u32 desc_idx;
-+		struct ffa_partition_info *parts_info;
-+		int ret;
-+
-+		data_bytes = count * sizeof(struct ffa_partition_desc);
-+		data_pages = efi_size_in_pages(data_bytes);
-+
-+		/*
-+		 * get the RX buffer size in pages
-+		 */
-+		ret = ffa_get_rxtx_buffers_pages_cnt(&buf_4k_pages);
-+		if (ret != FFA_ERR_STAT_SUCCESS) {
-+			ffa_err("Can not get the RX buffer size (error %d)", ret);
-+			return ret;
-+		}
-+
-+		if (data_pages > buf_4k_pages) {
-+			ffa_err("Partitions data size exceeds the RX buffer size:");
-+			ffa_err("    Sizes in pages: data %llu , RX buffer %lu ",
-+				data_pages,
-+				buf_4k_pages);
-+
-+			return -ENOMEM;
-+		}
-+
-+		efi_ret = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES,
-+					     EFI_RUNTIME_SERVICES_DATA,
-+					     data_pages,
-+					     (u64 *)&ffa_priv_data.partitions.descs);
-+
-+		if (efi_ret != EFI_SUCCESS) {
-+			ffa_priv_data.partitions.descs = NULL;
-+
-+			ffa_err("Cannot  allocate partitions data buffer (EFI error 0x%lx)",
-+				efi_ret);
-+
-+			return -ENOBUFS;
-+		}
-+
-+		/*
-+		 * convert the descs buffer physical address
-+		 * to virtual address
-+		 * This virtual address should not be unmapped
-+		 * descs is expected to be a virtual address
-+		 */
-+		ffa_priv_data.partitions.descs =
-+			(struct ffa_partition_desc *)
-+			map_sysmem((phys_addr_t)
-+				   ffa_priv_data.partitions.descs, 0);
-+
-+		/*
-+		 * make sure the buffer is clean before use
-+		 */
-+		memset(ffa_priv_data.partitions.descs, 0,
-+		       data_pages * SZ_4K);
-+
-+		ffa_info("Copying %lld page(s) of partitions data from RX buffer",
-+			 data_pages);
-+
-+		/*
-+		 * convert the RX buffer physical address to
-+		 * virtual address
-+		 */
-+		parts_info = (struct ffa_partition_info *)
-+			map_sysmem((phys_addr_t)
-+				   ffa_priv_data.pair.rxbuf, 0);
-+
-+		for (desc_idx = 0 ; desc_idx < count ; desc_idx++) {
-+			ffa_priv_data.partitions.descs[desc_idx].info =
-+				parts_info[desc_idx];
-+
-+			ffa_info("Partition ID %x : info cached",
-+				 ffa_priv_data.partitions.descs[desc_idx].info.id);
-+		}
-+		unmap_sysmem(parts_info);
-+
-+		ffa_priv_data.partitions.count = count;
-+
-+		ffa_info("%d partition(s) found and cached", count);
-+
-+	} else {
-+		u32 rx_desc_idx, cached_desc_idx;
-+		struct ffa_partition_info *parts_info;
-+		u8 desc_found;
-+
-+		/*
-+		 * convert the RX buffer physical address to virtual address
-+		 */
-+		parts_info = (struct ffa_partition_info *)
-+			map_sysmem((phys_addr_t)ffa_priv_data.pair.rxbuf, 0);
-+
-+		/*
-+		 * search for the SP IDs read from the RX buffer
-+		 * in the already cached SPs.
-+		 * Update the UUID when ID found.
-+		 */
-+		for (rx_desc_idx = 0; rx_desc_idx < count ; rx_desc_idx++) {
-+			desc_found = 0;
-+
-+			/*
-+			 * search the current ID in the cached partitions
-+			 */
-+			for (cached_desc_idx = 0;
-+			     cached_desc_idx < ffa_priv_data.partitions.count;
-+			     cached_desc_idx++) {
-+				/*
-+				 * save the UUID
-+				 */
-+				if (ffa_priv_data.partitions.descs[cached_desc_idx].info.id ==
-+				    parts_info[rx_desc_idx].id) {
-+					ffa_priv_data.partitions.descs[cached_desc_idx].UUID =
-+						*part_uuid;
-+
-+					desc_found = 1;
-+					break;
-+				}
-+			}
-+
-+			if (!desc_found) {
-+				unmap_sysmem(parts_info);
-+				return -ENODATA;
-+			}
-+		}
-+		unmap_sysmem(parts_info);
-+	}
-+#else
-+#warning "arm_ffa: reading FFA_PARTITION_INFO_GET data not implemented"
-+#endif
-+
-+	return  FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_query_partitions_info - invokes FFA_PARTITION_INFO_GET
-+ *							and saves partitions data
-+ * @part_uuid: Pointer to the partition(s) UUID
-+ * @pcount: Pointer to the number of partitions variable filled when querying
-+ *
-+ * This is the boot time function that executes the FFA_PARTITION_INFO_GET
-+ * to query the partitions data. Then, it calls ffa_read_partitions_info
-+ * to save the data in the private data structure.
-+ *
-+ * After reading the data the RX buffer is released using ffa_release_rx_buffer
-+ *
-+ * Return:
-+ *
-+ * When part_uuid is NULL, all partitions data are retrieved from secure world
-+ * When part_uuid is non NULL, data for partitions matching the given UUID are
-+ * retrieved and the number of partitions is returned
-+ * FFA_ERR_STAT_SUCCESS is returned on success. Otherwise, failure
-+ */
-+static int ffa_query_partitions_info(union ffa_partition_uuid *part_uuid,
-+				     u32 *pcount)
-+{
-+	unsigned long a0 = 0;
-+	union ffa_partition_uuid query_uuid = {0};
-+	unsigned long a5 = 0;
-+	unsigned long a6 = 0;
-+	unsigned long a7 = 0;
-+	struct arm_smccc_res res = {0};
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	a0 = FFA_PARTITION_INFO_GET;
-+
-+	/*
-+	 * If a UUID is specified. Information for one or more
-+	 * partitions in the system is queried. Otherwise, information
-+	 * for all installed partitions is queried
-+	 */
-+
-+	if (part_uuid) {
-+		if (!pcount)
-+			return -EINVAL;
-+
-+		query_uuid = *part_uuid;
-+	}
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, query_uuid.words.a1, query_uuid.words.a2,
-+				    query_uuid.words.a3, query_uuid.words.a4,
-+				    a5, a6, a7, &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		switch (((int)res.a2)) {
-+		case FFA_ERR_STAT_INVALID_PARAMETERS:
-+			ffa_err("Unrecognized UUID");
-+			return -EPERM;
-+		case FFA_ERR_STAT_NO_MEMORY:
-+			ffa_err("Results cannot fit in RX buffer of the caller");
-+			return -ENOMEM;
-+		case FFA_ERR_STAT_DENIED:
-+			ffa_err("Callee is not in a state to handle this request");
-+			return -EACCES;
-+		case FFA_ERR_STAT_NOT_SUPPORTED:
-+			ffa_err("This function is not implemented at this FF-A instance");
-+			return -EOPNOTSUPP;
-+		case FFA_ERR_STAT_BUSY:
-+			ffa_err("RX buffer of the caller is not free");
-+			return -EBUSY;
-+		default:
-+			ffa_err("Undefined error (%d)", ((int)res.a2));
-+			return -EINVAL;
-+		}
-+	}
-+	case FFA_SUCCESS:
-+	{
-+		int ret;
-+
-+		/*
-+		 * res.a2 contains the count of partition information descriptors
-+		 * populated in the RX buffer
-+		 */
-+		if (res.a2) {
-+			ret = ffa_read_partitions_info(res.a2, part_uuid);
-+			if (ret)
-+				ffa_err("Failed to read partition(s) data , error (%d)", ret);
-+		}
-+
-+		/*
-+		 * return the SP count
-+		 */
-+		if (part_uuid) {
-+			if (!ret)
-+				*pcount = res.a2;
-+			else
-+				*pcount = 0;
-+		}
-+		/*
-+		 * After calling FFA_PARTITION_INFO_GET the buffer ownership
-+		 * is assigned to the consumer (u-boot). So, we need to give
-+		 * the ownership back to the secure world
-+		 */
-+		ret = ffa_release_rx_buffer();
-+
-+		if (!part_uuid && !res.a2) {
-+			ffa_err("[FFA] no partition installed in the system");
-+			return -ENODEV;
-+		}
-+
-+		return ret;
-+	}
-+	default:
-+		ffa_err("Undefined response function (0x%lx)", res.a0);
-+		return  -EINVAL;
-+	}
-+}
-+
-+/**
-+ * ffa_get_partitions_info - FFA_PARTITION_INFO_GET handler function
-+ * @func_data: Pointer to the FF-A function arguments container structure.
-+ * The passed arguments:
-+ * Mode 1: When getting from the driver the number of
-+ *	secure partitions:
-+ *	@data0_size: UUID size
-+ *	@data0: pointer to the UUID (little endian)
-+ *	@data1_size: size of the number of partitions
-+ *				variable
-+ *	@data1: pointer to the number of partitions
-+ *			 variable. The variable will be set
-+ *			 by the driver
-+ * Mode 2: When requesting the driver to return the
-+ *	partitions information:
-+ *	@data0_size: UUID size
-+ *	@data0: pointer to the UUID (little endian)
-+ *	@data1_size: size of the SPs information buffer
-+ *	@data1: pointer to SPs information buffer
-+ *		(allocated by the client).
-+ *		The buffer will be filled by the driver
-+ *
-+ * This is the boot time function that queries the secure partition data from
-+ * the private data structure. If not found, it invokes FFA_PARTITION_INFO_GET
-+ * FF-A function to query the partition information from secure world.
-+ *
-+ * A client of the FF-A driver should know the UUID of the service it wants to
-+ * access. It should use the UUID to request the FF-A driver to provide the
-+ * partition(s) information of the service. The FF-A driver uses
-+ * PARTITION_INFO_GET to obtain this information. This is implemented through
-+ * ffa_get_partitions_info function.
-+ * A new FFA_PARTITION_INFO_GET call is issued (first one performed through
-+ * ffa_cache_partitions_info) allowing to retrieve the partition(s) information.
-+ * They are not saved (already done). We only update the UUID in the cached area.
-+ * This assumes that partitions data does not change in the secure world.
-+ * Otherwise u-boot will have an outdated partition data. The benefit of caching
-+ * the information in the FF-A driver is to accommodate discovery after
-+ * ExitBootServices().
-+ *
-+ * When invoked through a client request, ffa_get_partitions_info should be
-+ * called twice. First call is to get from the driver the number of secure
-+ * partitions (SPs) associated to a particular UUID.
-+ * Then, the caller (client) allocates the buffer to host the SPs data and
-+ * issues a 2nd call. Then, the driver fills the SPs data in the pre-allocated
-+ * buffer.
-+ *
-+ * To achieve the mechanism described above, ffa_get_partitions_info uses the
-+ * following functions:
-+ *		ffa_read_partitions_info
-+ *		ffa_query_partitions_info
-+ *
-+ * Return:
-+ *
-+ * @data1: When pointing to the number of partitions variable, the number is
-+ * set by the driver.
-+ * When pointing to the partitions information buffer, the buffer will be
-+ * filled by the driver.
-+ *
-+ * On success FFA_ERR_STAT_SUCCESS is returned. Otherwise, failure
-+ */
-+static int ffa_get_partitions_info(struct ffa_interface_data *func_data)
-+{
-+	/*
-+	 * fill_data:
-+	 * 0: return the SP count
-+	 * 1: fill SP data and return it to the caller
-+	 * -1: undefined mode
-+	 */
-+	int fill_data = -1;
-+	u32 desc_idx, client_desc_idx;
-+	union ffa_partition_uuid *part_uuid;
-+	u32 client_desc_max_cnt;
-+	u32 parts_found = 0;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!func_data) {
-+		ffa_err("No function data provided");
-+		return -EINVAL;
-+	}
-+
-+	if (!ffa_priv_data.partitions.count || !ffa_priv_data.partitions.descs)
-+		panic("[FFA] No partition installed\n");
-+
-+	if (func_data->data0_size == sizeof(union ffa_partition_uuid) &&
-+	    func_data->data0 &&
-+	    func_data->data1_size == sizeof(u32) &&
-+	    func_data->data1) {
-+		/*
-+		 * data0 (in): pointer to UUID
-+		 * data1 (in): pointer to SP count
-+		 * Out: SP count returned in the count variable pointed by data1
-+		 */
-+
-+		fill_data = 0;
-+
-+		ffa_info("Preparing for checking partitions count");
-+
-+	} else if ((func_data->data0_size == sizeof(union ffa_partition_uuid)) &&
-+		   func_data->data0 &&
-+		   (func_data->data1_size >= sizeof(struct ffa_partition_info)) &&
-+		   !(func_data->data1_size % sizeof(struct ffa_partition_info)) &&
-+		   func_data->data1) {
-+		/*
-+		 * data0 (in): pointer to UUID
-+		 * data1 (in): pointer to SPs descriptors buffer
-+		 *             (created by the client)
-+		 * Out: SPs descriptors returned in the buffer
-+		 *      pointed by data1
-+		 */
-+
-+		fill_data = 1;
-+
-+		client_desc_idx = 0;
-+
-+		/*
-+		 * number of empty descriptors preallocated by the caller
-+		 */
-+		client_desc_max_cnt =
-+			func_data->data1_size / sizeof(struct ffa_partition_info);
-+
-+		ffa_info("Preparing for filling partitions info");
-+
-+	} else {
-+		ffa_err("Invalid function arguments provided");
-+		return -EINVAL;
-+	}
-+
-+	part_uuid = (union ffa_partition_uuid *)func_data->data0;
-+
-+	ffa_info("Searching partitions using the provided UUID");
-+
-+#ifdef DEBUG
-+	{
-+		u32 dbg_uuid_cnt;
-+
-+		ffa_dbg("UUID: [LSB]");
-+
-+		for (dbg_uuid_cnt = 0 ; dbg_uuid_cnt < UUID_SIZE ; dbg_uuid_cnt++)
-+			ffa_dbg(" %02x", part_uuid->bytes[dbg_uuid_cnt]);
-+	}
-+#endif
-+
-+	/*
-+	 * search in the cached partitions
-+	 */
-+	for (desc_idx = 0;
-+	     desc_idx < ffa_priv_data.partitions.count;
-+	     desc_idx++) {
-+		if (ffa_uuid_are_identical(&ffa_priv_data.partitions.descs[desc_idx].UUID,
-+					   part_uuid)) {
-+			ffa_info("Partition ID %x matches the provided UUID",
-+				 ffa_priv_data.partitions.descs[desc_idx].info.id);
-+
-+			parts_found++;
-+
-+			if (fill_data) {
-+				/*
-+				 * trying to fill the partition info in data1
-+				 */
-+
-+				if (client_desc_idx < client_desc_max_cnt) {
-+					((struct ffa_partition_info *)
-+					 func_data->data1)[client_desc_idx++] =
-+						ffa_priv_data.partitions.descs[desc_idx].info;
-+					continue;
-+				}
-+
-+				ffa_err("Failed to fill the current descriptor client buffer full");
-+				return -ENOBUFS;
-+			}
-+		}
-+	}
-+
-+	if (!parts_found) {
-+		int ret;
-+
-+		ffa_info("No partition found. Querying framework ...");
-+
-+		ret = ffa_query_partitions_info(part_uuid, &parts_found);
-+
-+		if (ret == FFA_ERR_STAT_SUCCESS) {
-+			if (!fill_data) {
-+				*((u32 *)func_data->data1) = parts_found;
-+
-+				ffa_info("Number of partition(s) found matching the UUID: %d",
-+					 parts_found);
-+			} else {
-+				/*
-+				 * we want to read SPs info
-+				 */
-+
-+				/*
-+				 * If SPs data filled, retry searching SP info again
-+				 */
-+				if (parts_found)
-+					ret = ffa_get_partitions_info(func_data);
-+				else
-+					ret = -ENODATA;
-+			}
-+		}
-+
-+		return ret;
-+	}
-+
-+	/* partition(s) found */
-+	if (!fill_data)
-+		*((u32 *)func_data->data1) = parts_found;
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_cache_partitions_info - Queries and saves all secure partitions data
-+ *
-+ * This is a boot time function that invokes FFA_PARTITION_INFO_GET FF-A
-+ * function to query from secure world all partitions information.
-+ *
-+ * The FFA_PARTITION_INFO_GET call is issued with nil UUID as an argument.
-+ * All installed partitions information are returned. We cache them in the
-+ * resident private data structure and we keep the UUID field empty
-+ * (in FF-A 1.0 UUID is not provided by the partition descriptor)
-+ *
-+ * This function is called at the device probing level.
-+ * ffa_cache_partitions_info uses ffa_query_partitions_info to get the data
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_cache_partitions_info(void)
-+{
-+	ffa_dbg("[%s]", __func__);
-+	return ffa_query_partitions_info(NULL, NULL);
-+}
-+
-+/**
-+ * ffa_msg_send_direct_req - FFA_MSG_SEND_DIRECT_{REQ,RESP} handler function
-+ * @func_data: Pointer to the FF-A function arguments container structure.
-+ *					The passed arguments:
-+ *						@data0_size: partition ID size
-+ *						@data0: pointer to the partition ID
-+ *						@data1_size: exchanged data size
-+ *						@data1: pointer to the data buffer preallocated by
-+ *								the client (in/out)
-+ *
-+ * This is the runtime function that implements FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ * FF-A functions.
-+ *
-+ * FFA_MSG_SEND_DIRECT_REQ is used to send the data to the secure partition.
-+ * The response from the secure partition is handled by reading the
-+ * FFA_MSG_SEND_DIRECT_RESP arguments.
-+ *
-+ * The maximum size of the data that can be exchanged is 20 bytes which is
-+ * sizeof(struct ffa_send_direct_data) as defined by the FF-A specification 1.0
-+ * in the section relevant to FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int __ffa_runtime ffa_msg_send_direct_req(struct ffa_interface_data
-+						 *func_data)
-+{
-+	u16 dst_part_id;
-+	unsigned long a0 = 0;
-+	unsigned long a1 = 0;
-+	unsigned long a2 = 0;
-+	struct ffa_send_direct_data *msg;
-+	struct arm_smccc_res res = {0};
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	if (!ffa_priv_data.invoke_ffa_fn)
-+		panic("[FFA] no private data found\n");
-+
-+	if (!func_data)
-+		return -EINVAL;
-+
-+	if (!ffa_priv_data.partitions.count || !ffa_priv_data.partitions.descs)
-+		panic("[FFA] no partition installed\n");
-+
-+	if (func_data->data0_size != sizeof(u16) ||
-+	    !func_data->data0 ||
-+	    func_data->data1_size != FFA_MSG_SEND_DIRECT_MAX_SIZE ||
-+	    !func_data->data1) {
-+		ffa_err("Undefined interface parameters");
-+		return -EINVAL;
-+	}
-+
-+	dst_part_id = *((u16 *)func_data->data0);
-+	msg = func_data->data1;
-+
-+	ffa_dbg("Sending data to partition ID 0x%x", dst_part_id);
-+
-+	a0 = FFA_MSG_SEND_DIRECT_REQ;
-+
-+	a1 = PREP_SELF_ENDPOINT_ID(ffa_priv_data.id) |
-+		PREP_PART_ENDPOINT_ID(dst_part_id);
-+
-+	ffa_priv_data.invoke_ffa_fn(a0, a1, a2,
-+				    msg->a3,
-+				    msg->a4,
-+				    msg->a5,
-+				    msg->a6,
-+				    msg->a7,
-+				    &res);
-+
-+	while (res.a0 == FFA_INTERRUPT)
-+		ffa_priv_data.invoke_ffa_fn(FFA_RUN, res.a1,
-+					    0, 0, 0, 0, 0, 0,
-+					    &res);
-+
-+	switch (res.a0) {
-+	case FFA_ERROR:
-+	{
-+		switch (((int)res.a2)) {
-+		case FFA_ERR_STAT_INVALID_PARAMETERS:
-+			ffa_err("Invalid endpoint ID or non-zero reserved register");
-+			return -EPERM;
-+		case FFA_ERR_STAT_ABORTED:
-+			panic("[FFA] Message target ran into unexpected error and has aborted\n");
-+		case FFA_ERR_STAT_DENIED:
-+			panic("[FFA] Callee is not in a state to handle this request\n");
-+		case FFA_ERR_STAT_NOT_SUPPORTED:
-+			panic("[FFA] This function is not implemented at this FF-A instance\n");
-+		case FFA_ERR_STAT_BUSY:
-+			panic("[FFA] Message target is busy\n");
-+		default:
-+			panic("[FFA] Undefined error (%d)\n", ((int)res.a2));
-+		}
-+	}
-+	case FFA_SUCCESS:
-+
-+		ffa_dbg("Message sent with no response");
-+		return FFA_ERR_STAT_SUCCESS;
-+
-+	case FFA_MSG_SEND_DIRECT_RESP:
-+
-+		ffa_dbg("Message sent with response");
-+
-+		/*
-+		 * extract the 32-bit wide return data
-+		 */
-+		msg->a3 = (u32)res.a3;
-+		msg->a4 = (u32)res.a4;
-+		msg->a5 = (u32)res.a5;
-+		msg->a6 = (u32)res.a6;
-+		msg->a7 = (u32)res.a7;
-+
-+		return FFA_ERR_STAT_SUCCESS;
-+
-+	default:
-+		panic("[FFA] Undefined response function (0x%lx)\n", res.a0);
-+	}
-+}
-+
-+/**
-+ * invoke_ffa_drv_api - The driver dispatcher function
-+ * @func_id:	The FF-A function to be used
-+ * @func_data:  Pointer to the FF-A function arguments container
-+ *					structure. This also includes pointers to the
-+ *					returned data needed by clients.
-+ * The dispatcher is a runtime function that selects the FF-A function handler
-+ * based on the input FF-A function ID.
-+ * The input arguments are passed to the handler function.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int __ffa_runtime invoke_ffa_drv_api(u32 func_id,
-+				     struct ffa_interface_data *func_data)
-+{
-+	if (!ffa_priv_data.dev)
-+		panic("[FFA] no device found\n");
-+
-+	switch (func_id) {
-+	case FFA_PARTITION_INFO_GET:
-+		return ffa_get_partitions_info(func_data);
-+	case FFA_RXTX_UNMAP:
-+		return ffa_unmap_rxtx_buffers();
-+	case FFA_MSG_SEND_DIRECT_REQ:
-+		return ffa_msg_send_direct_req(func_data);
-+	default:
-+
-+		ffa_err("Undefined FF-A interface (%d)", func_id);
-+
-+		return -EINVAL;
-+	}
-+}
-+
-+/**
-+ * ffa_init_private_data - Initialization of the private data
-+ * @dev:	the arm_ffa device
-+ *
-+ * This boot time function reads data from the platform data structure
-+ * and populates the private data structure
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_init_private_data(struct udevice *dev)
-+{
-+	struct ffa_pdata *pdata = dev_get_plat(dev);
-+
-+	ffa_priv_data.conduit = pdata->conduit;
-+
-+	if (ffa_priv_data.conduit == FFA_CONDUIT_SMC) {
-+		ffa_priv_data.invoke_ffa_fn = arm_ffa_smccc_smc;
-+	} else {
-+		ffa_err("Undefined FF-A conduit (%d)", ffa_priv_data.conduit);
-+		return -EINVAL;
-+	}
-+
-+	ffa_info("Conduit is %s",
-+		 ((ffa_priv_data.conduit == FFA_CONDUIT_SMC) ?
-+		   "SMC" : "NOT SUPPORTED"));
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_probe - The driver probe function
-+ * @dev:	the arm_ffa device
-+ *
-+ * Probing is done at boot time and triggered by the uclass device discovery.
-+ * At probe level the following actions are done:
-+ *	- initialization of the driver private data structure
-+ *	- querying from secure world the FF-A framework version
-+ *	- querying from secure world the u-boot endpoint ID
-+ *	- querying from secure world the supported features of the specified FF-A calls
-+ *	- mapping the RX/TX buffers
-+ *	- querying from secure world all the partitions information
-+ *
-+ * All data queried from secure world is saved in the resident private data structure.
-+ *
-+ * The probe will fail if either FF-A framework is not detected or the
-+ * FF-A requests are not behaving correctly. This ensures that the
-+ * driver is not installed and its operations are not exported to the clients.
-+ * However, once the driver is successfully probed and an FF-A anomaly is
-+ * detected when clients invoke the driver operations, the driver cause
-+ * u-boot to panic because the client would not know what to do in such conditions.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_probe(struct udevice *dev)
-+{
-+	int ret;
-+	size_t buf_4k_pages = 0;
-+
-+	ffa_dbg("[%s]: initializing the FF-A driver", __func__);
-+
-+	ret = ffa_init_private_data(dev);
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_get_version();
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_get_endpoint_id();
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_get_rxtx_map_features();
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_get_rxtx_buffers_pages_cnt(&buf_4k_pages);
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_map_rxtx_buffers(buf_4k_pages);
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS)
-+		return ret;
-+
-+	ret = ffa_cache_partitions_info();
-+
-+	if (ret != FFA_ERR_STAT_SUCCESS) {
-+		ffa_free_rxtx_buffers(buf_4k_pages);
-+		return ret;
-+	}
-+
-+	ffa_dbg("[%s]: initialization done", __func__);
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_of_to_plat - Reads the device tree node
-+ * @dev:	the arm_ffa device
-+ *
-+ * This boot time function reads data from the device tree node and populates
-+ * the platform data structure
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+static int ffa_of_to_plat(struct udevice *dev)
-+{
-+	struct ffa_pdata *pdata = dev_get_plat(dev);
-+	const char *conduit;
-+
-+	ffa_dbg("[%s]", __func__);
-+
-+	conduit = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "method", NULL);
-+
-+	if (strcmp("smc", conduit)) {
-+		ffa_err("Unsupported conduit");
-+		return -EINVAL;
-+	}
-+
-+	pdata->conduit = FFA_CONDUIT_SMC;
-+
-+	return FFA_ERR_STAT_SUCCESS;
-+}
-+
-+/**
-+ * ffa_drv_ops - The driver operations runtime structure
-+ * @invoke_func:	The driver dispatcher
-+ */
-+struct ffa_ops __ffa_runtime_data ffa_drv_ops = {
-+	.invoke_func = invoke_ffa_drv_api
-+};
-+
-+/**
-+ * ffa_device_get_ops - driver operations getter
-+ *
-+ * Return:
-+ * This runtime function returns a pointer to the driver operations structure
-+ */
-+const struct ffa_ops * __ffa_runtime ffa_device_get_ops(void)
-+{
-+	return &ffa_drv_ops;
-+}
-+
-+/**
-+ * Defining the device tree compatible string
-+ */
-+
-+static const struct udevice_id ffa_match_id[] = {
-+	{"arm,ffa", 0},
-+	{},
-+};
-+
-+/**
-+ * Declaring the arm_ffa driver under UCLASS_FFA
-+ */
-+
-+U_BOOT_DRIVER(arm_ffa) = {
-+	.name		= "arm_ffa",
-+	.of_match	= ffa_match_id,
-+	.id		= UCLASS_FFA,
-+	.of_to_plat	= ffa_of_to_plat,
-+	.probe		= ffa_probe,
-+	.plat_auto	= sizeof(struct ffa_pdata),
-+};
-diff --git a/include/arm_ffa.h b/include/arm_ffa.h
-new file mode 100644
-index 0000000000..313f46f747
---- /dev/null
-+++ b/include/arm_ffa.h
-@@ -0,0 +1,191 @@
-+/* SPDX-License-Identifier: GPL-2.0+ */
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#ifndef __ARM_FFA_H
-+#define __ARM_FFA_H
-+
-+#include <linux/arm-smccc.h>
-+#include <linux/printk.h>
-+
-+/*
-+ * This header is public. It can be used by clients to access
-+ * data structures and definitions they need
-+ */
-+
-+/*
-+ * Macros for displaying logs
-+ */
-+
-+#define ffa_dbg(fmt, ...)  pr_debug("[FFA] " fmt "\n", ##__VA_ARGS__)
-+#define ffa_info(fmt, ...)  pr_info("[FFA] " fmt "\n", ##__VA_ARGS__)
-+#define ffa_err(fmt, ...)  pr_err("[FFA] " fmt "\n", ##__VA_ARGS__)
-+
-+/*
-+ * The driver operations success error code
-+ */
-+#define FFA_ERR_STAT_SUCCESS				(0)
-+
-+#if CONFIG_IS_ENABLED(EFI_LOADER)
-+
-+#include <efi_loader.h>
-+
-+/*
-+ * __ffa_runtime_data and __ffa_runtime - controls whether data/code are
-+ * available after calling the EFI ExitBootServices service.
-+ * Data/code tagged with these keywords are resident (available at boot time and
-+ * at runtime)
-+ */
-+
-+#define __ffa_runtime_data __efi_runtime_data
-+#define __ffa_runtime __efi_runtime
-+
-+#else
-+
-+#define __ffa_runtime_data
-+#define __ffa_runtime
-+
-+#endif
-+
-+/*
-+ * Definitions of the Arm FF-A interfaces supported by the Arm FF-A driver
-+ */
-+
-+#define FFA_SMC(calling_convention, func_num)				\
-+	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, (calling_convention),	\
-+			   ARM_SMCCC_OWNER_STANDARD, (func_num))
-+
-+#define FFA_SMC_32(func_num)	FFA_SMC(ARM_SMCCC_SMC_32, (func_num))
-+
-+#define FFA_VERSION				FFA_SMC_32(0x63)
-+#define FFA_ID_GET				FFA_SMC_32(0x69)
-+#define FFA_FEATURES				FFA_SMC_32(0x64)
-+#define FFA_PARTITION_INFO_GET				FFA_SMC_32(0x68)
-+#define FFA_RXTX_MAP				FFA_SMC_32(0x66)
-+#define FFA_RXTX_UNMAP				FFA_SMC_32(0x67)
-+#define FFA_RX_RELEASE				FFA_SMC_32(0x65)
-+#define FFA_MSG_SEND_DIRECT_REQ				FFA_SMC_32(0x6F)
-+#define FFA_MSG_SEND_DIRECT_RESP				FFA_SMC_32(0x70)
-+#define FFA_RUN				FFA_SMC_32(0x6D)
-+#define FFA_ERROR				FFA_SMC_32(0x60)
-+#define FFA_SUCCESS				FFA_SMC_32(0x61)
-+#define FFA_INTERRUPT				FFA_SMC_32(0x62)
-+
-+/*
-+ * struct ffa_partition_info - Partition information descriptor
-+ * @id:	Partition ID
-+ * @exec_ctxt:	Execution context count
-+ * @properties:	Partition properties
-+ *
-+ * Data structure containing information about partitions instantiated in the system
-+ * This structure is filled with the data queried by FFA_PARTITION_INFO_GET
-+ */
-+struct  __packed ffa_partition_info {
-+	u16 id;
-+	u16 exec_ctxt;
-+/* partition supports receipt of direct requests */
-+#define FFA_PARTITION_DIRECT_RECV	BIT(0)
-+/* partition can send direct requests. */
-+#define FFA_PARTITION_DIRECT_SEND	BIT(1)
-+/* partition can send and receive indirect messages. */
-+#define FFA_PARTITION_INDIRECT_MSG	BIT(2)
-+	u32 properties;
-+};
-+
-+/*
-+ * struct ffa_send_direct_data - Data structure hosting the data
-+ *                                       used by FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ * @a3-a7:	Data read/written from/to w3-w7 registers
-+ *
-+ * Data structure containing the data to be sent by FFA_MSG_SEND_DIRECT_REQ
-+ * or read from FFA_MSG_SEND_DIRECT_RESP
-+ */
-+struct __packed ffa_send_direct_data {
-+	u32 a3; /* w3 */
-+	u32 a4; /* w4 */
-+	u32 a5; /* w5 */
-+	u32 a6; /* w6 */
-+	u32 a7; /* w7 */
-+};
-+
-+#define FFA_MSG_SEND_DIRECT_MAX_SIZE (sizeof(struct ffa_send_direct_data))
-+
-+/* UUID data size */
-+#define UUID_SIZE (16)
-+
-+/*
-+ * union ffa_partition_uuid - Data union hosting the UUID
-+ *							transmitted by FFA_PARTITION_INFO_GET
-+ * @words:	data structure giving 32-bit words access to the UUID data
-+ * @bytes:	data structure giving byte access to the UUID data
-+ *
-+ * The structure holds little-endian UUID data.
-+ */
-+union ffa_partition_uuid {
-+	struct __packed words {
-+	u32 a1; /* w1 */
-+	u32 a2; /* w2 */
-+	u32 a3; /* w3 */
-+	u32 a4; /* w4 */
-+	} words;
-+	u8 bytes[UUID_SIZE];
-+};
-+
-+/**
-+ * struct ffa_interface_data - generic FF-A interface data structure used to exchange
-+ *							data between user layers and the driver
-+ * @data0_size:	size of the first argument
-+ * @data0:	pointer to the first argument
-+ * @data1_size>:	size of the second argument
-+ * @data1:	pointer to the second argument
-+ *
-+ * Using this structure user layers can pass various types of data with different sizes.
-+ * The driver internal functions can detect the nature of this data, verfy compliance
-+ * then execute the request when appropriate.
-+ */
-+struct ffa_interface_data {
-+	u32 data0_size; /* size of the first argument */
-+	void *data0; /* pointer to the first argument */
-+	u32 data1_size; /* size of the second argument */
-+	void *data1; /* pointer to the second argument */
-+};
-+
-+/**
-+ * struct ffa_ops - The driver operations structure
-+ * @invoke_func:	function pointer to the invoke function
-+ *
-+ * The data structure providing all the operations supported by the driver.
-+ * This structure is resident.
-+ */
-+struct ffa_ops {
-+	/* the driver dispatcher */
-+	int (*invoke_func)(u32 func_id, struct ffa_interface_data *func_data);
-+};
-+
-+/**
-+ * The device driver and the Uclass driver public functions
-+ */
-+
-+/**
-+ * ffa_get_invoke_func - performs a call to the FF-A driver dispatcher
-+ */
-+int __ffa_runtime ffa_get_invoke_func(u32 func_id,
-+				      struct ffa_interface_data *func_data);
-+
-+/**
-+ * ffa_device_get_ops - driver operations getter
-+ */
-+const struct ffa_ops * __ffa_runtime ffa_device_get_ops(void);
-+
-+/**
-+ * ffa_get_device - probes the arm_ffa device
-+ */
-+int ffa_get_device(void);
-+
-+/**
-+ * ffa_init_device - probes the arm_ffa device
-+ */
-+int ffa_init_device(void);
-+#endif
-diff --git a/include/arm_ffa_helper.h b/include/arm_ffa_helper.h
-new file mode 100644
-index 0000000000..0e143e5451
---- /dev/null
-+++ b/include/arm_ffa_helper.h
-@@ -0,0 +1,45 @@
-+/* SPDX-License-Identifier: GPL-2.0+ */
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#ifndef __ARM_FFA_HELPER_H
-+#define __ARM_FFA_HELPER_H
-+
-+#include <arm_ffa.h>
-+
-+/*
-+ * This header is public. Including this header provides all data structures
-+ * and definitions needed by clients to use the FF-A transport driver
-+ *
-+ * It also provides helper functions allowing to pass data and invoke  FF-A functions
-+ */
-+
-+/**
-+ * ffa_helper_get_partitions_info - Wrapper function for FFA_PARTITION_INFO_GET
-+ */
-+int ffa_helper_get_partitions_info(struct ffa_interface_data *func_data);
-+
-+/**
-+ * ffa_helper_unmap_rxtx_buffers - Wrapper function for FFA_RXTX_UNMAP
-+ */
-+int ffa_helper_unmap_rxtx_buffers(void);
-+
-+/**
-+ * ffa_helper_msg_send_direct_req - Wrapper function for
-+ *								FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ */
-+int __ffa_runtime ffa_helper_msg_send_direct_req(struct ffa_interface_data
-+						 *func_data);
-+
-+/**
-+ * ffa_helper_init_device - Wrapper function for probing the arm_ffa device
-+ */
-+int ffa_helper_init_device(void);
-+
-+/**
-+ * ffa_uuid_str_to_bin - Converts a big endian UUID string to a little endian buffer
-+ */
-+int ffa_uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin);
-+#endif
-diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
-index 0e26e1d138..a1181b8f48 100644
---- a/include/dm/uclass-id.h
-+++ b/include/dm/uclass-id.h
-@@ -52,6 +52,7 @@ enum uclass_id {
- 	UCLASS_EFI_MEDIA,	/* Devices provided by UEFI firmware */
- 	UCLASS_ETH,		/* Ethernet device */
- 	UCLASS_ETH_PHY,		/* Ethernet PHY device */
-+	UCLASS_FFA,		/* Arm Firmware Framework for Armv8-A */
- 	UCLASS_FIRMWARE,	/* Firmware */
- 	UCLASS_FS_FIRMWARE_LOADER,		/* Generic loader */
- 	UCLASS_GPIO,		/* Bank of general-purpose I/O pins */
-diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
-index 7f2be23394..54980a130f 100644
---- a/include/linux/arm-smccc.h
-+++ b/include/linux/arm-smccc.h
-@@ -1,6 +1,8 @@
- /* SPDX-License-Identifier: GPL-2.0 */
- /*
-  * Copyright (c) 2015, Linaro Limited
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-  */
- #ifndef __LINUX_ARM_SMCCC_H
- #define __LINUX_ARM_SMCCC_H
-@@ -57,13 +59,17 @@
- #include <linux/types.h>
- /**
-  * struct arm_smccc_res - Result from SMC/HVC call
-- * @a0-a3 result values from registers 0 to 3
-+ * @a0-a7 result values from registers 0 to 7
-  */
- struct arm_smccc_res {
- 	unsigned long a0;
- 	unsigned long a1;
- 	unsigned long a2;
- 	unsigned long a3;
-+	unsigned long a4;
-+	unsigned long a5;
-+	unsigned long a6;
-+	unsigned long a7;
- };
- 
- /**
-@@ -113,6 +119,26 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
- 			unsigned long a5, unsigned long a6, unsigned long a7,
- 			struct arm_smccc_res *res, struct arm_smccc_quirk *quirk);
- 
-+#if (IS_ENABLED(CONFIG_ARM_FFA_TRANSPORT))
-+/**
-+ * __arm_ffa_smccc_smc() - make SMC calls used for FF-A transport
-+ * @a0-a7: arguments passed in 64-bit registers x0 to x7
-+ * @res: result values from 64-bit registers x0 to x7
-+ *
-+ * This function is used to make SMC calls following SMC32 Calling Convention.
-+ * The content of the supplied parameters is copied to registers x0 to x7 prior
-+ * to the SMC instruction. The SMC call return data is 32-bit data read from
-+ * registers x0 tp x7.
-+ */
-+asmlinkage void __arm_ffa_smccc_smc(unsigned long a0, unsigned long a1,
-+				    unsigned long a2, unsigned long a3, unsigned long a4,
-+				    unsigned long a5, unsigned long a6, unsigned long a7,
-+				    struct arm_smccc_res *res);
-+
-+#define arm_ffa_smccc_smc __arm_ffa_smccc_smc
-+
-+#endif
-+
- #define arm_smccc_smc(...) __arm_smccc_smc(__VA_ARGS__, NULL)
- 
- #define arm_smccc_smc_quirk(...) __arm_smccc_smc(__VA_ARGS__)
-diff --git a/lib/Kconfig b/lib/Kconfig
-index 3c6fa99b1a..473821b882 100644
---- a/lib/Kconfig
-+++ b/lib/Kconfig
-@@ -810,6 +810,7 @@ config SMBIOS_PARSER
- source lib/efi/Kconfig
- source lib/efi_loader/Kconfig
- source lib/optee/Kconfig
-+source lib/arm-ffa/Kconfig
- 
- config TEST_FDTDEC
- 	bool "enable fdtdec test"
-diff --git a/lib/Makefile b/lib/Makefile
-index 11b03d1cbe..8e6fad6130 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -9,6 +9,7 @@ obj-$(CONFIG_EFI) += efi/
- obj-$(CONFIG_EFI_LOADER) += efi_driver/
- obj-$(CONFIG_EFI_LOADER) += efi_loader/
- obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest/
-+obj-$(CONFIG_ARM_FFA_TRANSPORT_HELPERS) += arm-ffa/
- obj-$(CONFIG_LZMA) += lzma/
- obj-$(CONFIG_BZIP2) += bzip2/
- obj-$(CONFIG_TIZEN) += tizen/
-diff --git a/lib/arm-ffa/Kconfig b/lib/arm-ffa/Kconfig
-new file mode 100644
-index 0000000000..79acbc5a8f
---- /dev/null
-+++ b/lib/arm-ffa/Kconfig
-@@ -0,0 +1,6 @@
-+config ARM_FFA_TRANSPORT_HELPERS
-+	bool "Enable interface helpers for Arm Firmware Framework for Armv8-A"
-+	depends on ARM_FFA_TRANSPORT
-+	help
-+	  User layers call FF-A interfaces using helper functions which
-+	  pass the data and the FF-A function ID to the low level driver
-diff --git a/lib/arm-ffa/Makefile b/lib/arm-ffa/Makefile
-new file mode 100644
-index 0000000000..c30c0f3981
---- /dev/null
-+++ b/lib/arm-ffa/Makefile
-@@ -0,0 +1,8 @@
-+# SPDX-License-Identifier: GPL-2.0+
-+#
-+# (C) Copyright 2021 Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+#
-+
-+# This file only gets included when CONFIG_ARM_FFA_TRANSPORT_HELPERS is set
-+
-+obj-y += arm_ffa_helper.o
-diff --git a/lib/arm-ffa/arm_ffa_helper.c b/lib/arm-ffa/arm_ffa_helper.c
-new file mode 100644
-index 0000000000..623899d380
---- /dev/null
-+++ b/lib/arm-ffa/arm_ffa_helper.c
-@@ -0,0 +1,188 @@
-+// SPDX-License-Identifier: GPL-2.0+
-+/*
-+ * (C) Copyright 2021 ARM Limited
-+ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-+ */
-+
-+#include <common.h>
-+#include <arm_ffa_helper.h>
-+#include <uuid.h>
-+
-+/**
-+ * ffa_helper_get_partitions_info - Wrapper function for FFA_PARTITION_INFO_GET
-+ *
-+ * @func_data: Pointer to the FF-A function arguments container
-+ *				structure.
-+ *				The passed arguments:
-+ *					Mode 1: When getting from the driver the number of
-+ *						secure partitions:
-+ *						@data0_size: UUID size
-+ *						@data0: pointer to the UUID (little endian)
-+ *						@data1_size: size of the number of partitions
-+ *									variable
-+ *						@data1: pointer to the number of partitions
-+ *								 variable. The variable will be set
-+ *								 by the driver
-+ *					Mode 2: When requesting the driver to return the
-+ *						partitions information:
-+ *						@data0_size: UUID size
-+ *						@data0: pointer to the UUID (little endian)
-+ *						@data1_size: size of the SPs information buffer
-+ *						@data1: pointer to SPs information buffer
-+ *								(allocated by the client).
-+ *							The buffer will be filled by the driver
-+ *
-+ * This is the boot time function used by clients who wants to get from secure
-+ * world the partition(s) information.
-+ *
-+ * A client of the FF-A driver should know the UUID of the service it wants to
-+ * access. It should use the UUID to request the FF-A driver to provide the
-+ * partition(s) information of the service. The client should use
-+ * ffa_helper_get_partitions_info to pass the UUID information to the driver
-+ * which uses PARTITION_INFO_GET to obtain the partition(s) information.
-+ *
-+ * ffa_helper_get_partitions_info should be called twice. First call is to get
-+ * from the driver the number of secure partitions (SPs) associated to a
-+ * particular UUID. Then, the caller (client) allocates the buffer to host the
-+ * SPs data and issues a 2nd call. Then, the driver fills the SPs data in the
-+ * pre-allocated buffer.
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int ffa_helper_get_partitions_info(struct ffa_interface_data *func_data)
-+{
-+	return ffa_get_invoke_func(FFA_PARTITION_INFO_GET, func_data);
-+}
-+
-+/**
-+ * ffa_helper_unmap_rxtx_buffers - Wrapper function for FFA_RXTX_UNMAP
-+ *
-+ * This is the boot time function that allows clients to unmap the RX/TX
-+ * buffers
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int ffa_helper_unmap_rxtx_buffers(void)
-+{
-+	return ffa_get_invoke_func(FFA_RXTX_UNMAP, NULL);
-+}
-+
-+/**
-+ * ffa_helper_msg_send_direct_req - Wrapper function for
-+ *								FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ * @func_data: Pointer to the FF-A function arguments container structure.
-+ * The passed arguments:
-+ *	@data0_size: partition ID size
-+ *	@data0: pointer to the partition ID
-+ *	@data1_size: exchanged data size
-+ *	@data1: pointer to the data buffer preallocated by the client (in/out)
-+ *
-+ * This is the runtime function that allows clients to send data to the secure
-+ * world partitions. The arm_ffa driver uses FFA_MSG_SEND_DIRECT_REQ to send the
-+ * data to the secure partition. The response from the secure partition is
-+ * handled internally by the driver using FFA_MSG_SEND_DIRECT_RESP and returned
-+ * to ffa_helper_msg_send_direct_req through @func_data
-+ *
-+ * The maximum size of the data that can be exchanged is 20 bytes which is
-+ * sizeof(struct ffa_send_direct_data) as defined by the FF-A specification 1.0
-+ * in the section relevant to FFA_MSG_SEND_DIRECT_{REQ,RESP}
-+ *
-+ * The client should pre-allocate a buffer pointed by @data1 which the size
-+ * is sizeof(struct ffa_send_direct_data)
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int __ffa_runtime ffa_helper_msg_send_direct_req(struct ffa_interface_data
-+											 *func_data)
-+{
-+	return ffa_get_invoke_func(FFA_MSG_SEND_DIRECT_REQ, func_data);
-+}
-+
-+/**
-+ * ffa_helper_init_device - Wrapper function for probing the arm_ffa device
-+ *
-+ * This boot time function should be called to probe the arm_ffa device so
-+ * it becomes ready for use.
-+ * To achieve that, this function is called automatically at initcalls
-+ * level (after u-boot relocation).
-+ *
-+ * Return:
-+ *
-+ * FFA_ERR_STAT_SUCCESS on success. Otherwise, failure
-+ */
-+int ffa_helper_init_device(void)
-+{
-+	return ffa_init_device();
-+}
-+
-+/**
-+ * ffa_uuid_str_to_bin - Converts a big endian UUID string to a little endian buffer
-+ * @uuid_str:	UUID string in big endian format (36 bytes wide + '/0')
-+ * @uuid_bin:	preallocated 16 bytes UUID buffer in little endian format
-+ *
-+ * UUID binary format used by the FF-A framework (16 bytes):
-+ *
-+ * [LSB] 4B-2B-2B-2B-6B (little endian data fields)
-+ *
-+ * UUID string is 36 length of characters (36 bytes):
-+ *
-+ * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-+ * be                be      be       be      be
-+ *
-+ * where x is a hexadecimal character. Fields are separated by '-'s.
-+ * When converting to a binary UUID, these endianness rules apply:
-+ *     be: means the field in the string is considered a big endian hex number
-+ *         and should be converted to little endian binary format
-+ *
-+ * Return:
-+ *
-+ *    uuid_bin filled with little endian UUID data
-+ *    On success 0 is returned. Otherwise, failure code.
-+ */
-+int ffa_uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin)
-+{
-+	u16 tmp16 = 0;
-+	u32 tmp32 = 0;
-+	u64 tmp64 = 0;
-+
-+	if (!uuid_str_valid(uuid_str) || !uuid_bin)
-+		return -EINVAL;
-+
-+	/*
-+	 * reverse bytes from big to little endian
-+	 */
-+	tmp32 = simple_strtoul(uuid_str, NULL, 16);
-+	memcpy(uuid_bin, &tmp32, 4);
-+
-+	/*
-+	 * reverse bytes from big to little endian
-+	 */
-+	tmp16 = simple_strtoul(uuid_str + 9, NULL, 16);
-+	memcpy(uuid_bin + 4, &tmp16, 2);
-+
-+	/*
-+	 * reverse bytes from big to little endian
-+	 */
-+	tmp16 = simple_strtoul(uuid_str + 14, NULL, 16);
-+	memcpy(uuid_bin + 6, &tmp16, 2);
-+
-+	/*
-+	 * reverse bytes from big to little endian
-+	 */
-+	tmp16 = simple_strtoul(uuid_str + 19, NULL, 16);
-+	memcpy(uuid_bin + 8, &tmp16, 2);
-+
-+	/*
-+	 * reverse bytes from big to little endian
-+	 */
-+	tmp64 = simple_strtoull(uuid_str + 24, NULL, 16);
-+	memcpy(uuid_bin + 10, (char *)&tmp64, 6);
-+
-+	return 0;
-+}
-diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
-index 5bcb8253ed..cffa2c69d6 100644
---- a/lib/efi_loader/efi_boottime.c
-+++ b/lib/efi_loader/efi_boottime.c
-@@ -23,6 +23,10 @@
- #include <asm/setjmp.h>
- #include <linux/libfdt_env.h>
- 
-+#if defined(CONFIG_ARM_FFA_TRANSPORT)
-+#include <arm_ffa_helper.h>
-+#endif
-+
- DECLARE_GLOBAL_DATA_PTR;
- 
- /* Task priority level */
-@@ -2114,6 +2118,10 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
- 	struct efi_event *evt, *next_event;
- 	efi_status_t ret = EFI_SUCCESS;
- 
-+#if defined(CONFIG_ARM_FFA_TRANSPORT)
-+	int ffa_ret;
-+#endif
-+
- 	EFI_ENTRY("%p, %zx", image_handle, map_key);
- 
- 	/* Check that the caller has read the current memory map */
-@@ -2174,6 +2182,15 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
- 		dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
- 	}
- 
-+#if defined(CONFIG_ARM_FFA_TRANSPORT)
-+	/* unmap FF-A RX/TX buffers */
-+	ffa_ret = ffa_helper_unmap_rxtx_buffers();
-+	if (ffa_ret)
-+		debug("[efi_boottime][ERROR]: can not unmap FF-A RX/TX buffers\n");
-+	else
-+		debug("[efi_boottime][INFO]: FF-A RX/TX buffers unmapped\n");
-+#endif
-+
- 	/* Patch out unsupported runtime function */
- 	efi_runtime_detach();
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0003-arm-total_compute-enable-psci.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0003-arm-total_compute-enable-psci.patch
deleted file mode 100644
index da8d3f0..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0003-arm-total_compute-enable-psci.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8dd3e03bd83939746b6a849dce37435ea7581032 Mon Sep 17 00:00:00 2001
-From: Davidson K <davidson.kumaresan@arm.com>
-Date: Thu, 14 Jul 2022 19:35:41 +0530
-Subject: [PATCH 3/7] arm: total_compute: enable psci
-
-psci is used for system reset
-
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: Iff4f769dc5e64b6000e892d77a011102b090acfd
-Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/uboot/patch/20220809102652.23776-1-davidson.kumaresan@arm.com/]
----
- arch/arm/dts/total_compute.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/dts/total_compute.dts b/arch/arm/dts/total_compute.dts
-index 4399269a44..96edacda0b 100644
---- a/arch/arm/dts/total_compute.dts
-+++ b/arch/arm/dts/total_compute.dts
-@@ -45,4 +45,8 @@
- 		clock-frequency = <24000000>;
- 		clock-output-names = "bp:clock24mhz";
- 	};
-+	psci {
-+		compatible = "arm,psci-1.0", "arm,psci-0.2";
-+		method = "smc";
-+	};
- };
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0004-arm_ffa-rxtx_map-should-use-64-bit-calls.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0004-arm_ffa-rxtx_map-should-use-64-bit-calls.patch
deleted file mode 100644
index fb1e9ea..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0004-arm_ffa-rxtx_map-should-use-64-bit-calls.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 6eee50e5376356b1faeb30507b411120a8b5c7d1 Mon Sep 17 00:00:00 2001
-From: Davidson K <davidson.kumaresan@arm.com>
-Date: Mon, 6 Jun 2022 15:13:15 +0530
-Subject: [PATCH 4/7] arm_ffa: rxtx_map should use 64 bit calls
-
-rxtx_map deals with the 64 bit addresses and hence the 64 bit calls
-should be used
-
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: Iec1251266e61139767588d683d60bada1ed10abe
-Upstream-Status: Pending [Not submitted to upstream yet]
----
- include/arm_ffa.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/arm_ffa.h b/include/arm_ffa.h
-index 313f46f747..9627107079 100644
---- a/include/arm_ffa.h
-+++ b/include/arm_ffa.h
-@@ -58,12 +58,13 @@
- 			   ARM_SMCCC_OWNER_STANDARD, (func_num))
- 
- #define FFA_SMC_32(func_num)	FFA_SMC(ARM_SMCCC_SMC_32, (func_num))
-+#define FFA_SMC_64(func_num)	FFA_SMC(ARM_SMCCC_SMC_64, (func_num))
- 
- #define FFA_VERSION				FFA_SMC_32(0x63)
- #define FFA_ID_GET				FFA_SMC_32(0x69)
- #define FFA_FEATURES				FFA_SMC_32(0x64)
- #define FFA_PARTITION_INFO_GET				FFA_SMC_32(0x68)
--#define FFA_RXTX_MAP				FFA_SMC_32(0x66)
-+#define FFA_RXTX_MAP				FFA_SMC_64(0x66)
- #define FFA_RXTX_UNMAP				FFA_SMC_32(0x67)
- #define FFA_RX_RELEASE				FFA_SMC_32(0x65)
- #define FFA_MSG_SEND_DIRECT_REQ				FFA_SMC_32(0x6F)
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0005-efi_firmware-add-new-fmp-driver-that-supports-arm-fw.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0005-efi_firmware-add-new-fmp-driver-that-supports-arm-fw.patch
deleted file mode 100644
index 159b048..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0005-efi_firmware-add-new-fmp-driver-that-supports-arm-fw.patch
+++ /dev/null
@@ -1,993 +0,0 @@
-From 6d26058401bce6012173b5341cdf4de72772a1c2 Mon Sep 17 00:00:00 2001
-From: Davidson K <davidson.kumaresan@arm.com>
-Date: Mon, 6 Jun 2022 13:19:07 +0530
-Subject: [PATCH 5/7] efi_firmware: add new fmp driver that supports arm fwu
- specification
-
-This fmp driver communicates to the firmware update secure partition
-executing in the secure world which is an implementation of the arm
-psa specification for the firmware update. The communication to the
-firmware update secure partition is based on stmm and arm ff-a framework.
-
-It implements only the get_image_info and set_image api.
-
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: I94c2cad210c32a60a8a0594cacf530b68ab6a09d
-Upstream-Status: Pending [Not submitted to upstream yet]
----
- include/efi_firmware_arm_psa.h        | 218 +++++++++++
- include/efi_loader.h                  |   1 +
- lib/efi_loader/Kconfig                |   9 +
- lib/efi_loader/Makefile               |   1 +
- lib/efi_loader/efi_capsule.c          |   8 +
- lib/efi_loader/efi_firmware.c         | 134 +++++++
- lib/efi_loader/efi_firmware_arm_psa.c | 520 ++++++++++++++++++++++++++
- 7 files changed, 891 insertions(+)
- create mode 100644 include/efi_firmware_arm_psa.h
- create mode 100644 lib/efi_loader/efi_firmware_arm_psa.c
-
-diff --git a/include/efi_firmware_arm_psa.h b/include/efi_firmware_arm_psa.h
-new file mode 100644
-index 0000000000..82f932066c
---- /dev/null
-+++ b/include/efi_firmware_arm_psa.h
-@@ -0,0 +1,218 @@
-+/* SPDX-License-Identifier: GPL-2.0+ */
-+/*
-+ * Copyright (C) 2022 Arm Limited
-+ */
-+
-+#ifndef _EFI_FIRMWARE_ARM_PSA_H
-+#define _EFI_FIRMWARE_ARM_PSA_H
-+
-+#include <efi_loader.h>
-+#include <mm_communication.h>
-+#include <stdint.h>
-+
-+#define PSA_FWU_DIRECTORY_UUID \
-+	EFI_GUID(0xdeee58d9, 0x5147, 0x4ad3, \
-+		 0xa2, 0x90, 0x77, 0x66, 0x6e, 0x23, 0x41, 0xa5)
-+
-+#define PSA_FWU_SP_UUID \
-+	EFI_GUID(0x6823a838, 0x1b06, 0x470e, \
-+		 0x97, 0x74, 0x0c, 0xce, 0x8b, 0xfb, 0x53, 0xfd)
-+
-+#define FFA_FWU_SP_UUID \
-+	{0x68, 0x23, 0xa8, 0x38, 0x1b, 0x06, 0x47, \
-+		0x0e, 0x97, 0x74, 0x0c, 0xce, 0x8b, 0xfb, 0x53, 0xfd}
-+
-+#define FWU_DISCOVER		0
-+#define FWU_BEGIN_STAGING	1
-+#define FWU_END_STAGING 	2
-+#define FWU_CANCEL_STAGING	3
-+#define FWU_OPEN		4
-+#define FWU_WRITE_STREAM	5
-+#define FWU_READ_STREAM 	6
-+#define FWU_COMMIT		7
-+#define FWU_ACCEPT_IMAGE	9
-+#define FWU_SELECT_PREVIOUS	10
-+
-+#define FWU_SUCCESS		0
-+#define FWU_UNKNOWN		((int32_t)-1)
-+#define FWU_BUSY		((int32_t)-2)
-+#define FWU_OUT_OF_BOUNDS	((int32_t)-3)
-+#define FWU_AUTH_FAIL		((int32_t)-4)
-+#define FWU_NO_PERMISSION	((int32_t)-5)
-+#define FWU_DENIED		((int32_t)-6)
-+#define FWU_RESUME		((int32_t)-7)
-+
-+#define MAX_IMAGES		5
-+
-+typedef int32_t fwu_status_t;
-+
-+struct fwu_image_info_entry {
-+	efi_guid_t image_guid;
-+	uint32_t client_permissions;
-+	uint32_t img_max_size;
-+	uint32_t lowest_acceptable_version;
-+	uint32_t img_version;
-+	uint32_t accepted;
-+	uint32_t reserved;
-+}__packed;
-+
-+struct fwu_image_directory {
-+	uint32_t directory_version;
-+	uint32_t num_images;
-+	uint32_t active_index;
-+	uint32_t boot_index;
-+	struct fwu_image_info_entry entries[MAX_IMAGES];
-+}__packed;
-+
-+int __efi_runtime arm_psa_get_image_info(
-+	efi_uintn_t *image_info_size,
-+	struct efi_firmware_image_descriptor *image_info,
-+	u32 *descriptor_version,
-+	u8 *descriptor_count,
-+	efi_uintn_t *descriptor_size,
-+	u32 *package_version,
-+	u16 **package_version_name
-+);
-+
-+int __efi_runtime arm_psa_update(
-+	const void *image,
-+	u8 image_index,
-+	efi_uintn_t image_size
-+);
-+
-+struct mm_fwu_discover_arg {
-+	uint32_t func_id;
-+}__packed;
-+
-+struct mm_fwu_discover_ret {
-+	uint32_t status;
-+	uint8_t version_major;
-+	uint8_t version_minor;
-+	uint16_t num_func;
-+	uint8_t function_presence[];
-+}__packed;
-+
-+struct mm_fwu_begin_staging_arg {
-+	uint32_t func_id;
-+}__packed;
-+
-+struct mm_fwu_begin_staging_ret {
-+	uint32_t status;
-+}__packed;
-+
-+struct mm_fwu_end_staging_arg {
-+	uint32_t func_id;
-+}__packed;
-+
-+struct mm_fwu_end_staging_ret {
-+	uint32_t status;
-+}__packed;
-+
-+struct mm_fwu_cancel_staging_arg {
-+	uint32_t func_id;
-+}__packed;
-+
-+struct mm_fwu_cancel_staging_ret {
-+	uint32_t status;
-+}__packed;
-+
-+struct mm_fwu_open_arg {
-+	uint32_t func_id;
-+	efi_guid_t image_guid;
-+}__packed;
-+
-+struct mm_fwu_open_ret {
-+	uint32_t status;
-+	uint32_t handle;
-+}__packed;
-+
-+struct mm_fwu_write_stream_arg {
-+	uint32_t func_id;
-+	uint32_t handle;
-+	uint32_t data_len;
-+	uint8_t payload[];
-+}__packed;
-+
-+struct mm_fwu_write_stream_ret {
-+	uint32_t status;
-+};
-+
-+struct mm_fwu_read_stream_arg {
-+	uint32_t func_id;
-+	uint32_t handle;
-+}__packed;
-+
-+struct mm_fwu_read_stream_ret {
-+	uint32_t status;
-+	uint32_t read_bytes;
-+	uint32_t total_bytes;
-+	uint8_t payload[];
-+}__packed;
-+
-+struct mm_fwu_commit_arg {
-+	uint32_t func_id;
-+	uint32_t handle;
-+	uint32_t acceptance_req;
-+	uint32_t max_atomic_len;
-+}__packed;
-+
-+struct mm_fwu_commit_ret {
-+	uint32_t status;
-+	uint32_t progress;
-+	uint32_t total_work;
-+}__packed;
-+
-+struct mm_fwu_accept_arg {
-+	uint32_t func_id;
-+	uint32_t reserved;
-+	efi_guid_t image_type_uuid;
-+}__packed;
-+
-+struct mm_fwu_accept_ret {
-+	uint32_t status;
-+};
-+
-+struct mm_fwu_select_previous_arg {
-+	uint32_t func_id;
-+}__packed;
-+
-+struct mm_fwu_select_previous_ret {
-+	uint32_t status;
-+}__packed;
-+
-+inline static void *get_fwu_hdr(struct efi_mm_communicate_header *mm_hdr)
-+{
-+	const efi_guid_t fwu_sp_guid = PSA_FWU_SP_UUID;
-+	guidcpy(&mm_hdr->header_guid, &fwu_sp_guid);
-+	return mm_hdr->data;
-+}
-+
-+#define GET_HDR(name)						\
-+static inline struct mm_fwu_##name *				\
-+get_fwu_##name (struct efi_mm_communicate_header *mm_hdr)	\
-+{								\
-+	return (struct mm_fwu_##name *)get_fwu_hdr(mm_hdr);	\
-+}								\
-+
-+GET_HDR(discover_arg)
-+GET_HDR(discover_ret)
-+GET_HDR(begin_staging_arg)
-+GET_HDR(begin_staging_ret)
-+GET_HDR(end_staging_arg)
-+GET_HDR(end_staging_ret)
-+GET_HDR(cancel_staging_arg)
-+GET_HDR(cancel_staging_ret)
-+GET_HDR(open_arg)
-+GET_HDR(open_ret)
-+GET_HDR(write_stream_arg)
-+GET_HDR(write_stream_ret)
-+GET_HDR(read_stream_arg)
-+GET_HDR(read_stream_ret)
-+GET_HDR(commit_arg)
-+GET_HDR(commit_ret)
-+GET_HDR(accept_arg)
-+GET_HDR(accept_ret)
-+GET_HDR(select_previous_arg)
-+GET_HDR(select_previous_ret)
-+
-+#endif /* _EFI_FIRMWARE_ARM_PSA_H */
-diff --git a/include/efi_loader.h b/include/efi_loader.h
-index af36639ec6..7327c87497 100644
---- a/include/efi_loader.h
-+++ b/include/efi_loader.h
-@@ -961,6 +961,7 @@ u16 *efi_create_indexed_name(u16 *buffer, size_t buffer_size, const char *name,
- 
- extern const struct efi_firmware_management_protocol efi_fmp_fit;
- extern const struct efi_firmware_management_protocol efi_fmp_raw;
-+extern const struct efi_firmware_management_protocol efi_fmp_arm_psa;
- 
- /* Capsule update */
- efi_status_t EFIAPI efi_update_capsule(
-diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
-index e5e35fe51f..f99d436f16 100644
---- a/lib/efi_loader/Kconfig
-+++ b/lib/efi_loader/Kconfig
-@@ -168,6 +168,15 @@ config EFI_CAPSULE_FIRMWARE_MANAGEMENT
- 	  Select this option if you want to enable capsule-based
- 	  firmware update using Firmware Management Protocol.
- 
-+config EFI_CAPSULE_FIRMWARE_ARM_PSA
-+	bool "FMP driver for ARM PSA FWU specification"
-+	depends on EFI_CAPSULE_FIRMWARE_MANAGEMENT
-+	select EFI_CAPSULE_FIRMWARE
-+	help
-+	  Select this option if you want to enable firmware management protocol
-+	  driver that supports the ARM PSA firmware update specification as
-+	  mentioned in https://developer.arm.com/documentation/den0118/a/
-+
- config EFI_CAPSULE_FIRMWARE_FIT
- 	bool "FMP driver for FIT images"
- 	depends on FIT
-diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
-index 034d26cf01..f986ac6417 100644
---- a/lib/efi_loader/Makefile
-+++ b/lib/efi_loader/Makefile
-@@ -38,6 +38,7 @@ obj-y += efi_boottime.o
- obj-y += efi_helper.o
- obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o
- obj-$(CONFIG_EFI_CAPSULE_FIRMWARE) += efi_firmware.o
-+obj-$(CONFIG_EFI_CAPSULE_FIRMWARE_ARM_PSA) += efi_firmware_arm_psa.o
- obj-y += efi_console.o
- obj-y += efi_device_path.o
- obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o
-diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
-index f00440163d..3154fc51d3 100644
---- a/lib/efi_loader/efi_capsule.c
-+++ b/lib/efi_loader/efi_capsule.c
-@@ -1041,6 +1041,14 @@ efi_status_t __weak efi_load_capsule_drivers(void)
- 				&efi_fmp_raw, NULL));
- 	}
- 
-+	if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_ARM_PSA)) {
-+		handle = NULL;
-+		ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
-+				&handle,
-+				&efi_guid_firmware_management_protocol,
-+				&efi_fmp_arm_psa, NULL));
-+	}
-+
- 	return ret;
- }
- 
-diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c
-index a5ff32f121..3356559af8 100644
---- a/lib/efi_loader/efi_firmware.c
-+++ b/lib/efi_loader/efi_firmware.c
-@@ -9,6 +9,7 @@
- #include <common.h>
- #include <charset.h>
- #include <dfu.h>
-+#include <efi_firmware_arm_psa.h>
- #include <efi_loader.h>
- #include <image.h>
- #include <signatures.h>
-@@ -478,3 +479,136 @@ const struct efi_firmware_management_protocol efi_fmp_raw = {
- 	.set_package_info = efi_firmware_set_package_info_unsupported,
- };
- #endif /* CONFIG_EFI_CAPSULE_FIRMWARE_RAW */
-+
-+#ifdef CONFIG_EFI_CAPSULE_FIRMWARE_ARM_PSA
-+/*
-+ * This FIRMWARE_MANAGEMENT_PROTOCOL driver provides a firmware update
-+ * method that supports the arm psa firmware update specification.
-+ */
-+
-+/**
-+ * efi_firmware_arm_psa_get_image_info - return information about the
-+ * 					 current firmware image
-+ * @this:			Protocol instance
-+ * @image_info_size:		Size of @image_info
-+ * @image_info:			Image information
-+ * @descriptor_version:		Pointer to version number
-+ * @descriptor_count:		Pointer to number of descriptors
-+ * @descriptor_size:		Pointer to descriptor size
-+ * package_version:		Package version
-+ * package_version_name:	Package version's name
-+ *
-+ * Return information bout the current firmware image in @image_info.
-+ * @image_info will consist of a number of descriptors.
-+ *
-+ * Return		status code
-+ */
-+
-+static
-+efi_status_t EFIAPI efi_firmware_arm_psa_get_image_info(
-+	struct efi_firmware_management_protocol *this,
-+	efi_uintn_t *image_info_size,
-+	struct efi_firmware_image_descriptor *image_info,
-+	u32 *descriptor_version,
-+	u8 *descriptor_count,
-+	efi_uintn_t *descriptor_size,
-+	u32 *package_version,
-+	u16 **package_version_name)
-+{
-+	int ret;
-+
-+	EFI_ENTRY("%p %p %p %p %p %p %p %p\n", this,
-+		  image_info_size, image_info,
-+		  descriptor_version, descriptor_count, descriptor_size,
-+		  package_version, package_version_name);
-+
-+	if (!image_info_size)
-+		return EFI_EXIT(EFI_INVALID_PARAMETER);
-+
-+	if (*image_info_size &&
-+	    (!image_info || !descriptor_version || !descriptor_count ||
-+	     !descriptor_size || !package_version || !package_version_name))
-+		return EFI_EXIT(EFI_INVALID_PARAMETER);
-+
-+	ret = arm_psa_get_image_info(image_info_size, image_info,
-+				descriptor_version, descriptor_count,
-+				descriptor_size,
-+				package_version, package_version_name);
-+
-+	if (ret) {
-+		if (ret == -ENOMEM)
-+			return EFI_EXIT(EFI_BUFFER_TOO_SMALL);
-+		else
-+			return EFI_EXIT(EFI_DEVICE_ERROR);
-+	}
-+
-+	return EFI_EXIT(EFI_SUCCESS);
-+}
-+
-+/**
-+ * efi_firmware_arm_psa_set_image - update the firmware image
-+ * @this:		Protocol instance
-+ * @image_index:	Image index number
-+ * @image:		New image
-+ * @image_size:		Size of new image
-+ * @vendor_code:	Vendor-specific update policy
-+ * @progress:		Function to report the progress of update
-+ * @abort_reason:	Pointer to string of abort reason
-+ *
-+ * Update the firmware to new image, following the arm psa firmware
-+ * update specification.
-+ * @vendor_code, @progress and @abort_reason are not supported.
-+ *
-+ * Return:		status code
-+ */
-+static
-+efi_status_t EFIAPI efi_firmware_arm_psa_set_image(
-+	struct efi_firmware_management_protocol *this,
-+	u8 image_index,
-+	const void *image,
-+	efi_uintn_t image_size,
-+	const void *vendor_code,
-+	efi_status_t (*progress)(efi_uintn_t completion),
-+	u16 **abort_reason)
-+{
-+	u32 fmp_hdr_signature;
-+	const struct fmp_payload_header *header;
-+
-+	EFI_ENTRY("%p %d %p %zd %p %p %p\n", this, image_index, image,
-+		  image_size, vendor_code, progress, abort_reason);
-+
-+	if (!image)
-+		return EFI_EXIT(EFI_INVALID_PARAMETER);
-+
-+	/* TODO: capsule authentication */
-+
-+	fmp_hdr_signature = FMP_PAYLOAD_HDR_SIGNATURE;
-+	header = (void *)image;
-+
-+	if (!memcmp(&header->signature, &fmp_hdr_signature,
-+		    sizeof(fmp_hdr_signature))) {
-+		/*
-+		 * When building the capsule with the scripts in
-+		 * edk2, a FMP header is inserted above the capsule
-+		 * payload. Compensate for this header to get the
-+		 * actual payload that is to be updated.
-+		 */
-+		image = (unsigned char *)image + header->header_size;
-+		image_size -= header->header_size;
-+	}
-+
-+	if (arm_psa_update(image, image_index, image_size))
-+		return EFI_EXIT(EFI_DEVICE_ERROR);
-+
-+	return EFI_EXIT(EFI_SUCCESS);
-+}
-+
-+const struct efi_firmware_management_protocol efi_fmp_arm_psa = {
-+	.get_image_info = efi_firmware_arm_psa_get_image_info,
-+	.get_image = efi_firmware_get_image_unsupported,
-+	.set_image = efi_firmware_arm_psa_set_image,
-+	.check_image = efi_firmware_check_image_unsupported,
-+	.get_package_info = efi_firmware_get_package_info_unsupported,
-+	.set_package_info = efi_firmware_set_package_info_unsupported,
-+};
-+#endif /* CONFIG_EFI_CAPSULE_FIRMWARE_ARM_PSA */
-diff --git a/lib/efi_loader/efi_firmware_arm_psa.c b/lib/efi_loader/efi_firmware_arm_psa.c
-new file mode 100644
-index 0000000000..ab575f0124
---- /dev/null
-+++ b/lib/efi_loader/efi_firmware_arm_psa.c
-@@ -0,0 +1,520 @@
-+/* SPDX-License-Identifier: GPL-2.0+ */
-+/*
-+ * Copyright (C) 2022 Arm Limited
-+ */
-+
-+#include <arm_ffa_helper.h>
-+#include <configs/total_compute.h>
-+#include <efi_firmware_arm_psa.h>
-+#include <efi_loader.h>
-+#include <malloc.h>
-+#include <mapmem.h>
-+#include <mm_communication.h>
-+
-+/* MM return codes */
-+#define MM_SUCCESS	0
-+
-+#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64	0xC4000061
-+#define ARM_SVC_ID_SP_EVENT_COMPLETE		ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64
-+
-+__efi_runtime_data static u16 mm_sp_id;
-+__efi_runtime_data static int fwu_initialized = 0;
-+__efi_runtime_data struct fwu_image_directory cached_image_directory;
-+__efi_runtime_data struct efi_mm_communicate_header *mm_hdr;
-+__efi_runtime_data void *mm_comm_buf;
-+
-+/**
-+ * ffa_discover_mm_sp_id() - Query the MM partition ID
-+ *
-+ * Use the FF-A driver to get the MM partition ID.
-+ * If multiple partitions are found, use the first one
-+ *
-+ * Return:
-+ *
-+ * 0 on success
-+ */
-+static int __efi_runtime ffa_discover_mm_sp_id(void)
-+{
-+	struct ffa_interface_data func_data = {0};
-+	u32 count = 0;
-+	int ret;
-+	struct ffa_partition_info *parts_info;
-+	static union ffa_partition_uuid fwu_sp_uuid = {.bytes = FFA_FWU_SP_UUID};
-+
-+	/*
-+	 * get from the driver the count of the SPs matching the UUID
-+	 */
-+	func_data.data0_size = sizeof(fwu_sp_uuid);
-+	func_data.data0 = &fwu_sp_uuid;
-+	func_data.data1_size = sizeof(count);
-+	func_data.data1 = &count;
-+
-+	ret = ffa_helper_get_partitions_info(&func_data);
-+	if (ret != FFA_ERR_STAT_SUCCESS) {
-+		log_err("EFI: Failure in querying partitions count (error code: %d)\n", ret);
-+		return ret;
-+	}
-+
-+	if (!count) {
-+		log_info("EFI: No MM partition found\n");
-+		return ret;
-+	}
-+
-+	/*
-+	 * pre-allocate a buffer to be filled by the driver
-+	 * with  ffa_partition_info structs
-+	 */
-+	parts_info = calloc(count, sizeof(struct ffa_partition_info));
-+	if (!parts_info)
-+		return -EINVAL;
-+
-+	log_info("EFI: Pre-allocating %d partition(s) info structures\n", count);
-+
-+	func_data.data1_size = count * sizeof(struct ffa_partition_info);
-+	func_data.data1 = parts_info;
-+
-+	/*
-+	 * ask the driver to fill the
-+	 * buffer with the SPs info
-+	 */
-+	ret = ffa_helper_get_partitions_info(&func_data);
-+	if (ret != FFA_ERR_STAT_SUCCESS) {
-+		log_err("EFI: Failure in querying partition(s) info (error code: %d)\n", ret);
-+		free(parts_info);
-+		return ret;
-+	}
-+
-+	/*
-+	 * MM SPs found , use the first one
-+	 */
-+
-+	mm_sp_id = parts_info[0].id;
-+
-+	log_info("EFI: MM partition ID 0x%x\n", mm_sp_id);
-+
-+	free(parts_info);
-+
-+	return 0;
-+}
-+
-+/**
-+ * ffa_notify_mm_sp() - Announce there is data in the shared buffer
-+ *
-+ * Notifies the MM partition in the trusted world that
-+ * data is available in the shared buffer.
-+ * This is a blocking call during which trusted world has exclusive access
-+ * to the MM shared buffer.
-+ *
-+ * Return:
-+ *
-+ * 0 on success
-+ */
-+static int __efi_runtime ffa_notify_mm_sp(void)
-+{
-+	struct ffa_interface_data func_data = {0};
-+	struct ffa_send_direct_data msg = {0};
-+	int ret;
-+	u32 sp_event_complete;
-+	int sp_event_ret;
-+
-+	func_data.data0_size = sizeof(mm_sp_id);
-+	func_data.data0 = &mm_sp_id;
-+
-+	msg.a3 = FFA_SHARED_MM_BUFFER_ADDR;
-+	msg.a4 = FFA_SHARED_MM_BUFFER_SIZE;
-+	func_data.data1_size = sizeof(msg);
-+	func_data.data1 = &msg;
-+
-+	ret = ffa_helper_msg_send_direct_req(&func_data);
-+	if (ret != FFA_ERR_STAT_SUCCESS) {
-+		log_err("EFI: Failure to notify the MM SP , FF-A  error (%d)\n", ret);
-+		return ret;
-+	}
-+
-+	sp_event_complete = msg.a3;
-+	sp_event_ret = (int)msg.a4;
-+
-+	if (sp_event_complete == ARM_SVC_ID_SP_EVENT_COMPLETE && sp_event_ret == MM_SUCCESS)
-+		return 0;
-+
-+	log_err("EFI: Failure to notify the MM SP (0x%x , %d)\n",
-+		sp_event_complete,
-+		sp_event_ret);
-+
-+	return -EACCES;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_discover(void)
-+{
-+	int ret;
-+	struct mm_fwu_discover_arg *discover_arg = get_fwu_discover_arg(mm_hdr);
-+	struct mm_fwu_discover_ret *discover_ret = get_fwu_discover_ret(mm_hdr);
-+
-+	discover_arg->func_id = FWU_DISCOVER;
-+
-+	mm_hdr->message_len = sizeof(struct mm_fwu_discover_arg);
-+
-+	ret = ffa_notify_mm_sp();
-+	if (ret)
-+		return ret;
-+
-+	if (discover_ret->version_major != 1) {
-+		log_err("FWU: Unsupported Update Agent version\n");
-+		return -EINVAL;
-+	}
-+	/* TODO: check other parameters as well */
-+
-+	return discover_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_begin_staging(void)
-+{
-+	int ret;
-+	struct mm_fwu_begin_staging_arg *begin_staging_arg = get_fwu_begin_staging_arg(mm_hdr);
-+	struct mm_fwu_begin_staging_ret *begin_staging_ret = get_fwu_begin_staging_ret(mm_hdr);
-+
-+	begin_staging_arg->func_id = FWU_BEGIN_STAGING;
-+
-+	mm_hdr->message_len = sizeof(struct mm_fwu_begin_staging_arg);
-+
-+	ret = ffa_notify_mm_sp();
-+	if (ret)
-+		return ret;
-+
-+	return begin_staging_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_end_staging(void)
-+{
-+	int ret;
-+	struct mm_fwu_end_staging_arg *end_staging_arg = get_fwu_end_staging_arg(mm_hdr);
-+	struct mm_fwu_end_staging_ret *end_staging_ret = get_fwu_end_staging_ret(mm_hdr);
-+
-+	end_staging_arg->func_id = FWU_END_STAGING;
-+
-+	mm_hdr->message_len = sizeof(struct mm_fwu_end_staging_arg);
-+
-+	ret = ffa_notify_mm_sp();
-+	if (ret)
-+		return ret;
-+
-+	return end_staging_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_cancel_staging(void)
-+{
-+	int ret;
-+	struct mm_fwu_cancel_staging_arg *cancel_staging_arg = get_fwu_cancel_staging_arg(mm_hdr);
-+	struct mm_fwu_cancel_staging_ret *cancel_staging_ret = get_fwu_cancel_staging_ret(mm_hdr);
-+
-+	cancel_staging_arg->func_id = FWU_CANCEL_STAGING;
-+
-+	mm_hdr->message_len = sizeof(struct mm_fwu_cancel_staging_arg);
-+
-+	ret = ffa_notify_mm_sp();
-+	if (ret)
-+		return ret;
-+
-+	return cancel_staging_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_open(const efi_guid_t *img_uuid, uint32_t *handle)
-+{
-+	int ret;
-+	struct mm_fwu_open_arg *open_hdr = get_fwu_open_arg(mm_hdr);
-+	struct mm_fwu_open_ret *open_ret = get_fwu_open_ret(mm_hdr);
-+
-+	open_hdr->func_id = FWU_OPEN;
-+	guidcpy(&open_hdr->image_guid, img_uuid);
-+
-+	mm_hdr->message_len = sizeof(struct mm_fwu_open_arg);
-+
-+	ret = ffa_notify_mm_sp();
-+	if (ret)
-+		return ret;
-+
-+	*handle = open_ret->handle;
-+
-+	return open_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_read_stream(uint32_t handle, uint8_t *buffer, uint32_t buffer_size)
-+{
-+	int ret;
-+	struct mm_fwu_read_stream_arg *read_stream_hdr = get_fwu_read_stream_arg(mm_hdr);
-+	struct mm_fwu_read_stream_ret *read_stream_ret = get_fwu_read_stream_ret(mm_hdr);
-+	uint32_t payload_size = FFA_SHARED_MM_BUFFER_SIZE - sizeof(struct mm_fwu_read_stream_ret)
-+							- sizeof(struct efi_mm_communicate_header);
-+	uint32_t read_offset = 0, read_size, total_size;
-+
-+	do {
-+		read_stream_hdr->func_id = FWU_READ_STREAM;
-+		read_stream_hdr->handle = handle;
-+
-+		mm_hdr->message_len = sizeof(struct mm_fwu_read_stream_arg);
-+
-+		ret = ffa_notify_mm_sp();
-+		if (ret)
-+			return ret;
-+
-+		if (read_stream_ret->status)
-+			return read_stream_ret->status;
-+
-+		read_size = read_stream_ret->read_bytes;
-+		total_size = read_stream_ret->total_bytes;
-+
-+		log_info("FWU: read bytes / total bytes : %d/%d\n", read_size, total_size);
-+
-+		if ((read_size <= payload_size) && (read_offset + read_size <= buffer_size))
-+			memcpy(buffer + read_offset, read_stream_ret->payload, read_size);
-+		else
-+			return -EINVAL;
-+
-+		read_offset += read_size;
-+
-+		if (read_offset > total_size)
-+			return -EINVAL;
-+	} while (total_size != read_offset);
-+
-+	return read_stream_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_write_stream(uint32_t handle, const uint8_t *buffer, uint32_t remaining_size)
-+{
-+	int ret;
-+	struct mm_fwu_write_stream_arg *write_stream_arg = get_fwu_write_stream_arg(mm_hdr);
-+	struct mm_fwu_write_stream_ret *write_stream_ret = get_fwu_write_stream_ret(mm_hdr);
-+	uint32_t write_size;
-+	uint32_t payload_size = FFA_SHARED_MM_BUFFER_SIZE - sizeof(struct mm_fwu_write_stream_arg)
-+							- sizeof(struct efi_mm_communicate_header);
-+
-+	while (remaining_size) {
-+		write_size = (remaining_size < payload_size) ? remaining_size :  payload_size;
-+		write_stream_arg->func_id = FWU_WRITE_STREAM;
-+		write_stream_arg->handle = handle;
-+		write_stream_arg->data_len = write_size;
-+		memcpy(write_stream_arg->payload, buffer, write_size);
-+
-+		mm_hdr->message_len = sizeof(struct mm_fwu_write_stream_arg) + write_size;
-+
-+		ret = ffa_notify_mm_sp();
-+		if (ret)
-+			return ret;
-+
-+		if(write_stream_ret->status)
-+			return write_stream_ret->status;
-+
-+		remaining_size -= write_size;
-+		buffer += write_size;
-+
-+		log_info("FWU: write size = %d, remaining size = %d\n",
-+				write_size, remaining_size);
-+	}
-+
-+	return write_stream_ret->status;
-+}
-+
-+static fwu_status_t __efi_runtime fwu_commit(uint32_t handle, bool client_accept)
-+{
-+	int ret;
-+	struct mm_fwu_commit_arg *commit_arg = get_fwu_commit_arg(mm_hdr);
-+	struct mm_fwu_commit_ret *commit_ret = get_fwu_commit_ret(mm_hdr);
-+
-+	do {
-+		commit_arg->func_id = FWU_COMMIT;
-+		commit_arg->handle = handle;
-+		commit_arg->acceptance_req = client_accept;
-+		commit_arg->max_atomic_len = 0;
-+
-+		mm_hdr->message_len = sizeof(struct mm_fwu_commit_arg);
-+
-+		ret = ffa_notify_mm_sp();
-+		if (ret)
-+			return ret;
-+
-+		log_info("FWU: commit progress %d/%d (work/total_work)\n",
-+			commit_ret->progress, commit_ret->total_work);
-+
-+	} while(commit_ret->status==FWU_RESUME);
-+
-+	return commit_ret->status;
-+}
-+
-+int __efi_runtime arm_psa_update(
-+	const void *image,
-+	u8 image_index,
-+	efi_uintn_t image_size
-+)
-+{
-+	int ret = 0;
-+	uint32_t handle;
-+
-+	if(image_index >= cached_image_directory.num_images)
-+		return -EINVAL;
-+
-+	ret = fwu_begin_staging();
-+	if (ret) {
-+		log_err("FWU: begin staging failed, ret = %d\n", ret);
-+		return ret;
-+	}
-+
-+	ret = fwu_open(&cached_image_directory.entries[image_index].image_guid, &handle);
-+	if (ret) {
-+		log_err("FWU: firmware image open failed, ret = %d\n", ret);
-+		goto cancel_staging;
-+	}
-+
-+	ret = fwu_write_stream(handle, (uint8_t *)image, image_size);
-+	if (ret) {
-+		log_err("FWU: write stream failed, ret = %d\n", ret);
-+		goto cancel_staging;
-+	}
-+
-+	/* TODO: implement client driven image acceptance */
-+	ret = fwu_commit(handle, 0);
-+	if (ret) {
-+		log_err("FWU: commit failed, ret = %d\n", ret);
-+		goto cancel_staging;
-+	}
-+
-+	ret = fwu_end_staging();
-+	if (ret) {
-+		log_err("FWU: end staging failed, ret = %d\n", ret);
-+		goto cancel_staging;
-+	}
-+
-+	log_info("successfully updated the image at index %d\n", image_index);
-+	return ret;
-+
-+cancel_staging:
-+	if (fwu_cancel_staging())
-+		log_err("FWU: cancel staging failed, ret = %d\n", ret);
-+
-+	return ret;
-+}
-+
-+static int __efi_runtime read_image_directory(void)
-+{
-+	int ret;
-+	uint32_t handle;
-+
-+	const efi_guid_t fwu_directory_uuid = PSA_FWU_DIRECTORY_UUID;
-+
-+	ret = fwu_open(&fwu_directory_uuid, &handle);
-+	if (ret) {
-+		log_err("FWU: open image directory failed, ret = %d\n", ret);
-+		return ret;
-+	}
-+
-+	ret = fwu_read_stream(handle, (uint8_t *)&cached_image_directory, sizeof(cached_image_directory));
-+	if (ret) {
-+		log_err("FWU: read stream failed, ret = %d\n", ret);
-+		return ret;
-+	}
-+
-+	if(cached_image_directory.num_images > MAX_IMAGES) {
-+		log_err("FWU: image limit exceeded.\n");
-+		log_err("FWU: number of images present: %d, max number of images supported: %d\n",
-+					cached_image_directory.num_images, MAX_IMAGES);
-+		return -EINVAL;
-+	}
-+
-+	return ret;
-+}
-+
-+static int update_agent_init(void)
-+{
-+	int ret;
-+
-+	ret = ffa_discover_mm_sp_id();
-+	if (ret) {
-+		log_err("FWU: discover update agent failed, ret = %d\n", ret);
-+		return ret;
-+	}
-+
-+	mm_comm_buf = (void *)map_sysmem((phys_addr_t)FFA_SHARED_MM_BUFFER_ADDR, 0);
-+	mm_hdr = (struct efi_mm_communicate_header *)mm_comm_buf;
-+
-+	ret = fwu_discover();
-+	if (ret) {
-+		log_err("FWU: discover failed, ret = %d\n", ret);
-+		goto out;
-+	}
-+
-+	ret = read_image_directory();
-+	if (ret) {
-+		log_err("FWU: reading image directory failed, ret = %d\n", ret);
-+		goto out;
-+	}
-+
-+	fwu_initialized = 1;
-+	return ret;
-+out:
-+	unmap_sysmem(mm_comm_buf);
-+	return ret;
-+}
-+
-+int __efi_runtime arm_psa_get_image_info(
-+        efi_uintn_t *image_info_size,
-+        struct efi_firmware_image_descriptor *image_info,
-+        u32 *descriptor_version,
-+        u8 *descriptor_count,
-+        efi_uintn_t *descriptor_size,
-+        u32 *package_version,
-+        u16 **package_version_name)
-+{
-+	int ret = 0;
-+	int required_image_info_size;
-+
-+	if (!fwu_initialized) {
-+		ret = update_agent_init();
-+		if (ret) {
-+			log_err("update agent init failed, ret = %d\n", ret);
-+			return ret;
-+		}
-+	}
-+
-+	required_image_info_size = cached_image_directory.num_images *
-+				sizeof(struct efi_firmware_image_descriptor);
-+
-+	if (*image_info_size < required_image_info_size) {
-+		*image_info_size = required_image_info_size;
-+		return -ENOMEM;
-+	}
-+
-+	*descriptor_version = EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION;
-+	*descriptor_count = cached_image_directory.num_images;
-+	*descriptor_size = required_image_info_size;
-+	*package_version = 0xffffffff; /* not supported */
-+	*package_version_name = NULL; /* not supported */
-+
-+	for (int i = 0; i < cached_image_directory.num_images; i++) {
-+		image_info[i].image_index = i+1;
-+		guidcpy(&image_info[i].image_type_id, &cached_image_directory.entries[i].image_guid);
-+		image_info[i].image_id = i;
-+		image_info[i].image_id_name = NULL; /* not supported */
-+		image_info[i].version = cached_image_directory.entries[i].img_version;
-+		image_info[i].version_name = NULL; /* not supported */
-+		image_info[i].size = cached_image_directory.entries[i].img_max_size;
-+
-+		image_info[i].attributes_supported =
-+			IMAGE_ATTRIBUTE_IMAGE_UPDATABLE |
-+			IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED;
-+		image_info[i].attributes_setting =
-+				IMAGE_ATTRIBUTE_IMAGE_UPDATABLE;
-+
-+		/* Check if the capsule authentication is enabled */
-+		if (IS_ENABLED(CONFIG_EFI_CAPSULE_AUTHENTICATE))
-+			image_info[i].attributes_setting |=
-+				IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED;
-+
-+		image_info[i].lowest_supported_image_version =
-+			cached_image_directory.entries[i].lowest_acceptable_version;
-+		image_info[i].last_attempt_version = 0;
-+		image_info[i].last_attempt_status = LAST_ATTEMPT_STATUS_SUCCESS;
-+		image_info[i].hardware_instance = 1;
-+		image_info[i].dependencies = NULL; /* not supported */
-+	}
-+
-+	return ret;
-+}
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0006-arm-total_compute-enable-capsule-update.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0006-arm-total_compute-enable-capsule-update.patch
deleted file mode 100644
index bf2bfe8..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0006-arm-total_compute-enable-capsule-update.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 2ab887402b9e22842d07e5f2fe1ac54518555af5 Mon Sep 17 00:00:00 2001
-From: Davidson K <davidson.kumaresan@arm.com>
-Date: Mon, 6 Jun 2022 13:24:42 +0530
-Subject: [PATCH 6/7] arm: total_compute: enable capsule update
-
-It includes:
-* Enabling runtime capsule update
-* Enabling efidebug command line tool
-* Enabling the FMP driver that supports ARM PSA firmware update specification
-* Predefining the carved out memory to be used for MM communication
-* Enabling FF-A transport driver and adding an entry in dts
-
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: I6d6c70c6fc386d6c40def800a7417c1ce4b8acf5
-Upstream-Status: Pending [Not submitted to upstream yet]
----
- arch/arm/dts/total_compute.dts  | 7 +++++++
- configs/total_compute_defconfig | 5 +++++
- include/configs/total_compute.h | 4 ++++
- 3 files changed, 16 insertions(+)
-
-diff --git a/arch/arm/dts/total_compute.dts b/arch/arm/dts/total_compute.dts
-index 96edacda0b..9b2cbfb452 100644
---- a/arch/arm/dts/total_compute.dts
-+++ b/arch/arm/dts/total_compute.dts
-@@ -45,8 +45,15 @@
- 		clock-frequency = <24000000>;
- 		clock-output-names = "bp:clock24mhz";
- 	};
-+
- 	psci {
- 		compatible = "arm,psci-1.0", "arm,psci-0.2";
- 		method = "smc";
- 	};
-+
-+	arm_ffa {
-+		compatible = "arm,ffa";
-+		method = "smc";
-+		status = "okay";
-+	};
- };
-diff --git a/configs/total_compute_defconfig b/configs/total_compute_defconfig
-index 6a375543cd..531ce41cd3 100644
---- a/configs/total_compute_defconfig
-+++ b/configs/total_compute_defconfig
-@@ -52,3 +52,8 @@ CONFIG_SYS_FLASH_PROTECTION=y
- CONFIG_SYS_FLASH_CFI=y
- CONFIG_LIBAVB=y
- CONFIG_OF_LIBFDT_OVERLAY=y
-+CONFIG_ARM_FFA_TRANSPORT=y
-+CONFIG_CMD_EFIDEBUG=y
-+CONFIG_EFI_CAPSULE_FIRMWARE_ARM_PSA=y
-+CONFIG_EFI_CAPSULE_ON_DISK=y
-+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
-diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h
-index 62bdb4f6a3..4b00f47ec6 100644
---- a/include/configs/total_compute.h
-+++ b/include/configs/total_compute.h
-@@ -59,4 +59,8 @@
- #define CONFIG_SYS_FLASH_EMPTY_INFO	/* flinfo indicates empty blocks */
- #define FLASH_MAX_SECTOR_SIZE		0x00040000
- 
-+/* Shared buffer used for communication between u-boot and the FWU SP */
-+#define FFA_SHARED_MM_BUFFER_SIZE	4 * 1024 * 1024 /* 4 MB */
-+#define FFA_SHARED_MM_BUFFER_ADDR	(0xFCA00000)
-+
- #endif /* __TOTAL_COMPUTE_H */
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0007-arm_ffa-unmap-rxtx-buffer-before-exiting-u-boot.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0007-arm_ffa-unmap-rxtx-buffer-before-exiting-u-boot.patch
deleted file mode 100644
index 5c43723..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/0007-arm_ffa-unmap-rxtx-buffer-before-exiting-u-boot.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 47be0456ea1760837d2de857e57842e595e9ea5e Mon Sep 17 00:00:00 2001
-From: Davidson K <davidson.kumaresan@arm.com>
-Date: Mon, 27 Jun 2022 14:11:27 +0530
-Subject: [PATCH 7/7] arm_ffa: unmap rxtx buffer before exiting u-boot
-
-The linux kernel ffa driver will be used after the kernel boots. It
-will try to map its own rxtx buffer. But there can be only one rxtx
-buffer mapped from the non secure world. Since the rxtx buffer of
-the u-boot is no longer used and we have to map the rxtx buffer of
-the linux kernel, the rxtx buffer of the u-boot should be unmapped.
-
-This will not be needed after the efi runtime services are enabled
-
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: I9deb6283d81f791185aa0a32d205b394d6d91f76
-Upstream-Status: Pending [Not submitted to upstream yet]
----
- drivers/arm-ffa/core.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/drivers/arm-ffa/core.c b/drivers/arm-ffa/core.c
-index 98e2d2fa17..0c619439cb 100644
---- a/drivers/arm-ffa/core.c
-+++ b/drivers/arm-ffa/core.c
-@@ -1470,6 +1470,16 @@ static const struct udevice_id ffa_match_id[] = {
- 	{},
- };
- 
-+/**
-+ * Unmap the rxtx buffer before exiting u-boot
-+ * This avoids conflicts with the linux kernel ffa driver
-+ */
-+
-+static int ffa_remove(struct udevice *dev)
-+{
-+	return ffa_unmap_rxtx_buffers();
-+}
-+
- /**
-  * Declaring the arm_ffa driver under UCLASS_FFA
-  */
-@@ -1481,4 +1491,6 @@ U_BOOT_DRIVER(arm_ffa) = {
- 	.of_to_plat	= ffa_of_to_plat,
- 	.probe		= ffa_probe,
- 	.plat_auto	= sizeof(struct ffa_pdata),
-+	.remove		= ffa_remove,
-+	.flags		= DM_FLAG_OS_PREPARE,
- };
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/bootargs.cfg b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/bootargs.cfg
index a06c44f..2bfd403 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/bootargs.cfg
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/bootargs.cfg
@@ -1,3 +1,3 @@
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyAMA0 debug user_debug=31 earlycon=pl011,0x7ff80000 loglevel=9 androidboot.hardware=total_compute androidboot.boot_devices=1c050000.mmci androidboot.selinux=permissive allow_mismatched_32bit_el0"
+CONFIG_BOOTARGS="console=ttyAMA0 debug earlycon=pl011,0x7ff80000"
 CONFIG_BOOTDELAY=0
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
index 6e68a42..0bb48a0 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -97,11 +97,4 @@
 #
 SRC_URI:append:tc = " \
         file://bootargs.cfg \
-        file://0001-arm-total_compute-update-secure-dram-size.patch \
-        file://0002-arm_ffa-introducing-Arm-FF-A-low-level-driver.patch \
-        file://0003-arm-total_compute-enable-psci.patch \
-        file://0004-arm_ffa-rxtx_map-should-use-64-bit-calls.patch \
-        file://0005-efi_firmware-add-new-fmp-driver-that-supports-arm-fw.patch \
-        file://0006-arm-total_compute-enable-capsule-update.patch \
-        file://0007-arm_ffa-unmap-rxtx-buffer-before-exiting-u-boot.patch \
         "
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2022.04.bb b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2022.04.bb
deleted file mode 100644
index 46f9244..0000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2022.04.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
-DESCRIPTION = "U-Boot, a boot loader for Embedded boards based on PowerPC, \
-ARM, MIPS and several other processors, which can be installed in a boot \
-ROM and used to initialize and test the hardware or to download and run \
-application code."
-SECTION = "bootloaders"
-DEPENDS += "flex-native bison-native"
-
-LICENSE = "GPL-2.0-or-later"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"
-PE = "1"
-
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "e4b6ebd3de982ae7185dbf689a030e73fd06e0d2"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
-          "
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-do_configure[cleandirs] = "${B}"
-
-require recipes-bsp/u-boot/u-boot.inc
-
-DEPENDS += "bc-native dtc-native gnutls-native"
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc-autofdo.scc b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc-autofdo.scc
deleted file mode 100644
index 5b20b6c..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc-autofdo.scc
+++ /dev/null
@@ -1 +0,0 @@
-kconf non-hardware tc/autofdo.cfg
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc.scc b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc.scc
deleted file mode 100644
index 6542e6b..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc.scc
+++ /dev/null
@@ -1,13 +0,0 @@
-kconf hardware tc/base.cfg
-kconf non-hardware tc/dhcp.cfg
-kconf non-hardware tc/devtmpfs.cfg
-kconf non-hardware tc/gralloc.cfg
-kconf non-hardware tc/mali.cfg
-kconf non-hardware tc/ffa.cfg
-kconf non-hardware tc/optee.cfg
-kconf non-hardware tc/virtio.cfg
-kconf non-hardware tc/autofdo.cfg
-kconf non-hardware tc/ci700.cfg
-kconf non-hardware tc/trusty.cfg
-kconf non-hardware tc/disable_mpam.cfg
-kconf non-hardware tc/disable_btf.cfg
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/autofdo.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/autofdo.cfg
deleted file mode 100644
index 8530c88..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/autofdo.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_CORESIGHT=y
-CONFIG_CORESIGHT_SOURCE_ETM4X=y
-CONFIG_CORESIGHT_TRBE=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/base.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/base.cfg
deleted file mode 100644
index 90b08f1..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/base.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-CONFIG_ARCH_VEXPRESS=y
-CONFIG_ARM_MHU=y
-CONFIG_ARM_MHU_V2=y
-CONFIG_ARM_SMMU_V3=y
-CONFIG_ARM64_VA_BITS_48=y
-CONFIG_COMMON_CLK_SCMI=y
-CONFIG_DRM_HDLCD=y
-CONFIG_DRM_KOMEDA=y
-CONFIG_DRM_VIRT_ENCODER=y
-CONFIG_MMC_ARMMMCI=y
-CONFIG_SERIO_AMBAKMI=y
-CONFIG_SMC91X=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ci700.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ci700.cfg
deleted file mode 100644
index 50c0153..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ci700.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_ARM_CMN=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/devtmpfs.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/devtmpfs.cfg
deleted file mode 100644
index abde412..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/devtmpfs.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_VT=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/dhcp.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/dhcp.cfg
deleted file mode 100644
index 78c5a04..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/dhcp.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_btf.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_btf.cfg
deleted file mode 100644
index 2743382..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_btf.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_DEBUG_INFO_BTF=n
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_mpam.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_mpam.cfg
deleted file mode 100644
index 2dceb6c..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/disable_mpam.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_ARM64_MPAM=n
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ffa.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ffa.cfg
deleted file mode 100644
index 34de78e..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/ffa.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_ARM_FFA_TRANSPORT=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/gralloc.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/gralloc.cfg
deleted file mode 100644
index 22abcb5..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/gralloc.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_DMABUF_HEAPS_SYSTEM=y
-CONFIG_DMABUF_HEAPS_CMA=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/mali.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/mali.cfg
deleted file mode 100644
index 166818f..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/mali.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/optee.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/optee.cfg
deleted file mode 100644
index 07554cf..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/optee.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_TEE=y
-CONFIG_OPTEE=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/trusty.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/trusty.cfg
deleted file mode 100644
index 54e8657..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/trusty.cfg
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_TRUSTY=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/virtio.cfg b/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/virtio.cfg
deleted file mode 100644
index 9e6d21c..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/tc/virtio.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_MMIO=y
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
index dc6f34e..38bea02 100644
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
+++ b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
@@ -17,7 +17,6 @@
 SRC_URI:append:fvp-baser-aemv8r64 = " ${SRC_URI_KMETA}"
 SRC_URI:append:juno = " ${SRC_URI_KMETA}"
 SRC_URI:append:n1sdp = " ${SRC_URI_KMETA}"
-SRC_URI:append:tc = " ${SRC_URI_KMETA}"
 SRCREV:arm-platforms-kmeta = "6147e82375aa9df8f2a162d42ea6406c79c854c5"
 
 #
@@ -128,54 +127,5 @@
 # Total Compute (TC0/TC1) KMACHINE
 #
 COMPATIBLE_MACHINE:tc = "(tc0|tc1)"
+KBUILD_DEFCONFIG:tc = "defconfig"
 KCONFIG_MODE:tc = "--alldefconfig"
-FILESEXTRAPATHS:prepend:tc := "${ARMBSPFILESPATHS}:${THISDIR}/linux-arm64-ack-5.15/tc:"
-SRC_URI:append:tc = " \
-    file://gki_defconfig \
-    file://0001-drm-Add-component-aware-simple-encoder.patch \
-    file://0001-drm-komeda-Fix-handling-of-atomic-commits-in-the-ato.patch \
-    file://0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch \
-    file://0003-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch \
-    file://0004-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch \
-    file://0005-firmware-arm_ffa-extern-ffa_bus_type.patch \
-    file://0006-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch \
-    file://0007-Revert-optee-use-driver-internal-tee_context-for-som.patch \
-    file://0008-tee-add-sec_world_id-to-struct-tee_shm.patch \
-    file://0009-optee-simplify-optee_release.patch \
-    file://0010-optee-refactor-driver-with-internal-callbacks.patch \
-    file://0011-optee-isolate-smc-abi.patch \
-    file://0012-optee-add-FF-A-support.patch \
-    file://0013-optee-smc_abi.c-add-missing-include-linux-mm.h.patch \
-    file://0014-optee-Fix-spelling-mistake-reclain-reclaim.patch \
-    file://0015-optee-fix-kfree-NULL-pointer.patch \
-    file://0016-perf-arm-cmn-Account-for-NUMA-affinity.patch \
-    file://0017-perf-arm-cmn-Drop-compile-test-restriction.patch \
-    file://0018-perf-arm-cmn-Refactor-node-ID-handling.patch \
-    file://0019-perf-arm-cmn-Streamline-node-iteration.patch \
-    file://0020-perf-arm-cmn-Refactor-DTM-handling.patch \
-    file://0021-perf-arm-cmn-Optimise-DTM-counter-reads.patch \
-    file://0022-perf-arm-cmn-Optimise-DTC-counter-accesses.patch \
-    file://0023-perf-arm-cmn-Move-group-validation-data-off-stack.patch \
-    file://0024-perf-arm-cmn-Demarcate-CMN-600-specifics.patch \
-    file://0025-perf-arm-cmn-Support-new-IP-features.patch \
-    file://0026-perf-arm-cmn-Add-CI-700-Support.patch \
-    file://0027-ANDROID-trusty-Backport-of-trusty-driver.patch \
-    file://0028-ANDROID-trusty-Remove-FFA-specific-initilization.patch \
-    file://0029-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch \
-    file://0030-ANDROID-trusty-Separate-out-SMC-based-transport.patch \
-    file://0031-ANDROID-trusty-Modify-device-compatible-string.patch \
-    file://0032-ANDROID-trusty-Add-transport-descriptor.patch \
-    file://0033-ANDROID-trusty-Add-trusty-ffa-driver.patch \
-    file://0034-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch \
-    file://0035-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch \
-    file://0036-ANDROID-trusty-Make-trusty-transports-configurable.patch \
-    file://0037-ANDROID-trusty-log-include-panic_notifier.h.patch \
-    file://0038-ANDROID-trusty-ipc-fix-VIRTIO_ID_TRUSTY_IPC-ID.patch \
-    file://0039-gki_config-add-tc-disable_mpam.patch \
-    file://0040-ANDROID-KVM-arm64-disable-FFA-driver-at-EL2.patch \
-    file://init_disassemble_info-signature-changes-causes-compile-failures.patch \
-    file://0041-etherdevice-Adjust-ether_addr-prototypes-to-silence-.patch \
-    file://0042-mm-page_alloc-fix-building-error-on-Werror-array-com.patch \
-    "
-KERNEL_FEATURES:append:tc = " bsp/arm-platforms/tc.scc"
-KERNEL_FEATURES:append:tc1 = " bsp/arm-platforms/tc-autofdo.scc"
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-Add-component-aware-simple-encoder.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-Add-component-aware-simple-encoder.patch
deleted file mode 100644
index d361efd..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-Add-component-aware-simple-encoder.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-From 5c07d2e7bf1634743249178bf2ca2a06779e6e7a Mon Sep 17 00:00:00 2001
-From: Tushar Khandelwal <tushar.khandelwal@arm.com>
-Date: Tue, 16 Jun 2020 12:39:06 +0000
-Subject: [PATCH 01/40] drm: Add component-aware simple encoder
-
-This is a simple DRM encoder that gets its connector timings information
-from a OF subnode in the device tree and exposes that as a "discovered"
-panel. It can be used together with component-based DRM drivers in an
-emulated environment where no real encoder or connector hardware exists
-and the display output is configured outside the kernel.
-
-Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
-
-Upstream-Status: Backport [https://git.linaro.org/landing-teams/working/arm/kernel-release.git/commit/?h=latest-armlt&id=15283f7be4b1e586702551e85b4caf06531ac2fc]
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ic68cbba7da7d36ee23359ff53bf30eb44cb78661
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/gpu/drm/Kconfig               |  11 +
- drivers/gpu/drm/Makefile              |   2 +
- drivers/gpu/drm/drm_virtual_encoder.c | 299 ++++++++++++++++++++++++++
- 3 files changed, 312 insertions(+)
- create mode 100644 drivers/gpu/drm/drm_virtual_encoder.c
-
-diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index cea777ae7fb9..2468ec7155ef 100644
---- a/drivers/gpu/drm/Kconfig
-+++ b/drivers/gpu/drm/Kconfig
-@@ -291,6 +291,17 @@ config DRM_VKMS
- 
- 	  If M is selected the module will be called vkms.
- 
-+config DRM_VIRT_ENCODER
-+       tristate "Virtual OF-based encoder"
-+       depends on DRM && OF
-+       select VIDEOMODE_HELPERS
-+       help
-+         Choose this option to get a virtual encoder and its associated
-+         connector that will use the device tree to read the display
-+         timings information. If M is selected the module will be called
-+         drm_vencoder.
-+
-+
- source "drivers/gpu/drm/exynos/Kconfig"
- 
- source "drivers/gpu/drm/rockchip/Kconfig"
-diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
-index ad1112154898..361999b7d063 100644
---- a/drivers/gpu/drm/Makefile
-+++ b/drivers/gpu/drm/Makefile
-@@ -59,6 +59,8 @@ drm_kms_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
- 
- obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
- obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/
-+drm_vencoder-y := drm_virtual_encoder.o
-+obj-$(CONFIG_DRM_VIRT_ENCODER) += drm_vencoder.o
- 
- obj-$(CONFIG_DRM)	+= drm.o
- obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
-diff --git a/drivers/gpu/drm/drm_virtual_encoder.c b/drivers/gpu/drm/drm_virtual_encoder.c
-new file mode 100644
-index 000000000000..39a902ecfe32
---- /dev/null
-+++ b/drivers/gpu/drm/drm_virtual_encoder.c
-@@ -0,0 +1,299 @@
-+/*
-+ * Copyright (C) 2016 ARM Limited
-+ * Author: Liviu Dudau <Liviu.Dudau@arm.com>
-+ *
-+ * Dummy encoder and connector that use the OF to "discover" the attached
-+ * display timings. Can be used in situations where the encoder and connector's
-+ * functionality are emulated and no setup steps are needed, or to describe
-+ * attached panels for which no driver exists but can be used without
-+ * additional hardware setup.
-+ *
-+ * The encoder also uses the component framework so that it can be a quick
-+ * replacement for existing drivers when testing in an emulated environment.
-+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License.  See the file COPYING in the main directory of this archive
-+ * for more details.
-+ *
-+ */
-+
-+#include <drm/drm_crtc.h>
-+#include <drm/drm_atomic_helper.h>
-+#include <drm/drm_crtc_helper.h>
-+#include <drm/drm_probe_helper.h>
-+#include <drm/drm_print.h>
-+#include <linux/platform_device.h>
-+#include <drm/drm_of.h>
-+#include <linux/component.h>
-+#include <video/display_timing.h>
-+#include <video/of_display_timing.h>
-+#include <video/videomode.h>
-+
-+struct drm_virt_priv {
-+	struct drm_connector connector;
-+	struct drm_encoder encoder;
-+	struct display_timings *timings;
-+};
-+
-+#define connector_to_drm_virt_priv(x) \
-+	container_of(x, struct drm_virt_priv, connector)
-+
-+#define encoder_to_drm_virt_priv(x) \
-+	container_of(x, struct drm_virt_priv, encoder)
-+
-+static void drm_virtcon_destroy(struct drm_connector *connector)
-+{
-+	struct drm_virt_priv *conn = connector_to_drm_virt_priv(connector);
-+
-+	drm_connector_cleanup(connector);
-+	display_timings_release(conn->timings);
-+}
-+
-+static enum drm_connector_status
-+drm_virtcon_detect(struct drm_connector *connector, bool force)
-+{
-+	return connector_status_connected;
-+}
-+
-+static const struct drm_connector_funcs drm_virtcon_funcs = {
-+	.reset = drm_atomic_helper_connector_reset,
-+	.detect	= drm_virtcon_detect,
-+	.fill_modes = drm_helper_probe_single_connector_modes,
-+	.destroy = drm_virtcon_destroy,
-+	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
-+	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
-+};
-+
-+static int drm_virtcon_get_modes(struct drm_connector *connector)
-+{
-+	struct drm_virt_priv *conn = connector_to_drm_virt_priv(connector);
-+	struct display_timings *timings = conn->timings;
-+	int i;
-+
-+	for (i = 0; i < timings->num_timings; i++) {
-+		struct drm_display_mode *mode = drm_mode_create(connector->dev);
-+		struct videomode vm;
-+
-+		if (videomode_from_timings(timings, &vm, i))
-+			break;
-+
-+		drm_display_mode_from_videomode(&vm, mode);
-+		mode->type = DRM_MODE_TYPE_DRIVER;
-+		if (timings->native_mode == i)
-+			mode->type = DRM_MODE_TYPE_PREFERRED;
-+
-+		drm_mode_set_name(mode);
-+		drm_mode_probed_add(connector, mode);
-+	}
-+
-+	return i;
-+}
-+
-+static int drm_virtcon_mode_valid(struct drm_connector *connector,
-+				   struct drm_display_mode *mode)
-+{
-+	return MODE_OK;
-+}
-+
-+struct drm_encoder *drm_virtcon_best_encoder(struct drm_connector *connector)
-+{
-+	struct drm_virt_priv *priv = connector_to_drm_virt_priv(connector);
-+
-+	return &priv->encoder;
-+}
-+
-+struct drm_encoder *
-+drm_virtcon_atomic_best_encoder(struct drm_connector *connector,
-+				struct drm_atomic_state *state)
-+{
-+	struct drm_virt_priv *priv = connector_to_drm_virt_priv(connector);
-+
-+	return &priv->encoder;
-+}
-+
-+static const struct drm_connector_helper_funcs drm_virtcon_helper_funcs = {
-+	.get_modes = drm_virtcon_get_modes,
-+	.mode_valid = drm_virtcon_mode_valid,
-+	.best_encoder = drm_virtcon_best_encoder,
-+	.atomic_best_encoder = drm_virtcon_atomic_best_encoder,
-+};
-+
-+static void drm_vencoder_destroy(struct drm_encoder *encoder)
-+{
-+	drm_encoder_cleanup(encoder);
-+}
-+
-+static const struct drm_encoder_funcs drm_vencoder_funcs = {
-+	.destroy = drm_vencoder_destroy,
-+};
-+
-+static void drm_vencoder_dpms(struct drm_encoder *encoder, int mode)
-+{
-+	/* nothing needed */
-+}
-+
-+static bool drm_vencoder_mode_fixup(struct drm_encoder *encoder,
-+				    const struct drm_display_mode *mode,
-+				    struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+	return true;
-+}
-+
-+static void drm_vencoder_prepare(struct drm_encoder *encoder)
-+{
-+	drm_vencoder_dpms(encoder, DRM_MODE_DPMS_OFF);
-+}
-+
-+static void drm_vencoder_commit(struct drm_encoder *encoder)
-+{
-+	drm_vencoder_dpms(encoder, DRM_MODE_DPMS_ON);
-+}
-+
-+static void drm_vencoder_mode_set(struct drm_encoder *encoder,
-+				  struct drm_display_mode *mode,
-+				  struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+}
-+
-+static const struct drm_encoder_helper_funcs drm_vencoder_helper_funcs = {
-+	.dpms		= drm_vencoder_dpms,
-+	.mode_fixup	= drm_vencoder_mode_fixup,
-+	.prepare	= drm_vencoder_prepare,
-+	.commit		= drm_vencoder_commit,
-+	.mode_set	= drm_vencoder_mode_set,
-+};
-+
-+static int drm_vencoder_bind(struct device *dev, struct device *master,
-+			     void *data)
-+{
-+	struct drm_encoder *encoder;
-+	struct drm_virt_priv *con;
-+	struct drm_connector *connector;
-+	struct drm_device *drm = data;
-+	u32 crtcs = 0;
-+	int ret;
-+
-+	con = devm_kzalloc(dev, sizeof(*con), GFP_KERNEL);
-+	if (!con)
-+		return -ENOMEM;
-+
-+	dev_set_drvdata(dev, con);
-+	connector = &con->connector;
-+	encoder = &con->encoder;
-+
-+	if (dev->of_node) {
-+		struct drm_bridge *bridge;
-+		crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
-+		bridge = of_drm_find_bridge(dev->of_node);
-+		if (bridge) {
-+			ret = drm_bridge_attach(encoder, bridge, NULL, 0);
-+			if (ret) {
-+				DRM_ERROR("Failed to initialize bridge\n");
-+				return ret;
-+			}
-+		}
-+		con->timings = of_get_display_timings(dev->of_node);
-+		if (!con->timings) {
-+			dev_err(dev, "failed to get display panel timings\n");
-+			return ENXIO;
-+		}
-+	}
-+
-+	/* If no CRTCs were found, fall back to the old encoder's behaviour */
-+	if (crtcs == 0) {
-+		dev_warn(dev, "Falling back to first CRTC\n");
-+		crtcs = 1 << 0;
-+	}
-+
-+	encoder->possible_crtcs = crtcs ? crtcs : 1;
-+	encoder->possible_clones = 0;
-+
-+	ret = drm_encoder_init(drm, encoder, &drm_vencoder_funcs,
-+			       DRM_MODE_ENCODER_VIRTUAL, NULL);
-+	if (ret)
-+		goto encoder_init_err;
-+
-+	drm_encoder_helper_add(encoder, &drm_vencoder_helper_funcs);
-+
-+	/* bogus values, pretend we're a 24" screen for DPI calculations */
-+	connector->display_info.width_mm = 519;
-+	connector->display_info.height_mm = 324;
-+	connector->interlace_allowed = false;
-+	connector->doublescan_allowed = false;
-+	connector->polled = 0;
-+
-+	ret = drm_connector_init(drm, connector, &drm_virtcon_funcs,
-+				 DRM_MODE_CONNECTOR_VIRTUAL);
-+	if (ret)
-+		goto connector_init_err;
-+
-+	drm_connector_helper_add(connector, &drm_virtcon_helper_funcs);
-+
-+	drm_connector_register(connector);
-+
-+	ret = drm_connector_attach_encoder(connector, encoder);
-+	if (ret)
-+		goto attach_err;
-+
-+	return ret;
-+
-+attach_err:
-+	drm_connector_unregister(connector);
-+	drm_connector_cleanup(connector);
-+connector_init_err:
-+	drm_encoder_cleanup(encoder);
-+encoder_init_err:
-+	display_timings_release(con->timings);
-+
-+	return ret;
-+};
-+
-+static void drm_vencoder_unbind(struct device *dev, struct device *master,
-+				void *data)
-+{
-+	struct drm_virt_priv *con = dev_get_drvdata(dev);
-+
-+	drm_connector_unregister(&con->connector);
-+	drm_connector_cleanup(&con->connector);
-+	drm_encoder_cleanup(&con->encoder);
-+	display_timings_release(con->timings);
-+}
-+
-+static const struct component_ops drm_vencoder_ops = {
-+	.bind = drm_vencoder_bind,
-+	.unbind = drm_vencoder_unbind,
-+};
-+
-+static int drm_vencoder_probe(struct platform_device *pdev)
-+{
-+	return component_add(&pdev->dev, &drm_vencoder_ops);
-+}
-+
-+static int drm_vencoder_remove(struct platform_device *pdev)
-+{
-+	component_del(&pdev->dev, &drm_vencoder_ops);
-+	return 0;
-+}
-+
-+static const struct of_device_id drm_vencoder_of_match[] = {
-+	{ .compatible = "drm,virtual-encoder", },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, drm_vencoder_of_match);
-+
-+static struct platform_driver drm_vencoder_driver = {
-+	.probe = drm_vencoder_probe,
-+	.remove = drm_vencoder_remove,
-+	.driver = {
-+		.name = "drm_vencoder",
-+		.of_match_table = drm_vencoder_of_match,
-+	},
-+};
-+
-+module_platform_driver(drm_vencoder_driver);
-+
-+MODULE_AUTHOR("Liviu Dudau");
-+MODULE_DESCRIPTION("Virtual DRM Encoder");
-+MODULE_LICENSE("GPL v2");
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-komeda-Fix-handling-of-atomic-commits-in-the-ato.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-komeda-Fix-handling-of-atomic-commits-in-the-ato.patch
deleted file mode 100644
index c038ad7..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0001-drm-komeda-Fix-handling-of-atomic-commits-in-the-ato.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 3bfadb22e58bdf7691f80f403dd85794f2b86ad6 Mon Sep 17 00:00:00 2001
-From: Liviu Dudau <liviu.dudau@arm.com>
-Date: Fri, 8 Jul 2022 16:39:21 +0100
-Subject: [PATCH] drm/komeda: Fix handling of atomic commits in the
- atomic_commit_tail hook
-
-Komeda driver relies on the generic DRM atomic helper functions to handle
-commits. It only implements an atomic_commit_tail hook for the
-mode_config_helper_funcs and even that one is pretty close to the generic
-implementation with the exception of additional dma_fence signalling.
-
-What the generic helper framework doesn't do is waiting for the actual
-hardware to signal that the commit parameters have been written into the
-appropriate registers. As we signal CRTC events only on the irq handlers,
-we need to flush the configuration and wait for the hardware to respond.
-
-Add the Komeda specific implementation for atomic_commit_hw_done() that
-flushes and waits for flip done before calling drm_atomic_helper_commit_hw_done().
-
-The fix was prompted by a patch from Carsten Haitzler where he was trying to
-solve the same issue but in a different way that I think can lead to wrong
-event signaling to userspace.
-
-Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/msgid/20220722122139.288486-1-liviu.dudau@arm.com]
-Reported-by: Carsten Haitzler <carsten.haitzler@arm.com>
-Tested-by: Carsten Haitzler <carsten.haitzler@arm.com>
-Reviewed-by: Carsten Haitzler <carsten.haitzler@arm.com>
-Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20220722122139.288486-1-liviu.dudau@arm.com
-Signed-off-by: Ben Horgan <ben.horgan@arm.com>
-Change-Id: I0bd92150120eb929692c1d38c4d1077d38401cdd
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- .../gpu/drm/arm/display/komeda/komeda_crtc.c  |  4 ++--
- .../gpu/drm/arm/display/komeda/komeda_kms.c   | 21 ++++++++++++++++++-
- .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 ++
- 3 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
-index 59172acb9738..292f533d8cf0 100644
---- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
-+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
-@@ -235,7 +235,7 @@ void komeda_crtc_handle_event(struct komeda_crtc   *kcrtc,
- 			crtc->state->event = NULL;
- 			drm_crtc_send_vblank_event(crtc, event);
- 		} else {
--			DRM_WARN("CRTC[%d]: FLIP happen but no pending commit.\n",
-+			DRM_WARN("CRTC[%d]: FLIP happened but no pending commit.\n",
- 				 drm_crtc_index(&kcrtc->base));
- 		}
- 		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-@@ -286,7 +286,7 @@ komeda_crtc_atomic_enable(struct drm_crtc *crtc,
- 	komeda_crtc_do_flush(crtc, old);
- }
- 
--static void
-+void
- komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
- 					 struct completion *input_flip_done)
- {
-diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-index 8b2be8a9a27d..c434fb43d82c 100644
---- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-@@ -69,6 +69,25 @@ static const struct drm_driver komeda_kms_driver = {
- 	.minor = 1,
- };
- 
-+static void komeda_kms_atomic_commit_hw_done(struct drm_atomic_state *state)
-+{
-+	struct drm_device *dev = state->dev;
-+	struct komeda_kms_dev *kms = to_kdev(dev);
-+	int i;
-+
-+	for (i = 0; i < kms->n_crtcs; i++) {
-+		struct komeda_crtc *kcrtc = &kms->crtcs[i];
-+
-+		if (kcrtc->base.state->active) {
-+			struct completion *flip_done = NULL;
-+			if (kcrtc->base.state->event)
-+				flip_done = kcrtc->base.state->event->base.completion;
-+			komeda_crtc_flush_and_wait_for_flip_done(kcrtc, flip_done);
-+		}
-+	}
-+	drm_atomic_helper_commit_hw_done(state);
-+}
-+
- static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
- {
- 	struct drm_device *dev = old_state->dev;
-@@ -81,7 +100,7 @@ static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
- 
- 	drm_atomic_helper_commit_modeset_enables(dev, old_state);
- 
--	drm_atomic_helper_commit_hw_done(old_state);
-+	komeda_kms_atomic_commit_hw_done(old_state);
- 
- 	drm_atomic_helper_wait_for_flip_done(dev, old_state);
- 
-diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
-index 456f3c435719..bf6e8fba5061 100644
---- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
-+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
-@@ -182,6 +182,8 @@ void komeda_kms_cleanup_private_objs(struct komeda_kms_dev *kms);
- 
- void komeda_crtc_handle_event(struct komeda_crtc   *kcrtc,
- 			      struct komeda_events *evts);
-+void komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
-+					      struct completion *input_flip_done);
- 
- struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev);
- void komeda_kms_detach(struct komeda_kms_dev *kms);
--- 
-2.25.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch
deleted file mode 100644
index f662fe4..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 97bdf703e47606d15cd04f1aa5490bcaed842ae3 Mon Sep 17 00:00:00 2001
-From: Tushar Khandelwal <tushar.khandelwal@arm.com>
-Date: Wed, 17 Jun 2020 10:49:26 +0000
-Subject: [PATCH 02/40] drm: arm: komeda: add RENDER capability to the device
- node
-
-this is required to make this driver work with android framework
-
-Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
-
-Upstream-Status: Inappropriate [Product specific configuration]
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-index 93b7f09b96ca..8b2be8a9a27d 100644
---- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
-@@ -58,7 +58,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
- }
- 
- static const struct drm_driver komeda_kms_driver = {
--	.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
-+	.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_RENDER,
- 	.lastclose			= drm_fb_helper_lastclose,
- 	DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(komeda_gem_cma_dumb_create),
- 	.fops = &komeda_cma_fops,
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0003-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0003-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch
deleted file mode 100644
index e6e1c00..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0003-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b9cf2d89db4fc10b930b8d8f8fce3a0d00fecf8 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 13 Jan 2022 20:14:25 +0000
-Subject: [PATCH 03/40] firmware: arm_ffa: Fix uuid argument passed to
- ffa_partition_probe
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ib2749ec3e02da5bb6d835f7dbf2d608c41fad1f2
-Upstream-Status: Backport [f3c45c045e25ed52461829d2ce07954f72b6ad15]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/firmware/arm_ffa/driver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
-index fc6d3b9bd472..d3d53fbd3d29 100644
---- a/drivers/firmware/arm_ffa/driver.c
-+++ b/drivers/firmware/arm_ffa/driver.c
-@@ -501,7 +501,7 @@ static int ffa_partition_info_get(const char *uuid_str,
- 		return -ENODEV;
- 	}
- 
--	count = ffa_partition_probe(&uuid_null, &pbuf);
-+	count = ffa_partition_probe(&uuid, &pbuf);
- 	if (count <= 0)
- 		return -ENOENT;
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0004-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0004-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch
deleted file mode 100644
index 6e11823..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0004-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9fe23341c66deefb1f953d7ca642f928d8a50c6e Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 13 Jan 2022 22:22:28 +0000
-Subject: [PATCH 04/40] firmware: arm_ffa: Add ffa_dev_get_drvdata
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Icd09d686cab9922563b1deda5276307ea5d94923
-Upstream-Status: Backport [498af8d1678ae2351218337b47bbf3cb0fc16821]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- include/linux/arm_ffa.h | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
-index f0cb5b72b87b..06dc83d38779 100644
---- a/include/linux/arm_ffa.h
-+++ b/include/linux/arm_ffa.h
-@@ -129,7 +129,12 @@ struct ffa_driver {
- 
- static inline void ffa_dev_set_drvdata(struct ffa_device *fdev, void *data)
- {
--	fdev->dev.driver_data = data;
-+	dev_set_drvdata(&fdev->dev, data);
-+}
-+
-+static inline void *ffa_dev_get_drvdata(struct ffa_device *fdev)
-+{
-+	return dev_get_drvdata(&fdev->dev);
- }
- 
- #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0005-firmware-arm_ffa-extern-ffa_bus_type.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0005-firmware-arm_ffa-extern-ffa_bus_type.patch
deleted file mode 100644
index 62e130c..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0005-firmware-arm_ffa-extern-ffa_bus_type.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 53e29fa837f36f3a699f7ada50dd08e43028a9c7 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 13 Jan 2022 22:23:52 +0000
-Subject: [PATCH 05/40] firmware: arm_ffa: extern ffa_bus_type
-
-extern ffa_bus_type so that SP driver can use it in bus_find_device call.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ib7a6a563aa35627a545f82c796816a5f72c80d70
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- include/linux/arm_ffa.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
-index 06dc83d38779..d5c0a0c37fbe 100644
---- a/include/linux/arm_ffa.h
-+++ b/include/linux/arm_ffa.h
-@@ -179,6 +179,8 @@ const struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev)
- #define ffa_unregister(driver) \
- 	ffa_driver_unregister(driver)
- 
-+extern struct bus_type ffa_bus_type;
-+
- /**
-  * module_ffa_driver() - Helper macro for registering a psa_ffa driver
-  * @__ffa_driver: ffa_driver structure
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0006-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0006-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch
deleted file mode 100644
index 5f076eb..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0006-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 47cd54d908380de17d84a852625ef3a1ff92f496 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 12:23:04 +0000
-Subject: [PATCH 06/40] firmware: arm_ffa: Fix FFA_MEM_SHARE and
- FFA_MEM_FRAG_TX
-
-FFA memory share on success might return FFA_MEM_FRAG_RX. In that case
-set handle from w1/w2 from FFA return value.
-
-FFA_MEM_FRAG_TX call will return FFA_SUCCESS for the last fragment, so
-check for this return code.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: I7ef44742d53a9e75d8587d1213be98a1352f16d4
-Upstream-Status: Backport [987756f67dee237ec35f3b249ab1ae25260c5340]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/firmware/arm_ffa/driver.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
-index d3d53fbd3d29..de6641912768 100644
---- a/drivers/firmware/arm_ffa/driver.c
-+++ b/drivers/firmware/arm_ffa/driver.c
-@@ -317,11 +317,15 @@ static int ffa_mem_first_frag(u32 func_id, phys_addr_t buf, u32 buf_sz,
- 	if (ret.a0 == FFA_ERROR)
- 		return ffa_to_linux_errno((int)ret.a2);
- 
--	if (ret.a0 != FFA_SUCCESS)
-+	if (ret.a0 != FFA_SUCCESS && ret.a0 != FFA_MEM_FRAG_RX)
- 		return -EOPNOTSUPP;
- 
--	if (handle)
--		*handle = PACK_HANDLE(ret.a2, ret.a3);
-+	if (handle) {
-+		if (ret.a0 == FFA_MEM_FRAG_RX)
-+			*handle = PACK_HANDLE(ret.a1, ret.a2);
-+		else
-+			*handle = PACK_HANDLE(ret.a2, ret.a3);
-+	}
- 
- 	return frag_len;
- }
-@@ -345,7 +349,7 @@ static int ffa_mem_next_frag(u64 handle, u32 frag_len)
- 	if (ret.a0 == FFA_ERROR)
- 		return ffa_to_linux_errno((int)ret.a2);
- 
--	if (ret.a0 != FFA_MEM_FRAG_RX)
-+	if (ret.a0 != FFA_SUCCESS && ret.a0 != FFA_MEM_FRAG_RX)
- 		return -EOPNOTSUPP;
- 
- 	return ret.a3;
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0007-Revert-optee-use-driver-internal-tee_context-for-som.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0007-Revert-optee-use-driver-internal-tee_context-for-som.patch
deleted file mode 100644
index f3cd0e8..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0007-Revert-optee-use-driver-internal-tee_context-for-som.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 96e0bd88e2fb4fcb1625240ef36bccf0383633f6 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Tue, 17 May 2022 16:53:56 +0100
-Subject: [PATCH 07/40] Revert "optee: use driver internal tee_context for some
- rpc"
-
-This reverts commit 2922aff4339712ef004451715e94bdbd55fe38ed.
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/core.c          | 8 --------
- drivers/tee/optee/optee_private.h | 2 --
- drivers/tee/optee/rpc.c           | 8 +++-----
- 3 files changed, 3 insertions(+), 15 deletions(-)
-
-diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
-index 50c0d839fe75..5363ebebfc35 100644
---- a/drivers/tee/optee/core.c
-+++ b/drivers/tee/optee/core.c
-@@ -588,7 +588,6 @@ static int optee_remove(struct platform_device *pdev)
- 	/* Unregister OP-TEE specific client devices on TEE bus */
- 	optee_unregister_devices();
- 
--	teedev_close_context(optee->ctx);
- 	/*
- 	 * Ask OP-TEE to free all cached shared memory objects to decrease
- 	 * reference counters and also avoid wild pointers in secure world
-@@ -634,7 +633,6 @@ static int optee_probe(struct platform_device *pdev)
- 	struct optee *optee = NULL;
- 	void *memremaped_shm = NULL;
- 	struct tee_device *teedev;
--	struct tee_context *ctx;
- 	u32 sec_caps;
- 	int rc;
- 
-@@ -721,12 +719,6 @@ static int optee_probe(struct platform_device *pdev)
- 	optee_supp_init(&optee->supp);
- 	optee->memremaped_shm = memremaped_shm;
- 	optee->pool = pool;
--	ctx = teedev_open(optee->teedev);
--	if (IS_ERR(ctx)) {
--		rc = PTR_ERR(ctx);
--		goto err;
--	}
--	optee->ctx = ctx;
- 
- 	/*
- 	 * Ensure that there are no pre-existing shm objects before enabling
-diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
-index ea09533e30cd..f6bb4a763ba9 100644
---- a/drivers/tee/optee/optee_private.h
-+++ b/drivers/tee/optee/optee_private.h
-@@ -70,7 +70,6 @@ struct optee_supp {
-  * struct optee - main service struct
-  * @supp_teedev:	supplicant device
-  * @teedev:		client device
-- * @ctx:		driver internal TEE context
-  * @invoke_fn:		function to issue smc or hvc
-  * @call_queue:		queue of threads waiting to call @invoke_fn
-  * @wait_queue:		queue of threads from secure world waiting for a
-@@ -88,7 +87,6 @@ struct optee {
- 	struct tee_device *supp_teedev;
- 	struct tee_device *teedev;
- 	optee_invoke_fn *invoke_fn;
--	struct tee_context *ctx;
- 	struct optee_call_queue call_queue;
- 	struct optee_wait_queue wait_queue;
- 	struct optee_supp supp;
-diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
-index 456833d82007..efbaff7ad7e5 100644
---- a/drivers/tee/optee/rpc.c
-+++ b/drivers/tee/optee/rpc.c
-@@ -285,7 +285,6 @@ static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
- }
- 
- static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
--					  struct optee *optee,
- 					  struct optee_msg_arg *arg,
- 					  struct optee_call_ctx *call_ctx)
- {
-@@ -315,8 +314,7 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
- 		shm = cmd_alloc_suppl(ctx, sz);
- 		break;
- 	case OPTEE_RPC_SHM_TYPE_KERNEL:
--		shm = tee_shm_alloc(optee->ctx, sz,
--				    TEE_SHM_MAPPED | TEE_SHM_PRIV);
-+		shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
- 		break;
- 	default:
- 		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-@@ -473,7 +471,7 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
- 		break;
- 	case OPTEE_RPC_CMD_SHM_ALLOC:
- 		free_pages_list(call_ctx);
--		handle_rpc_func_cmd_shm_alloc(ctx, optee, arg, call_ctx);
-+		handle_rpc_func_cmd_shm_alloc(ctx, arg, call_ctx);
- 		break;
- 	case OPTEE_RPC_CMD_SHM_FREE:
- 		handle_rpc_func_cmd_shm_free(ctx, arg);
-@@ -504,7 +502,7 @@ void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
- 
- 	switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
- 	case OPTEE_SMC_RPC_FUNC_ALLOC:
--		shm = tee_shm_alloc(optee->ctx, param->a1,
-+		shm = tee_shm_alloc(ctx, param->a1,
- 				    TEE_SHM_MAPPED | TEE_SHM_PRIV);
- 		if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
- 			reg_pair_from_64(&param->a1, &param->a2, pa);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0008-tee-add-sec_world_id-to-struct-tee_shm.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0008-tee-add-sec_world_id-to-struct-tee_shm.patch
deleted file mode 100644
index 2a22b10..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0008-tee-add-sec_world_id-to-struct-tee_shm.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 04f76b1e265b37ab8a3acf4bbf64d1efd69a6c73 Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Thu, 25 Mar 2021 15:08:44 +0100
-Subject: [PATCH 08/40] tee: add sec_world_id to struct tee_shm
-
-Adds sec_world_id to struct tee_shm which describes a shared memory
-object. sec_world_id can be used by a driver to store an id assigned by
-secure world.
-
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [9028b2463c1ea96f51c3ba53e2479346019ff6ad]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- include/linux/tee_drv.h | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
-index 38b701b7af4c..5e1533ee3785 100644
---- a/include/linux/tee_drv.h
-+++ b/include/linux/tee_drv.h
-@@ -197,7 +197,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method,
-  * @num_pages:	number of locked pages
-  * @refcount:	reference counter
-  * @flags:	defined by TEE_SHM_* in tee_drv.h
-- * @id:		unique id of a shared memory object on this device
-+ * @id:		unique id of a shared memory object on this device, shared
-+ *		with user space
-+ * @sec_world_id:
-+ *		secure world assigned id of this shared memory object, not
-+ *		used by all drivers
-  *
-  * This pool is only supposed to be accessed directly from the TEE
-  * subsystem and from drivers that implements their own shm pool manager.
-@@ -213,6 +217,7 @@ struct tee_shm {
- 	refcount_t refcount;
- 	u32 flags;
- 	int id;
-+	u64 sec_world_id;
- };
- 
- /**
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0009-optee-simplify-optee_release.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0009-optee-simplify-optee_release.patch
deleted file mode 100644
index 32e05ed..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0009-optee-simplify-optee_release.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 5a2565d002084a4c6b80329a4a23cb6c98c4f344 Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Thu, 25 Mar 2021 15:08:46 +0100
-Subject: [PATCH 09/40] optee: simplify optee_release()
-
-Simplifies optee_release() with a new helper function,
-optee_close_session_helper() which has been factored out from
-optee_close_session().
-
-A separate optee_release_supp() is added for the supplicant device.
-
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [c0ab6db39a908d86ed44e8a5632548e2ec1b4dca]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/call.c          | 31 ++++++++++-------
- drivers/tee/optee/core.c          | 56 +++++++++++--------------------
- drivers/tee/optee/optee_private.h |  1 +
- 3 files changed, 39 insertions(+), 49 deletions(-)
-
-diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
-index 945f03da0223..103976df2062 100644
---- a/drivers/tee/optee/call.c
-+++ b/drivers/tee/optee/call.c
-@@ -288,12 +288,28 @@ int optee_open_session(struct tee_context *ctx,
- 	return rc;
- }
- 
--int optee_close_session(struct tee_context *ctx, u32 session)
-+int optee_close_session_helper(struct tee_context *ctx, u32 session)
- {
--	struct optee_context_data *ctxdata = ctx->data;
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *msg_arg;
- 	phys_addr_t msg_parg;
-+
-+	shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
-+	if (IS_ERR(shm))
-+		return PTR_ERR(shm);
-+
-+	msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION;
-+	msg_arg->session = session;
-+	optee_do_call_with_arg(ctx, msg_parg);
-+
-+	tee_shm_free(shm);
-+
-+	return 0;
-+}
-+
-+int optee_close_session(struct tee_context *ctx, u32 session)
-+{
-+	struct optee_context_data *ctxdata = ctx->data;
- 	struct optee_session *sess;
- 
- 	/* Check that the session is valid and remove it from the list */
-@@ -306,16 +322,7 @@ int optee_close_session(struct tee_context *ctx, u32 session)
- 		return -EINVAL;
- 	kfree(sess);
- 
--	shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
--	if (IS_ERR(shm))
--		return PTR_ERR(shm);
--
--	msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION;
--	msg_arg->session = session;
--	optee_do_call_with_arg(ctx, msg_parg);
--
--	tee_shm_free(shm);
--	return 0;
-+	return optee_close_session_helper(ctx, session);
- }
- 
- int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
-diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
-index 5363ebebfc35..79f67a79e7b7 100644
---- a/drivers/tee/optee/core.c
-+++ b/drivers/tee/optee/core.c
-@@ -264,60 +264,42 @@ static int optee_open(struct tee_context *ctx)
- 	return 0;
- }
- 
--static void optee_release(struct tee_context *ctx)
-+static void optee_release_helper(struct tee_context *ctx,
-+				 int (*close_session)(struct tee_context *ctx,
-+						      u32 session))
- {
- 	struct optee_context_data *ctxdata = ctx->data;
--	struct tee_device *teedev = ctx->teedev;
--	struct optee *optee = tee_get_drvdata(teedev);
--	struct tee_shm *shm;
--	struct optee_msg_arg *arg = NULL;
--	phys_addr_t parg;
- 	struct optee_session *sess;
- 	struct optee_session *sess_tmp;
- 
- 	if (!ctxdata)
- 		return;
- 
--	shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg),
--			    TEE_SHM_MAPPED | TEE_SHM_PRIV);
--	if (!IS_ERR(shm)) {
--		arg = tee_shm_get_va(shm, 0);
--		/*
--		 * If va2pa fails for some reason, we can't call into
--		 * secure world, only free the memory. Secure OS will leak
--		 * sessions and finally refuse more sessions, but we will
--		 * at least let normal world reclaim its memory.
--		 */
--		if (!IS_ERR(arg))
--			if (tee_shm_va2pa(shm, arg, &parg))
--				arg = NULL; /* prevent usage of parg below */
--	}
--
- 	list_for_each_entry_safe(sess, sess_tmp, &ctxdata->sess_list,
- 				 list_node) {
- 		list_del(&sess->list_node);
--		if (!IS_ERR_OR_NULL(arg)) {
--			memset(arg, 0, sizeof(*arg));
--			arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION;
--			arg->session = sess->session_id;
--			optee_do_call_with_arg(ctx, parg);
--		}
-+		close_session(ctx, sess->session_id);
- 		kfree(sess);
- 	}
- 	kfree(ctxdata);
-+	ctx->data = NULL;
-+}
- 
--	if (!IS_ERR(shm))
--		tee_shm_free(shm);
-+static void optee_release(struct tee_context *ctx)
-+{
-+	optee_release_helper(ctx, optee_close_session_helper);
-+}
- 
--	ctx->data = NULL;
-+static void optee_release_supp(struct tee_context *ctx)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 
--	if (teedev == optee->supp_teedev) {
--		if (optee->scan_bus_wq) {
--			destroy_workqueue(optee->scan_bus_wq);
--			optee->scan_bus_wq = NULL;
--		}
--		optee_supp_release(&optee->supp);
-+	optee_release_helper(ctx, optee_close_session_helper);
-+	if (optee->scan_bus_wq) {
-+		destroy_workqueue(optee->scan_bus_wq);
-+		optee->scan_bus_wq = NULL;
- 	}
-+	optee_supp_release(&optee->supp);
- }
- 
- static const struct tee_driver_ops optee_ops = {
-@@ -341,7 +323,7 @@ static const struct tee_desc optee_desc = {
- static const struct tee_driver_ops optee_supp_ops = {
- 	.get_version = optee_get_version,
- 	.open = optee_open,
--	.release = optee_release,
-+	.release = optee_release_supp,
- 	.supp_recv = optee_supp_recv,
- 	.supp_send = optee_supp_send,
- 	.shm_register = optee_shm_register_supp,
-diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
-index f6bb4a763ba9..a55793f9f6eb 100644
---- a/drivers/tee/optee/optee_private.h
-+++ b/drivers/tee/optee/optee_private.h
-@@ -152,6 +152,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg);
- int optee_open_session(struct tee_context *ctx,
- 		       struct tee_ioctl_open_session_arg *arg,
- 		       struct tee_param *param);
-+int optee_close_session_helper(struct tee_context *ctx, u32 session);
- int optee_close_session(struct tee_context *ctx, u32 session);
- int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 		      struct tee_param *param);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0010-optee-refactor-driver-with-internal-callbacks.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0010-optee-refactor-driver-with-internal-callbacks.patch
deleted file mode 100644
index 8dfb68d..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0010-optee-refactor-driver-with-internal-callbacks.patch
+++ /dev/null
@@ -1,722 +0,0 @@
-From cbb24d5b6b4e6704da79bb3df76179a88a6ee14f Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Thu, 25 Mar 2021 15:08:50 +0100
-Subject: [PATCH 10/40] optee: refactor driver with internal callbacks
-
-The OP-TEE driver is refactored with three internal callbacks replacing
-direct calls to optee_from_msg_param(), optee_to_msg_param() and
-optee_do_call_with_arg().
-
-These functions a central to communicating with OP-TEE in secure world
-by using the SMC Calling Convention directly.
-
-This refactoring makes room for using other primitives to communicate
-with OP-TEE in secure world while being able to reuse as much as
-possible from the present driver.
-
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [4602c5842f649da2fbd2cea3560af750cfbd59e3]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/call.c          |  86 +++++++++--------
- drivers/tee/optee/core.c          | 148 ++++++++++++++++++++----------
- drivers/tee/optee/optee_private.h |  35 +++++--
- drivers/tee/optee/rpc.c           |  19 ++--
- 4 files changed, 182 insertions(+), 106 deletions(-)
-
-diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
-index 103976df2062..ddedde45f1ee 100644
---- a/drivers/tee/optee/call.c
-+++ b/drivers/tee/optee/call.c
-@@ -1,6 +1,6 @@
- // SPDX-License-Identifier: GPL-2.0-only
- /*
-- * Copyright (c) 2015, Linaro Limited
-+ * Copyright (c) 2015-2021, Linaro Limited
-  */
- #include <linux/arm-smccc.h>
- #include <linux/device.h>
-@@ -118,20 +118,25 @@ static struct optee_session *find_session(struct optee_context_data *ctxdata,
- /**
-  * optee_do_call_with_arg() - Do an SMC to OP-TEE in secure world
-  * @ctx:	calling context
-- * @parg:	physical address of message to pass to secure world
-+ * @arg:	shared memory holding the message to pass to secure world
-  *
-  * Does and SMC to OP-TEE in secure world and handles eventual resulting
-  * Remote Procedure Calls (RPC) from OP-TEE.
-  *
-  * Returns return code from secure world, 0 is OK
-  */
--u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
-+int optee_do_call_with_arg(struct tee_context *ctx, struct tee_shm *arg)
- {
- 	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_call_waiter w;
- 	struct optee_rpc_param param = { };
- 	struct optee_call_ctx call_ctx = { };
--	u32 ret;
-+	phys_addr_t parg;
-+	int rc;
-+
-+	rc = tee_shm_get_pa(arg, 0, &parg);
-+	if (rc)
-+		return rc;
- 
- 	param.a0 = OPTEE_SMC_CALL_WITH_ARG;
- 	reg_pair_from_64(&param.a1, &param.a2, parg);
-@@ -160,7 +165,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
- 			param.a3 = res.a3;
- 			optee_handle_rpc(ctx, &param, &call_ctx);
- 		} else {
--			ret = res.a0;
-+			rc = res.a0;
- 			break;
- 		}
- 	}
-@@ -172,14 +177,12 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
- 	 */
- 	optee_cq_wait_final(&optee->call_queue, &w);
- 
--	return ret;
-+	return rc;
- }
- 
- static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
--				   struct optee_msg_arg **msg_arg,
--				   phys_addr_t *msg_parg)
-+				   struct optee_msg_arg **msg_arg)
- {
--	int rc;
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *ma;
- 
-@@ -190,22 +193,13 @@ static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
- 
- 	ma = tee_shm_get_va(shm, 0);
- 	if (IS_ERR(ma)) {
--		rc = PTR_ERR(ma);
--		goto out;
-+		tee_shm_free(shm);
-+		return (void *)ma;
- 	}
- 
--	rc = tee_shm_get_pa(shm, 0, msg_parg);
--	if (rc)
--		goto out;
--
- 	memset(ma, 0, OPTEE_MSG_GET_ARG_SIZE(num_params));
- 	ma->num_params = num_params;
- 	*msg_arg = ma;
--out:
--	if (rc) {
--		tee_shm_free(shm);
--		return ERR_PTR(rc);
--	}
- 
- 	return shm;
- }
-@@ -214,16 +208,16 @@ int optee_open_session(struct tee_context *ctx,
- 		       struct tee_ioctl_open_session_arg *arg,
- 		       struct tee_param *param)
- {
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_context_data *ctxdata = ctx->data;
- 	int rc;
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *msg_arg;
--	phys_addr_t msg_parg;
- 	struct optee_session *sess = NULL;
- 	uuid_t client_uuid;
- 
- 	/* +2 for the meta parameters added below */
--	shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg);
-+	shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
-@@ -247,7 +241,8 @@ int optee_open_session(struct tee_context *ctx,
- 		goto out;
- 	export_uuid(msg_arg->params[1].u.octets, &client_uuid);
- 
--	rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param);
-+	rc = optee->ops->to_msg_param(optee, msg_arg->params + 2,
-+				      arg->num_params, param);
- 	if (rc)
- 		goto out;
- 
-@@ -257,7 +252,7 @@ int optee_open_session(struct tee_context *ctx,
- 		goto out;
- 	}
- 
--	if (optee_do_call_with_arg(ctx, msg_parg)) {
-+	if (optee->ops->do_call_with_arg(ctx, shm)) {
- 		msg_arg->ret = TEEC_ERROR_COMMUNICATION;
- 		msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
- 	}
-@@ -272,7 +267,8 @@ int optee_open_session(struct tee_context *ctx,
- 		kfree(sess);
- 	}
- 
--	if (optee_from_msg_param(param, arg->num_params, msg_arg->params + 2)) {
-+	if (optee->ops->from_msg_param(optee, param, arg->num_params,
-+				       msg_arg->params + 2)) {
- 		arg->ret = TEEC_ERROR_COMMUNICATION;
- 		arg->ret_origin = TEEC_ORIGIN_COMMS;
- 		/* Close session again to avoid leakage */
-@@ -291,16 +287,16 @@ int optee_open_session(struct tee_context *ctx,
- int optee_close_session_helper(struct tee_context *ctx, u32 session)
- {
- 	struct tee_shm *shm;
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_msg_arg *msg_arg;
--	phys_addr_t msg_parg;
- 
--	shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
-+	shm = get_msg_arg(ctx, 0, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
- 	msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION;
- 	msg_arg->session = session;
--	optee_do_call_with_arg(ctx, msg_parg);
-+	optee->ops->do_call_with_arg(ctx, shm);
- 
- 	tee_shm_free(shm);
- 
-@@ -328,10 +324,10 @@ int optee_close_session(struct tee_context *ctx, u32 session)
- int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 		      struct tee_param *param)
- {
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_context_data *ctxdata = ctx->data;
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *msg_arg;
--	phys_addr_t msg_parg;
- 	struct optee_session *sess;
- 	int rc;
- 
-@@ -342,7 +338,7 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 	if (!sess)
- 		return -EINVAL;
- 
--	shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg);
-+	shm = get_msg_arg(ctx, arg->num_params, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 	msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND;
-@@ -350,16 +346,18 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 	msg_arg->session = arg->session;
- 	msg_arg->cancel_id = arg->cancel_id;
- 
--	rc = optee_to_msg_param(msg_arg->params, arg->num_params, param);
-+	rc = optee->ops->to_msg_param(optee, msg_arg->params, arg->num_params,
-+				      param);
- 	if (rc)
- 		goto out;
- 
--	if (optee_do_call_with_arg(ctx, msg_parg)) {
-+	if (optee->ops->do_call_with_arg(ctx, shm)) {
- 		msg_arg->ret = TEEC_ERROR_COMMUNICATION;
- 		msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
- 	}
- 
--	if (optee_from_msg_param(param, arg->num_params, msg_arg->params)) {
-+	if (optee->ops->from_msg_param(optee, param, arg->num_params,
-+				       msg_arg->params)) {
- 		msg_arg->ret = TEEC_ERROR_COMMUNICATION;
- 		msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
- 	}
-@@ -373,10 +371,10 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 
- int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
- {
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_context_data *ctxdata = ctx->data;
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *msg_arg;
--	phys_addr_t msg_parg;
- 	struct optee_session *sess;
- 
- 	/* Check that the session is valid */
-@@ -386,14 +384,14 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
- 	if (!sess)
- 		return -EINVAL;
- 
--	shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
-+	shm = get_msg_arg(ctx, 0, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
- 	msg_arg->cmd = OPTEE_MSG_CMD_CANCEL;
- 	msg_arg->session = session;
- 	msg_arg->cancel_id = cancel_id;
--	optee_do_call_with_arg(ctx, msg_parg);
-+	optee->ops->do_call_with_arg(ctx, shm);
- 
- 	tee_shm_free(shm);
- 	return 0;
-@@ -622,10 +620,10 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
- 		       struct page **pages, size_t num_pages,
- 		       unsigned long start)
- {
--	struct tee_shm *shm_arg = NULL;
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_msg_arg *msg_arg;
-+	struct tee_shm *shm_arg;
- 	u64 *pages_list;
--	phys_addr_t msg_parg;
- 	int rc;
- 
- 	if (!num_pages)
-@@ -639,7 +637,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
- 	if (!pages_list)
- 		return -ENOMEM;
- 
--	shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg);
-+	shm_arg = get_msg_arg(ctx, 1, &msg_arg);
- 	if (IS_ERR(shm_arg)) {
- 		rc = PTR_ERR(shm_arg);
- 		goto out;
-@@ -660,7 +658,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
- 	msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) |
- 	  (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
- 
--	if (optee_do_call_with_arg(ctx, msg_parg) ||
-+	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
- 	    msg_arg->ret != TEEC_SUCCESS)
- 		rc = -EINVAL;
- 
-@@ -672,12 +670,12 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
- 
- int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
- {
--	struct tee_shm *shm_arg;
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_msg_arg *msg_arg;
--	phys_addr_t msg_parg;
-+	struct tee_shm *shm_arg;
- 	int rc = 0;
- 
--	shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg);
-+	shm_arg = get_msg_arg(ctx, 1, &msg_arg);
- 	if (IS_ERR(shm_arg))
- 		return PTR_ERR(shm_arg);
- 
-@@ -686,7 +684,7 @@ int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
- 	msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
- 	msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
- 
--	if (optee_do_call_with_arg(ctx, msg_parg) ||
-+	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
- 	    msg_arg->ret != TEEC_SUCCESS)
- 		rc = -EINVAL;
- 	tee_shm_free(shm_arg);
-diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
-index 79f67a79e7b7..26492d3115f5 100644
---- a/drivers/tee/optee/core.c
-+++ b/drivers/tee/optee/core.c
-@@ -1,6 +1,6 @@
- // SPDX-License-Identifier: GPL-2.0-only
- /*
-- * Copyright (c) 2015, Linaro Limited
-+ * Copyright (c) 2015-2021, Linaro Limited
-  */
- 
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-@@ -27,21 +27,87 @@
- 
- #define OPTEE_SHM_NUM_PRIV_PAGES	CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
- 
-+static void from_msg_param_value(struct tee_param *p, u32 attr,
-+				 const struct optee_msg_param *mp)
-+{
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
-+	p->u.value.a = mp->u.value.a;
-+	p->u.value.b = mp->u.value.b;
-+	p->u.value.c = mp->u.value.c;
-+}
-+
-+static int from_msg_param_tmp_mem(struct tee_param *p, u32 attr,
-+				  const struct optee_msg_param *mp)
-+{
-+	struct tee_shm *shm;
-+	phys_addr_t pa;
-+	int rc;
-+
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT;
-+	p->u.memref.size = mp->u.tmem.size;
-+	shm = (struct tee_shm *)(unsigned long)mp->u.tmem.shm_ref;
-+	if (!shm) {
-+		p->u.memref.shm_offs = 0;
-+		p->u.memref.shm = NULL;
-+		return 0;
-+	}
-+
-+	rc = tee_shm_get_pa(shm, 0, &pa);
-+	if (rc)
-+		return rc;
-+
-+	p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
-+	p->u.memref.shm = shm;
-+
-+	/* Check that the memref is covered by the shm object */
-+	if (p->u.memref.size) {
-+		size_t o = p->u.memref.shm_offs +
-+			   p->u.memref.size - 1;
-+
-+		rc = tee_shm_get_pa(shm, o, NULL);
-+		if (rc)
-+			return rc;
-+	}
-+
-+	return 0;
-+}
-+
-+static void from_msg_param_reg_mem(struct tee_param *p, u32 attr,
-+				   const struct optee_msg_param *mp)
-+{
-+	struct tee_shm *shm;
-+
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
-+	p->u.memref.size = mp->u.rmem.size;
-+	shm = (struct tee_shm *)(unsigned long)mp->u.rmem.shm_ref;
-+
-+	if (shm) {
-+		p->u.memref.shm_offs = mp->u.rmem.offs;
-+		p->u.memref.shm = shm;
-+	} else {
-+		p->u.memref.shm_offs = 0;
-+		p->u.memref.shm = NULL;
-+	}
-+}
-+
- /**
-  * optee_from_msg_param() - convert from OPTEE_MSG parameters to
-  *			    struct tee_param
-+ * @optee:	main service struct
-  * @params:	subsystem internal parameter representation
-  * @num_params:	number of elements in the parameter arrays
-  * @msg_params:	OPTEE_MSG parameters
-  * Returns 0 on success or <0 on failure
-  */
--int optee_from_msg_param(struct tee_param *params, size_t num_params,
--			 const struct optee_msg_param *msg_params)
-+static int optee_from_msg_param(struct optee *optee, struct tee_param *params,
-+				size_t num_params,
-+				const struct optee_msg_param *msg_params)
- {
- 	int rc;
- 	size_t n;
--	struct tee_shm *shm;
--	phys_addr_t pa;
- 
- 	for (n = 0; n < num_params; n++) {
- 		struct tee_param *p = params + n;
-@@ -56,48 +122,19 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
- 		case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
- 		case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
- 		case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
--			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT +
--				  attr - OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
--			p->u.value.a = mp->u.value.a;
--			p->u.value.b = mp->u.value.b;
--			p->u.value.c = mp->u.value.c;
-+			from_msg_param_value(p, attr, mp);
- 			break;
- 		case OPTEE_MSG_ATTR_TYPE_TMEM_INPUT:
- 		case OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT:
- 		case OPTEE_MSG_ATTR_TYPE_TMEM_INOUT:
--			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
--				  attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT;
--			p->u.memref.size = mp->u.tmem.size;
--			shm = (struct tee_shm *)(unsigned long)
--				mp->u.tmem.shm_ref;
--			if (!shm) {
--				p->u.memref.shm_offs = 0;
--				p->u.memref.shm = NULL;
--				break;
--			}
--			rc = tee_shm_get_pa(shm, 0, &pa);
-+			rc = from_msg_param_tmp_mem(p, attr, mp);
- 			if (rc)
- 				return rc;
--			p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
--			p->u.memref.shm = shm;
- 			break;
- 		case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
- 		case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
- 		case OPTEE_MSG_ATTR_TYPE_RMEM_INOUT:
--			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
--				  attr - OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
--			p->u.memref.size = mp->u.rmem.size;
--			shm = (struct tee_shm *)(unsigned long)
--				mp->u.rmem.shm_ref;
--
--			if (!shm) {
--				p->u.memref.shm_offs = 0;
--				p->u.memref.shm = NULL;
--				break;
--			}
--			p->u.memref.shm_offs = mp->u.rmem.offs;
--			p->u.memref.shm = shm;
--
-+			from_msg_param_reg_mem(p, attr, mp);
- 			break;
- 
- 		default:
-@@ -107,6 +144,16 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
- 	return 0;
- }
- 
-+static void to_msg_param_value(struct optee_msg_param *mp,
-+			       const struct tee_param *p)
-+{
-+	mp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + p->attr -
-+		   TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT;
-+	mp->u.value.a = p->u.value.a;
-+	mp->u.value.b = p->u.value.b;
-+	mp->u.value.c = p->u.value.c;
-+}
-+
- static int to_msg_param_tmp_mem(struct optee_msg_param *mp,
- 				const struct tee_param *p)
- {
-@@ -149,13 +196,15 @@ static int to_msg_param_reg_mem(struct optee_msg_param *mp,
- 
- /**
-  * optee_to_msg_param() - convert from struct tee_params to OPTEE_MSG parameters
-+ * @optee:	main service struct
-  * @msg_params:	OPTEE_MSG parameters
-  * @num_params:	number of elements in the parameter arrays
-  * @params:	subsystem itnernal parameter representation
-  * Returns 0 on success or <0 on failure
-  */
--int optee_to_msg_param(struct optee_msg_param *msg_params, size_t num_params,
--		       const struct tee_param *params)
-+static int optee_to_msg_param(struct optee *optee,
-+			      struct optee_msg_param *msg_params,
-+			      size_t num_params, const struct tee_param *params)
- {
- 	int rc;
- 	size_t n;
-@@ -172,11 +221,7 @@ int optee_to_msg_param(struct optee_msg_param *msg_params, size_t num_params,
- 		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
- 		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
- 		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
--			mp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + p->attr -
--				   TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT;
--			mp->u.value.a = p->u.value.a;
--			mp->u.value.b = p->u.value.b;
--			mp->u.value.c = p->u.value.c;
-+			to_msg_param_value(mp, p);
- 			break;
- 		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
- 		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
-@@ -302,7 +347,7 @@ static void optee_release_supp(struct tee_context *ctx)
- 	optee_supp_release(&optee->supp);
- }
- 
--static const struct tee_driver_ops optee_ops = {
-+static const struct tee_driver_ops optee_clnt_ops = {
- 	.get_version = optee_get_version,
- 	.open = optee_open,
- 	.release = optee_release,
-@@ -314,9 +359,9 @@ static const struct tee_driver_ops optee_ops = {
- 	.shm_unregister = optee_shm_unregister,
- };
- 
--static const struct tee_desc optee_desc = {
-+static const struct tee_desc optee_clnt_desc = {
- 	.name = DRIVER_NAME "-clnt",
--	.ops = &optee_ops,
-+	.ops = &optee_clnt_ops,
- 	.owner = THIS_MODULE,
- };
- 
-@@ -337,6 +382,12 @@ static const struct tee_desc optee_supp_desc = {
- 	.flags = TEE_DESC_PRIVILEGED,
- };
- 
-+static const struct optee_ops optee_ops = {
-+	.do_call_with_arg = optee_do_call_with_arg,
-+	.to_msg_param = optee_to_msg_param,
-+	.from_msg_param = optee_from_msg_param,
-+};
-+
- static bool optee_msg_api_uid_is_optee_api(optee_invoke_fn *invoke_fn)
- {
- 	struct arm_smccc_res res;
-@@ -670,10 +721,11 @@ static int optee_probe(struct platform_device *pdev)
- 		goto err;
- 	}
- 
-+	optee->ops = &optee_ops;
- 	optee->invoke_fn = invoke_fn;
- 	optee->sec_caps = sec_caps;
- 
--	teedev = tee_device_alloc(&optee_desc, NULL, pool, optee);
-+	teedev = tee_device_alloc(&optee_clnt_desc, NULL, pool, optee);
- 	if (IS_ERR(teedev)) {
- 		rc = PTR_ERR(teedev);
- 		goto err;
-diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
-index a55793f9f6eb..beca97017996 100644
---- a/drivers/tee/optee/optee_private.h
-+++ b/drivers/tee/optee/optee_private.h
-@@ -1,6 +1,6 @@
- /* SPDX-License-Identifier: GPL-2.0-only */
- /*
-- * Copyright (c) 2015, Linaro Limited
-+ * Copyright (c) 2015-2021, Linaro Limited
-  */
- 
- #ifndef OPTEE_PRIVATE_H
-@@ -66,9 +66,34 @@ struct optee_supp {
- 	struct completion reqs_c;
- };
- 
-+struct optee;
-+
-+/**
-+ * struct optee_ops - OP-TEE driver internal operations
-+ * @do_call_with_arg:	enters OP-TEE in secure world
-+ * @to_msg_param:	converts from struct tee_param to OPTEE_MSG parameters
-+ * @from_msg_param:	converts from OPTEE_MSG parameters to struct tee_param
-+ *
-+ * These OPs are only supposed to be used internally in the OP-TEE driver
-+ * as a way of abstracting the different methogs of entering OP-TEE in
-+ * secure world.
-+ */
-+struct optee_ops {
-+	int (*do_call_with_arg)(struct tee_context *ctx,
-+				struct tee_shm *shm_arg);
-+	int (*to_msg_param)(struct optee *optee,
-+			    struct optee_msg_param *msg_params,
-+			    size_t num_params, const struct tee_param *params);
-+	int (*from_msg_param)(struct optee *optee, struct tee_param *params,
-+			      size_t num_params,
-+			      const struct optee_msg_param *msg_params);
-+};
-+
- /**
-  * struct optee - main service struct
-  * @supp_teedev:	supplicant device
-+ * @ops:		internal callbacks for different ways to reach secure
-+ *			world
-  * @teedev:		client device
-  * @invoke_fn:		function to issue smc or hvc
-  * @call_queue:		queue of threads waiting to call @invoke_fn
-@@ -86,6 +111,7 @@ struct optee_supp {
- struct optee {
- 	struct tee_device *supp_teedev;
- 	struct tee_device *teedev;
-+	const struct optee_ops *ops;
- 	optee_invoke_fn *invoke_fn;
- 	struct optee_call_queue call_queue;
- 	struct optee_wait_queue wait_queue;
-@@ -148,7 +174,7 @@ int optee_supp_recv(struct tee_context *ctx, u32 *func, u32 *num_params,
- int optee_supp_send(struct tee_context *ctx, u32 ret, u32 num_params,
- 		    struct tee_param *param);
- 
--u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg);
-+int optee_do_call_with_arg(struct tee_context *ctx, struct tee_shm *arg);
- int optee_open_session(struct tee_context *ctx,
- 		       struct tee_ioctl_open_session_arg *arg,
- 		       struct tee_param *param);
-@@ -172,11 +198,6 @@ int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
- 			    unsigned long start);
- int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
- 
--int optee_from_msg_param(struct tee_param *params, size_t num_params,
--			 const struct optee_msg_param *msg_params);
--int optee_to_msg_param(struct optee_msg_param *msg_params, size_t num_params,
--		       const struct tee_param *params);
--
- u64 *optee_allocate_pages_list(size_t num_entries);
- void optee_free_pages_list(void *array, size_t num_entries);
- void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
-diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
-index efbaff7ad7e5..309258d47790 100644
---- a/drivers/tee/optee/rpc.c
-+++ b/drivers/tee/optee/rpc.c
-@@ -1,6 +1,6 @@
- // SPDX-License-Identifier: GPL-2.0-only
- /*
-- * Copyright (c) 2015-2016, Linaro Limited
-+ * Copyright (c) 2015-2021, Linaro Limited
-  */
- 
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-@@ -55,6 +55,7 @@ static void handle_rpc_func_cmd_get_time(struct optee_msg_arg *arg)
- static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
- 					     struct optee_msg_arg *arg)
- {
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct tee_param *params;
- 	struct i2c_adapter *adapter;
- 	struct i2c_msg msg = { };
-@@ -79,7 +80,8 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
- 		return;
- 	}
- 
--	if (optee_from_msg_param(params, arg->num_params, arg->params))
-+	if (optee->ops->from_msg_param(optee, params, arg->num_params,
-+				       arg->params))
- 		goto bad;
- 
- 	for (i = 0; i < arg->num_params; i++) {
-@@ -122,7 +124,8 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
- 		arg->ret = TEEC_ERROR_COMMUNICATION;
- 	} else {
- 		params[3].u.value.a = msg.len;
--		if (optee_to_msg_param(arg->params, arg->num_params, params))
-+		if (optee->ops->to_msg_param(optee, arg->params,
-+					     arg->num_params, params))
- 			arg->ret = TEEC_ERROR_BAD_PARAMETERS;
- 		else
- 			arg->ret = TEEC_SUCCESS;
-@@ -234,7 +237,7 @@ static void handle_rpc_func_cmd_wait(struct optee_msg_arg *arg)
- 	arg->ret = TEEC_ERROR_BAD_PARAMETERS;
- }
- 
--static void handle_rpc_supp_cmd(struct tee_context *ctx,
-+static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee,
- 				struct optee_msg_arg *arg)
- {
- 	struct tee_param *params;
-@@ -248,14 +251,16 @@ static void handle_rpc_supp_cmd(struct tee_context *ctx,
- 		return;
- 	}
- 
--	if (optee_from_msg_param(params, arg->num_params, arg->params)) {
-+	if (optee->ops->from_msg_param(optee, params, arg->num_params,
-+				       arg->params)) {
- 		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
- 		goto out;
- 	}
- 
- 	arg->ret = optee_supp_thrd_req(ctx, arg->cmd, arg->num_params, params);
- 
--	if (optee_to_msg_param(arg->params, arg->num_params, params))
-+	if (optee->ops->to_msg_param(optee, arg->params, arg->num_params,
-+				     params))
- 		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
- out:
- 	kfree(params);
-@@ -480,7 +485,7 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
- 		handle_rpc_func_cmd_i2c_transfer(ctx, arg);
- 		break;
- 	default:
--		handle_rpc_supp_cmd(ctx, arg);
-+		handle_rpc_supp_cmd(ctx, optee, arg);
- 	}
- }
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0011-optee-isolate-smc-abi.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0011-optee-isolate-smc-abi.patch
deleted file mode 100644
index 15270bb..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0011-optee-isolate-smc-abi.patch
+++ /dev/null
@@ -1,3168 +0,0 @@
-From bfcb795efc2d07bf99fd6c6e4f43951bc7354d5e Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Wed, 21 Jul 2021 16:30:28 +0200
-Subject: [PATCH 11/40] optee: isolate smc abi
-
-Isolate the ABI based on raw SMCs. Code specific to the raw SMC ABI is
-moved into smc_abi.c. This makes room for other ABIs with a clear
-separation.
-
-The driver changes to use module_init()/module_exit() instead of
-module_platform_driver(). The platform_driver_register() and
-platform_driver_unregister() functions called directly to keep the same
-behavior. This is needed because module_platform_driver() is based on
-module_driver() which can only be used once in a module.
-
-A function optee_rpc_cmd() is factored out from the function
-handle_rpc_func_cmd() to handle the ABI independent part of RPC
-processing.
-
-This patch is not supposed to change the driver behavior, it's only a
-matter of reorganizing the code.
-
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [c51a564a5b48355f30309b84cdffe3f96d1ae0d3]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/Makefile        |    4 +-
- drivers/tee/optee/call.c          |  369 +-------
- drivers/tee/optee/core.c          |  721 ++-------------
- drivers/tee/optee/optee_private.h |  106 ++-
- drivers/tee/optee/rpc.c           |  218 +----
- drivers/tee/optee/shm_pool.h      |   14 -
- drivers/tee/optee/smc_abi.c       | 1361 +++++++++++++++++++++++++++++
- 7 files changed, 1506 insertions(+), 1287 deletions(-)
- delete mode 100644 drivers/tee/optee/shm_pool.h
- create mode 100644 drivers/tee/optee/smc_abi.c
-
-diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
-index 3aa33ea9e6a6..97ac3ab3e1c0 100644
---- a/drivers/tee/optee/Makefile
-+++ b/drivers/tee/optee/Makefile
-@@ -4,8 +4,8 @@ optee-objs += core.o
- optee-objs += call.o
- optee-objs += rpc.o
- optee-objs += supp.o
--optee-objs += shm_pool.o
- optee-objs += device.o
-+optee-objs += smc_abi.o
- 
- # for tracing framework to find optee_trace.h
--CFLAGS_call.o := -I$(src)
-+CFLAGS_smc_abi.o := -I$(src)
-diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
-index ddedde45f1ee..9ff4f0812825 100644
---- a/drivers/tee/optee/call.c
-+++ b/drivers/tee/optee/call.c
-@@ -2,28 +2,17 @@
- /*
-  * Copyright (c) 2015-2021, Linaro Limited
-  */
--#include <linux/arm-smccc.h>
- #include <linux/device.h>
- #include <linux/err.h>
- #include <linux/errno.h>
- #include <linux/mm.h>
--#include <linux/sched.h>
- #include <linux/slab.h>
- #include <linux/tee_drv.h>
- #include <linux/types.h>
--#include <linux/uaccess.h>
- #include "optee_private.h"
--#include "optee_smc.h"
--#define CREATE_TRACE_POINTS
--#include "optee_trace.h"
- 
--struct optee_call_waiter {
--	struct list_head list_node;
--	struct completion c;
--};
--
--static void optee_cq_wait_init(struct optee_call_queue *cq,
--			       struct optee_call_waiter *w)
-+void optee_cq_wait_init(struct optee_call_queue *cq,
-+			struct optee_call_waiter *w)
- {
- 	/*
- 	 * We're preparing to make a call to secure world. In case we can't
-@@ -47,8 +36,8 @@ static void optee_cq_wait_init(struct optee_call_queue *cq,
- 	mutex_unlock(&cq->mutex);
- }
- 
--static void optee_cq_wait_for_completion(struct optee_call_queue *cq,
--					 struct optee_call_waiter *w)
-+void optee_cq_wait_for_completion(struct optee_call_queue *cq,
-+				  struct optee_call_waiter *w)
- {
- 	wait_for_completion(&w->c);
- 
-@@ -74,8 +63,8 @@ static void optee_cq_complete_one(struct optee_call_queue *cq)
- 	}
- }
- 
--static void optee_cq_wait_final(struct optee_call_queue *cq,
--				struct optee_call_waiter *w)
-+void optee_cq_wait_final(struct optee_call_queue *cq,
-+			 struct optee_call_waiter *w)
- {
- 	/*
- 	 * We're done with the call to secure world. The thread in secure
-@@ -115,73 +104,8 @@ static struct optee_session *find_session(struct optee_context_data *ctxdata,
- 	return NULL;
- }
- 
--/**
-- * optee_do_call_with_arg() - Do an SMC to OP-TEE in secure world
-- * @ctx:	calling context
-- * @arg:	shared memory holding the message to pass to secure world
-- *
-- * Does and SMC to OP-TEE in secure world and handles eventual resulting
-- * Remote Procedure Calls (RPC) from OP-TEE.
-- *
-- * Returns return code from secure world, 0 is OK
-- */
--int optee_do_call_with_arg(struct tee_context *ctx, struct tee_shm *arg)
--{
--	struct optee *optee = tee_get_drvdata(ctx->teedev);
--	struct optee_call_waiter w;
--	struct optee_rpc_param param = { };
--	struct optee_call_ctx call_ctx = { };
--	phys_addr_t parg;
--	int rc;
--
--	rc = tee_shm_get_pa(arg, 0, &parg);
--	if (rc)
--		return rc;
--
--	param.a0 = OPTEE_SMC_CALL_WITH_ARG;
--	reg_pair_from_64(&param.a1, &param.a2, parg);
--	/* Initialize waiter */
--	optee_cq_wait_init(&optee->call_queue, &w);
--	while (true) {
--		struct arm_smccc_res res;
--
--		trace_optee_invoke_fn_begin(&param);
--		optee->invoke_fn(param.a0, param.a1, param.a2, param.a3,
--				 param.a4, param.a5, param.a6, param.a7,
--				 &res);
--		trace_optee_invoke_fn_end(&param, &res);
--
--		if (res.a0 == OPTEE_SMC_RETURN_ETHREAD_LIMIT) {
--			/*
--			 * Out of threads in secure world, wait for a thread
--			 * become available.
--			 */
--			optee_cq_wait_for_completion(&optee->call_queue, &w);
--		} else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
--			cond_resched();
--			param.a0 = res.a0;
--			param.a1 = res.a1;
--			param.a2 = res.a2;
--			param.a3 = res.a3;
--			optee_handle_rpc(ctx, &param, &call_ctx);
--		} else {
--			rc = res.a0;
--			break;
--		}
--	}
--
--	optee_rpc_finalize_call(&call_ctx);
--	/*
--	 * We're done with our thread in secure world, if there's any
--	 * thread waiters wake up one.
--	 */
--	optee_cq_wait_final(&optee->call_queue, &w);
--
--	return rc;
--}
--
--static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
--				   struct optee_msg_arg **msg_arg)
-+struct tee_shm *optee_get_msg_arg(struct tee_context *ctx, size_t num_params,
-+				  struct optee_msg_arg **msg_arg)
- {
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *ma;
-@@ -217,7 +141,7 @@ int optee_open_session(struct tee_context *ctx,
- 	uuid_t client_uuid;
- 
- 	/* +2 for the meta parameters added below */
--	shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg);
-+	shm = optee_get_msg_arg(ctx, arg->num_params + 2, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
-@@ -290,7 +214,7 @@ int optee_close_session_helper(struct tee_context *ctx, u32 session)
- 	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 	struct optee_msg_arg *msg_arg;
- 
--	shm = get_msg_arg(ctx, 0, &msg_arg);
-+	shm = optee_get_msg_arg(ctx, 0, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
-@@ -338,7 +262,7 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 	if (!sess)
- 		return -EINVAL;
- 
--	shm = get_msg_arg(ctx, arg->num_params, &msg_arg);
-+	shm = optee_get_msg_arg(ctx, arg->num_params, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 	msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND;
-@@ -384,7 +308,7 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
- 	if (!sess)
- 		return -EINVAL;
- 
--	shm = get_msg_arg(ctx, 0, &msg_arg);
-+	shm = optee_get_msg_arg(ctx, 0, &msg_arg);
- 	if (IS_ERR(shm))
- 		return PTR_ERR(shm);
- 
-@@ -397,182 +321,6 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
- 	return 0;
- }
- 
--/**
-- * optee_enable_shm_cache() - Enables caching of some shared memory allocation
-- *			      in OP-TEE
-- * @optee:	main service struct
-- */
--void optee_enable_shm_cache(struct optee *optee)
--{
--	struct optee_call_waiter w;
--
--	/* We need to retry until secure world isn't busy. */
--	optee_cq_wait_init(&optee->call_queue, &w);
--	while (true) {
--		struct arm_smccc_res res;
--
--		optee->invoke_fn(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
--				 0, &res);
--		if (res.a0 == OPTEE_SMC_RETURN_OK)
--			break;
--		optee_cq_wait_for_completion(&optee->call_queue, &w);
--	}
--	optee_cq_wait_final(&optee->call_queue, &w);
--}
--
--/**
-- * __optee_disable_shm_cache() - Disables caching of some shared memory
-- *                               allocation in OP-TEE
-- * @optee:	main service struct
-- * @is_mapped:	true if the cached shared memory addresses were mapped by this
-- *		kernel, are safe to dereference, and should be freed
-- */
--static void __optee_disable_shm_cache(struct optee *optee, bool is_mapped)
--{
--	struct optee_call_waiter w;
--
--	/* We need to retry until secure world isn't busy. */
--	optee_cq_wait_init(&optee->call_queue, &w);
--	while (true) {
--		union {
--			struct arm_smccc_res smccc;
--			struct optee_smc_disable_shm_cache_result result;
--		} res;
--
--		optee->invoke_fn(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
--				 0, &res.smccc);
--		if (res.result.status == OPTEE_SMC_RETURN_ENOTAVAIL)
--			break; /* All shm's freed */
--		if (res.result.status == OPTEE_SMC_RETURN_OK) {
--			struct tee_shm *shm;
--
--			/*
--			 * Shared memory references that were not mapped by
--			 * this kernel must be ignored to prevent a crash.
--			 */
--			if (!is_mapped)
--				continue;
--
--			shm = reg_pair_to_ptr(res.result.shm_upper32,
--					      res.result.shm_lower32);
--			tee_shm_free(shm);
--		} else {
--			optee_cq_wait_for_completion(&optee->call_queue, &w);
--		}
--	}
--	optee_cq_wait_final(&optee->call_queue, &w);
--}
--
--/**
-- * optee_disable_shm_cache() - Disables caching of mapped shared memory
-- *                             allocations in OP-TEE
-- * @optee:	main service struct
-- */
--void optee_disable_shm_cache(struct optee *optee)
--{
--	return __optee_disable_shm_cache(optee, true);
--}
--
--/**
-- * optee_disable_unmapped_shm_cache() - Disables caching of shared memory
-- *                                      allocations in OP-TEE which are not
-- *                                      currently mapped
-- * @optee:	main service struct
-- */
--void optee_disable_unmapped_shm_cache(struct optee *optee)
--{
--	return __optee_disable_shm_cache(optee, false);
--}
--
--#define PAGELIST_ENTRIES_PER_PAGE				\
--	((OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(u64)) - 1)
--
--/**
-- * optee_fill_pages_list() - write list of user pages to given shared
-- * buffer.
-- *
-- * @dst: page-aligned buffer where list of pages will be stored
-- * @pages: array of pages that represents shared buffer
-- * @num_pages: number of entries in @pages
-- * @page_offset: offset of user buffer from page start
-- *
-- * @dst should be big enough to hold list of user page addresses and
-- *	links to the next pages of buffer
-- */
--void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
--			   size_t page_offset)
--{
--	int n = 0;
--	phys_addr_t optee_page;
--	/*
--	 * Refer to OPTEE_MSG_ATTR_NONCONTIG description in optee_msg.h
--	 * for details.
--	 */
--	struct {
--		u64 pages_list[PAGELIST_ENTRIES_PER_PAGE];
--		u64 next_page_data;
--	} *pages_data;
--
--	/*
--	 * Currently OP-TEE uses 4k page size and it does not looks
--	 * like this will change in the future.  On other hand, there are
--	 * no know ARM architectures with page size < 4k.
--	 * Thus the next built assert looks redundant. But the following
--	 * code heavily relies on this assumption, so it is better be
--	 * safe than sorry.
--	 */
--	BUILD_BUG_ON(PAGE_SIZE < OPTEE_MSG_NONCONTIG_PAGE_SIZE);
--
--	pages_data = (void *)dst;
--	/*
--	 * If linux page is bigger than 4k, and user buffer offset is
--	 * larger than 4k/8k/12k/etc this will skip first 4k pages,
--	 * because they bear no value data for OP-TEE.
--	 */
--	optee_page = page_to_phys(*pages) +
--		round_down(page_offset, OPTEE_MSG_NONCONTIG_PAGE_SIZE);
--
--	while (true) {
--		pages_data->pages_list[n++] = optee_page;
--
--		if (n == PAGELIST_ENTRIES_PER_PAGE) {
--			pages_data->next_page_data =
--				virt_to_phys(pages_data + 1);
--			pages_data++;
--			n = 0;
--		}
--
--		optee_page += OPTEE_MSG_NONCONTIG_PAGE_SIZE;
--		if (!(optee_page & ~PAGE_MASK)) {
--			if (!--num_pages)
--				break;
--			pages++;
--			optee_page = page_to_phys(*pages);
--		}
--	}
--}
--
--/*
-- * The final entry in each pagelist page is a pointer to the next
-- * pagelist page.
-- */
--static size_t get_pages_list_size(size_t num_entries)
--{
--	int pages = DIV_ROUND_UP(num_entries, PAGELIST_ENTRIES_PER_PAGE);
--
--	return pages * OPTEE_MSG_NONCONTIG_PAGE_SIZE;
--}
--
--u64 *optee_allocate_pages_list(size_t num_entries)
--{
--	return alloc_pages_exact(get_pages_list_size(num_entries), GFP_KERNEL);
--}
--
--void optee_free_pages_list(void *list, size_t num_entries)
--{
--	free_pages_exact(list, get_pages_list_size(num_entries));
--}
--
- static bool is_normal_memory(pgprot_t p)
- {
- #if defined(CONFIG_ARM)
-@@ -596,7 +344,7 @@ static int __check_mem_type(struct vm_area_struct *vma, unsigned long end)
- 	return -EINVAL;
- }
- 
--static int check_mem_type(unsigned long start, size_t num_pages)
-+int optee_check_mem_type(unsigned long start, size_t num_pages)
- {
- 	struct mm_struct *mm = current->mm;
- 	int rc;
-@@ -615,94 +363,3 @@ static int check_mem_type(unsigned long start, size_t num_pages)
- 
- 	return rc;
- }
--
--int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
--		       struct page **pages, size_t num_pages,
--		       unsigned long start)
--{
--	struct optee *optee = tee_get_drvdata(ctx->teedev);
--	struct optee_msg_arg *msg_arg;
--	struct tee_shm *shm_arg;
--	u64 *pages_list;
--	int rc;
--
--	if (!num_pages)
--		return -EINVAL;
--
--	rc = check_mem_type(start, num_pages);
--	if (rc)
--		return rc;
--
--	pages_list = optee_allocate_pages_list(num_pages);
--	if (!pages_list)
--		return -ENOMEM;
--
--	shm_arg = get_msg_arg(ctx, 1, &msg_arg);
--	if (IS_ERR(shm_arg)) {
--		rc = PTR_ERR(shm_arg);
--		goto out;
--	}
--
--	optee_fill_pages_list(pages_list, pages, num_pages,
--			      tee_shm_get_page_offset(shm));
--
--	msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM;
--	msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT |
--				OPTEE_MSG_ATTR_NONCONTIG;
--	msg_arg->params->u.tmem.shm_ref = (unsigned long)shm;
--	msg_arg->params->u.tmem.size = tee_shm_get_size(shm);
--	/*
--	 * In the least bits of msg_arg->params->u.tmem.buf_ptr we
--	 * store buffer offset from 4k page, as described in OP-TEE ABI.
--	 */
--	msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) |
--	  (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
--
--	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
--	    msg_arg->ret != TEEC_SUCCESS)
--		rc = -EINVAL;
--
--	tee_shm_free(shm_arg);
--out:
--	optee_free_pages_list(pages_list, num_pages);
--	return rc;
--}
--
--int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
--{
--	struct optee *optee = tee_get_drvdata(ctx->teedev);
--	struct optee_msg_arg *msg_arg;
--	struct tee_shm *shm_arg;
--	int rc = 0;
--
--	shm_arg = get_msg_arg(ctx, 1, &msg_arg);
--	if (IS_ERR(shm_arg))
--		return PTR_ERR(shm_arg);
--
--	msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM;
--
--	msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
--	msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
--
--	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
--	    msg_arg->ret != TEEC_SUCCESS)
--		rc = -EINVAL;
--	tee_shm_free(shm_arg);
--	return rc;
--}
--
--int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
--			    struct page **pages, size_t num_pages,
--			    unsigned long start)
--{
--	/*
--	 * We don't want to register supplicant memory in OP-TEE.
--	 * Instead information about it will be passed in RPC code.
--	 */
--	return check_mem_type(start, num_pages);
--}
--
--int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm)
--{
--	return 0;
--}
-diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
-index 26492d3115f5..27b855325b33 100644
---- a/drivers/tee/optee/core.c
-+++ b/drivers/tee/optee/core.c
-@@ -1,260 +1,71 @@
- // SPDX-License-Identifier: GPL-2.0-only
- /*
-  * Copyright (c) 2015-2021, Linaro Limited
-+ * Copyright (c) 2016, EPAM Systems
-  */
- 
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- 
--#include <linux/arm-smccc.h>
- #include <linux/crash_dump.h>
- #include <linux/errno.h>
- #include <linux/io.h>
-+#include <linux/mm.h>
- #include <linux/module.h>
--#include <linux/of.h>
--#include <linux/of_platform.h>
--#include <linux/platform_device.h>
- #include <linux/slab.h>
- #include <linux/string.h>
- #include <linux/tee_drv.h>
- #include <linux/types.h>
--#include <linux/uaccess.h>
- #include <linux/workqueue.h>
- #include "optee_private.h"
--#include "optee_smc.h"
--#include "shm_pool.h"
- 
--#define DRIVER_NAME "optee"
--
--#define OPTEE_SHM_NUM_PRIV_PAGES	CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
--
--static void from_msg_param_value(struct tee_param *p, u32 attr,
--				 const struct optee_msg_param *mp)
--{
--	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT +
--		  attr - OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
--	p->u.value.a = mp->u.value.a;
--	p->u.value.b = mp->u.value.b;
--	p->u.value.c = mp->u.value.c;
--}
--
--static int from_msg_param_tmp_mem(struct tee_param *p, u32 attr,
--				  const struct optee_msg_param *mp)
--{
--	struct tee_shm *shm;
--	phys_addr_t pa;
--	int rc;
--
--	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
--		  attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT;
--	p->u.memref.size = mp->u.tmem.size;
--	shm = (struct tee_shm *)(unsigned long)mp->u.tmem.shm_ref;
--	if (!shm) {
--		p->u.memref.shm_offs = 0;
--		p->u.memref.shm = NULL;
--		return 0;
--	}
--
--	rc = tee_shm_get_pa(shm, 0, &pa);
--	if (rc)
--		return rc;
--
--	p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
--	p->u.memref.shm = shm;
--
--	/* Check that the memref is covered by the shm object */
--	if (p->u.memref.size) {
--		size_t o = p->u.memref.shm_offs +
--			   p->u.memref.size - 1;
--
--		rc = tee_shm_get_pa(shm, o, NULL);
--		if (rc)
--			return rc;
--	}
--
--	return 0;
--}
--
--static void from_msg_param_reg_mem(struct tee_param *p, u32 attr,
--				   const struct optee_msg_param *mp)
-+int optee_pool_op_alloc_helper(struct tee_shm_pool_mgr *poolm,
-+			       struct tee_shm *shm, size_t size,
-+			       int (*shm_register)(struct tee_context *ctx,
-+						   struct tee_shm *shm,
-+						   struct page **pages,
-+						   size_t num_pages,
-+						   unsigned long start))
- {
--	struct tee_shm *shm;
-+	unsigned int order = get_order(size);
-+	struct page *page;
-+	int rc = 0;
- 
--	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
--		  attr - OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
--	p->u.memref.size = mp->u.rmem.size;
--	shm = (struct tee_shm *)(unsigned long)mp->u.rmem.shm_ref;
--
--	if (shm) {
--		p->u.memref.shm_offs = mp->u.rmem.offs;
--		p->u.memref.shm = shm;
--	} else {
--		p->u.memref.shm_offs = 0;
--		p->u.memref.shm = NULL;
--	}
--}
--
--/**
-- * optee_from_msg_param() - convert from OPTEE_MSG parameters to
-- *			    struct tee_param
-- * @optee:	main service struct
-- * @params:	subsystem internal parameter representation
-- * @num_params:	number of elements in the parameter arrays
-- * @msg_params:	OPTEE_MSG parameters
-- * Returns 0 on success or <0 on failure
-- */
--static int optee_from_msg_param(struct optee *optee, struct tee_param *params,
--				size_t num_params,
--				const struct optee_msg_param *msg_params)
--{
--	int rc;
--	size_t n;
-+	page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
-+	if (!page)
-+		return -ENOMEM;
- 
--	for (n = 0; n < num_params; n++) {
--		struct tee_param *p = params + n;
--		const struct optee_msg_param *mp = msg_params + n;
--		u32 attr = mp->attr & OPTEE_MSG_ATTR_TYPE_MASK;
-+	shm->kaddr = page_address(page);
-+	shm->paddr = page_to_phys(page);
-+	shm->size = PAGE_SIZE << order;
- 
--		switch (attr) {
--		case OPTEE_MSG_ATTR_TYPE_NONE:
--			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
--			memset(&p->u, 0, sizeof(p->u));
--			break;
--		case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
--		case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
--		case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
--			from_msg_param_value(p, attr, mp);
--			break;
--		case OPTEE_MSG_ATTR_TYPE_TMEM_INPUT:
--		case OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT:
--		case OPTEE_MSG_ATTR_TYPE_TMEM_INOUT:
--			rc = from_msg_param_tmp_mem(p, attr, mp);
--			if (rc)
--				return rc;
--			break;
--		case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
--		case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
--		case OPTEE_MSG_ATTR_TYPE_RMEM_INOUT:
--			from_msg_param_reg_mem(p, attr, mp);
--			break;
-+	if (shm_register) {
-+		unsigned int nr_pages = 1 << order, i;
-+		struct page **pages;
- 
--		default:
--			return -EINVAL;
-+		pages = kcalloc(nr_pages, sizeof(*pages), GFP_KERNEL);
-+		if (!pages) {
-+			rc = -ENOMEM;
-+			goto err;
- 		}
--	}
--	return 0;
--}
--
--static void to_msg_param_value(struct optee_msg_param *mp,
--			       const struct tee_param *p)
--{
--	mp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + p->attr -
--		   TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT;
--	mp->u.value.a = p->u.value.a;
--	mp->u.value.b = p->u.value.b;
--	mp->u.value.c = p->u.value.c;
--}
--
--static int to_msg_param_tmp_mem(struct optee_msg_param *mp,
--				const struct tee_param *p)
--{
--	int rc;
--	phys_addr_t pa;
- 
--	mp->attr = OPTEE_MSG_ATTR_TYPE_TMEM_INPUT + p->attr -
--		   TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
--
--	mp->u.tmem.shm_ref = (unsigned long)p->u.memref.shm;
--	mp->u.tmem.size = p->u.memref.size;
-+		for (i = 0; i < nr_pages; i++) {
-+			pages[i] = page;
-+			page++;
-+		}
- 
--	if (!p->u.memref.shm) {
--		mp->u.tmem.buf_ptr = 0;
--		return 0;
-+		shm->flags |= TEE_SHM_REGISTER;
-+		rc = shm_register(shm->ctx, shm, pages, nr_pages,
-+				  (unsigned long)shm->kaddr);
-+		kfree(pages);
-+		if (rc)
-+			goto err;
- 	}
- 
--	rc = tee_shm_get_pa(p->u.memref.shm, p->u.memref.shm_offs, &pa);
--	if (rc)
--		return rc;
--
--	mp->u.tmem.buf_ptr = pa;
--	mp->attr |= OPTEE_MSG_ATTR_CACHE_PREDEFINED <<
--		    OPTEE_MSG_ATTR_CACHE_SHIFT;
--
--	return 0;
--}
--
--static int to_msg_param_reg_mem(struct optee_msg_param *mp,
--				const struct tee_param *p)
--{
--	mp->attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT + p->attr -
--		   TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
--
--	mp->u.rmem.shm_ref = (unsigned long)p->u.memref.shm;
--	mp->u.rmem.size = p->u.memref.size;
--	mp->u.rmem.offs = p->u.memref.shm_offs;
--	return 0;
--}
--
--/**
-- * optee_to_msg_param() - convert from struct tee_params to OPTEE_MSG parameters
-- * @optee:	main service struct
-- * @msg_params:	OPTEE_MSG parameters
-- * @num_params:	number of elements in the parameter arrays
-- * @params:	subsystem itnernal parameter representation
-- * Returns 0 on success or <0 on failure
-- */
--static int optee_to_msg_param(struct optee *optee,
--			      struct optee_msg_param *msg_params,
--			      size_t num_params, const struct tee_param *params)
--{
--	int rc;
--	size_t n;
--
--	for (n = 0; n < num_params; n++) {
--		const struct tee_param *p = params + n;
--		struct optee_msg_param *mp = msg_params + n;
--
--		switch (p->attr) {
--		case TEE_IOCTL_PARAM_ATTR_TYPE_NONE:
--			mp->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
--			memset(&mp->u, 0, sizeof(mp->u));
--			break;
--		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
--		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
--		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
--			to_msg_param_value(mp, p);
--			break;
--		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
--		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
--		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT:
--			if (tee_shm_is_registered(p->u.memref.shm))
--				rc = to_msg_param_reg_mem(mp, p);
--			else
--				rc = to_msg_param_tmp_mem(mp, p);
--			if (rc)
--				return rc;
--			break;
--		default:
--			return -EINVAL;
--		}
--	}
- 	return 0;
--}
- 
--static void optee_get_version(struct tee_device *teedev,
--			      struct tee_ioctl_version_data *vers)
--{
--	struct tee_ioctl_version_data v = {
--		.impl_id = TEE_IMPL_ID_OPTEE,
--		.impl_caps = TEE_OPTEE_CAP_TZ,
--		.gen_caps = TEE_GEN_CAP_GP,
--	};
--	struct optee *optee = tee_get_drvdata(teedev);
--
--	if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
--		v.gen_caps |= TEE_GEN_CAP_REG_MEM;
--	if (optee->sec_caps & OPTEE_SMC_SEC_CAP_MEMREF_NULL)
--		v.gen_caps |= TEE_GEN_CAP_MEMREF_NULL;
--	*vers = v;
-+err:
-+	__free_pages(page, order);
-+	return rc;
- }
- 
- static void optee_bus_scan(struct work_struct *work)
-@@ -262,7 +73,7 @@ static void optee_bus_scan(struct work_struct *work)
- 	WARN_ON(optee_enumerate_devices(PTA_CMD_GET_DEVICES_SUPP));
- }
- 
--static int optee_open(struct tee_context *ctx)
-+int optee_open(struct tee_context *ctx, bool cap_memref_null)
- {
- 	struct optee_context_data *ctxdata;
- 	struct tee_device *teedev = ctx->teedev;
-@@ -300,11 +111,7 @@ static int optee_open(struct tee_context *ctx)
- 	mutex_init(&ctxdata->mutex);
- 	INIT_LIST_HEAD(&ctxdata->sess_list);
- 
--	if (optee->sec_caps & OPTEE_SMC_SEC_CAP_MEMREF_NULL)
--		ctx->cap_memref_null  = true;
--	else
--		ctx->cap_memref_null = false;
--
-+	ctx->cap_memref_null = cap_memref_null;
- 	ctx->data = ctxdata;
- 	return 0;
- }
-@@ -330,12 +137,12 @@ static void optee_release_helper(struct tee_context *ctx,
- 	ctx->data = NULL;
- }
- 
--static void optee_release(struct tee_context *ctx)
-+void optee_release(struct tee_context *ctx)
- {
- 	optee_release_helper(ctx, optee_close_session_helper);
- }
- 
--static void optee_release_supp(struct tee_context *ctx)
-+void optee_release_supp(struct tee_context *ctx)
- {
- 	struct optee *optee = tee_get_drvdata(ctx->teedev);
- 
-@@ -347,287 +154,11 @@ static void optee_release_supp(struct tee_context *ctx)
- 	optee_supp_release(&optee->supp);
- }
- 
--static const struct tee_driver_ops optee_clnt_ops = {
--	.get_version = optee_get_version,
--	.open = optee_open,
--	.release = optee_release,
--	.open_session = optee_open_session,
--	.close_session = optee_close_session,
--	.invoke_func = optee_invoke_func,
--	.cancel_req = optee_cancel_req,
--	.shm_register = optee_shm_register,
--	.shm_unregister = optee_shm_unregister,
--};
--
--static const struct tee_desc optee_clnt_desc = {
--	.name = DRIVER_NAME "-clnt",
--	.ops = &optee_clnt_ops,
--	.owner = THIS_MODULE,
--};
--
--static const struct tee_driver_ops optee_supp_ops = {
--	.get_version = optee_get_version,
--	.open = optee_open,
--	.release = optee_release_supp,
--	.supp_recv = optee_supp_recv,
--	.supp_send = optee_supp_send,
--	.shm_register = optee_shm_register_supp,
--	.shm_unregister = optee_shm_unregister_supp,
--};
--
--static const struct tee_desc optee_supp_desc = {
--	.name = DRIVER_NAME "-supp",
--	.ops = &optee_supp_ops,
--	.owner = THIS_MODULE,
--	.flags = TEE_DESC_PRIVILEGED,
--};
--
--static const struct optee_ops optee_ops = {
--	.do_call_with_arg = optee_do_call_with_arg,
--	.to_msg_param = optee_to_msg_param,
--	.from_msg_param = optee_from_msg_param,
--};
--
--static bool optee_msg_api_uid_is_optee_api(optee_invoke_fn *invoke_fn)
--{
--	struct arm_smccc_res res;
--
--	invoke_fn(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0, 0, &res);
--
--	if (res.a0 == OPTEE_MSG_UID_0 && res.a1 == OPTEE_MSG_UID_1 &&
--	    res.a2 == OPTEE_MSG_UID_2 && res.a3 == OPTEE_MSG_UID_3)
--		return true;
--	return false;
--}
--
--static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
--{
--	union {
--		struct arm_smccc_res smccc;
--		struct optee_smc_call_get_os_revision_result result;
--	} res = {
--		.result = {
--			.build_id = 0
--		}
--	};
--
--	invoke_fn(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0, 0,
--		  &res.smccc);
--
--	if (res.result.build_id)
--		pr_info("revision %lu.%lu (%08lx)", res.result.major,
--			res.result.minor, res.result.build_id);
--	else
--		pr_info("revision %lu.%lu", res.result.major, res.result.minor);
--}
--
--static bool optee_msg_api_revision_is_compatible(optee_invoke_fn *invoke_fn)
--{
--	union {
--		struct arm_smccc_res smccc;
--		struct optee_smc_calls_revision_result result;
--	} res;
--
--	invoke_fn(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0, 0, &res.smccc);
--
--	if (res.result.major == OPTEE_MSG_REVISION_MAJOR &&
--	    (int)res.result.minor >= OPTEE_MSG_REVISION_MINOR)
--		return true;
--	return false;
--}
--
--static bool optee_msg_exchange_capabilities(optee_invoke_fn *invoke_fn,
--					    u32 *sec_caps)
--{
--	union {
--		struct arm_smccc_res smccc;
--		struct optee_smc_exchange_capabilities_result result;
--	} res;
--	u32 a1 = 0;
--
--	/*
--	 * TODO This isn't enough to tell if it's UP system (from kernel
--	 * point of view) or not, is_smp() returns the the information
--	 * needed, but can't be called directly from here.
--	 */
--	if (!IS_ENABLED(CONFIG_SMP) || nr_cpu_ids == 1)
--		a1 |= OPTEE_SMC_NSEC_CAP_UNIPROCESSOR;
--
--	invoke_fn(OPTEE_SMC_EXCHANGE_CAPABILITIES, a1, 0, 0, 0, 0, 0, 0,
--		  &res.smccc);
--
--	if (res.result.status != OPTEE_SMC_RETURN_OK)
--		return false;
--
--	*sec_caps = res.result.capabilities;
--	return true;
--}
--
--static struct tee_shm_pool *optee_config_dyn_shm(void)
--{
--	struct tee_shm_pool_mgr *priv_mgr;
--	struct tee_shm_pool_mgr *dmabuf_mgr;
--	void *rc;
--
--	rc = optee_shm_pool_alloc_pages();
--	if (IS_ERR(rc))
--		return rc;
--	priv_mgr = rc;
--
--	rc = optee_shm_pool_alloc_pages();
--	if (IS_ERR(rc)) {
--		tee_shm_pool_mgr_destroy(priv_mgr);
--		return rc;
--	}
--	dmabuf_mgr = rc;
--
--	rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr);
--	if (IS_ERR(rc)) {
--		tee_shm_pool_mgr_destroy(priv_mgr);
--		tee_shm_pool_mgr_destroy(dmabuf_mgr);
--	}
--
--	return rc;
--}
--
--static struct tee_shm_pool *
--optee_config_shm_memremap(optee_invoke_fn *invoke_fn, void **memremaped_shm)
-+void optee_remove_common(struct optee *optee)
- {
--	union {
--		struct arm_smccc_res smccc;
--		struct optee_smc_get_shm_config_result result;
--	} res;
--	unsigned long vaddr;
--	phys_addr_t paddr;
--	size_t size;
--	phys_addr_t begin;
--	phys_addr_t end;
--	void *va;
--	struct tee_shm_pool_mgr *priv_mgr;
--	struct tee_shm_pool_mgr *dmabuf_mgr;
--	void *rc;
--	const int sz = OPTEE_SHM_NUM_PRIV_PAGES * PAGE_SIZE;
--
--	invoke_fn(OPTEE_SMC_GET_SHM_CONFIG, 0, 0, 0, 0, 0, 0, 0, &res.smccc);
--	if (res.result.status != OPTEE_SMC_RETURN_OK) {
--		pr_err("static shm service not available\n");
--		return ERR_PTR(-ENOENT);
--	}
--
--	if (res.result.settings != OPTEE_SMC_SHM_CACHED) {
--		pr_err("only normal cached shared memory supported\n");
--		return ERR_PTR(-EINVAL);
--	}
--
--	begin = roundup(res.result.start, PAGE_SIZE);
--	end = rounddown(res.result.start + res.result.size, PAGE_SIZE);
--	paddr = begin;
--	size = end - begin;
--
--	if (size < 2 * OPTEE_SHM_NUM_PRIV_PAGES * PAGE_SIZE) {
--		pr_err("too small shared memory area\n");
--		return ERR_PTR(-EINVAL);
--	}
--
--	va = memremap(paddr, size, MEMREMAP_WB);
--	if (!va) {
--		pr_err("shared memory ioremap failed\n");
--		return ERR_PTR(-EINVAL);
--	}
--	vaddr = (unsigned long)va;
--
--	rc = tee_shm_pool_mgr_alloc_res_mem(vaddr, paddr, sz,
--					    3 /* 8 bytes aligned */);
--	if (IS_ERR(rc))
--		goto err_memunmap;
--	priv_mgr = rc;
--
--	vaddr += sz;
--	paddr += sz;
--	size -= sz;
--
--	rc = tee_shm_pool_mgr_alloc_res_mem(vaddr, paddr, size, PAGE_SHIFT);
--	if (IS_ERR(rc))
--		goto err_free_priv_mgr;
--	dmabuf_mgr = rc;
--
--	rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr);
--	if (IS_ERR(rc))
--		goto err_free_dmabuf_mgr;
--
--	*memremaped_shm = va;
--
--	return rc;
--
--err_free_dmabuf_mgr:
--	tee_shm_pool_mgr_destroy(dmabuf_mgr);
--err_free_priv_mgr:
--	tee_shm_pool_mgr_destroy(priv_mgr);
--err_memunmap:
--	memunmap(va);
--	return rc;
--}
--
--/* Simple wrapper functions to be able to use a function pointer */
--static void optee_smccc_smc(unsigned long a0, unsigned long a1,
--			    unsigned long a2, unsigned long a3,
--			    unsigned long a4, unsigned long a5,
--			    unsigned long a6, unsigned long a7,
--			    struct arm_smccc_res *res)
--{
--	arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res);
--}
--
--static void optee_smccc_hvc(unsigned long a0, unsigned long a1,
--			    unsigned long a2, unsigned long a3,
--			    unsigned long a4, unsigned long a5,
--			    unsigned long a6, unsigned long a7,
--			    struct arm_smccc_res *res)
--{
--	arm_smccc_hvc(a0, a1, a2, a3, a4, a5, a6, a7, res);
--}
--
--static optee_invoke_fn *get_invoke_func(struct device *dev)
--{
--	const char *method;
--
--	pr_info("probing for conduit method.\n");
--
--	if (device_property_read_string(dev, "method", &method)) {
--		pr_warn("missing \"method\" property\n");
--		return ERR_PTR(-ENXIO);
--	}
--
--	if (!strcmp("hvc", method))
--		return optee_smccc_hvc;
--	else if (!strcmp("smc", method))
--		return optee_smccc_smc;
--
--	pr_warn("invalid \"method\" property: %s\n", method);
--	return ERR_PTR(-EINVAL);
--}
--
--/* optee_remove - Device Removal Routine
-- * @pdev: platform device information struct
-- *
-- * optee_remove is called by platform subsystem to alert the driver
-- * that it should release the device
-- */
--
--static int optee_remove(struct platform_device *pdev)
--{
--	struct optee *optee = platform_get_drvdata(pdev);
--
- 	/* Unregister OP-TEE specific client devices on TEE bus */
- 	optee_unregister_devices();
- 
--	/*
--	 * Ask OP-TEE to free all cached shared memory objects to decrease
--	 * reference counters and also avoid wild pointers in secure world
--	 * into the old shared memory range.
--	 */
--	optee_disable_shm_cache(optee);
--
- 	/*
- 	 * The two devices have to be unregistered before we can free the
- 	 * other resources.
-@@ -636,39 +167,13 @@ static int optee_remove(struct platform_device *pdev)
- 	tee_device_unregister(optee->teedev);
- 
- 	tee_shm_pool_free(optee->pool);
--	if (optee->memremaped_shm)
--		memunmap(optee->memremaped_shm);
- 	optee_wait_queue_exit(&optee->wait_queue);
- 	optee_supp_uninit(&optee->supp);
- 	mutex_destroy(&optee->call_queue.mutex);
--
--	kfree(optee);
--
--	return 0;
--}
--
--/* optee_shutdown - Device Removal Routine
-- * @pdev: platform device information struct
-- *
-- * platform_shutdown is called by the platform subsystem to alert
-- * the driver that a shutdown, reboot, or kexec is happening and
-- * device must be disabled.
-- */
--static void optee_shutdown(struct platform_device *pdev)
--{
--	optee_disable_shm_cache(platform_get_drvdata(pdev));
- }
- 
--static int optee_probe(struct platform_device *pdev)
-+static int optee_core_init(void)
- {
--	optee_invoke_fn *invoke_fn;
--	struct tee_shm_pool *pool = ERR_PTR(-EINVAL);
--	struct optee *optee = NULL;
--	void *memremaped_shm = NULL;
--	struct tee_device *teedev;
--	u32 sec_caps;
--	int rc;
--
- 	/*
- 	 * The kernel may have crashed at the same time that all available
- 	 * secure world threads were suspended and we cannot reschedule the
-@@ -679,139 +184,15 @@ static int optee_probe(struct platform_device *pdev)
- 	if (is_kdump_kernel())
- 		return -ENODEV;
- 
--	invoke_fn = get_invoke_func(&pdev->dev);
--	if (IS_ERR(invoke_fn))
--		return PTR_ERR(invoke_fn);
--
--	if (!optee_msg_api_uid_is_optee_api(invoke_fn)) {
--		pr_warn("api uid mismatch\n");
--		return -EINVAL;
--	}
--
--	optee_msg_get_os_revision(invoke_fn);
--
--	if (!optee_msg_api_revision_is_compatible(invoke_fn)) {
--		pr_warn("api revision mismatch\n");
--		return -EINVAL;
--	}
--
--	if (!optee_msg_exchange_capabilities(invoke_fn, &sec_caps)) {
--		pr_warn("capabilities mismatch\n");
--		return -EINVAL;
--	}
--
--	/*
--	 * Try to use dynamic shared memory if possible
--	 */
--	if (sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
--		pool = optee_config_dyn_shm();
--
--	/*
--	 * If dynamic shared memory is not available or failed - try static one
--	 */
--	if (IS_ERR(pool) && (sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM))
--		pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm);
--
--	if (IS_ERR(pool))
--		return PTR_ERR(pool);
--
--	optee = kzalloc(sizeof(*optee), GFP_KERNEL);
--	if (!optee) {
--		rc = -ENOMEM;
--		goto err;
--	}
--
--	optee->ops = &optee_ops;
--	optee->invoke_fn = invoke_fn;
--	optee->sec_caps = sec_caps;
--
--	teedev = tee_device_alloc(&optee_clnt_desc, NULL, pool, optee);
--	if (IS_ERR(teedev)) {
--		rc = PTR_ERR(teedev);
--		goto err;
--	}
--	optee->teedev = teedev;
--
--	teedev = tee_device_alloc(&optee_supp_desc, NULL, pool, optee);
--	if (IS_ERR(teedev)) {
--		rc = PTR_ERR(teedev);
--		goto err;
--	}
--	optee->supp_teedev = teedev;
--
--	rc = tee_device_register(optee->teedev);
--	if (rc)
--		goto err;
--
--	rc = tee_device_register(optee->supp_teedev);
--	if (rc)
--		goto err;
--
--	mutex_init(&optee->call_queue.mutex);
--	INIT_LIST_HEAD(&optee->call_queue.waiters);
--	optee_wait_queue_init(&optee->wait_queue);
--	optee_supp_init(&optee->supp);
--	optee->memremaped_shm = memremaped_shm;
--	optee->pool = pool;
--
--	/*
--	 * Ensure that there are no pre-existing shm objects before enabling
--	 * the shm cache so that there's no chance of receiving an invalid
--	 * address during shutdown. This could occur, for example, if we're
--	 * kexec booting from an older kernel that did not properly cleanup the
--	 * shm cache.
--	 */
--	optee_disable_unmapped_shm_cache(optee);
--
--	optee_enable_shm_cache(optee);
--
--	if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
--		pr_info("dynamic shared memory is enabled\n");
--
--	platform_set_drvdata(pdev, optee);
--
--	rc = optee_enumerate_devices(PTA_CMD_GET_DEVICES);
--	if (rc) {
--		optee_remove(pdev);
--		return rc;
--	}
--
--	pr_info("initialized driver\n");
--	return 0;
--err:
--	if (optee) {
--		/*
--		 * tee_device_unregister() is safe to call even if the
--		 * devices hasn't been registered with
--		 * tee_device_register() yet.
--		 */
--		tee_device_unregister(optee->supp_teedev);
--		tee_device_unregister(optee->teedev);
--		kfree(optee);
--	}
--	if (pool)
--		tee_shm_pool_free(pool);
--	if (memremaped_shm)
--		memunmap(memremaped_shm);
--	return rc;
-+	return optee_smc_abi_register();
- }
-+module_init(optee_core_init);
- 
--static const struct of_device_id optee_dt_match[] = {
--	{ .compatible = "linaro,optee-tz" },
--	{},
--};
--MODULE_DEVICE_TABLE(of, optee_dt_match);
--
--static struct platform_driver optee_driver = {
--	.probe  = optee_probe,
--	.remove = optee_remove,
--	.shutdown = optee_shutdown,
--	.driver = {
--		.name = "optee",
--		.of_match_table = optee_dt_match,
--	},
--};
--module_platform_driver(optee_driver);
-+static void optee_core_exit(void)
-+{
-+	optee_smc_abi_unregister();
-+}
-+module_exit(optee_core_exit);
- 
- MODULE_AUTHOR("Linaro");
- MODULE_DESCRIPTION("OP-TEE driver");
-diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
-index beca97017996..40af6b059b20 100644
---- a/drivers/tee/optee/optee_private.h
-+++ b/drivers/tee/optee/optee_private.h
-@@ -12,6 +12,8 @@
- #include <linux/types.h>
- #include "optee_msg.h"
- 
-+#define DRIVER_NAME "optee"
-+
- #define OPTEE_MAX_ARG_SIZE	1024
- 
- /* Some Global Platform error codes used in this driver */
-@@ -29,6 +31,11 @@ typedef void (optee_invoke_fn)(unsigned long, unsigned long, unsigned long,
- 				unsigned long, unsigned long,
- 				struct arm_smccc_res *);
- 
-+struct optee_call_waiter {
-+	struct list_head list_node;
-+	struct completion c;
-+};
-+
- struct optee_call_queue {
- 	/* Serializes access to this struct */
- 	struct mutex mutex;
-@@ -66,6 +73,19 @@ struct optee_supp {
- 	struct completion reqs_c;
- };
- 
-+/**
-+ * struct optee_smc - SMC ABI specifics
-+ * @invoke_fn:		function to issue smc or hvc
-+ * @memremaped_shm	virtual address of memory in shared memory pool
-+ * @sec_caps:		secure world capabilities defined by
-+ *			OPTEE_SMC_SEC_CAP_* in optee_smc.h
-+ */
-+struct optee_smc {
-+	optee_invoke_fn *invoke_fn;
-+	void *memremaped_shm;
-+	u32 sec_caps;
-+};
-+
- struct optee;
- 
- /**
-@@ -95,15 +115,12 @@ struct optee_ops {
-  * @ops:		internal callbacks for different ways to reach secure
-  *			world
-  * @teedev:		client device
-- * @invoke_fn:		function to issue smc or hvc
-+ * @smc:		specific to SMC ABI
-  * @call_queue:		queue of threads waiting to call @invoke_fn
-  * @wait_queue:		queue of threads from secure world waiting for a
-  *			secure world sync object
-  * @supp:		supplicant synchronization struct for RPC to supplicant
-  * @pool:		shared memory pool
-- * @memremaped_shm	virtual address of memory in shared memory pool
-- * @sec_caps:		secure world capabilities defined by
-- *			OPTEE_SMC_SEC_CAP_* in optee_smc.h
-  * @scan_bus_done	flag if device registation was already done.
-  * @scan_bus_wq		workqueue to scan optee bus and register optee drivers
-  * @scan_bus_work	workq to scan optee bus and register optee drivers
-@@ -112,13 +129,11 @@ struct optee {
- 	struct tee_device *supp_teedev;
- 	struct tee_device *teedev;
- 	const struct optee_ops *ops;
--	optee_invoke_fn *invoke_fn;
-+	struct optee_smc smc;
- 	struct optee_call_queue call_queue;
- 	struct optee_wait_queue wait_queue;
- 	struct optee_supp supp;
- 	struct tee_shm_pool *pool;
--	void *memremaped_shm;
--	u32 sec_caps;
- 	bool   scan_bus_done;
- 	struct workqueue_struct *scan_bus_wq;
- 	struct work_struct scan_bus_work;
-@@ -153,10 +168,6 @@ struct optee_call_ctx {
- 	size_t num_entries;
- };
- 
--void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
--		      struct optee_call_ctx *call_ctx);
--void optee_rpc_finalize_call(struct optee_call_ctx *call_ctx);
--
- void optee_wait_queue_init(struct optee_wait_queue *wq);
- void optee_wait_queue_exit(struct optee_wait_queue *wq);
- 
-@@ -174,7 +185,6 @@ int optee_supp_recv(struct tee_context *ctx, u32 *func, u32 *num_params,
- int optee_supp_send(struct tee_context *ctx, u32 ret, u32 num_params,
- 		    struct tee_param *param);
- 
--int optee_do_call_with_arg(struct tee_context *ctx, struct tee_shm *arg);
- int optee_open_session(struct tee_context *ctx,
- 		       struct tee_ioctl_open_session_arg *arg,
- 		       struct tee_param *param);
-@@ -184,30 +194,60 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
- 		      struct tee_param *param);
- int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session);
- 
--void optee_enable_shm_cache(struct optee *optee);
--void optee_disable_shm_cache(struct optee *optee);
--void optee_disable_unmapped_shm_cache(struct optee *optee);
--
--int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
--		       struct page **pages, size_t num_pages,
--		       unsigned long start);
--int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm);
--
--int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
--			    struct page **pages, size_t num_pages,
--			    unsigned long start);
--int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
--
--u64 *optee_allocate_pages_list(size_t num_entries);
--void optee_free_pages_list(void *array, size_t num_entries);
--void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
--			   size_t page_offset);
--
- #define PTA_CMD_GET_DEVICES		0x0
- #define PTA_CMD_GET_DEVICES_SUPP	0x1
- int optee_enumerate_devices(u32 func);
- void optee_unregister_devices(void);
- 
-+int optee_pool_op_alloc_helper(struct tee_shm_pool_mgr *poolm,
-+			       struct tee_shm *shm, size_t size,
-+			       int (*shm_register)(struct tee_context *ctx,
-+						   struct tee_shm *shm,
-+						   struct page **pages,
-+						   size_t num_pages,
-+						   unsigned long start));
-+
-+
-+void optee_remove_common(struct optee *optee);
-+int optee_open(struct tee_context *ctx, bool cap_memref_null);
-+void optee_release(struct tee_context *ctx);
-+void optee_release_supp(struct tee_context *ctx);
-+
-+static inline void optee_from_msg_param_value(struct tee_param *p, u32 attr,
-+					      const struct optee_msg_param *mp)
-+{
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
-+	p->u.value.a = mp->u.value.a;
-+	p->u.value.b = mp->u.value.b;
-+	p->u.value.c = mp->u.value.c;
-+}
-+
-+static inline void optee_to_msg_param_value(struct optee_msg_param *mp,
-+					    const struct tee_param *p)
-+{
-+	mp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + p->attr -
-+		   TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT;
-+	mp->u.value.a = p->u.value.a;
-+	mp->u.value.b = p->u.value.b;
-+	mp->u.value.c = p->u.value.c;
-+}
-+
-+void optee_cq_wait_init(struct optee_call_queue *cq,
-+			struct optee_call_waiter *w);
-+void optee_cq_wait_for_completion(struct optee_call_queue *cq,
-+				  struct optee_call_waiter *w);
-+void optee_cq_wait_final(struct optee_call_queue *cq,
-+			 struct optee_call_waiter *w);
-+int optee_check_mem_type(unsigned long start, size_t num_pages);
-+struct tee_shm *optee_get_msg_arg(struct tee_context *ctx, size_t num_params,
-+				  struct optee_msg_arg **msg_arg);
-+
-+struct tee_shm *optee_rpc_cmd_alloc_suppl(struct tee_context *ctx, size_t sz);
-+void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm);
-+void optee_rpc_cmd(struct tee_context *ctx, struct optee *optee,
-+		   struct optee_msg_arg *arg);
-+
- /*
-  * Small helpers
-  */
-@@ -223,4 +263,8 @@ static inline void reg_pair_from_64(u32 *reg0, u32 *reg1, u64 val)
- 	*reg1 = val;
- }
- 
-+/* Registration of the ABIs */
-+int optee_smc_abi_register(void);
-+void optee_smc_abi_unregister(void);
-+
- #endif /*OPTEE_PRIVATE_H*/
-diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
-index 309258d47790..cd642e340eaf 100644
---- a/drivers/tee/optee/rpc.c
-+++ b/drivers/tee/optee/rpc.c
-@@ -6,12 +6,10 @@
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- 
- #include <linux/delay.h>
--#include <linux/device.h>
- #include <linux/i2c.h>
- #include <linux/slab.h>
- #include <linux/tee_drv.h>
- #include "optee_private.h"
--#include "optee_smc.h"
- #include "optee_rpc_cmd.h"
- 
- struct wq_entry {
-@@ -266,7 +264,7 @@ static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee,
- 	kfree(params);
- }
- 
--static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
-+struct tee_shm *optee_rpc_cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
- {
- 	u32 ret;
- 	struct tee_param param;
-@@ -289,103 +287,7 @@ static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
- 	return shm;
- }
- 
--static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
--					  struct optee_msg_arg *arg,
--					  struct optee_call_ctx *call_ctx)
--{
--	phys_addr_t pa;
--	struct tee_shm *shm;
--	size_t sz;
--	size_t n;
--
--	arg->ret_origin = TEEC_ORIGIN_COMMS;
--
--	if (!arg->num_params ||
--	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT) {
--		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--		return;
--	}
--
--	for (n = 1; n < arg->num_params; n++) {
--		if (arg->params[n].attr != OPTEE_MSG_ATTR_TYPE_NONE) {
--			arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--			return;
--		}
--	}
--
--	sz = arg->params[0].u.value.b;
--	switch (arg->params[0].u.value.a) {
--	case OPTEE_RPC_SHM_TYPE_APPL:
--		shm = cmd_alloc_suppl(ctx, sz);
--		break;
--	case OPTEE_RPC_SHM_TYPE_KERNEL:
--		shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
--		break;
--	default:
--		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--		return;
--	}
--
--	if (IS_ERR(shm)) {
--		arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
--		return;
--	}
--
--	if (tee_shm_get_pa(shm, 0, &pa)) {
--		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--		goto bad;
--	}
--
--	sz = tee_shm_get_size(shm);
--
--	if (tee_shm_is_registered(shm)) {
--		struct page **pages;
--		u64 *pages_list;
--		size_t page_num;
--
--		pages = tee_shm_get_pages(shm, &page_num);
--		if (!pages || !page_num) {
--			arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
--			goto bad;
--		}
--
--		pages_list = optee_allocate_pages_list(page_num);
--		if (!pages_list) {
--			arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
--			goto bad;
--		}
--
--		call_ctx->pages_list = pages_list;
--		call_ctx->num_entries = page_num;
--
--		arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT |
--				      OPTEE_MSG_ATTR_NONCONTIG;
--		/*
--		 * In the least bits of u.tmem.buf_ptr we store buffer offset
--		 * from 4k page, as described in OP-TEE ABI.
--		 */
--		arg->params[0].u.tmem.buf_ptr = virt_to_phys(pages_list) |
--			(tee_shm_get_page_offset(shm) &
--			 (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
--		arg->params[0].u.tmem.size = tee_shm_get_size(shm);
--		arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
--
--		optee_fill_pages_list(pages_list, pages, page_num,
--				      tee_shm_get_page_offset(shm));
--	} else {
--		arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT;
--		arg->params[0].u.tmem.buf_ptr = pa;
--		arg->params[0].u.tmem.size = sz;
--		arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
--	}
--
--	arg->ret = TEEC_SUCCESS;
--	return;
--bad:
--	tee_shm_free(shm);
--}
--
--static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
-+void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
- {
- 	struct tee_param param;
- 
-@@ -410,60 +312,9 @@ static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
- 	optee_supp_thrd_req(ctx, OPTEE_RPC_CMD_SHM_FREE, 1, &param);
- }
- 
--static void handle_rpc_func_cmd_shm_free(struct tee_context *ctx,
--					 struct optee_msg_arg *arg)
--{
--	struct tee_shm *shm;
--
--	arg->ret_origin = TEEC_ORIGIN_COMMS;
--
--	if (arg->num_params != 1 ||
--	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT) {
--		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--		return;
--	}
--
--	shm = (struct tee_shm *)(unsigned long)arg->params[0].u.value.b;
--	switch (arg->params[0].u.value.a) {
--	case OPTEE_RPC_SHM_TYPE_APPL:
--		cmd_free_suppl(ctx, shm);
--		break;
--	case OPTEE_RPC_SHM_TYPE_KERNEL:
--		tee_shm_free(shm);
--		break;
--	default:
--		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
--	}
--	arg->ret = TEEC_SUCCESS;
--}
--
--static void free_pages_list(struct optee_call_ctx *call_ctx)
--{
--	if (call_ctx->pages_list) {
--		optee_free_pages_list(call_ctx->pages_list,
--				      call_ctx->num_entries);
--		call_ctx->pages_list = NULL;
--		call_ctx->num_entries = 0;
--	}
--}
--
--void optee_rpc_finalize_call(struct optee_call_ctx *call_ctx)
--{
--	free_pages_list(call_ctx);
--}
--
--static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
--				struct tee_shm *shm,
--				struct optee_call_ctx *call_ctx)
-+void optee_rpc_cmd(struct tee_context *ctx, struct optee *optee,
-+		   struct optee_msg_arg *arg)
- {
--	struct optee_msg_arg *arg;
--
--	arg = tee_shm_get_va(shm, 0);
--	if (IS_ERR(arg)) {
--		pr_err("%s: tee_shm_get_va %p failed\n", __func__, shm);
--		return;
--	}
--
- 	switch (arg->cmd) {
- 	case OPTEE_RPC_CMD_GET_TIME:
- 		handle_rpc_func_cmd_get_time(arg);
-@@ -474,13 +325,6 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
- 	case OPTEE_RPC_CMD_SUSPEND:
- 		handle_rpc_func_cmd_wait(arg);
- 		break;
--	case OPTEE_RPC_CMD_SHM_ALLOC:
--		free_pages_list(call_ctx);
--		handle_rpc_func_cmd_shm_alloc(ctx, arg, call_ctx);
--		break;
--	case OPTEE_RPC_CMD_SHM_FREE:
--		handle_rpc_func_cmd_shm_free(ctx, arg);
--		break;
- 	case OPTEE_RPC_CMD_I2C_TRANSFER:
- 		handle_rpc_func_cmd_i2c_transfer(ctx, arg);
- 		break;
-@@ -489,58 +333,4 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
- 	}
- }
- 
--/**
-- * optee_handle_rpc() - handle RPC from secure world
-- * @ctx:	context doing the RPC
-- * @param:	value of registers for the RPC
-- * @call_ctx:	call context. Preserved during one OP-TEE invocation
-- *
-- * Result of RPC is written back into @param.
-- */
--void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
--		      struct optee_call_ctx *call_ctx)
--{
--	struct tee_device *teedev = ctx->teedev;
--	struct optee *optee = tee_get_drvdata(teedev);
--	struct tee_shm *shm;
--	phys_addr_t pa;
--
--	switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
--	case OPTEE_SMC_RPC_FUNC_ALLOC:
--		shm = tee_shm_alloc(ctx, param->a1,
--				    TEE_SHM_MAPPED | TEE_SHM_PRIV);
--		if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
--			reg_pair_from_64(&param->a1, &param->a2, pa);
--			reg_pair_from_64(&param->a4, &param->a5,
--					 (unsigned long)shm);
--		} else {
--			param->a1 = 0;
--			param->a2 = 0;
--			param->a4 = 0;
--			param->a5 = 0;
--		}
--		break;
--	case OPTEE_SMC_RPC_FUNC_FREE:
--		shm = reg_pair_to_ptr(param->a1, param->a2);
--		tee_shm_free(shm);
--		break;
--	case OPTEE_SMC_RPC_FUNC_FOREIGN_INTR:
--		/*
--		 * A foreign interrupt was raised while secure world was
--		 * executing, since they are handled in Linux a dummy RPC is
--		 * performed to let Linux take the interrupt through the normal
--		 * vector.
--		 */
--		break;
--	case OPTEE_SMC_RPC_FUNC_CMD:
--		shm = reg_pair_to_ptr(param->a1, param->a2);
--		handle_rpc_func_cmd(ctx, optee, shm, call_ctx);
--		break;
--	default:
--		pr_warn("Unknown RPC func 0x%x\n",
--			(u32)OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0));
--		break;
--	}
- 
--	param->a0 = OPTEE_SMC_CALL_RETURN_FROM_RPC;
--}
-diff --git a/drivers/tee/optee/shm_pool.h b/drivers/tee/optee/shm_pool.h
-deleted file mode 100644
-index 28109d991c4b..000000000000
---- a/drivers/tee/optee/shm_pool.h
-+++ /dev/null
-@@ -1,14 +0,0 @@
--/* SPDX-License-Identifier: GPL-2.0-only */
--/*
-- * Copyright (c) 2015, Linaro Limited
-- * Copyright (c) 2016, EPAM Systems
-- */
--
--#ifndef SHM_POOL_H
--#define SHM_POOL_H
--
--#include <linux/tee_drv.h>
--
--struct tee_shm_pool_mgr *optee_shm_pool_alloc_pages(void);
--
--#endif
-diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
-new file mode 100644
-index 000000000000..9a787fb4f5e5
---- /dev/null
-+++ b/drivers/tee/optee/smc_abi.c
-@@ -0,0 +1,1361 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (c) 2015-2021, Linaro Limited
-+ * Copyright (c) 2016, EPAM Systems
-+ */
-+
-+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-+
-+#include <linux/arm-smccc.h>
-+#include <linux/errno.h>
-+#include <linux/io.h>
-+#include <linux/sched.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_platform.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/string.h>
-+#include <linux/tee_drv.h>
-+#include <linux/types.h>
-+#include <linux/workqueue.h>
-+#include "optee_private.h"
-+#include "optee_smc.h"
-+#include "optee_rpc_cmd.h"
-+#define CREATE_TRACE_POINTS
-+#include "optee_trace.h"
-+
-+/*
-+ * This file implement the SMC ABI used when communicating with secure world
-+ * OP-TEE OS via raw SMCs.
-+ * This file is divided into the following sections:
-+ * 1. Convert between struct tee_param and struct optee_msg_param
-+ * 2. Low level support functions to register shared memory in secure world
-+ * 3. Dynamic shared memory pool based on alloc_pages()
-+ * 4. Do a normal scheduled call into secure world
-+ * 5. Driver initialization.
-+ */
-+
-+#define OPTEE_SHM_NUM_PRIV_PAGES	CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
-+
-+/*
-+ * 1. Convert between struct tee_param and struct optee_msg_param
-+ *
-+ * optee_from_msg_param() and optee_to_msg_param() are the main
-+ * functions.
-+ */
-+
-+static int from_msg_param_tmp_mem(struct tee_param *p, u32 attr,
-+				  const struct optee_msg_param *mp)
-+{
-+	struct tee_shm *shm;
-+	phys_addr_t pa;
-+	int rc;
-+
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT;
-+	p->u.memref.size = mp->u.tmem.size;
-+	shm = (struct tee_shm *)(unsigned long)mp->u.tmem.shm_ref;
-+	if (!shm) {
-+		p->u.memref.shm_offs = 0;
-+		p->u.memref.shm = NULL;
-+		return 0;
-+	}
-+
-+	rc = tee_shm_get_pa(shm, 0, &pa);
-+	if (rc)
-+		return rc;
-+
-+	p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
-+	p->u.memref.shm = shm;
-+
-+	/* Check that the memref is covered by the shm object */
-+	if (p->u.memref.size) {
-+		size_t o = p->u.memref.shm_offs +
-+			   p->u.memref.size - 1;
-+
-+		rc = tee_shm_get_pa(shm, o, NULL);
-+		if (rc)
-+			return rc;
-+	}
-+
-+	return 0;
-+}
-+
-+static void from_msg_param_reg_mem(struct tee_param *p, u32 attr,
-+				   const struct optee_msg_param *mp)
-+{
-+	struct tee_shm *shm;
-+
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
-+	p->u.memref.size = mp->u.rmem.size;
-+	shm = (struct tee_shm *)(unsigned long)mp->u.rmem.shm_ref;
-+
-+	if (shm) {
-+		p->u.memref.shm_offs = mp->u.rmem.offs;
-+		p->u.memref.shm = shm;
-+	} else {
-+		p->u.memref.shm_offs = 0;
-+		p->u.memref.shm = NULL;
-+	}
-+}
-+
-+/**
-+ * optee_from_msg_param() - convert from OPTEE_MSG parameters to
-+ *			    struct tee_param
-+ * @optee:	main service struct
-+ * @params:	subsystem internal parameter representation
-+ * @num_params:	number of elements in the parameter arrays
-+ * @msg_params:	OPTEE_MSG parameters
-+ * Returns 0 on success or <0 on failure
-+ */
-+static int optee_from_msg_param(struct optee *optee, struct tee_param *params,
-+				size_t num_params,
-+				const struct optee_msg_param *msg_params)
-+{
-+	int rc;
-+	size_t n;
-+
-+	for (n = 0; n < num_params; n++) {
-+		struct tee_param *p = params + n;
-+		const struct optee_msg_param *mp = msg_params + n;
-+		u32 attr = mp->attr & OPTEE_MSG_ATTR_TYPE_MASK;
-+
-+		switch (attr) {
-+		case OPTEE_MSG_ATTR_TYPE_NONE:
-+			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
-+			memset(&p->u, 0, sizeof(p->u));
-+			break;
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
-+			optee_from_msg_param_value(p, attr, mp);
-+			break;
-+		case OPTEE_MSG_ATTR_TYPE_TMEM_INPUT:
-+		case OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT:
-+		case OPTEE_MSG_ATTR_TYPE_TMEM_INOUT:
-+			rc = from_msg_param_tmp_mem(p, attr, mp);
-+			if (rc)
-+				return rc;
-+			break;
-+		case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
-+		case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
-+		case OPTEE_MSG_ATTR_TYPE_RMEM_INOUT:
-+			from_msg_param_reg_mem(p, attr, mp);
-+			break;
-+
-+		default:
-+			return -EINVAL;
-+		}
-+	}
-+	return 0;
-+}
-+
-+static int to_msg_param_tmp_mem(struct optee_msg_param *mp,
-+				const struct tee_param *p)
-+{
-+	int rc;
-+	phys_addr_t pa;
-+
-+	mp->attr = OPTEE_MSG_ATTR_TYPE_TMEM_INPUT + p->attr -
-+		   TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
-+
-+	mp->u.tmem.shm_ref = (unsigned long)p->u.memref.shm;
-+	mp->u.tmem.size = p->u.memref.size;
-+
-+	if (!p->u.memref.shm) {
-+		mp->u.tmem.buf_ptr = 0;
-+		return 0;
-+	}
-+
-+	rc = tee_shm_get_pa(p->u.memref.shm, p->u.memref.shm_offs, &pa);
-+	if (rc)
-+		return rc;
-+
-+	mp->u.tmem.buf_ptr = pa;
-+	mp->attr |= OPTEE_MSG_ATTR_CACHE_PREDEFINED <<
-+		    OPTEE_MSG_ATTR_CACHE_SHIFT;
-+
-+	return 0;
-+}
-+
-+static int to_msg_param_reg_mem(struct optee_msg_param *mp,
-+				const struct tee_param *p)
-+{
-+	mp->attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT + p->attr -
-+		   TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
-+
-+	mp->u.rmem.shm_ref = (unsigned long)p->u.memref.shm;
-+	mp->u.rmem.size = p->u.memref.size;
-+	mp->u.rmem.offs = p->u.memref.shm_offs;
-+	return 0;
-+}
-+
-+/**
-+ * optee_to_msg_param() - convert from struct tee_params to OPTEE_MSG parameters
-+ * @optee:	main service struct
-+ * @msg_params:	OPTEE_MSG parameters
-+ * @num_params:	number of elements in the parameter arrays
-+ * @params:	subsystem itnernal parameter representation
-+ * Returns 0 on success or <0 on failure
-+ */
-+static int optee_to_msg_param(struct optee *optee,
-+			      struct optee_msg_param *msg_params,
-+			      size_t num_params, const struct tee_param *params)
-+{
-+	int rc;
-+	size_t n;
-+
-+	for (n = 0; n < num_params; n++) {
-+		const struct tee_param *p = params + n;
-+		struct optee_msg_param *mp = msg_params + n;
-+
-+		switch (p->attr) {
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_NONE:
-+			mp->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
-+			memset(&mp->u, 0, sizeof(mp->u));
-+			break;
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
-+			optee_to_msg_param_value(mp, p);
-+			break;
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT:
-+			if (tee_shm_is_registered(p->u.memref.shm))
-+				rc = to_msg_param_reg_mem(mp, p);
-+			else
-+				rc = to_msg_param_tmp_mem(mp, p);
-+			if (rc)
-+				return rc;
-+			break;
-+		default:
-+			return -EINVAL;
-+		}
-+	}
-+	return 0;
-+}
-+
-+/*
-+ * 2. Low level support functions to register shared memory in secure world
-+ *
-+ * Functions to enable/disable shared memory caching in secure world, that
-+ * is, lazy freeing of previously allocated shared memory. Freeing is
-+ * performed when a request has been compled.
-+ *
-+ * Functions to register and unregister shared memory both for normal
-+ * clients and for tee-supplicant.
-+ */
-+
-+/**
-+ * optee_enable_shm_cache() - Enables caching of some shared memory allocation
-+ *			      in OP-TEE
-+ * @optee:	main service struct
-+ */
-+static void optee_enable_shm_cache(struct optee *optee)
-+{
-+	struct optee_call_waiter w;
-+
-+	/* We need to retry until secure world isn't busy. */
-+	optee_cq_wait_init(&optee->call_queue, &w);
-+	while (true) {
-+		struct arm_smccc_res res;
-+
-+		optee->smc.invoke_fn(OPTEE_SMC_ENABLE_SHM_CACHE,
-+				     0, 0, 0, 0, 0, 0, 0, &res);
-+		if (res.a0 == OPTEE_SMC_RETURN_OK)
-+			break;
-+		optee_cq_wait_for_completion(&optee->call_queue, &w);
-+	}
-+	optee_cq_wait_final(&optee->call_queue, &w);
-+}
-+
-+/**
-+ * __optee_disable_shm_cache() - Disables caching of some shared memory
-+ *				 allocation in OP-TEE
-+ * @optee:	main service struct
-+ * @is_mapped:	true if the cached shared memory addresses were mapped by this
-+ *		kernel, are safe to dereference, and should be freed
-+ */
-+static void __optee_disable_shm_cache(struct optee *optee, bool is_mapped)
-+{
-+	struct optee_call_waiter w;
-+
-+	/* We need to retry until secure world isn't busy. */
-+	optee_cq_wait_init(&optee->call_queue, &w);
-+	while (true) {
-+		union {
-+			struct arm_smccc_res smccc;
-+			struct optee_smc_disable_shm_cache_result result;
-+		} res;
-+
-+		optee->smc.invoke_fn(OPTEE_SMC_DISABLE_SHM_CACHE,
-+				     0, 0, 0, 0, 0, 0, 0, &res.smccc);
-+		if (res.result.status == OPTEE_SMC_RETURN_ENOTAVAIL)
-+			break; /* All shm's freed */
-+		if (res.result.status == OPTEE_SMC_RETURN_OK) {
-+			struct tee_shm *shm;
-+
-+			/*
-+			 * Shared memory references that were not mapped by
-+			 * this kernel must be ignored to prevent a crash.
-+			 */
-+			if (!is_mapped)
-+				continue;
-+
-+			shm = reg_pair_to_ptr(res.result.shm_upper32,
-+					      res.result.shm_lower32);
-+			tee_shm_free(shm);
-+		} else {
-+			optee_cq_wait_for_completion(&optee->call_queue, &w);
-+		}
-+	}
-+	optee_cq_wait_final(&optee->call_queue, &w);
-+}
-+
-+/**
-+ * optee_disable_shm_cache() - Disables caching of mapped shared memory
-+ *			       allocations in OP-TEE
-+ * @optee:	main service struct
-+ */
-+static void optee_disable_shm_cache(struct optee *optee)
-+{
-+	return __optee_disable_shm_cache(optee, true);
-+}
-+
-+/**
-+ * optee_disable_unmapped_shm_cache() - Disables caching of shared memory
-+ *					allocations in OP-TEE which are not
-+ *					currently mapped
-+ * @optee:	main service struct
-+ */
-+static void optee_disable_unmapped_shm_cache(struct optee *optee)
-+{
-+	return __optee_disable_shm_cache(optee, false);
-+}
-+
-+#define PAGELIST_ENTRIES_PER_PAGE				\
-+	((OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(u64)) - 1)
-+
-+/*
-+ * The final entry in each pagelist page is a pointer to the next
-+ * pagelist page.
-+ */
-+static size_t get_pages_list_size(size_t num_entries)
-+{
-+	int pages = DIV_ROUND_UP(num_entries, PAGELIST_ENTRIES_PER_PAGE);
-+
-+	return pages * OPTEE_MSG_NONCONTIG_PAGE_SIZE;
-+}
-+
-+static u64 *optee_allocate_pages_list(size_t num_entries)
-+{
-+	return alloc_pages_exact(get_pages_list_size(num_entries), GFP_KERNEL);
-+}
-+
-+static void optee_free_pages_list(void *list, size_t num_entries)
-+{
-+	free_pages_exact(list, get_pages_list_size(num_entries));
-+}
-+
-+/**
-+ * optee_fill_pages_list() - write list of user pages to given shared
-+ * buffer.
-+ *
-+ * @dst: page-aligned buffer where list of pages will be stored
-+ * @pages: array of pages that represents shared buffer
-+ * @num_pages: number of entries in @pages
-+ * @page_offset: offset of user buffer from page start
-+ *
-+ * @dst should be big enough to hold list of user page addresses and
-+ *	links to the next pages of buffer
-+ */
-+static void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
-+				  size_t page_offset)
-+{
-+	int n = 0;
-+	phys_addr_t optee_page;
-+	/*
-+	 * Refer to OPTEE_MSG_ATTR_NONCONTIG description in optee_msg.h
-+	 * for details.
-+	 */
-+	struct {
-+		u64 pages_list[PAGELIST_ENTRIES_PER_PAGE];
-+		u64 next_page_data;
-+	} *pages_data;
-+
-+	/*
-+	 * Currently OP-TEE uses 4k page size and it does not looks
-+	 * like this will change in the future.  On other hand, there are
-+	 * no know ARM architectures with page size < 4k.
-+	 * Thus the next built assert looks redundant. But the following
-+	 * code heavily relies on this assumption, so it is better be
-+	 * safe than sorry.
-+	 */
-+	BUILD_BUG_ON(PAGE_SIZE < OPTEE_MSG_NONCONTIG_PAGE_SIZE);
-+
-+	pages_data = (void *)dst;
-+	/*
-+	 * If linux page is bigger than 4k, and user buffer offset is
-+	 * larger than 4k/8k/12k/etc this will skip first 4k pages,
-+	 * because they bear no value data for OP-TEE.
-+	 */
-+	optee_page = page_to_phys(*pages) +
-+		round_down(page_offset, OPTEE_MSG_NONCONTIG_PAGE_SIZE);
-+
-+	while (true) {
-+		pages_data->pages_list[n++] = optee_page;
-+
-+		if (n == PAGELIST_ENTRIES_PER_PAGE) {
-+			pages_data->next_page_data =
-+				virt_to_phys(pages_data + 1);
-+			pages_data++;
-+			n = 0;
-+		}
-+
-+		optee_page += OPTEE_MSG_NONCONTIG_PAGE_SIZE;
-+		if (!(optee_page & ~PAGE_MASK)) {
-+			if (!--num_pages)
-+				break;
-+			pages++;
-+			optee_page = page_to_phys(*pages);
-+		}
-+	}
-+}
-+
-+static int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
-+			      struct page **pages, size_t num_pages,
-+			      unsigned long start)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	struct optee_msg_arg *msg_arg;
-+	struct tee_shm *shm_arg;
-+	u64 *pages_list;
-+	int rc;
-+
-+	if (!num_pages)
-+		return -EINVAL;
-+
-+	rc = optee_check_mem_type(start, num_pages);
-+	if (rc)
-+		return rc;
-+
-+	pages_list = optee_allocate_pages_list(num_pages);
-+	if (!pages_list)
-+		return -ENOMEM;
-+
-+	shm_arg = optee_get_msg_arg(ctx, 1, &msg_arg);
-+	if (IS_ERR(shm_arg)) {
-+		rc = PTR_ERR(shm_arg);
-+		goto out;
-+	}
-+
-+	optee_fill_pages_list(pages_list, pages, num_pages,
-+			      tee_shm_get_page_offset(shm));
-+
-+	msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM;
-+	msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT |
-+				OPTEE_MSG_ATTR_NONCONTIG;
-+	msg_arg->params->u.tmem.shm_ref = (unsigned long)shm;
-+	msg_arg->params->u.tmem.size = tee_shm_get_size(shm);
-+	/*
-+	 * In the least bits of msg_arg->params->u.tmem.buf_ptr we
-+	 * store buffer offset from 4k page, as described in OP-TEE ABI.
-+	 */
-+	msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) |
-+	  (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
-+
-+	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
-+	    msg_arg->ret != TEEC_SUCCESS)
-+		rc = -EINVAL;
-+
-+	tee_shm_free(shm_arg);
-+out:
-+	optee_free_pages_list(pages_list, num_pages);
-+	return rc;
-+}
-+
-+static int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	struct optee_msg_arg *msg_arg;
-+	struct tee_shm *shm_arg;
-+	int rc = 0;
-+
-+	shm_arg = optee_get_msg_arg(ctx, 1, &msg_arg);
-+	if (IS_ERR(shm_arg))
-+		return PTR_ERR(shm_arg);
-+
-+	msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM;
-+
-+	msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
-+	msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
-+
-+	if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
-+	    msg_arg->ret != TEEC_SUCCESS)
-+		rc = -EINVAL;
-+	tee_shm_free(shm_arg);
-+	return rc;
-+}
-+
-+static int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
-+				   struct page **pages, size_t num_pages,
-+				   unsigned long start)
-+{
-+	/*
-+	 * We don't want to register supplicant memory in OP-TEE.
-+	 * Instead information about it will be passed in RPC code.
-+	 */
-+	return optee_check_mem_type(start, num_pages);
-+}
-+
-+static int optee_shm_unregister_supp(struct tee_context *ctx,
-+				     struct tee_shm *shm)
-+{
-+	return 0;
-+}
-+
-+/*
-+ * 3. Dynamic shared memory pool based on alloc_pages()
-+ *
-+ * Implements an OP-TEE specific shared memory pool which is used
-+ * when dynamic shared memory is supported by secure world.
-+ *
-+ * The main function is optee_shm_pool_alloc_pages().
-+ */
-+
-+static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
-+			 struct tee_shm *shm, size_t size)
-+{
-+	/*
-+	 * Shared memory private to the OP-TEE driver doesn't need
-+	 * to be registered with OP-TEE.
-+	 */
-+	if (shm->flags & TEE_SHM_PRIV)
-+		return optee_pool_op_alloc_helper(poolm, shm, size, NULL);
-+
-+	return optee_pool_op_alloc_helper(poolm, shm, size, optee_shm_register);
-+}
-+
-+static void pool_op_free(struct tee_shm_pool_mgr *poolm,
-+			 struct tee_shm *shm)
-+{
-+	if (!(shm->flags & TEE_SHM_PRIV))
-+		optee_shm_unregister(shm->ctx, shm);
-+
-+	free_pages((unsigned long)shm->kaddr, get_order(shm->size));
-+	shm->kaddr = NULL;
-+}
-+
-+static void pool_op_destroy_poolmgr(struct tee_shm_pool_mgr *poolm)
-+{
-+	kfree(poolm);
-+}
-+
-+static const struct tee_shm_pool_mgr_ops pool_ops = {
-+	.alloc = pool_op_alloc,
-+	.free = pool_op_free,
-+	.destroy_poolmgr = pool_op_destroy_poolmgr,
-+};
-+
-+/**
-+ * optee_shm_pool_alloc_pages() - create page-based allocator pool
-+ *
-+ * This pool is used when OP-TEE supports dymanic SHM. In this case
-+ * command buffers and such are allocated from kernel's own memory.
-+ */
-+static struct tee_shm_pool_mgr *optee_shm_pool_alloc_pages(void)
-+{
-+	struct tee_shm_pool_mgr *mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
-+
-+	if (!mgr)
-+		return ERR_PTR(-ENOMEM);
-+
-+	mgr->ops = &pool_ops;
-+
-+	return mgr;
-+}
-+
-+/*
-+ * 4. Do a normal scheduled call into secure world
-+ *
-+ * The function optee_smc_do_call_with_arg() performs a normal scheduled
-+ * call into secure world. During this call may normal world request help
-+ * from normal world using RPCs, Remote Procedure Calls. This includes
-+ * delivery of non-secure interrupts to for instance allow rescheduling of
-+ * the current task.
-+ */
-+
-+static void handle_rpc_func_cmd_shm_free(struct tee_context *ctx,
-+					 struct optee_msg_arg *arg)
-+{
-+	struct tee_shm *shm;
-+
-+	arg->ret_origin = TEEC_ORIGIN_COMMS;
-+
-+	if (arg->num_params != 1 ||
-+	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT) {
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		return;
-+	}
-+
-+	shm = (struct tee_shm *)(unsigned long)arg->params[0].u.value.b;
-+	switch (arg->params[0].u.value.a) {
-+	case OPTEE_RPC_SHM_TYPE_APPL:
-+		optee_rpc_cmd_free_suppl(ctx, shm);
-+		break;
-+	case OPTEE_RPC_SHM_TYPE_KERNEL:
-+		tee_shm_free(shm);
-+		break;
-+	default:
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+	}
-+	arg->ret = TEEC_SUCCESS;
-+}
-+
-+static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
-+					  struct optee_msg_arg *arg,
-+					  struct optee_call_ctx *call_ctx)
-+{
-+	phys_addr_t pa;
-+	struct tee_shm *shm;
-+	size_t sz;
-+	size_t n;
-+
-+	arg->ret_origin = TEEC_ORIGIN_COMMS;
-+
-+	if (!arg->num_params ||
-+	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT) {
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		return;
-+	}
-+
-+	for (n = 1; n < arg->num_params; n++) {
-+		if (arg->params[n].attr != OPTEE_MSG_ATTR_TYPE_NONE) {
-+			arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+			return;
-+		}
-+	}
-+
-+	sz = arg->params[0].u.value.b;
-+	switch (arg->params[0].u.value.a) {
-+	case OPTEE_RPC_SHM_TYPE_APPL:
-+		shm = optee_rpc_cmd_alloc_suppl(ctx, sz);
-+		break;
-+	case OPTEE_RPC_SHM_TYPE_KERNEL:
-+		shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
-+		break;
-+	default:
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		return;
-+	}
-+
-+	if (IS_ERR(shm)) {
-+		arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
-+		return;
-+	}
-+
-+	if (tee_shm_get_pa(shm, 0, &pa)) {
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		goto bad;
-+	}
-+
-+	sz = tee_shm_get_size(shm);
-+
-+	if (tee_shm_is_registered(shm)) {
-+		struct page **pages;
-+		u64 *pages_list;
-+		size_t page_num;
-+
-+		pages = tee_shm_get_pages(shm, &page_num);
-+		if (!pages || !page_num) {
-+			arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
-+			goto bad;
-+		}
-+
-+		pages_list = optee_allocate_pages_list(page_num);
-+		if (!pages_list) {
-+			arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
-+			goto bad;
-+		}
-+
-+		call_ctx->pages_list = pages_list;
-+		call_ctx->num_entries = page_num;
-+
-+		arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT |
-+				      OPTEE_MSG_ATTR_NONCONTIG;
-+		/*
-+		 * In the least bits of u.tmem.buf_ptr we store buffer offset
-+		 * from 4k page, as described in OP-TEE ABI.
-+		 */
-+		arg->params[0].u.tmem.buf_ptr = virt_to_phys(pages_list) |
-+			(tee_shm_get_page_offset(shm) &
-+			 (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
-+		arg->params[0].u.tmem.size = tee_shm_get_size(shm);
-+		arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
-+
-+		optee_fill_pages_list(pages_list, pages, page_num,
-+				      tee_shm_get_page_offset(shm));
-+	} else {
-+		arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT;
-+		arg->params[0].u.tmem.buf_ptr = pa;
-+		arg->params[0].u.tmem.size = sz;
-+		arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
-+	}
-+
-+	arg->ret = TEEC_SUCCESS;
-+	return;
-+bad:
-+	tee_shm_free(shm);
-+}
-+
-+static void free_pages_list(struct optee_call_ctx *call_ctx)
-+{
-+	if (call_ctx->pages_list) {
-+		optee_free_pages_list(call_ctx->pages_list,
-+				      call_ctx->num_entries);
-+		call_ctx->pages_list = NULL;
-+		call_ctx->num_entries = 0;
-+	}
-+}
-+
-+static void optee_rpc_finalize_call(struct optee_call_ctx *call_ctx)
-+{
-+	free_pages_list(call_ctx);
-+}
-+
-+static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
-+				struct tee_shm *shm,
-+				struct optee_call_ctx *call_ctx)
-+{
-+	struct optee_msg_arg *arg;
-+
-+	arg = tee_shm_get_va(shm, 0);
-+	if (IS_ERR(arg)) {
-+		pr_err("%s: tee_shm_get_va %p failed\n", __func__, shm);
-+		return;
-+	}
-+
-+	switch (arg->cmd) {
-+	case OPTEE_RPC_CMD_SHM_ALLOC:
-+		free_pages_list(call_ctx);
-+		handle_rpc_func_cmd_shm_alloc(ctx, arg, call_ctx);
-+		break;
-+	case OPTEE_RPC_CMD_SHM_FREE:
-+		handle_rpc_func_cmd_shm_free(ctx, arg);
-+		break;
-+	default:
-+		optee_rpc_cmd(ctx, optee, arg);
-+	}
-+}
-+
-+/**
-+ * optee_handle_rpc() - handle RPC from secure world
-+ * @ctx:	context doing the RPC
-+ * @param:	value of registers for the RPC
-+ * @call_ctx:	call context. Preserved during one OP-TEE invocation
-+ *
-+ * Result of RPC is written back into @param.
-+ */
-+static void optee_handle_rpc(struct tee_context *ctx,
-+			     struct optee_rpc_param *param,
-+			     struct optee_call_ctx *call_ctx)
-+{
-+	struct tee_device *teedev = ctx->teedev;
-+	struct optee *optee = tee_get_drvdata(teedev);
-+	struct tee_shm *shm;
-+	phys_addr_t pa;
-+
-+	switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
-+	case OPTEE_SMC_RPC_FUNC_ALLOC:
-+		shm = tee_shm_alloc(ctx, param->a1,
-+				    TEE_SHM_MAPPED | TEE_SHM_PRIV);
-+		if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
-+			reg_pair_from_64(&param->a1, &param->a2, pa);
-+			reg_pair_from_64(&param->a4, &param->a5,
-+					 (unsigned long)shm);
-+		} else {
-+			param->a1 = 0;
-+			param->a2 = 0;
-+			param->a4 = 0;
-+			param->a5 = 0;
-+		}
-+		break;
-+	case OPTEE_SMC_RPC_FUNC_FREE:
-+		shm = reg_pair_to_ptr(param->a1, param->a2);
-+		tee_shm_free(shm);
-+		break;
-+	case OPTEE_SMC_RPC_FUNC_FOREIGN_INTR:
-+		/*
-+		 * A foreign interrupt was raised while secure world was
-+		 * executing, since they are handled in Linux a dummy RPC is
-+		 * performed to let Linux take the interrupt through the normal
-+		 * vector.
-+		 */
-+		break;
-+	case OPTEE_SMC_RPC_FUNC_CMD:
-+		shm = reg_pair_to_ptr(param->a1, param->a2);
-+		handle_rpc_func_cmd(ctx, optee, shm, call_ctx);
-+		break;
-+	default:
-+		pr_warn("Unknown RPC func 0x%x\n",
-+			(u32)OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0));
-+		break;
-+	}
-+
-+	param->a0 = OPTEE_SMC_CALL_RETURN_FROM_RPC;
-+}
-+
-+/**
-+ * optee_smc_do_call_with_arg() - Do an SMC to OP-TEE in secure world
-+ * @ctx:	calling context
-+ * @arg:	shared memory holding the message to pass to secure world
-+ *
-+ * Does and SMC to OP-TEE in secure world and handles eventual resulting
-+ * Remote Procedure Calls (RPC) from OP-TEE.
-+ *
-+ * Returns return code from secure world, 0 is OK
-+ */
-+static int optee_smc_do_call_with_arg(struct tee_context *ctx,
-+				      struct tee_shm *arg)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	struct optee_call_waiter w;
-+	struct optee_rpc_param param = { };
-+	struct optee_call_ctx call_ctx = { };
-+	phys_addr_t parg;
-+	int rc;
-+
-+	rc = tee_shm_get_pa(arg, 0, &parg);
-+	if (rc)
-+		return rc;
-+
-+	param.a0 = OPTEE_SMC_CALL_WITH_ARG;
-+	reg_pair_from_64(&param.a1, &param.a2, parg);
-+	/* Initialize waiter */
-+	optee_cq_wait_init(&optee->call_queue, &w);
-+	while (true) {
-+		struct arm_smccc_res res;
-+
-+		trace_optee_invoke_fn_begin(&param);
-+		optee->smc.invoke_fn(param.a0, param.a1, param.a2, param.a3,
-+				     param.a4, param.a5, param.a6, param.a7,
-+				     &res);
-+		trace_optee_invoke_fn_end(&param, &res);
-+
-+		if (res.a0 == OPTEE_SMC_RETURN_ETHREAD_LIMIT) {
-+			/*
-+			 * Out of threads in secure world, wait for a thread
-+			 * become available.
-+			 */
-+			optee_cq_wait_for_completion(&optee->call_queue, &w);
-+		} else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
-+			cond_resched();
-+			param.a0 = res.a0;
-+			param.a1 = res.a1;
-+			param.a2 = res.a2;
-+			param.a3 = res.a3;
-+			optee_handle_rpc(ctx, &param, &call_ctx);
-+		} else {
-+			rc = res.a0;
-+			break;
-+		}
-+	}
-+
-+	optee_rpc_finalize_call(&call_ctx);
-+	/*
-+	 * We're done with our thread in secure world, if there's any
-+	 * thread waiters wake up one.
-+	 */
-+	optee_cq_wait_final(&optee->call_queue, &w);
-+
-+	return rc;
-+}
-+
-+/*
-+ * 5. Driver initialization
-+ *
-+ * During driver inititialization is secure world probed to find out which
-+ * features it supports so the driver can be initialized with a matching
-+ * configuration. This involves for instance support for dynamic shared
-+ * memory instead of a static memory carvout.
-+ */
-+
-+static void optee_get_version(struct tee_device *teedev,
-+			      struct tee_ioctl_version_data *vers)
-+{
-+	struct tee_ioctl_version_data v = {
-+		.impl_id = TEE_IMPL_ID_OPTEE,
-+		.impl_caps = TEE_OPTEE_CAP_TZ,
-+		.gen_caps = TEE_GEN_CAP_GP,
-+	};
-+	struct optee *optee = tee_get_drvdata(teedev);
-+
-+	if (optee->smc.sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
-+		v.gen_caps |= TEE_GEN_CAP_REG_MEM;
-+	if (optee->smc.sec_caps & OPTEE_SMC_SEC_CAP_MEMREF_NULL)
-+		v.gen_caps |= TEE_GEN_CAP_MEMREF_NULL;
-+	*vers = v;
-+}
-+
-+static int optee_smc_open(struct tee_context *ctx)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	u32 sec_caps = optee->smc.sec_caps;
-+
-+	return optee_open(ctx, sec_caps & OPTEE_SMC_SEC_CAP_MEMREF_NULL);
-+}
-+
-+static const struct tee_driver_ops optee_clnt_ops = {
-+	.get_version = optee_get_version,
-+	.open = optee_smc_open,
-+	.release = optee_release,
-+	.open_session = optee_open_session,
-+	.close_session = optee_close_session,
-+	.invoke_func = optee_invoke_func,
-+	.cancel_req = optee_cancel_req,
-+	.shm_register = optee_shm_register,
-+	.shm_unregister = optee_shm_unregister,
-+};
-+
-+static const struct tee_desc optee_clnt_desc = {
-+	.name = DRIVER_NAME "-clnt",
-+	.ops = &optee_clnt_ops,
-+	.owner = THIS_MODULE,
-+};
-+
-+static const struct tee_driver_ops optee_supp_ops = {
-+	.get_version = optee_get_version,
-+	.open = optee_smc_open,
-+	.release = optee_release_supp,
-+	.supp_recv = optee_supp_recv,
-+	.supp_send = optee_supp_send,
-+	.shm_register = optee_shm_register_supp,
-+	.shm_unregister = optee_shm_unregister_supp,
-+};
-+
-+static const struct tee_desc optee_supp_desc = {
-+	.name = DRIVER_NAME "-supp",
-+	.ops = &optee_supp_ops,
-+	.owner = THIS_MODULE,
-+	.flags = TEE_DESC_PRIVILEGED,
-+};
-+
-+static const struct optee_ops optee_ops = {
-+	.do_call_with_arg = optee_smc_do_call_with_arg,
-+	.to_msg_param = optee_to_msg_param,
-+	.from_msg_param = optee_from_msg_param,
-+};
-+
-+static bool optee_msg_api_uid_is_optee_api(optee_invoke_fn *invoke_fn)
-+{
-+	struct arm_smccc_res res;
-+
-+	invoke_fn(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0, 0, &res);
-+
-+	if (res.a0 == OPTEE_MSG_UID_0 && res.a1 == OPTEE_MSG_UID_1 &&
-+	    res.a2 == OPTEE_MSG_UID_2 && res.a3 == OPTEE_MSG_UID_3)
-+		return true;
-+	return false;
-+}
-+
-+static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
-+{
-+	union {
-+		struct arm_smccc_res smccc;
-+		struct optee_smc_call_get_os_revision_result result;
-+	} res = {
-+		.result = {
-+			.build_id = 0
-+		}
-+	};
-+
-+	invoke_fn(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0, 0,
-+		  &res.smccc);
-+
-+	if (res.result.build_id)
-+		pr_info("revision %lu.%lu (%08lx)", res.result.major,
-+			res.result.minor, res.result.build_id);
-+	else
-+		pr_info("revision %lu.%lu", res.result.major, res.result.minor);
-+}
-+
-+static bool optee_msg_api_revision_is_compatible(optee_invoke_fn *invoke_fn)
-+{
-+	union {
-+		struct arm_smccc_res smccc;
-+		struct optee_smc_calls_revision_result result;
-+	} res;
-+
-+	invoke_fn(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0, 0, &res.smccc);
-+
-+	if (res.result.major == OPTEE_MSG_REVISION_MAJOR &&
-+	    (int)res.result.minor >= OPTEE_MSG_REVISION_MINOR)
-+		return true;
-+	return false;
-+}
-+
-+static bool optee_msg_exchange_capabilities(optee_invoke_fn *invoke_fn,
-+					    u32 *sec_caps)
-+{
-+	union {
-+		struct arm_smccc_res smccc;
-+		struct optee_smc_exchange_capabilities_result result;
-+	} res;
-+	u32 a1 = 0;
-+
-+	/*
-+	 * TODO This isn't enough to tell if it's UP system (from kernel
-+	 * point of view) or not, is_smp() returns the information
-+	 * needed, but can't be called directly from here.
-+	 */
-+	if (!IS_ENABLED(CONFIG_SMP) || nr_cpu_ids == 1)
-+		a1 |= OPTEE_SMC_NSEC_CAP_UNIPROCESSOR;
-+
-+	invoke_fn(OPTEE_SMC_EXCHANGE_CAPABILITIES, a1, 0, 0, 0, 0, 0, 0,
-+		  &res.smccc);
-+
-+	if (res.result.status != OPTEE_SMC_RETURN_OK)
-+		return false;
-+
-+	*sec_caps = res.result.capabilities;
-+	return true;
-+}
-+
-+static struct tee_shm_pool *optee_config_dyn_shm(void)
-+{
-+	struct tee_shm_pool_mgr *priv_mgr;
-+	struct tee_shm_pool_mgr *dmabuf_mgr;
-+	void *rc;
-+
-+	rc = optee_shm_pool_alloc_pages();
-+	if (IS_ERR(rc))
-+		return rc;
-+	priv_mgr = rc;
-+
-+	rc = optee_shm_pool_alloc_pages();
-+	if (IS_ERR(rc)) {
-+		tee_shm_pool_mgr_destroy(priv_mgr);
-+		return rc;
-+	}
-+	dmabuf_mgr = rc;
-+
-+	rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr);
-+	if (IS_ERR(rc)) {
-+		tee_shm_pool_mgr_destroy(priv_mgr);
-+		tee_shm_pool_mgr_destroy(dmabuf_mgr);
-+	}
-+
-+	return rc;
-+}
-+
-+static struct tee_shm_pool *
-+optee_config_shm_memremap(optee_invoke_fn *invoke_fn, void **memremaped_shm)
-+{
-+	union {
-+		struct arm_smccc_res smccc;
-+		struct optee_smc_get_shm_config_result result;
-+	} res;
-+	unsigned long vaddr;
-+	phys_addr_t paddr;
-+	size_t size;
-+	phys_addr_t begin;
-+	phys_addr_t end;
-+	void *va;
-+	struct tee_shm_pool_mgr *priv_mgr;
-+	struct tee_shm_pool_mgr *dmabuf_mgr;
-+	void *rc;
-+	const int sz = OPTEE_SHM_NUM_PRIV_PAGES * PAGE_SIZE;
-+
-+	invoke_fn(OPTEE_SMC_GET_SHM_CONFIG, 0, 0, 0, 0, 0, 0, 0, &res.smccc);
-+	if (res.result.status != OPTEE_SMC_RETURN_OK) {
-+		pr_err("static shm service not available\n");
-+		return ERR_PTR(-ENOENT);
-+	}
-+
-+	if (res.result.settings != OPTEE_SMC_SHM_CACHED) {
-+		pr_err("only normal cached shared memory supported\n");
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	begin = roundup(res.result.start, PAGE_SIZE);
-+	end = rounddown(res.result.start + res.result.size, PAGE_SIZE);
-+	paddr = begin;
-+	size = end - begin;
-+
-+	if (size < 2 * OPTEE_SHM_NUM_PRIV_PAGES * PAGE_SIZE) {
-+		pr_err("too small shared memory area\n");
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	va = memremap(paddr, size, MEMREMAP_WB);
-+	if (!va) {
-+		pr_err("shared memory ioremap failed\n");
-+		return ERR_PTR(-EINVAL);
-+	}
-+	vaddr = (unsigned long)va;
-+
-+	rc = tee_shm_pool_mgr_alloc_res_mem(vaddr, paddr, sz,
-+					    3 /* 8 bytes aligned */);
-+	if (IS_ERR(rc))
-+		goto err_memunmap;
-+	priv_mgr = rc;
-+
-+	vaddr += sz;
-+	paddr += sz;
-+	size -= sz;
-+
-+	rc = tee_shm_pool_mgr_alloc_res_mem(vaddr, paddr, size, PAGE_SHIFT);
-+	if (IS_ERR(rc))
-+		goto err_free_priv_mgr;
-+	dmabuf_mgr = rc;
-+
-+	rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr);
-+	if (IS_ERR(rc))
-+		goto err_free_dmabuf_mgr;
-+
-+	*memremaped_shm = va;
-+
-+	return rc;
-+
-+err_free_dmabuf_mgr:
-+	tee_shm_pool_mgr_destroy(dmabuf_mgr);
-+err_free_priv_mgr:
-+	tee_shm_pool_mgr_destroy(priv_mgr);
-+err_memunmap:
-+	memunmap(va);
-+	return rc;
-+}
-+
-+/* Simple wrapper functions to be able to use a function pointer */
-+static void optee_smccc_smc(unsigned long a0, unsigned long a1,
-+			    unsigned long a2, unsigned long a3,
-+			    unsigned long a4, unsigned long a5,
-+			    unsigned long a6, unsigned long a7,
-+			    struct arm_smccc_res *res)
-+{
-+	arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res);
-+}
-+
-+static void optee_smccc_hvc(unsigned long a0, unsigned long a1,
-+			    unsigned long a2, unsigned long a3,
-+			    unsigned long a4, unsigned long a5,
-+			    unsigned long a6, unsigned long a7,
-+			    struct arm_smccc_res *res)
-+{
-+	arm_smccc_hvc(a0, a1, a2, a3, a4, a5, a6, a7, res);
-+}
-+
-+static optee_invoke_fn *get_invoke_func(struct device *dev)
-+{
-+	const char *method;
-+
-+	pr_info("probing for conduit method.\n");
-+
-+	if (device_property_read_string(dev, "method", &method)) {
-+		pr_warn("missing \"method\" property\n");
-+		return ERR_PTR(-ENXIO);
-+	}
-+
-+	if (!strcmp("hvc", method))
-+		return optee_smccc_hvc;
-+	else if (!strcmp("smc", method))
-+		return optee_smccc_smc;
-+
-+	pr_warn("invalid \"method\" property: %s\n", method);
-+	return ERR_PTR(-EINVAL);
-+}
-+
-+/* optee_remove - Device Removal Routine
-+ * @pdev: platform device information struct
-+ *
-+ * optee_remove is called by platform subsystem to alert the driver
-+ * that it should release the device
-+ */
-+static int optee_smc_remove(struct platform_device *pdev)
-+{
-+	struct optee *optee = platform_get_drvdata(pdev);
-+
-+	/*
-+	 * Ask OP-TEE to free all cached shared memory objects to decrease
-+	 * reference counters and also avoid wild pointers in secure world
-+	 * into the old shared memory range.
-+	 */
-+	optee_disable_shm_cache(optee);
-+
-+	optee_remove_common(optee);
-+
-+	if (optee->smc.memremaped_shm)
-+		memunmap(optee->smc.memremaped_shm);
-+
-+	kfree(optee);
-+
-+	return 0;
-+}
-+
-+/* optee_shutdown - Device Removal Routine
-+ * @pdev: platform device information struct
-+ *
-+ * platform_shutdown is called by the platform subsystem to alert
-+ * the driver that a shutdown, reboot, or kexec is happening and
-+ * device must be disabled.
-+ */
-+static void optee_shutdown(struct platform_device *pdev)
-+{
-+	optee_disable_shm_cache(platform_get_drvdata(pdev));
-+}
-+
-+static int optee_probe(struct platform_device *pdev)
-+{
-+	optee_invoke_fn *invoke_fn;
-+	struct tee_shm_pool *pool = ERR_PTR(-EINVAL);
-+	struct optee *optee = NULL;
-+	void *memremaped_shm = NULL;
-+	struct tee_device *teedev;
-+	u32 sec_caps;
-+	int rc;
-+
-+	invoke_fn = get_invoke_func(&pdev->dev);
-+	if (IS_ERR(invoke_fn))
-+		return PTR_ERR(invoke_fn);
-+
-+	if (!optee_msg_api_uid_is_optee_api(invoke_fn)) {
-+		pr_warn("api uid mismatch\n");
-+		return -EINVAL;
-+	}
-+
-+	optee_msg_get_os_revision(invoke_fn);
-+
-+	if (!optee_msg_api_revision_is_compatible(invoke_fn)) {
-+		pr_warn("api revision mismatch\n");
-+		return -EINVAL;
-+	}
-+
-+	if (!optee_msg_exchange_capabilities(invoke_fn, &sec_caps)) {
-+		pr_warn("capabilities mismatch\n");
-+		return -EINVAL;
-+	}
-+
-+	/*
-+	 * Try to use dynamic shared memory if possible
-+	 */
-+	if (sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
-+		pool = optee_config_dyn_shm();
-+
-+	/*
-+	 * If dynamic shared memory is not available or failed - try static one
-+	 */
-+	if (IS_ERR(pool) && (sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM))
-+		pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm);
-+
-+	if (IS_ERR(pool))
-+		return PTR_ERR(pool);
-+
-+	optee = kzalloc(sizeof(*optee), GFP_KERNEL);
-+	if (!optee) {
-+		rc = -ENOMEM;
-+		goto err;
-+	}
-+
-+	optee->ops = &optee_ops;
-+	optee->smc.invoke_fn = invoke_fn;
-+	optee->smc.sec_caps = sec_caps;
-+
-+	teedev = tee_device_alloc(&optee_clnt_desc, NULL, pool, optee);
-+	if (IS_ERR(teedev)) {
-+		rc = PTR_ERR(teedev);
-+		goto err;
-+	}
-+	optee->teedev = teedev;
-+
-+	teedev = tee_device_alloc(&optee_supp_desc, NULL, pool, optee);
-+	if (IS_ERR(teedev)) {
-+		rc = PTR_ERR(teedev);
-+		goto err;
-+	}
-+	optee->supp_teedev = teedev;
-+
-+	rc = tee_device_register(optee->teedev);
-+	if (rc)
-+		goto err;
-+
-+	rc = tee_device_register(optee->supp_teedev);
-+	if (rc)
-+		goto err;
-+
-+	mutex_init(&optee->call_queue.mutex);
-+	INIT_LIST_HEAD(&optee->call_queue.waiters);
-+	optee_wait_queue_init(&optee->wait_queue);
-+	optee_supp_init(&optee->supp);
-+	optee->smc.memremaped_shm = memremaped_shm;
-+	optee->pool = pool;
-+
-+	/*
-+	 * Ensure that there are no pre-existing shm objects before enabling
-+	 * the shm cache so that there's no chance of receiving an invalid
-+	 * address during shutdown. This could occur, for example, if we're
-+	 * kexec booting from an older kernel that did not properly cleanup the
-+	 * shm cache.
-+	 */
-+	optee_disable_unmapped_shm_cache(optee);
-+
-+	optee_enable_shm_cache(optee);
-+
-+	if (optee->smc.sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
-+		pr_info("dynamic shared memory is enabled\n");
-+
-+	platform_set_drvdata(pdev, optee);
-+
-+	rc = optee_enumerate_devices(PTA_CMD_GET_DEVICES);
-+	if (rc) {
-+		optee_smc_remove(pdev);
-+		return rc;
-+	}
-+
-+	pr_info("initialized driver\n");
-+	return 0;
-+err:
-+	if (optee) {
-+		/*
-+		 * tee_device_unregister() is safe to call even if the
-+		 * devices hasn't been registered with
-+		 * tee_device_register() yet.
-+		 */
-+		tee_device_unregister(optee->supp_teedev);
-+		tee_device_unregister(optee->teedev);
-+		kfree(optee);
-+	}
-+	if (pool)
-+		tee_shm_pool_free(pool);
-+	if (memremaped_shm)
-+		memunmap(memremaped_shm);
-+	return rc;
-+}
-+
-+static const struct of_device_id optee_dt_match[] = {
-+	{ .compatible = "linaro,optee-tz" },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, optee_dt_match);
-+
-+static struct platform_driver optee_driver = {
-+	.probe  = optee_probe,
-+	.remove = optee_smc_remove,
-+	.shutdown = optee_shutdown,
-+	.driver = {
-+		.name = "optee",
-+		.of_match_table = optee_dt_match,
-+	},
-+};
-+
-+int optee_smc_abi_register(void)
-+{
-+	return platform_driver_register(&optee_driver);
-+}
-+
-+void optee_smc_abi_unregister(void)
-+{
-+	platform_driver_unregister(&optee_driver);
-+}
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0012-optee-add-FF-A-support.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0012-optee-add-FF-A-support.patch
deleted file mode 100644
index 14d89d5..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0012-optee-add-FF-A-support.patch
+++ /dev/null
@@ -1,1356 +0,0 @@
-From 2e26d6cc12475b86cfc0a42d6c21146b5ce1fe4b Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Wed, 21 Jul 2021 17:45:21 +0200
-Subject: [PATCH 12/40] optee: add FF-A support
-
-Adds support for using FF-A [1] as transport to the OP-TEE driver.
-
-Introduces struct optee_msg_param_fmem which carries all information
-needed when OP-TEE is calling FFA_MEM_RETRIEVE_REQ to get the shared
-memory reference mapped by the hypervisor in S-EL2. Register usage is
-also updated to include the information needed.
-
-The FF-A part of this driver is enabled if CONFIG_ARM_FFA_TRANSPORT is
-enabled.
-
-[1] https://developer.arm.com/documentation/den0077/latest
-Acked-by: Sumit Garg <sumit.garg@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [4615e5a34b95e0d81467f6d2176f19a5d184cb5d]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/Makefile        |   1 +
- drivers/tee/optee/call.c          |  13 +-
- drivers/tee/optee/core.c          |  16 +-
- drivers/tee/optee/ffa_abi.c       | 911 ++++++++++++++++++++++++++++++
- drivers/tee/optee/optee_ffa.h     | 153 +++++
- drivers/tee/optee/optee_msg.h     |  27 +-
- drivers/tee/optee/optee_private.h |  35 +-
- 7 files changed, 1143 insertions(+), 13 deletions(-)
- create mode 100644 drivers/tee/optee/ffa_abi.c
- create mode 100644 drivers/tee/optee/optee_ffa.h
-
-diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
-index 97ac3ab3e1c0..66b8a17f14c4 100644
---- a/drivers/tee/optee/Makefile
-+++ b/drivers/tee/optee/Makefile
-@@ -6,6 +6,7 @@ optee-objs += rpc.o
- optee-objs += supp.o
- optee-objs += device.o
- optee-objs += smc_abi.o
-+optee-objs += ffa_abi.o
- 
- # for tracing framework to find optee_trace.h
- CFLAGS_smc_abi.o := -I$(src)
-diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
-index 9ff4f0812825..b25cc1fac945 100644
---- a/drivers/tee/optee/call.c
-+++ b/drivers/tee/optee/call.c
-@@ -107,11 +107,20 @@ static struct optee_session *find_session(struct optee_context_data *ctxdata,
- struct tee_shm *optee_get_msg_arg(struct tee_context *ctx, size_t num_params,
- 				  struct optee_msg_arg **msg_arg)
- {
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	size_t sz = OPTEE_MSG_GET_ARG_SIZE(num_params);
- 	struct tee_shm *shm;
- 	struct optee_msg_arg *ma;
- 
--	shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params),
--			    TEE_SHM_MAPPED | TEE_SHM_PRIV);
-+	/*
-+	 * rpc_arg_count is set to the number of allocated parameters in
-+	 * the RPC argument struct if a second MSG arg struct is expected.
-+	 * The second arg struct will then be used for RPC.
-+	 */
-+	if (optee->rpc_arg_count)
-+		sz += OPTEE_MSG_GET_ARG_SIZE(optee->rpc_arg_count);
-+
-+	shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
- 	if (IS_ERR(shm))
- 		return shm;
- 
-diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
-index 27b855325b33..ab2edfcc6c70 100644
---- a/drivers/tee/optee/core.c
-+++ b/drivers/tee/optee/core.c
-@@ -172,6 +172,9 @@ void optee_remove_common(struct optee *optee)
- 	mutex_destroy(&optee->call_queue.mutex);
- }
- 
-+static int smc_abi_rc;
-+static int ffa_abi_rc;
-+
- static int optee_core_init(void)
- {
- 	/*
-@@ -184,13 +187,22 @@ static int optee_core_init(void)
- 	if (is_kdump_kernel())
- 		return -ENODEV;
- 
--	return optee_smc_abi_register();
-+	smc_abi_rc = optee_smc_abi_register();
-+	ffa_abi_rc = optee_ffa_abi_register();
-+
-+	/* If both failed there's no point with this module */
-+	if (smc_abi_rc && ffa_abi_rc)
-+		return smc_abi_rc;
-+	return 0;
- }
- module_init(optee_core_init);
- 
- static void optee_core_exit(void)
- {
--	optee_smc_abi_unregister();
-+	if (!smc_abi_rc)
-+		optee_smc_abi_unregister();
-+	if (!ffa_abi_rc)
-+		optee_ffa_abi_unregister();
- }
- module_exit(optee_core_exit);
- 
-diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
-new file mode 100644
-index 000000000000..6defd1ec982a
---- /dev/null
-+++ b/drivers/tee/optee/ffa_abi.c
-@@ -0,0 +1,911 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (c) 2021, Linaro Limited
-+ */
-+
-+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-+
-+#include <linux/arm_ffa.h>
-+#include <linux/errno.h>
-+#include <linux/scatterlist.h>
-+#include <linux/sched.h>
-+#include <linux/slab.h>
-+#include <linux/string.h>
-+#include <linux/tee_drv.h>
-+#include <linux/types.h>
-+#include "optee_private.h"
-+#include "optee_ffa.h"
-+#include "optee_rpc_cmd.h"
-+
-+/*
-+ * This file implement the FF-A ABI used when communicating with secure world
-+ * OP-TEE OS via FF-A.
-+ * This file is divided into the following sections:
-+ * 1. Maintain a hash table for lookup of a global FF-A memory handle
-+ * 2. Convert between struct tee_param and struct optee_msg_param
-+ * 3. Low level support functions to register shared memory in secure world
-+ * 4. Dynamic shared memory pool based on alloc_pages()
-+ * 5. Do a normal scheduled call into secure world
-+ * 6. Driver initialization.
-+ */
-+
-+/*
-+ * 1. Maintain a hash table for lookup of a global FF-A memory handle
-+ *
-+ * FF-A assigns a global memory handle for each piece shared memory.
-+ * This handle is then used when communicating with secure world.
-+ *
-+ * Main functions are optee_shm_add_ffa_handle() and optee_shm_rem_ffa_handle()
-+ */
-+struct shm_rhash {
-+	struct tee_shm *shm;
-+	u64 global_id;
-+	struct rhash_head linkage;
-+};
-+
-+static void rh_free_fn(void *ptr, void *arg)
-+{
-+	kfree(ptr);
-+}
-+
-+static const struct rhashtable_params shm_rhash_params = {
-+	.head_offset = offsetof(struct shm_rhash, linkage),
-+	.key_len     = sizeof(u64),
-+	.key_offset  = offsetof(struct shm_rhash, global_id),
-+	.automatic_shrinking = true,
-+};
-+
-+static struct tee_shm *optee_shm_from_ffa_handle(struct optee *optee,
-+						 u64 global_id)
-+{
-+	struct tee_shm *shm = NULL;
-+	struct shm_rhash *r;
-+
-+	mutex_lock(&optee->ffa.mutex);
-+	r = rhashtable_lookup_fast(&optee->ffa.global_ids, &global_id,
-+				   shm_rhash_params);
-+	if (r)
-+		shm = r->shm;
-+	mutex_unlock(&optee->ffa.mutex);
-+
-+	return shm;
-+}
-+
-+static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm,
-+				    u64 global_id)
-+{
-+	struct shm_rhash *r;
-+	int rc;
-+
-+	r = kmalloc(sizeof(*r), GFP_KERNEL);
-+	if (!r)
-+		return -ENOMEM;
-+	r->shm = shm;
-+	r->global_id = global_id;
-+
-+	mutex_lock(&optee->ffa.mutex);
-+	rc = rhashtable_lookup_insert_fast(&optee->ffa.global_ids, &r->linkage,
-+					   shm_rhash_params);
-+	mutex_unlock(&optee->ffa.mutex);
-+
-+	if (rc)
-+		kfree(r);
-+
-+	return rc;
-+}
-+
-+static int optee_shm_rem_ffa_handle(struct optee *optee, u64 global_id)
-+{
-+	struct shm_rhash *r;
-+	int rc = -ENOENT;
-+
-+	mutex_lock(&optee->ffa.mutex);
-+	r = rhashtable_lookup_fast(&optee->ffa.global_ids, &global_id,
-+				   shm_rhash_params);
-+	if (r)
-+		rc = rhashtable_remove_fast(&optee->ffa.global_ids,
-+					    &r->linkage, shm_rhash_params);
-+	mutex_unlock(&optee->ffa.mutex);
-+
-+	if (!rc)
-+		kfree(r);
-+
-+	return rc;
-+}
-+
-+/*
-+ * 2. Convert between struct tee_param and struct optee_msg_param
-+ *
-+ * optee_ffa_from_msg_param() and optee_ffa_to_msg_param() are the main
-+ * functions.
-+ */
-+
-+static void from_msg_param_ffa_mem(struct optee *optee, struct tee_param *p,
-+				   u32 attr, const struct optee_msg_param *mp)
-+{
-+	struct tee_shm *shm = NULL;
-+	u64 offs_high = 0;
-+	u64 offs_low = 0;
-+
-+	p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT +
-+		  attr - OPTEE_MSG_ATTR_TYPE_FMEM_INPUT;
-+	p->u.memref.size = mp->u.fmem.size;
-+
-+	if (mp->u.fmem.global_id != OPTEE_MSG_FMEM_INVALID_GLOBAL_ID)
-+		shm = optee_shm_from_ffa_handle(optee, mp->u.fmem.global_id);
-+	p->u.memref.shm = shm;
-+
-+	if (shm) {
-+		offs_low = mp->u.fmem.offs_low;
-+		offs_high = mp->u.fmem.offs_high;
-+	}
-+	p->u.memref.shm_offs = offs_low | offs_high << 32;
-+}
-+
-+/**
-+ * optee_ffa_from_msg_param() - convert from OPTEE_MSG parameters to
-+ *				struct tee_param
-+ * @optee:	main service struct
-+ * @params:	subsystem internal parameter representation
-+ * @num_params:	number of elements in the parameter arrays
-+ * @msg_params:	OPTEE_MSG parameters
-+ *
-+ * Returns 0 on success or <0 on failure
-+ */
-+static int optee_ffa_from_msg_param(struct optee *optee,
-+				    struct tee_param *params, size_t num_params,
-+				    const struct optee_msg_param *msg_params)
-+{
-+	size_t n;
-+
-+	for (n = 0; n < num_params; n++) {
-+		struct tee_param *p = params + n;
-+		const struct optee_msg_param *mp = msg_params + n;
-+		u32 attr = mp->attr & OPTEE_MSG_ATTR_TYPE_MASK;
-+
-+		switch (attr) {
-+		case OPTEE_MSG_ATTR_TYPE_NONE:
-+			p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
-+			memset(&p->u, 0, sizeof(p->u));
-+			break;
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
-+		case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
-+			optee_from_msg_param_value(p, attr, mp);
-+			break;
-+		case OPTEE_MSG_ATTR_TYPE_FMEM_INPUT:
-+		case OPTEE_MSG_ATTR_TYPE_FMEM_OUTPUT:
-+		case OPTEE_MSG_ATTR_TYPE_FMEM_INOUT:
-+			from_msg_param_ffa_mem(optee, p, attr, mp);
-+			break;
-+		default:
-+			return -EINVAL;
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+static int to_msg_param_ffa_mem(struct optee_msg_param *mp,
-+				const struct tee_param *p)
-+{
-+	struct tee_shm *shm = p->u.memref.shm;
-+
-+	mp->attr = OPTEE_MSG_ATTR_TYPE_FMEM_INPUT + p->attr -
-+		   TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
-+
-+	if (shm) {
-+		u64 shm_offs = p->u.memref.shm_offs;
-+
-+		mp->u.fmem.internal_offs = shm->offset;
-+
-+		mp->u.fmem.offs_low = shm_offs;
-+		mp->u.fmem.offs_high = shm_offs >> 32;
-+		/* Check that the entire offset could be stored. */
-+		if (mp->u.fmem.offs_high != shm_offs >> 32)
-+			return -EINVAL;
-+
-+		mp->u.fmem.global_id = shm->sec_world_id;
-+	} else {
-+		memset(&mp->u, 0, sizeof(mp->u));
-+		mp->u.fmem.global_id = OPTEE_MSG_FMEM_INVALID_GLOBAL_ID;
-+	}
-+	mp->u.fmem.size = p->u.memref.size;
-+
-+	return 0;
-+}
-+
-+/**
-+ * optee_ffa_to_msg_param() - convert from struct tee_params to OPTEE_MSG
-+ *			      parameters
-+ * @optee:	main service struct
-+ * @msg_params:	OPTEE_MSG parameters
-+ * @num_params:	number of elements in the parameter arrays
-+ * @params:	subsystem itnernal parameter representation
-+ * Returns 0 on success or <0 on failure
-+ */
-+static int optee_ffa_to_msg_param(struct optee *optee,
-+				  struct optee_msg_param *msg_params,
-+				  size_t num_params,
-+				  const struct tee_param *params)
-+{
-+	size_t n;
-+
-+	for (n = 0; n < num_params; n++) {
-+		const struct tee_param *p = params + n;
-+		struct optee_msg_param *mp = msg_params + n;
-+
-+		switch (p->attr) {
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_NONE:
-+			mp->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE;
-+			memset(&mp->u, 0, sizeof(mp->u));
-+			break;
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
-+			optee_to_msg_param_value(mp, p);
-+			break;
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
-+		case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT:
-+			if (to_msg_param_ffa_mem(mp, p))
-+				return -EINVAL;
-+			break;
-+		default:
-+			return -EINVAL;
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+/*
-+ * 3. Low level support functions to register shared memory in secure world
-+ *
-+ * Functions to register and unregister shared memory both for normal
-+ * clients and for tee-supplicant.
-+ */
-+
-+static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
-+				  struct page **pages, size_t num_pages,
-+				  unsigned long start)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
-+	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
-+	struct ffa_mem_region_attributes mem_attr = {
-+		.receiver = ffa_dev->vm_id,
-+		.attrs = FFA_MEM_RW,
-+	};
-+	struct ffa_mem_ops_args args = {
-+		.use_txbuf = true,
-+		.attrs = &mem_attr,
-+		.nattrs = 1,
-+	};
-+	struct sg_table sgt;
-+	int rc;
-+
-+	rc = optee_check_mem_type(start, num_pages);
-+	if (rc)
-+		return rc;
-+
-+	rc = sg_alloc_table_from_pages(&sgt, pages, num_pages, 0,
-+				       num_pages * PAGE_SIZE, GFP_KERNEL);
-+	if (rc)
-+		return rc;
-+	args.sg = sgt.sgl;
-+	rc = ffa_ops->memory_share(ffa_dev, &args);
-+	sg_free_table(&sgt);
-+	if (rc)
-+		return rc;
-+
-+	rc = optee_shm_add_ffa_handle(optee, shm, args.g_handle);
-+	if (rc) {
-+		ffa_ops->memory_reclaim(args.g_handle, 0);
-+		return rc;
-+	}
-+
-+	shm->sec_world_id = args.g_handle;
-+
-+	return 0;
-+}
-+
-+static int optee_ffa_shm_unregister(struct tee_context *ctx,
-+				    struct tee_shm *shm)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
-+	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
-+	u64 global_handle = shm->sec_world_id;
-+	struct ffa_send_direct_data data = {
-+		.data0 = OPTEE_FFA_UNREGISTER_SHM,
-+		.data1 = (u32)global_handle,
-+		.data2 = (u32)(global_handle >> 32)
-+	};
-+	int rc;
-+
-+	optee_shm_rem_ffa_handle(optee, global_handle);
-+	shm->sec_world_id = 0;
-+
-+	rc = ffa_ops->sync_send_receive(ffa_dev, &data);
-+	if (rc)
-+		pr_err("Unregister SHM id 0x%llx rc %d\n", global_handle, rc);
-+
-+	rc = ffa_ops->memory_reclaim(global_handle, 0);
-+	if (rc)
-+		pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
-+
-+	return rc;
-+}
-+
-+static int optee_ffa_shm_unregister_supp(struct tee_context *ctx,
-+					 struct tee_shm *shm)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
-+	u64 global_handle = shm->sec_world_id;
-+	int rc;
-+
-+	/*
-+	 * We're skipping the OPTEE_FFA_YIELDING_CALL_UNREGISTER_SHM call
-+	 * since this is OP-TEE freeing via RPC so it has already retired
-+	 * this ID.
-+	 */
-+
-+	optee_shm_rem_ffa_handle(optee, global_handle);
-+	rc = ffa_ops->memory_reclaim(global_handle, 0);
-+	if (rc)
-+		pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
-+
-+	shm->sec_world_id = 0;
-+
-+	return rc;
-+}
-+
-+/*
-+ * 4. Dynamic shared memory pool based on alloc_pages()
-+ *
-+ * Implements an OP-TEE specific shared memory pool.
-+ * The main function is optee_ffa_shm_pool_alloc_pages().
-+ */
-+
-+static int pool_ffa_op_alloc(struct tee_shm_pool_mgr *poolm,
-+			     struct tee_shm *shm, size_t size)
-+{
-+	return optee_pool_op_alloc_helper(poolm, shm, size,
-+					  optee_ffa_shm_register);
-+}
-+
-+static void pool_ffa_op_free(struct tee_shm_pool_mgr *poolm,
-+			     struct tee_shm *shm)
-+{
-+	optee_ffa_shm_unregister(shm->ctx, shm);
-+	free_pages((unsigned long)shm->kaddr, get_order(shm->size));
-+	shm->kaddr = NULL;
-+}
-+
-+static void pool_ffa_op_destroy_poolmgr(struct tee_shm_pool_mgr *poolm)
-+{
-+	kfree(poolm);
-+}
-+
-+static const struct tee_shm_pool_mgr_ops pool_ffa_ops = {
-+	.alloc = pool_ffa_op_alloc,
-+	.free = pool_ffa_op_free,
-+	.destroy_poolmgr = pool_ffa_op_destroy_poolmgr,
-+};
-+
-+/**
-+ * optee_ffa_shm_pool_alloc_pages() - create page-based allocator pool
-+ *
-+ * This pool is used with OP-TEE over FF-A. In this case command buffers
-+ * and such are allocated from kernel's own memory.
-+ */
-+static struct tee_shm_pool_mgr *optee_ffa_shm_pool_alloc_pages(void)
-+{
-+	struct tee_shm_pool_mgr *mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
-+
-+	if (!mgr)
-+		return ERR_PTR(-ENOMEM);
-+
-+	mgr->ops = &pool_ffa_ops;
-+
-+	return mgr;
-+}
-+
-+/*
-+ * 5. Do a normal scheduled call into secure world
-+ *
-+ * The function optee_ffa_do_call_with_arg() performs a normal scheduled
-+ * call into secure world. During this call may normal world request help
-+ * from normal world using RPCs, Remote Procedure Calls. This includes
-+ * delivery of non-secure interrupts to for instance allow rescheduling of
-+ * the current task.
-+ */
-+
-+static void handle_ffa_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
-+					      struct optee_msg_arg *arg)
-+{
-+	struct tee_shm *shm;
-+
-+	if (arg->num_params != 1 ||
-+	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT) {
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		return;
-+	}
-+
-+	switch (arg->params[0].u.value.a) {
-+	case OPTEE_RPC_SHM_TYPE_APPL:
-+		shm = optee_rpc_cmd_alloc_suppl(ctx, arg->params[0].u.value.b);
-+		break;
-+	case OPTEE_RPC_SHM_TYPE_KERNEL:
-+		shm = tee_shm_alloc(ctx, arg->params[0].u.value.b,
-+				    TEE_SHM_MAPPED | TEE_SHM_PRIV);
-+		break;
-+	default:
-+		arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+		return;
-+	}
-+
-+	if (IS_ERR(shm)) {
-+		arg->ret = TEEC_ERROR_OUT_OF_MEMORY;
-+		return;
-+	}
-+
-+	arg->params[0] = (struct optee_msg_param){
-+		.attr = OPTEE_MSG_ATTR_TYPE_FMEM_OUTPUT,
-+		.u.fmem.size = tee_shm_get_size(shm),
-+		.u.fmem.global_id = shm->sec_world_id,
-+		.u.fmem.internal_offs = shm->offset,
-+	};
-+
-+	arg->ret = TEEC_SUCCESS;
-+}
-+
-+static void handle_ffa_rpc_func_cmd_shm_free(struct tee_context *ctx,
-+					     struct optee *optee,
-+					     struct optee_msg_arg *arg)
-+{
-+	struct tee_shm *shm;
-+
-+	if (arg->num_params != 1 ||
-+	    arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_VALUE_INPUT)
-+		goto err_bad_param;
-+
-+	shm = optee_shm_from_ffa_handle(optee, arg->params[0].u.value.b);
-+	if (!shm)
-+		goto err_bad_param;
-+	switch (arg->params[0].u.value.a) {
-+	case OPTEE_RPC_SHM_TYPE_APPL:
-+		optee_rpc_cmd_free_suppl(ctx, shm);
-+		break;
-+	case OPTEE_RPC_SHM_TYPE_KERNEL:
-+		tee_shm_free(shm);
-+		break;
-+	default:
-+		goto err_bad_param;
-+	}
-+	arg->ret = TEEC_SUCCESS;
-+	return;
-+
-+err_bad_param:
-+	arg->ret = TEEC_ERROR_BAD_PARAMETERS;
-+}
-+
-+static void handle_ffa_rpc_func_cmd(struct tee_context *ctx,
-+				    struct optee_msg_arg *arg)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+
-+	arg->ret_origin = TEEC_ORIGIN_COMMS;
-+	switch (arg->cmd) {
-+	case OPTEE_RPC_CMD_SHM_ALLOC:
-+		handle_ffa_rpc_func_cmd_shm_alloc(ctx, arg);
-+		break;
-+	case OPTEE_RPC_CMD_SHM_FREE:
-+		handle_ffa_rpc_func_cmd_shm_free(ctx, optee, arg);
-+		break;
-+	default:
-+		optee_rpc_cmd(ctx, optee, arg);
-+	}
-+}
-+
-+static void optee_handle_ffa_rpc(struct tee_context *ctx, u32 cmd,
-+				 struct optee_msg_arg *arg)
-+{
-+	switch (cmd) {
-+	case OPTEE_FFA_YIELDING_CALL_RETURN_RPC_CMD:
-+		handle_ffa_rpc_func_cmd(ctx, arg);
-+		break;
-+	case OPTEE_FFA_YIELDING_CALL_RETURN_INTERRUPT:
-+		/* Interrupt delivered by now */
-+		break;
-+	default:
-+		pr_warn("Unknown RPC func 0x%x\n", cmd);
-+		break;
-+	}
-+}
-+
-+static int optee_ffa_yielding_call(struct tee_context *ctx,
-+				   struct ffa_send_direct_data *data,
-+				   struct optee_msg_arg *rpc_arg)
-+{
-+	struct optee *optee = tee_get_drvdata(ctx->teedev);
-+	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
-+	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
-+	struct optee_call_waiter w;
-+	u32 cmd = data->data0;
-+	u32 w4 = data->data1;
-+	u32 w5 = data->data2;
-+	u32 w6 = data->data3;
-+	int rc;
-+
-+	/* Initialize waiter */
-+	optee_cq_wait_init(&optee->call_queue, &w);
-+	while (true) {
-+		rc = ffa_ops->sync_send_receive(ffa_dev, data);
-+		if (rc)
-+			goto done;
-+
-+		switch ((int)data->data0) {
-+		case TEEC_SUCCESS:
-+			break;
-+		case TEEC_ERROR_BUSY:
-+			if (cmd == OPTEE_FFA_YIELDING_CALL_RESUME) {
-+				rc = -EIO;
-+				goto done;
-+			}
-+
-+			/*
-+			 * Out of threads in secure world, wait for a thread
-+			 * become available.
-+			 */
-+			optee_cq_wait_for_completion(&optee->call_queue, &w);
-+			data->data0 = cmd;
-+			data->data1 = w4;
-+			data->data2 = w5;
-+			data->data3 = w6;
-+			continue;
-+		default:
-+			rc = -EIO;
-+			goto done;
-+		}
-+
-+		if (data->data1 == OPTEE_FFA_YIELDING_CALL_RETURN_DONE)
-+			goto done;
-+
-+		/*
-+		 * OP-TEE has returned with a RPC request.
-+		 *
-+		 * Note that data->data4 (passed in register w7) is already
-+		 * filled in by ffa_ops->sync_send_receive() returning
-+		 * above.
-+		 */
-+		cond_resched();
-+		optee_handle_ffa_rpc(ctx, data->data1, rpc_arg);
-+		cmd = OPTEE_FFA_YIELDING_CALL_RESUME;
-+		data->data0 = cmd;
-+		data->data1 = 0;
-+		data->data2 = 0;
-+		data->data3 = 0;
-+	}
-+done:
-+	/*
-+	 * We're done with our thread in secure world, if there's any
-+	 * thread waiters wake up one.
-+	 */
-+	optee_cq_wait_final(&optee->call_queue, &w);
-+
-+	return rc;
-+}
-+
-+/**
-+ * optee_ffa_do_call_with_arg() - Do a FF-A call to enter OP-TEE in secure world
-+ * @ctx:	calling context
-+ * @shm:	shared memory holding the message to pass to secure world
-+ *
-+ * Does a FF-A call to OP-TEE in secure world and handles eventual resulting
-+ * Remote Procedure Calls (RPC) from OP-TEE.
-+ *
-+ * Returns return code from FF-A, 0 is OK
-+ */
-+
-+static int optee_ffa_do_call_with_arg(struct tee_context *ctx,
-+				      struct tee_shm *shm)
-+{
-+	struct ffa_send_direct_data data = {
-+		.data0 = OPTEE_FFA_YIELDING_CALL_WITH_ARG,
-+		.data1 = (u32)shm->sec_world_id,
-+		.data2 = (u32)(shm->sec_world_id >> 32),
-+		.data3 = shm->offset,
-+	};
-+	struct optee_msg_arg *arg = tee_shm_get_va(shm, 0);
-+	unsigned int rpc_arg_offs = OPTEE_MSG_GET_ARG_SIZE(arg->num_params);
-+	struct optee_msg_arg *rpc_arg = tee_shm_get_va(shm, rpc_arg_offs);
-+
-+	return optee_ffa_yielding_call(ctx, &data, rpc_arg);
-+}
-+
-+/*
-+ * 6. Driver initialization
-+ *
-+ * During driver inititialization is the OP-TEE Secure Partition is probed
-+ * to find out which features it supports so the driver can be initialized
-+ * with a matching configuration.
-+ */
-+
-+static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
-+					const struct ffa_dev_ops *ops)
-+{
-+	struct ffa_send_direct_data data = { OPTEE_FFA_GET_API_VERSION };
-+	int rc;
-+
-+	ops->mode_32bit_set(ffa_dev);
-+
-+	rc = ops->sync_send_receive(ffa_dev, &data);
-+	if (rc) {
-+		pr_err("Unexpected error %d\n", rc);
-+		return false;
-+	}
-+	if (data.data0 != OPTEE_FFA_VERSION_MAJOR ||
-+	    data.data1 < OPTEE_FFA_VERSION_MINOR) {
-+		pr_err("Incompatible OP-TEE API version %lu.%lu",
-+		       data.data0, data.data1);
-+		return false;
-+	}
-+
-+	data = (struct ffa_send_direct_data){ OPTEE_FFA_GET_OS_VERSION };
-+	rc = ops->sync_send_receive(ffa_dev, &data);
-+	if (rc) {
-+		pr_err("Unexpected error %d\n", rc);
-+		return false;
-+	}
-+	if (data.data2)
-+		pr_info("revision %lu.%lu (%08lx)",
-+			data.data0, data.data1, data.data2);
-+	else
-+		pr_info("revision %lu.%lu", data.data0, data.data1);
-+
-+	return true;
-+}
-+
-+static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev,
-+				    const struct ffa_dev_ops *ops,
-+				    unsigned int *rpc_arg_count)
-+{
-+	struct ffa_send_direct_data data = { OPTEE_FFA_EXCHANGE_CAPABILITIES };
-+	int rc;
-+
-+	rc = ops->sync_send_receive(ffa_dev, &data);
-+	if (rc) {
-+		pr_err("Unexpected error %d", rc);
-+		return false;
-+	}
-+	if (data.data0) {
-+		pr_err("Unexpected exchange error %lu", data.data0);
-+		return false;
-+	}
-+
-+	*rpc_arg_count = (u8)data.data1;
-+
-+	return true;
-+}
-+
-+static struct tee_shm_pool *optee_ffa_config_dyn_shm(void)
-+{
-+	struct tee_shm_pool_mgr *priv_mgr;
-+	struct tee_shm_pool_mgr *dmabuf_mgr;
-+	void *rc;
-+
-+	rc = optee_ffa_shm_pool_alloc_pages();
-+	if (IS_ERR(rc))
-+		return rc;
-+	priv_mgr = rc;
-+
-+	rc = optee_ffa_shm_pool_alloc_pages();
-+	if (IS_ERR(rc)) {
-+		tee_shm_pool_mgr_destroy(priv_mgr);
-+		return rc;
-+	}
-+	dmabuf_mgr = rc;
-+
-+	rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr);
-+	if (IS_ERR(rc)) {
-+		tee_shm_pool_mgr_destroy(priv_mgr);
-+		tee_shm_pool_mgr_destroy(dmabuf_mgr);
-+	}
-+
-+	return rc;
-+}
-+
-+static void optee_ffa_get_version(struct tee_device *teedev,
-+				  struct tee_ioctl_version_data *vers)
-+{
-+	struct tee_ioctl_version_data v = {
-+		.impl_id = TEE_IMPL_ID_OPTEE,
-+		.impl_caps = TEE_OPTEE_CAP_TZ,
-+		.gen_caps = TEE_GEN_CAP_GP | TEE_GEN_CAP_REG_MEM |
-+			    TEE_GEN_CAP_MEMREF_NULL,
-+	};
-+
-+	*vers = v;
-+}
-+
-+static int optee_ffa_open(struct tee_context *ctx)
-+{
-+	return optee_open(ctx, true);
-+}
-+
-+static const struct tee_driver_ops optee_ffa_clnt_ops = {
-+	.get_version = optee_ffa_get_version,
-+	.open = optee_ffa_open,
-+	.release = optee_release,
-+	.open_session = optee_open_session,
-+	.close_session = optee_close_session,
-+	.invoke_func = optee_invoke_func,
-+	.cancel_req = optee_cancel_req,
-+	.shm_register = optee_ffa_shm_register,
-+	.shm_unregister = optee_ffa_shm_unregister,
-+};
-+
-+static const struct tee_desc optee_ffa_clnt_desc = {
-+	.name = DRIVER_NAME "-ffa-clnt",
-+	.ops = &optee_ffa_clnt_ops,
-+	.owner = THIS_MODULE,
-+};
-+
-+static const struct tee_driver_ops optee_ffa_supp_ops = {
-+	.get_version = optee_ffa_get_version,
-+	.open = optee_ffa_open,
-+	.release = optee_release_supp,
-+	.supp_recv = optee_supp_recv,
-+	.supp_send = optee_supp_send,
-+	.shm_register = optee_ffa_shm_register, /* same as for clnt ops */
-+	.shm_unregister = optee_ffa_shm_unregister_supp,
-+};
-+
-+static const struct tee_desc optee_ffa_supp_desc = {
-+	.name = DRIVER_NAME "-ffa-supp",
-+	.ops = &optee_ffa_supp_ops,
-+	.owner = THIS_MODULE,
-+	.flags = TEE_DESC_PRIVILEGED,
-+};
-+
-+static const struct optee_ops optee_ffa_ops = {
-+	.do_call_with_arg = optee_ffa_do_call_with_arg,
-+	.to_msg_param = optee_ffa_to_msg_param,
-+	.from_msg_param = optee_ffa_from_msg_param,
-+};
-+
-+static void optee_ffa_remove(struct ffa_device *ffa_dev)
-+{
-+	struct optee *optee = ffa_dev->dev.driver_data;
-+
-+	optee_remove_common(optee);
-+
-+	mutex_destroy(&optee->ffa.mutex);
-+	rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL);
-+
-+	kfree(optee);
-+}
-+
-+static int optee_ffa_probe(struct ffa_device *ffa_dev)
-+{
-+	const struct ffa_dev_ops *ffa_ops;
-+	unsigned int rpc_arg_count;
-+	struct tee_device *teedev;
-+	struct optee *optee;
-+	int rc;
-+
-+	ffa_ops = ffa_dev_ops_get(ffa_dev);
-+	if (!ffa_ops) {
-+		pr_warn("failed \"method\" init: ffa\n");
-+		return -ENOENT;
-+	}
-+
-+	if (!optee_ffa_api_is_compatbile(ffa_dev, ffa_ops))
-+		return -EINVAL;
-+
-+	if (!optee_ffa_exchange_caps(ffa_dev, ffa_ops, &rpc_arg_count))
-+		return -EINVAL;
-+
-+	optee = kzalloc(sizeof(*optee), GFP_KERNEL);
-+	if (!optee) {
-+		rc = -ENOMEM;
-+		goto err;
-+	}
-+	optee->pool = optee_ffa_config_dyn_shm();
-+	if (IS_ERR(optee->pool)) {
-+		rc = PTR_ERR(optee->pool);
-+		optee->pool = NULL;
-+		goto err;
-+	}
-+
-+	optee->ops = &optee_ffa_ops;
-+	optee->ffa.ffa_dev = ffa_dev;
-+	optee->ffa.ffa_ops = ffa_ops;
-+	optee->rpc_arg_count = rpc_arg_count;
-+
-+	teedev = tee_device_alloc(&optee_ffa_clnt_desc, NULL, optee->pool,
-+				  optee);
-+	if (IS_ERR(teedev)) {
-+		rc = PTR_ERR(teedev);
-+		goto err;
-+	}
-+	optee->teedev = teedev;
-+
-+	teedev = tee_device_alloc(&optee_ffa_supp_desc, NULL, optee->pool,
-+				  optee);
-+	if (IS_ERR(teedev)) {
-+		rc = PTR_ERR(teedev);
-+		goto err;
-+	}
-+	optee->supp_teedev = teedev;
-+
-+	rc = tee_device_register(optee->teedev);
-+	if (rc)
-+		goto err;
-+
-+	rc = tee_device_register(optee->supp_teedev);
-+	if (rc)
-+		goto err;
-+
-+	rc = rhashtable_init(&optee->ffa.global_ids, &shm_rhash_params);
-+	if (rc)
-+		goto err;
-+	mutex_init(&optee->ffa.mutex);
-+	mutex_init(&optee->call_queue.mutex);
-+	INIT_LIST_HEAD(&optee->call_queue.waiters);
-+	optee_wait_queue_init(&optee->wait_queue);
-+	optee_supp_init(&optee->supp);
-+	ffa_dev_set_drvdata(ffa_dev, optee);
-+
-+	rc = optee_enumerate_devices(PTA_CMD_GET_DEVICES);
-+	if (rc) {
-+		optee_ffa_remove(ffa_dev);
-+		return rc;
-+	}
-+
-+	pr_info("initialized driver\n");
-+	return 0;
-+err:
-+	/*
-+	 * tee_device_unregister() is safe to call even if the
-+	 * devices hasn't been registered with
-+	 * tee_device_register() yet.
-+	 */
-+	tee_device_unregister(optee->supp_teedev);
-+	tee_device_unregister(optee->teedev);
-+	if (optee->pool)
-+		tee_shm_pool_free(optee->pool);
-+	kfree(optee);
-+	return rc;
-+}
-+
-+static const struct ffa_device_id optee_ffa_device_id[] = {
-+	/* 486178e0-e7f8-11e3-bc5e0002a5d5c51b */
-+	{ UUID_INIT(0x486178e0, 0xe7f8, 0x11e3,
-+		    0xbc, 0x5e, 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b) },
-+	{}
-+};
-+
-+static struct ffa_driver optee_ffa_driver = {
-+	.name = "optee",
-+	.probe = optee_ffa_probe,
-+	.remove = optee_ffa_remove,
-+	.id_table = optee_ffa_device_id,
-+};
-+
-+int optee_ffa_abi_register(void)
-+{
-+	if (IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT))
-+		return ffa_register(&optee_ffa_driver);
-+	else
-+		return -EOPNOTSUPP;
-+}
-+
-+void optee_ffa_abi_unregister(void)
-+{
-+	if (IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT))
-+		ffa_unregister(&optee_ffa_driver);
-+}
-diff --git a/drivers/tee/optee/optee_ffa.h b/drivers/tee/optee/optee_ffa.h
-new file mode 100644
-index 000000000000..ee3a03fc392c
---- /dev/null
-+++ b/drivers/tee/optee/optee_ffa.h
-@@ -0,0 +1,153 @@
-+/* SPDX-License-Identifier: BSD-2-Clause */
-+/*
-+ * Copyright (c) 2019-2021, Linaro Limited
-+ */
-+
-+/*
-+ * This file is exported by OP-TEE and is kept in sync between secure world
-+ * and normal world drivers. We're using ARM FF-A 1.0 specification.
-+ */
-+
-+#ifndef __OPTEE_FFA_H
-+#define __OPTEE_FFA_H
-+
-+#include <linux/arm_ffa.h>
-+
-+/*
-+ * Normal world sends requests with FFA_MSG_SEND_DIRECT_REQ and
-+ * responses are returned with FFA_MSG_SEND_DIRECT_RESP for normal
-+ * messages.
-+ *
-+ * All requests with FFA_MSG_SEND_DIRECT_REQ and FFA_MSG_SEND_DIRECT_RESP
-+ * are using the AArch32 SMC calling convention with register usage as
-+ * defined in FF-A specification:
-+ * w0:    Function ID (0x8400006F or 0x84000070)
-+ * w1:    Source/Destination IDs
-+ * w2:    Reserved (MBZ)
-+ * w3-w7: Implementation defined, free to be used below
-+ */
-+
-+#define OPTEE_FFA_VERSION_MAJOR	1
-+#define OPTEE_FFA_VERSION_MINOR	0
-+
-+#define OPTEE_FFA_BLOCKING_CALL(id)	(id)
-+#define OPTEE_FFA_YIELDING_CALL_BIT	31
-+#define OPTEE_FFA_YIELDING_CALL(id)	((id) | BIT(OPTEE_FFA_YIELDING_CALL_BIT))
-+
-+/*
-+ * Returns the API version implemented, currently follows the FF-A version.
-+ * Call register usage:
-+ * w3:    Service ID, OPTEE_FFA_GET_API_VERSION
-+ * w4-w7: Not used (MBZ)
-+ *
-+ * Return register usage:
-+ * w3:    OPTEE_FFA_VERSION_MAJOR
-+ * w4:    OPTEE_FFA_VERSION_MINOR
-+ * w5-w7: Not used (MBZ)
-+ */
-+#define OPTEE_FFA_GET_API_VERSION	OPTEE_FFA_BLOCKING_CALL(0)
-+
-+/*
-+ * Returns the revision of OP-TEE.
-+ *
-+ * Used by non-secure world to figure out which version of the Trusted OS
-+ * is installed. Note that the returned revision is the revision of the
-+ * Trusted OS, not of the API.
-+ *
-+ * Call register usage:
-+ * w3:    Service ID, OPTEE_FFA_GET_OS_VERSION
-+ * w4-w7: Unused (MBZ)
-+ *
-+ * Return register usage:
-+ * w3:    CFG_OPTEE_REVISION_MAJOR
-+ * w4:    CFG_OPTEE_REVISION_MINOR
-+ * w5:    TEE_IMPL_GIT_SHA1 (or zero if not supported)
-+ */
-+#define OPTEE_FFA_GET_OS_VERSION	OPTEE_FFA_BLOCKING_CALL(1)
-+
-+/*
-+ * Exchange capabilities between normal world and secure world.
-+ *
-+ * Currently there are no defined capabilities. When features are added new
-+ * capabilities may be added.
-+ *
-+ * Call register usage:
-+ * w3:    Service ID, OPTEE_FFA_EXCHANGE_CAPABILITIES
-+ * w4-w7: Note used (MBZ)
-+ *
-+ * Return register usage:
-+ * w3:    Error code, 0 on success
-+ * w4:    Bit[7:0]:  Number of parameters needed for RPC to be supplied
-+ *                   as the second MSG arg struct for
-+ *                   OPTEE_FFA_YIELDING_CALL_WITH_ARG.
-+ *        Bit[31:8]: Reserved (MBZ)
-+ * w5-w7: Note used (MBZ)
-+ */
-+#define OPTEE_FFA_EXCHANGE_CAPABILITIES OPTEE_FFA_BLOCKING_CALL(2)
-+
-+/*
-+ * Unregister shared memory
-+ *
-+ * Call register usage:
-+ * w3:    Service ID, OPTEE_FFA_YIELDING_CALL_UNREGISTER_SHM
-+ * w4:    Shared memory handle, lower bits
-+ * w5:    Shared memory handle, higher bits
-+ * w6-w7: Not used (MBZ)
-+ *
-+ * Return register usage:
-+ * w3:    Error code, 0 on success
-+ * w4-w7: Note used (MBZ)
-+ */
-+#define OPTEE_FFA_UNREGISTER_SHM	OPTEE_FFA_BLOCKING_CALL(3)
-+
-+/*
-+ * Call with struct optee_msg_arg as argument in the supplied shared memory
-+ * with a zero internal offset and normal cached memory attributes.
-+ * Register usage:
-+ * w3:    Service ID, OPTEE_FFA_YIELDING_CALL_WITH_ARG
-+ * w4:    Lower 32 bits of a 64-bit Shared memory handle
-+ * w5:    Upper 32 bits of a 64-bit Shared memory handle
-+ * w6:    Offset into shared memory pointing to a struct optee_msg_arg
-+ *	  right after the parameters of this struct (at offset
-+ *	  OPTEE_MSG_GET_ARG_SIZE(num_params) follows a struct optee_msg_arg
-+ *	  for RPC, this struct has reserved space for the number of RPC
-+ *	  parameters as returned by OPTEE_FFA_EXCHANGE_CAPABILITIES.
-+ * w7:    Not used (MBZ)
-+ * Resume from RPC. Register usage:
-+ * w3:    Service ID, OPTEE_FFA_YIELDING_CALL_RESUME
-+ * w4-w6: Not used (MBZ)
-+ * w7:    Resume info
-+ *
-+ * Normal return (yielding call is completed). Register usage:
-+ * w3:    Error code, 0 on success
-+ * w4:    OPTEE_FFA_YIELDING_CALL_RETURN_DONE
-+ * w5-w7: Not used (MBZ)
-+ *
-+ * RPC interrupt return (RPC from secure world). Register usage:
-+ * w3:    Error code == 0
-+ * w4:    Any defined RPC code but OPTEE_FFA_YIELDING_CALL_RETURN_DONE
-+ * w5-w6: Not used (MBZ)
-+ * w7:    Resume info
-+ *
-+ * Possible error codes in register w3:
-+ * 0:                       Success
-+ * FFA_DENIED:              w4 isn't one of OPTEE_FFA_YIELDING_CALL_START
-+ *                          OPTEE_FFA_YIELDING_CALL_RESUME
-+ *
-+ * Possible error codes for OPTEE_FFA_YIELDING_CALL_START,
-+ * FFA_BUSY:               Number of OP-TEE OS threads exceeded,
-+ *                         try again later
-+ * FFA_DENIED:             RPC shared memory object not found
-+ * FFA_INVALID_PARAMETER:  Bad shared memory handle or offset into the memory
-+ *
-+ * Possible error codes for OPTEE_FFA_YIELDING_CALL_RESUME
-+ * FFA_INVALID_PARAMETER:  Bad resume info
-+ */
-+#define OPTEE_FFA_YIELDING_CALL_WITH_ARG	OPTEE_FFA_YIELDING_CALL(0)
-+#define OPTEE_FFA_YIELDING_CALL_RESUME		OPTEE_FFA_YIELDING_CALL(1)
-+
-+#define OPTEE_FFA_YIELDING_CALL_RETURN_DONE		0
-+#define OPTEE_FFA_YIELDING_CALL_RETURN_RPC_CMD		1
-+#define OPTEE_FFA_YIELDING_CALL_RETURN_INTERRUPT	2
-+
-+#endif /*__OPTEE_FFA_H*/
-diff --git a/drivers/tee/optee/optee_msg.h b/drivers/tee/optee/optee_msg.h
-index e3d72d09c484..2422e185d400 100644
---- a/drivers/tee/optee/optee_msg.h
-+++ b/drivers/tee/optee/optee_msg.h
-@@ -28,6 +28,9 @@
- #define OPTEE_MSG_ATTR_TYPE_RMEM_INPUT		0x5
- #define OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT		0x6
- #define OPTEE_MSG_ATTR_TYPE_RMEM_INOUT		0x7
-+#define OPTEE_MSG_ATTR_TYPE_FMEM_INPUT		OPTEE_MSG_ATTR_TYPE_RMEM_INPUT
-+#define OPTEE_MSG_ATTR_TYPE_FMEM_OUTPUT		OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT
-+#define OPTEE_MSG_ATTR_TYPE_FMEM_INOUT		OPTEE_MSG_ATTR_TYPE_RMEM_INOUT
- #define OPTEE_MSG_ATTR_TYPE_TMEM_INPUT		0x9
- #define OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT		0xa
- #define OPTEE_MSG_ATTR_TYPE_TMEM_INOUT		0xb
-@@ -96,6 +99,8 @@
-  */
- #define OPTEE_MSG_NONCONTIG_PAGE_SIZE		4096
- 
-+#define OPTEE_MSG_FMEM_INVALID_GLOBAL_ID	0xffffffffffffffff
-+
- /**
-  * struct optee_msg_param_tmem - temporary memory reference parameter
-  * @buf_ptr:	Address of the buffer
-@@ -127,6 +132,23 @@ struct optee_msg_param_rmem {
- 	u64 shm_ref;
- };
- 
-+/**
-+ * struct optee_msg_param_fmem - ffa memory reference parameter
-+ * @offs_lower:	   Lower bits of offset into shared memory reference
-+ * @offs_upper:	   Upper bits of offset into shared memory reference
-+ * @internal_offs: Internal offset into the first page of shared memory
-+ *		   reference
-+ * @size:	   Size of the buffer
-+ * @global_id:	   Global identifier of Shared memory
-+ */
-+struct optee_msg_param_fmem {
-+	u32 offs_low;
-+	u16 offs_high;
-+	u16 internal_offs;
-+	u64 size;
-+	u64 global_id;
-+};
-+
- /**
-  * struct optee_msg_param_value - opaque value parameter
-  *
-@@ -143,13 +165,15 @@ struct optee_msg_param_value {
-  * @attr:	attributes
-  * @tmem:	parameter by temporary memory reference
-  * @rmem:	parameter by registered memory reference
-+ * @fmem:	parameter by ffa registered memory reference
-  * @value:	parameter by opaque value
-  * @octets:	parameter by octet string
-  *
-  * @attr & OPTEE_MSG_ATTR_TYPE_MASK indicates if tmem, rmem or value is used in
-  * the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value or octets,
-  * OPTEE_MSG_ATTR_TYPE_TMEM_* indicates @tmem and
-- * OPTEE_MSG_ATTR_TYPE_RMEM_* indicates @rmem,
-+ * OPTEE_MSG_ATTR_TYPE_RMEM_* or the alias PTEE_MSG_ATTR_TYPE_FMEM_* indicates
-+ * @rmem or @fmem depending on the conduit.
-  * OPTEE_MSG_ATTR_TYPE_NONE indicates that none of the members are used.
-  */
- struct optee_msg_param {
-@@ -157,6 +181,7 @@ struct optee_msg_param {
- 	union {
- 		struct optee_msg_param_tmem tmem;
- 		struct optee_msg_param_rmem rmem;
-+		struct optee_msg_param_fmem fmem;
- 		struct optee_msg_param_value value;
- 		u8 octets[24];
- 	} u;
-diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
-index 40af6b059b20..6660e05298db 100644
---- a/drivers/tee/optee/optee_private.h
-+++ b/drivers/tee/optee/optee_private.h
-@@ -7,6 +7,7 @@
- #define OPTEE_PRIVATE_H
- 
- #include <linux/arm-smccc.h>
-+#include <linux/rhashtable.h>
- #include <linux/semaphore.h>
- #include <linux/tee_drv.h>
- #include <linux/types.h>
-@@ -22,6 +23,7 @@
- #define TEEC_ERROR_NOT_SUPPORTED	0xFFFF000A
- #define TEEC_ERROR_COMMUNICATION	0xFFFF000E
- #define TEEC_ERROR_OUT_OF_MEMORY	0xFFFF000C
-+#define TEEC_ERROR_BUSY			0xFFFF000D
- #define TEEC_ERROR_SHORT_BUFFER		0xFFFF0010
- 
- #define TEEC_ORIGIN_COMMS		0x00000002
-@@ -73,19 +75,28 @@ struct optee_supp {
- 	struct completion reqs_c;
- };
- 
--/**
-- * struct optee_smc - SMC ABI specifics
-- * @invoke_fn:		function to issue smc or hvc
-- * @memremaped_shm	virtual address of memory in shared memory pool
-- * @sec_caps:		secure world capabilities defined by
-- *			OPTEE_SMC_SEC_CAP_* in optee_smc.h
-- */
- struct optee_smc {
- 	optee_invoke_fn *invoke_fn;
- 	void *memremaped_shm;
- 	u32 sec_caps;
- };
- 
-+/**
-+ * struct optee_ffa_data -  FFA communication struct
-+ * @ffa_dev		FFA device, contains the destination id, the id of
-+ *			OP-TEE in secure world
-+ * @ffa_ops		FFA operations
-+ * @mutex		Serializes access to @global_ids
-+ * @global_ids		FF-A shared memory global handle translation
-+ */
-+struct optee_ffa {
-+	struct ffa_device *ffa_dev;
-+	const struct ffa_dev_ops *ffa_ops;
-+	/* Serializes access to @global_ids */
-+	struct mutex mutex;
-+	struct rhashtable global_ids;
-+};
-+
- struct optee;
- 
- /**
-@@ -116,11 +127,13 @@ struct optee_ops {
-  *			world
-  * @teedev:		client device
-  * @smc:		specific to SMC ABI
-+ * @ffa:		specific to FF-A ABI
-  * @call_queue:		queue of threads waiting to call @invoke_fn
-  * @wait_queue:		queue of threads from secure world waiting for a
-  *			secure world sync object
-  * @supp:		supplicant synchronization struct for RPC to supplicant
-  * @pool:		shared memory pool
-+ * @rpc_arg_count:	If > 0 number of RPC parameters to make room for
-  * @scan_bus_done	flag if device registation was already done.
-  * @scan_bus_wq		workqueue to scan optee bus and register optee drivers
-  * @scan_bus_work	workq to scan optee bus and register optee drivers
-@@ -129,11 +142,15 @@ struct optee {
- 	struct tee_device *supp_teedev;
- 	struct tee_device *teedev;
- 	const struct optee_ops *ops;
--	struct optee_smc smc;
-+	union {
-+		struct optee_smc smc;
-+		struct optee_ffa ffa;
-+	};
- 	struct optee_call_queue call_queue;
- 	struct optee_wait_queue wait_queue;
- 	struct optee_supp supp;
- 	struct tee_shm_pool *pool;
-+	unsigned int rpc_arg_count;
- 	bool   scan_bus_done;
- 	struct workqueue_struct *scan_bus_wq;
- 	struct work_struct scan_bus_work;
-@@ -266,5 +283,7 @@ static inline void reg_pair_from_64(u32 *reg0, u32 *reg1, u64 val)
- /* Registration of the ABIs */
- int optee_smc_abi_register(void);
- void optee_smc_abi_unregister(void);
-+int optee_ffa_abi_register(void);
-+void optee_ffa_abi_unregister(void);
- 
- #endif /*OPTEE_PRIVATE_H*/
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0013-optee-smc_abi.c-add-missing-include-linux-mm.h.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0013-optee-smc_abi.c-add-missing-include-linux-mm.h.patch
deleted file mode 100644
index a527fbc..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0013-optee-smc_abi.c-add-missing-include-linux-mm.h.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 61c33344f747deac2860571ef965c20f9170efea Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Thu, 21 Oct 2021 14:55:39 +0200
-Subject: [PATCH 13/40] optee: smc_abi.c: add missing #include <linux/mm.h>
-
-Adds missing #include <linux/mm.h> drivers/tee/optee/smc_abi.c to fix
-compile errors like:
-drivers/tee/optee/smc_abi.c:405:15: error: implicit
-declaration of function 'page_to_section'
-[-Werror,-Wimplicit-function-declaration]
-        optee_page = page_to_phys(*pages) +
-                     ^
-arch/arm/include/asm/memory.h:148:43: note: expanded from
-macro 'page_to_phys'
-                                               ^
-include/asm-generic/memory_model.h:52:21: note: expanded
-from macro 'page_to_pfn'
-                    ^
-include/asm-generic/memory_model.h:35:14: note: expanded
-from macro '__page_to_pfn'
-        int __sec = page_to_section(__pg);                      \
-                    ^
-drivers/tee/optee/smc_abi.c:405:15: note: did you mean
-'__nr_to_section'?
-arch/arm/include/asm/memory.h:148:43: note: expanded from
-macro 'page_to_phys'
-                                               ^
-include/asm-generic/memory_model.h:52:21: note: expanded
-from macro 'page_to_pfn'
-                    ^
-include/asm-generic/memory_model.h:35:14: note: expanded
-from macro '__page_to_pfn'
-        int __sec = page_to_section(__pg);                      \
-                    ^
-include/linux/mmzone.h:1365:35: note: '__nr_to_section'
-declared here
-static inline struct mem_section *__nr_to_section(unsigned long nr)
-
-Fixes: c51a564a5b48 ("optee: isolate smc abi")
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Link: https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org'
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Upstream-Status: Backport [https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/tee/optee/smc_abi.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
-index 9a787fb4f5e5..6196d7c3888f 100644
---- a/drivers/tee/optee/smc_abi.c
-+++ b/drivers/tee/optee/smc_abi.c
-@@ -10,6 +10,7 @@
- #include <linux/errno.h>
- #include <linux/io.h>
- #include <linux/sched.h>
-+#include <linux/mm.h>
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/of_platform.h>
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0014-optee-Fix-spelling-mistake-reclain-reclaim.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0014-optee-Fix-spelling-mistake-reclain-reclaim.patch
deleted file mode 100644
index 3409d66..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0014-optee-Fix-spelling-mistake-reclain-reclaim.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From bf890db9200464083c44987cd41c034b1019fc5a Mon Sep 17 00:00:00 2001
-From: Colin Ian King <colin.i.king@googlemail.com>
-Date: Sat, 23 Oct 2021 12:52:09 +0100
-Subject: [PATCH 14/40] optee: Fix spelling mistake "reclain" -> "reclaim"
-
-There are spelling mistakes in pr_err error messages. Fix them.
-
-Fixes: 4615e5a34b95 ("optee: add FF-A support")
-Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-[jw: added a fixes]
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [1b73a9e4986a4e9065bacf1e5ab2dfda17b54161]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/tee/optee/ffa_abi.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
-index 6defd1ec982a..45424824e0f9 100644
---- a/drivers/tee/optee/ffa_abi.c
-+++ b/drivers/tee/optee/ffa_abi.c
-@@ -333,7 +333,7 @@ static int optee_ffa_shm_unregister(struct tee_context *ctx,
- 
- 	rc = ffa_ops->memory_reclaim(global_handle, 0);
- 	if (rc)
--		pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
-+		pr_err("mem_reclaim: 0x%llx %d", global_handle, rc);
- 
- 	return rc;
- }
-@@ -355,7 +355,7 @@ static int optee_ffa_shm_unregister_supp(struct tee_context *ctx,
- 	optee_shm_rem_ffa_handle(optee, global_handle);
- 	rc = ffa_ops->memory_reclaim(global_handle, 0);
- 	if (rc)
--		pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
-+		pr_err("mem_reclaim: 0x%llx %d", global_handle, rc);
- 
- 	shm->sec_world_id = 0;
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0015-optee-fix-kfree-NULL-pointer.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0015-optee-fix-kfree-NULL-pointer.patch
deleted file mode 100644
index 090ff3b..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0015-optee-fix-kfree-NULL-pointer.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 9f3b899a2e8bf79f572f408bfd86836578f46106 Mon Sep 17 00:00:00 2001
-From: Lv Ruyi <lv.ruyi@zte.com.cn>
-Date: Thu, 4 Nov 2021 11:30:47 +0000
-Subject: [PATCH 15/40] optee: fix kfree NULL pointer
-
-This patch fixes the following Coccinelle error:
-drivers/tee/optee/ffa_abi.c: 877: ERROR  optee is NULL but dereferenced.
-
-If memory allocation fails, optee is null pointer. the code will goto err
-and release optee.
-
-Fixes: 4615e5a34b95 ("optee: add FF-A support")
-Reported-by: Zeal Robot <zealci@zte.com.cn>
-Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
-Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-[jw: removed the redundant braces]
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-Upstream-Status: Backport [c23ca66a4dadb6f050dc57358bc8d57a747c35bf]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/tee/optee/ffa_abi.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
-index 45424824e0f9..d8c8683863aa 100644
---- a/drivers/tee/optee/ffa_abi.c
-+++ b/drivers/tee/optee/ffa_abi.c
-@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
- 		return -EINVAL;
- 
- 	optee = kzalloc(sizeof(*optee), GFP_KERNEL);
--	if (!optee) {
--		rc = -ENOMEM;
--		goto err;
--	}
-+	if (!optee)
-+		return -ENOMEM;
-+
- 	optee->pool = optee_ffa_config_dyn_shm();
- 	if (IS_ERR(optee->pool)) {
- 		rc = PTR_ERR(optee->pool);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0016-perf-arm-cmn-Account-for-NUMA-affinity.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0016-perf-arm-cmn-Account-for-NUMA-affinity.patch
deleted file mode 100644
index 1530463..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0016-perf-arm-cmn-Account-for-NUMA-affinity.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From a52e1e964aa4f2592ebffb30df048cc85fa5a02c Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:51 +0000
-Subject: [PATCH 16/40] perf/arm-cmn: Account for NUMA affinity
-
-On a system with multiple CMN meshes, ideally we'd want to access each
-PMU from within its own mesh, rather than with a long CML round-trip,
-wherever feasible. Since such a system is likely to be presented as
-multiple NUMA nodes, let's also hope a proximity domain is specified
-for each CMN programming interface, and use that to guide our choice
-of IRQ affinity to favour a node-local CPU where possible.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/32438b0d016e0649d882d47d30ac2000484287b9.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/32438b0d016e0649d882d47d30ac2000484287b9.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 51 +++++++++++++++++++++++++++++++-----------
- 1 file changed, 38 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 400eb7f579dc..02b898dbba91 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -1147,23 +1147,47 @@ static int arm_cmn_commit_txn(struct pmu *pmu)
- 	return 0;
- }
- 
--static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
-+static void arm_cmn_migrate(struct arm_cmn *cmn, unsigned int cpu)
-+{
-+	unsigned int i;
-+
-+	perf_pmu_migrate_context(&cmn->pmu, cmn->cpu, cpu);
-+	for (i = 0; i < cmn->num_dtcs; i++)
-+		irq_set_affinity(cmn->dtc[i].irq, cpumask_of(cpu));
-+	cmn->cpu = cpu;
-+}
-+
-+static int arm_cmn_pmu_online_cpu(unsigned int cpu, struct hlist_node *cpuhp_node)
- {
- 	struct arm_cmn *cmn;
--	unsigned int i, target;
-+	int node;
- 
--	cmn = hlist_entry_safe(node, struct arm_cmn, cpuhp_node);
--	if (cpu != cmn->cpu)
--		return 0;
-+	cmn = hlist_entry_safe(cpuhp_node, struct arm_cmn, cpuhp_node);
-+	node = dev_to_node(cmn->dev);
-+	if (node != NUMA_NO_NODE && cpu_to_node(cmn->cpu) != node && cpu_to_node(cpu) == node)
-+		arm_cmn_migrate(cmn, cpu);
-+	return 0;
-+}
-+
-+static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *cpuhp_node)
-+{
-+	struct arm_cmn *cmn;
-+	unsigned int target;
-+	int node;
-+	cpumask_t mask;
- 
--	target = cpumask_any_but(cpu_online_mask, cpu);
--	if (target >= nr_cpu_ids)
-+	cmn = hlist_entry_safe(cpuhp_node, struct arm_cmn, cpuhp_node);
-+	if (cpu != cmn->cpu)
- 		return 0;
- 
--	perf_pmu_migrate_context(&cmn->pmu, cpu, target);
--	for (i = 0; i < cmn->num_dtcs; i++)
--		irq_set_affinity(cmn->dtc[i].irq, cpumask_of(target));
--	cmn->cpu = target;
-+	node = dev_to_node(cmn->dev);
-+	if (cpumask_and(&mask, cpumask_of_node(node), cpu_online_mask) &&
-+	    cpumask_andnot(&mask, &mask, cpumask_of(cpu)))
-+		target = cpumask_any(&mask);
-+	else
-+		target = cpumask_any_but(cpu_online_mask, cpu);
-+	if (target < nr_cpu_ids)
-+		arm_cmn_migrate(cmn, target);
- 	return 0;
- }
- 
-@@ -1532,7 +1556,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
- 	if (err)
- 		return err;
- 
--	cmn->cpu = raw_smp_processor_id();
-+	cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
- 	cmn->pmu = (struct pmu) {
- 		.module = THIS_MODULE,
- 		.attr_groups = arm_cmn_attr_groups,
-@@ -1608,7 +1632,8 @@ static int __init arm_cmn_init(void)
- 	int ret;
- 
- 	ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
--				      "perf/arm/cmn:online", NULL,
-+				      "perf/arm/cmn:online",
-+				      arm_cmn_pmu_online_cpu,
- 				      arm_cmn_pmu_offline_cpu);
- 	if (ret < 0)
- 		return ret;
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0017-perf-arm-cmn-Drop-compile-test-restriction.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0017-perf-arm-cmn-Drop-compile-test-restriction.patch
deleted file mode 100644
index 2a8e62a..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0017-perf-arm-cmn-Drop-compile-test-restriction.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 16cf1b5483d4cbad8ee52fcc9945abcea6492bd1 Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:52 +0000
-Subject: [PATCH 17/40] perf/arm-cmn: Drop compile-test restriction
-
-Although CMN is currently (and overwhelmingly likely to remain) deployed
-in arm64-only (modulo userspace) systems, the 64-bit "dependency" for
-compile-testing was just laziness due to heavy reliance on readq/writeq
-accessors. Since we only need one extra include for robustness in that
-regard, let's pull that in, widen the compile-test coverage, and fix up
-the smattering of type laziness that that brings to light.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/baee9ee0d0bdad8aaeb70f5a4b98d8fd4b1f5786.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/baee9ee0d0bdad8aaeb70f5a4b98d8fd4b1f5786.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/Kconfig   |  2 +-
- drivers/perf/arm-cmn.c | 25 +++++++++++++------------
- 2 files changed, 14 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
-index 77522e5efe11..e453915ebc84 100644
---- a/drivers/perf/Kconfig
-+++ b/drivers/perf/Kconfig
-@@ -43,7 +43,7 @@ config ARM_CCN
- 
- config ARM_CMN
- 	tristate "Arm CMN-600 PMU support"
--	depends on ARM64 || (COMPILE_TEST && 64BIT)
-+	depends on ARM64 || COMPILE_TEST
- 	help
- 	  Support for PMU events monitoring on the Arm CMN-600 Coherent Mesh
- 	  Network interconnect.
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 02b898dbba91..1d52fcfe3a0d 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -7,6 +7,7 @@
- #include <linux/bitops.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
-+#include <linux/io-64-nonatomic-lo-hi.h>
- #include <linux/kernel.h>
- #include <linux/list.h>
- #include <linux/module.h>
-@@ -122,11 +123,11 @@
- 
- 
- /* Event attributes */
--#define CMN_CONFIG_TYPE			GENMASK(15, 0)
--#define CMN_CONFIG_EVENTID		GENMASK(23, 16)
--#define CMN_CONFIG_OCCUPID		GENMASK(27, 24)
--#define CMN_CONFIG_BYNODEID		BIT(31)
--#define CMN_CONFIG_NODEID		GENMASK(47, 32)
-+#define CMN_CONFIG_TYPE			GENMASK_ULL(15, 0)
-+#define CMN_CONFIG_EVENTID		GENMASK_ULL(23, 16)
-+#define CMN_CONFIG_OCCUPID		GENMASK_ULL(27, 24)
-+#define CMN_CONFIG_BYNODEID		BIT_ULL(31)
-+#define CMN_CONFIG_NODEID		GENMASK_ULL(47, 32)
- 
- #define CMN_EVENT_TYPE(event)		FIELD_GET(CMN_CONFIG_TYPE, (event)->attr.config)
- #define CMN_EVENT_EVENTID(event)	FIELD_GET(CMN_CONFIG_EVENTID, (event)->attr.config)
-@@ -134,13 +135,13 @@
- #define CMN_EVENT_BYNODEID(event)	FIELD_GET(CMN_CONFIG_BYNODEID, (event)->attr.config)
- #define CMN_EVENT_NODEID(event)		FIELD_GET(CMN_CONFIG_NODEID, (event)->attr.config)
- 
--#define CMN_CONFIG_WP_COMBINE		GENMASK(27, 24)
--#define CMN_CONFIG_WP_DEV_SEL		BIT(48)
--#define CMN_CONFIG_WP_CHN_SEL		GENMASK(50, 49)
--#define CMN_CONFIG_WP_GRP		BIT(52)
--#define CMN_CONFIG_WP_EXCLUSIVE		BIT(53)
--#define CMN_CONFIG1_WP_VAL		GENMASK(63, 0)
--#define CMN_CONFIG2_WP_MASK		GENMASK(63, 0)
-+#define CMN_CONFIG_WP_COMBINE		GENMASK_ULL(27, 24)
-+#define CMN_CONFIG_WP_DEV_SEL		BIT_ULL(48)
-+#define CMN_CONFIG_WP_CHN_SEL		GENMASK_ULL(50, 49)
-+#define CMN_CONFIG_WP_GRP		BIT_ULL(52)
-+#define CMN_CONFIG_WP_EXCLUSIVE		BIT_ULL(53)
-+#define CMN_CONFIG1_WP_VAL		GENMASK_ULL(63, 0)
-+#define CMN_CONFIG2_WP_MASK		GENMASK_ULL(63, 0)
- 
- #define CMN_EVENT_WP_COMBINE(event)	FIELD_GET(CMN_CONFIG_WP_COMBINE, (event)->attr.config)
- #define CMN_EVENT_WP_DEV_SEL(event)	FIELD_GET(CMN_CONFIG_WP_DEV_SEL, (event)->attr.config)
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0018-perf-arm-cmn-Refactor-node-ID-handling.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0018-perf-arm-cmn-Refactor-node-ID-handling.patch
deleted file mode 100644
index 6f2e80a..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0018-perf-arm-cmn-Refactor-node-ID-handling.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 762ba0fb54d97c08c35fbe2745c19fd4a74ded0d Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:53 +0000
-Subject: [PATCH 18/40] perf/arm-cmn: Refactor node ID handling
-
-Add a bit more abstraction for the places where we decompose node IDs.
-This will help keep things nice and manageable when we come to add yet
-more variables which affect the node ID format. Also use the opportunity
-to move the rest of the low-level node management helpers back up to the
-logical place they were meant to be - how they ended up buried right in
-the middle of the event-related definitions is somewhat of a mystery...
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/a2242a8c3c96056c13a04ae87bf2047e5e64d2d9.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/a2242a8c3c96056c13a04ae87bf2047e5e64d2d9.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 94 +++++++++++++++++++++++++-----------------
- 1 file changed, 56 insertions(+), 38 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 1d52fcfe3a0d..adf50d613734 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -255,6 +255,58 @@ struct arm_cmn {
- 
- static int arm_cmn_hp_state;
- 
-+struct arm_cmn_nodeid {
-+	u8 x;
-+	u8 y;
-+	u8 port;
-+	u8 dev;
-+};
-+
-+static int arm_cmn_xyidbits(const struct arm_cmn *cmn)
-+{
-+	int dim = max(cmn->mesh_x, cmn->mesh_y);
-+
-+	return dim > 4 ? 3 : 2;
-+}
-+
-+static struct arm_cmn_nodeid arm_cmn_nid(const struct arm_cmn *cmn, u16 id)
-+{
-+	struct arm_cmn_nodeid nid;
-+	int bits = arm_cmn_xyidbits(cmn);
-+
-+	nid.x = CMN_NODEID_X(id, bits);
-+	nid.y = CMN_NODEID_Y(id, bits);
-+	nid.port = CMN_NODEID_PID(id);
-+	nid.dev = CMN_NODEID_DEVID(id);
-+
-+	return nid;
-+}
-+
-+static void arm_cmn_init_node_to_xp(const struct arm_cmn *cmn,
-+				    struct arm_cmn_node *dn)
-+{
-+	struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
-+	int xp_idx = cmn->mesh_x * nid.y + nid.x;
-+
-+	dn->to_xp = (cmn->xps + xp_idx) - dn;
-+}
-+
-+static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
-+{
-+	return dn->type == CMN_TYPE_XP ? dn : dn + dn->to_xp;
-+}
-+
-+static struct arm_cmn_node *arm_cmn_node(const struct arm_cmn *cmn,
-+					 enum cmn_node_type type)
-+{
-+	int i;
-+
-+	for (i = 0; i < cmn->num_dns; i++)
-+		if (cmn->dns[i].type == type)
-+			return &cmn->dns[i];
-+	return NULL;
-+}
-+
- struct arm_cmn_hw_event {
- 	struct arm_cmn_node *dn;
- 	u64 dtm_idx[2];
-@@ -295,38 +347,6 @@ struct arm_cmn_format_attr {
- 	int config;
- };
- 
--static int arm_cmn_xyidbits(const struct arm_cmn *cmn)
--{
--	return cmn->mesh_x > 4 || cmn->mesh_y > 4 ? 3 : 2;
--}
--
--static void arm_cmn_init_node_to_xp(const struct arm_cmn *cmn,
--				    struct arm_cmn_node *dn)
--{
--	int bits = arm_cmn_xyidbits(cmn);
--	int x = CMN_NODEID_X(dn->id, bits);
--	int y = CMN_NODEID_Y(dn->id, bits);
--	int xp_idx = cmn->mesh_x * y + x;
--
--	dn->to_xp = (cmn->xps + xp_idx) - dn;
--}
--
--static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
--{
--	return dn->type == CMN_TYPE_XP ? dn : dn + dn->to_xp;
--}
--
--static struct arm_cmn_node *arm_cmn_node(const struct arm_cmn *cmn,
--					 enum cmn_node_type type)
--{
--	int i;
--
--	for (i = 0; i < cmn->num_dns; i++)
--		if (cmn->dns[i].type == type)
--			return &cmn->dns[i];
--	return NULL;
--}
--
- #define CMN_EVENT_ATTR(_name, _type, _eventid, _occupid)		\
- 	(&((struct arm_cmn_event_attr[]) {{				\
- 		.attr = __ATTR(_name, 0444, arm_cmn_event_show, NULL),	\
-@@ -966,11 +986,10 @@ static int arm_cmn_event_init(struct perf_event *event)
- 	}
- 
- 	if (!hw->num_dns) {
--		int bits = arm_cmn_xyidbits(cmn);
-+		struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, nodeid);
- 
- 		dev_dbg(cmn->dev, "invalid node 0x%x (%d,%d,%d,%d) type 0x%x\n",
--			nodeid, CMN_NODEID_X(nodeid, bits), CMN_NODEID_Y(nodeid, bits),
--			CMN_NODEID_PID(nodeid), CMN_NODEID_DEVID(nodeid), type);
-+			nodeid, nid.x, nid.y, nid.port, nid.dev, type);
- 		return -EINVAL;
- 	}
- 	/*
-@@ -1068,11 +1087,10 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 			dn->wp_event[wp_idx] = dtc_idx;
- 			writel_relaxed(cfg, dn->pmu_base + CMN_DTM_WPn_CONFIG(wp_idx));
- 		} else {
--			unsigned int port = CMN_NODEID_PID(dn->id);
--			unsigned int dev = CMN_NODEID_DEVID(dn->id);
-+			struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
- 
- 			input_sel = CMN__PMEVCNT0_INPUT_SEL_DEV + dtm_idx +
--				    (port << 4) + (dev << 2);
-+				    (nid.port << 4) + (nid.dev << 2);
- 
- 			if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event))) {
- 				int occupid = CMN_EVENT_OCCUPID(event);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0019-perf-arm-cmn-Streamline-node-iteration.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0019-perf-arm-cmn-Streamline-node-iteration.patch
deleted file mode 100644
index 2fd7ba4..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0019-perf-arm-cmn-Streamline-node-iteration.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From ca15b67dc746c13a8231d11a3e2925f128982a7d Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:54 +0000
-Subject: [PATCH 19/40] perf/arm-cmn: Streamline node iteration
-
-Refactor the places where we scan through the set of nodes to switch
-from explicit array indexing to pointer-based iteration. This leads to
-slightly simpler object code, but also makes the source less dense and
-more pleasant for further development. It also unearths an almost-bug
-in arm_cmn_event_init() where we've been depending on the "array index"
-of NULL relative to cmn->dns being a sufficiently large number, yuck.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/ee0c9eda9a643f46001ac43aadf3f0b1fd5660dd.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/ee0c9eda9a643f46001ac43aadf3f0b1fd5660dd.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 33 ++++++++++++++++++++-------------
- 1 file changed, 20 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index adf50d613734..da7bf779fec2 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -299,11 +299,11 @@ static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
- static struct arm_cmn_node *arm_cmn_node(const struct arm_cmn *cmn,
- 					 enum cmn_node_type type)
- {
--	int i;
-+	struct arm_cmn_node *dn;
- 
--	for (i = 0; i < cmn->num_dns; i++)
--		if (cmn->dns[i].type == type)
--			return &cmn->dns[i];
-+	for (dn = cmn->dns; dn->type; dn++)
-+		if (dn->type == type)
-+			return dn;
- 	return NULL;
- }
- 
-@@ -941,8 +941,8 @@ static int arm_cmn_event_init(struct perf_event *event)
- {
- 	struct arm_cmn *cmn = to_cmn(event->pmu);
- 	struct arm_cmn_hw_event *hw = to_cmn_hw(event);
-+	struct arm_cmn_node *dn;
- 	enum cmn_node_type type;
--	unsigned int i;
- 	bool bynodeid;
- 	u16 nodeid, eventid;
- 
-@@ -974,10 +974,12 @@ static int arm_cmn_event_init(struct perf_event *event)
- 	nodeid = CMN_EVENT_NODEID(event);
- 
- 	hw->dn = arm_cmn_node(cmn, type);
--	for (i = hw->dn - cmn->dns; i < cmn->num_dns && cmn->dns[i].type == type; i++) {
-+	if (!hw->dn)
-+		return -EINVAL;
-+	for (dn = hw->dn; dn->type == type; dn++) {
- 		if (!bynodeid) {
- 			hw->num_dns++;
--		} else if (cmn->dns[i].id != nodeid) {
-+		} else if (dn->id != nodeid) {
- 			hw->dn++;
- 		} else {
- 			hw->num_dns = 1;
-@@ -1332,7 +1334,7 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- 
- 	cmn->xps = arm_cmn_node(cmn, CMN_TYPE_XP);
- 
--	for (dn = cmn->dns; dn < cmn->dns + cmn->num_dns; dn++) {
-+	for (dn = cmn->dns; dn->type; dn++) {
- 		if (dn->type != CMN_TYPE_XP)
- 			arm_cmn_init_node_to_xp(cmn, dn);
- 		else if (cmn->num_dtcs == 1)
-@@ -1382,6 +1384,7 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	u32 xp_offset[CMN_MAX_XPS];
- 	u64 reg;
- 	int i, j;
-+	size_t sz;
- 
- 	cfg_region = cmn->base + rgn_offset;
- 	reg = readl_relaxed(cfg_region + CMN_CFGM_PERIPH_ID_2);
-@@ -1408,14 +1411,13 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		cmn->num_dns += FIELD_GET(CMN_CI_CHILD_COUNT, reg);
- 	}
- 
--	/* Cheeky +1 to help terminate pointer-based iteration */
--	cmn->dns = devm_kcalloc(cmn->dev, cmn->num_dns + 1,
--				sizeof(*cmn->dns), GFP_KERNEL);
--	if (!cmn->dns)
-+	/* Cheeky +1 to help terminate pointer-based iteration later */
-+	dn = devm_kcalloc(cmn->dev, cmn->num_dns + 1, sizeof(*dn), GFP_KERNEL);
-+	if (!dn)
- 		return -ENOMEM;
- 
- 	/* Pass 2: now we can actually populate the nodes */
--	dn = cmn->dns;
-+	cmn->dns = dn;
- 	for (i = 0; i < cmn->num_xps; i++) {
- 		void __iomem *xp_region = cmn->base + xp_offset[i];
- 		struct arm_cmn_node *xp = dn++;
-@@ -1484,6 +1486,11 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	/* Correct for any nodes we skipped */
- 	cmn->num_dns = dn - cmn->dns;
- 
-+	sz = (void *)(dn + 1) - (void *)cmn->dns;
-+	dn = devm_krealloc(cmn->dev, cmn->dns, sz, GFP_KERNEL);
-+	if (dn)
-+		cmn->dns = dn;
-+
- 	/*
- 	 * If mesh_x wasn't set during discovery then we never saw
- 	 * an XP at (0,1), thus we must have an Nx1 configuration.
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0020-perf-arm-cmn-Refactor-DTM-handling.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0020-perf-arm-cmn-Refactor-DTM-handling.patch
deleted file mode 100644
index 6036b23..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0020-perf-arm-cmn-Refactor-DTM-handling.patch
+++ /dev/null
@@ -1,406 +0,0 @@
-From a4c8c0c804b1a92373faceda9350512f2139562a Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:55 +0000
-Subject: [PATCH 20/40] perf/arm-cmn: Refactor DTM handling
-
-Untangle DTMs from XPs into a dedicated abstraction. This helps make
-things a little more obvious and robust, but primarily paves the way
-for further development where new IPs can grow extra DTMs per XP.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/9cca18b1b98f482df7f1aaf3d3213e7f39500423.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/9cca18b1b98f482df7f1aaf3d3213e7f39500423.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 169 +++++++++++++++++++++--------------------
- 1 file changed, 87 insertions(+), 82 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index da7bf779fec2..8b98ca9666d0 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -35,14 +35,9 @@
- #define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
- #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
- 
--#define CMN_ADDR_NODE_PTR		GENMASK(27, 14)
--
--#define CMN_NODE_PTR_DEVID(ptr)		(((ptr) >> 2) & 3)
--#define CMN_NODE_PTR_PID(ptr)		((ptr) & 1)
--#define CMN_NODE_PTR_X(ptr, bits)	((ptr) >> (6 + (bits)))
--#define CMN_NODE_PTR_Y(ptr, bits)	(((ptr) >> 6) & ((1U << (bits)) - 1))
--
--#define CMN_MAX_XPS			(8 * 8)
-+#define CMN_MAX_DIMENSION		8
-+#define CMN_MAX_XPS			(CMN_MAX_DIMENSION * CMN_MAX_DIMENSION)
-+#define CMN_MAX_DTMS			CMN_MAX_XPS
- 
- /* The CFG node has one other useful purpose */
- #define CMN_CFGM_PERIPH_ID_2		0x0010
-@@ -190,32 +185,32 @@ struct arm_cmn_node {
- 	u16 id, logid;
- 	enum cmn_node_type type;
- 
-+	int dtm;
- 	union {
--		/* Device node */
-+		/* DN/HN-F/CXHA */
- 		struct {
--			int to_xp;
--			/* DN/HN-F/CXHA */
--			unsigned int occupid_val;
--			unsigned int occupid_count;
-+			u8 occupid_val;
-+			u8 occupid_count;
- 		};
- 		/* XP */
--		struct {
--			int dtc;
--			u32 pmu_config_low;
--			union {
--				u8 input_sel[4];
--				__le32 pmu_config_high;
--			};
--			s8 wp_event[4];
--		};
-+		int dtc;
- 	};
--
- 	union {
- 		u8 event[4];
- 		__le32 event_sel;
- 	};
- };
- 
-+struct arm_cmn_dtm {
-+	void __iomem *base;
-+	u32 pmu_config_low;
-+	union {
-+		u8 input_sel[4];
-+		__le32 pmu_config_high;
-+	};
-+	s8 wp_event[4];
-+};
-+
- struct arm_cmn_dtc {
- 	void __iomem *base;
- 	int irq;
-@@ -241,6 +236,7 @@ struct arm_cmn {
- 	struct arm_cmn_node *xps;
- 	struct arm_cmn_node *dns;
- 
-+	struct arm_cmn_dtm *dtms;
- 	struct arm_cmn_dtc *dtc;
- 	unsigned int num_dtcs;
- 
-@@ -282,20 +278,14 @@ static struct arm_cmn_nodeid arm_cmn_nid(const struct arm_cmn *cmn, u16 id)
- 	return nid;
- }
- 
--static void arm_cmn_init_node_to_xp(const struct arm_cmn *cmn,
--				    struct arm_cmn_node *dn)
-+static struct arm_cmn_node *arm_cmn_node_to_xp(const struct arm_cmn *cmn,
-+					       const struct arm_cmn_node *dn)
- {
- 	struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
- 	int xp_idx = cmn->mesh_x * nid.y + nid.x;
- 
--	dn->to_xp = (cmn->xps + xp_idx) - dn;
--}
--
--static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
--{
--	return dn->type == CMN_TYPE_XP ? dn : dn + dn->to_xp;
-+	return cmn->xps + xp_idx;
- }
--
- static struct arm_cmn_node *arm_cmn_node(const struct arm_cmn *cmn,
- 					 enum cmn_node_type type)
- {
-@@ -706,9 +696,9 @@ static u64 arm_cmn_read_dtm(struct arm_cmn *cmn, struct arm_cmn_hw_event *hw,
- 
- 	offset = snapshot ? CMN_DTM_PMEVCNTSR : CMN_DTM_PMEVCNT;
- 	for_each_hw_dn(hw, dn, i) {
--		struct arm_cmn_node *xp = arm_cmn_node_to_xp(dn);
-+		struct arm_cmn_dtm *dtm = &cmn->dtms[dn->dtm];
- 		int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
--		u64 reg = readq_relaxed(xp->pmu_base + offset);
-+		u64 reg = readq_relaxed(dtm->base + offset);
- 		u16 dtm_count = reg >> (dtm_idx * 16);
- 
- 		count += dtm_count;
-@@ -835,9 +825,9 @@ static void arm_cmn_event_stop(struct perf_event *event, int flags)
- }
- 
- struct arm_cmn_val {
--	u8 dtm_count[CMN_MAX_XPS];
--	u8 occupid[CMN_MAX_XPS];
--	u8 wp[CMN_MAX_XPS][4];
-+	u8 dtm_count[CMN_MAX_DTMS];
-+	u8 occupid[CMN_MAX_DTMS];
-+	u8 wp[CMN_MAX_DTMS][4];
- 	int dtc_count;
- 	bool cycles;
- };
-@@ -866,16 +856,16 @@ static void arm_cmn_val_add_event(struct arm_cmn_val *val, struct perf_event *ev
- 		occupid = 0;
- 
- 	for_each_hw_dn(hw, dn, i) {
--		int wp_idx, xp = arm_cmn_node_to_xp(dn)->logid;
-+		int wp_idx, dtm = dn->dtm;
- 
--		val->dtm_count[xp]++;
--		val->occupid[xp] = occupid;
-+		val->dtm_count[dtm]++;
-+		val->occupid[dtm] = occupid;
- 
- 		if (type != CMN_TYPE_WP)
- 			continue;
- 
- 		wp_idx = arm_cmn_wp_idx(event);
--		val->wp[xp][wp_idx] = CMN_EVENT_WP_COMBINE(event) + 1;
-+		val->wp[dtm][wp_idx] = CMN_EVENT_WP_COMBINE(event) + 1;
- 	}
- }
- 
-@@ -914,22 +904,22 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 		occupid = 0;
- 
- 	for_each_hw_dn(hw, dn, i) {
--		int wp_idx, wp_cmb, xp = arm_cmn_node_to_xp(dn)->logid;
-+		int wp_idx, wp_cmb, dtm = dn->dtm;
- 
--		if (val.dtm_count[xp] == CMN_DTM_NUM_COUNTERS)
-+		if (val.dtm_count[dtm] == CMN_DTM_NUM_COUNTERS)
- 			return -EINVAL;
- 
--		if (occupid && val.occupid[xp] && occupid != val.occupid[xp])
-+		if (occupid && val.occupid[dtm] && occupid != val.occupid[dtm])
- 			return -EINVAL;
- 
- 		if (type != CMN_TYPE_WP)
- 			continue;
- 
- 		wp_idx = arm_cmn_wp_idx(event);
--		if (val.wp[xp][wp_idx])
-+		if (val.wp[dtm][wp_idx])
- 			return -EINVAL;
- 
--		wp_cmb = val.wp[xp][wp_idx ^ 1];
-+		wp_cmb = val.wp[dtm][wp_idx ^ 1];
- 		if (wp_cmb && wp_cmb != CMN_EVENT_WP_COMBINE(event) + 1)
- 			return -EINVAL;
- 	}
-@@ -1010,17 +1000,17 @@ static void arm_cmn_event_clear(struct arm_cmn *cmn, struct perf_event *event,
- 	enum cmn_node_type type = CMN_EVENT_TYPE(event);
- 
- 	while (i--) {
--		struct arm_cmn_node *xp = arm_cmn_node_to_xp(hw->dn + i);
-+		struct arm_cmn_dtm *dtm = &cmn->dtms[hw->dn[i].dtm];
- 		unsigned int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
- 
- 		if (type == CMN_TYPE_WP)
--			hw->dn[i].wp_event[arm_cmn_wp_idx(event)] = -1;
-+			dtm->wp_event[arm_cmn_wp_idx(event)] = -1;
- 
- 		if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event)))
- 			hw->dn[i].occupid_count--;
- 
--		xp->pmu_config_low &= ~CMN__PMEVCNT_PAIRED(dtm_idx);
--		writel_relaxed(xp->pmu_config_low, xp->pmu_base + CMN_DTM_PMU_CONFIG);
-+		dtm->pmu_config_low &= ~CMN__PMEVCNT_PAIRED(dtm_idx);
-+		writel_relaxed(dtm->pmu_config_low, dtm->base + CMN_DTM_PMU_CONFIG);
- 	}
- 	memset(hw->dtm_idx, 0, sizeof(hw->dtm_idx));
- 
-@@ -1062,12 +1052,12 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 
- 	/* ...then the local counters to feed it. */
- 	for_each_hw_dn(hw, dn, i) {
--		struct arm_cmn_node *xp = arm_cmn_node_to_xp(dn);
-+		struct arm_cmn_dtm *dtm = &cmn->dtms[dn->dtm];
- 		unsigned int dtm_idx, shift;
- 		u64 reg;
- 
- 		dtm_idx = 0;
--		while (xp->pmu_config_low & CMN__PMEVCNT_PAIRED(dtm_idx))
-+		while (dtm->pmu_config_low & CMN__PMEVCNT_PAIRED(dtm_idx))
- 			if (++dtm_idx == CMN_DTM_NUM_COUNTERS)
- 				goto free_dtms;
- 
-@@ -1077,17 +1067,17 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 			int tmp, wp_idx = arm_cmn_wp_idx(event);
- 			u32 cfg = arm_cmn_wp_config(event);
- 
--			if (dn->wp_event[wp_idx] >= 0)
-+			if (dtm->wp_event[wp_idx] >= 0)
- 				goto free_dtms;
- 
--			tmp = dn->wp_event[wp_idx ^ 1];
-+			tmp = dtm->wp_event[wp_idx ^ 1];
- 			if (tmp >= 0 && CMN_EVENT_WP_COMBINE(event) !=
- 					CMN_EVENT_WP_COMBINE(dtc->counters[tmp]))
- 				goto free_dtms;
- 
- 			input_sel = CMN__PMEVCNT0_INPUT_SEL_WP + wp_idx;
--			dn->wp_event[wp_idx] = dtc_idx;
--			writel_relaxed(cfg, dn->pmu_base + CMN_DTM_WPn_CONFIG(wp_idx));
-+			dtm->wp_event[wp_idx] = dtc_idx;
-+			writel_relaxed(cfg, dtm->base + CMN_DTM_WPn_CONFIG(wp_idx));
- 		} else {
- 			struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
- 
-@@ -1095,7 +1085,7 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 				    (nid.port << 4) + (nid.dev << 2);
- 
- 			if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event))) {
--				int occupid = CMN_EVENT_OCCUPID(event);
-+				u8 occupid = CMN_EVENT_OCCUPID(event);
- 
- 				if (dn->occupid_count == 0) {
- 					dn->occupid_val = occupid;
-@@ -1110,13 +1100,13 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 
- 		arm_cmn_set_index(hw->dtm_idx, i, dtm_idx);
- 
--		xp->input_sel[dtm_idx] = input_sel;
-+		dtm->input_sel[dtm_idx] = input_sel;
- 		shift = CMN__PMEVCNTn_GLOBAL_NUM_SHIFT(dtm_idx);
--		xp->pmu_config_low &= ~(CMN__PMEVCNT0_GLOBAL_NUM << shift);
--		xp->pmu_config_low |= FIELD_PREP(CMN__PMEVCNT0_GLOBAL_NUM, dtc_idx) << shift;
--		xp->pmu_config_low |= CMN__PMEVCNT_PAIRED(dtm_idx);
--		reg = (u64)le32_to_cpu(xp->pmu_config_high) << 32 | xp->pmu_config_low;
--		writeq_relaxed(reg, xp->pmu_base + CMN_DTM_PMU_CONFIG);
-+		dtm->pmu_config_low &= ~(CMN__PMEVCNT0_GLOBAL_NUM << shift);
-+		dtm->pmu_config_low |= FIELD_PREP(CMN__PMEVCNT0_GLOBAL_NUM, dtc_idx) << shift;
-+		dtm->pmu_config_low |= CMN__PMEVCNT_PAIRED(dtm_idx);
-+		reg = (u64)le32_to_cpu(dtm->pmu_config_high) << 32 | dtm->pmu_config_low;
-+		writeq_relaxed(reg, dtm->base + CMN_DTM_PMU_CONFIG);
- 	}
- 
- 	/* Go go go! */
-@@ -1276,23 +1266,22 @@ static int arm_cmn_init_irqs(struct arm_cmn *cmn)
- 	return 0;
- }
- 
--static void arm_cmn_init_dtm(struct arm_cmn_node *xp)
-+static void arm_cmn_init_dtm(struct arm_cmn_dtm *dtm, struct arm_cmn_node *xp)
- {
- 	int i;
- 
-+	dtm->base = xp->pmu_base;
-+	dtm->pmu_config_low = CMN_DTM_PMU_CONFIG_PMU_EN;
- 	for (i = 0; i < 4; i++) {
--		xp->wp_event[i] = -1;
--		writeq_relaxed(0, xp->pmu_base + CMN_DTM_WPn_MASK(i));
--		writeq_relaxed(~0ULL, xp->pmu_base + CMN_DTM_WPn_VAL(i));
-+		dtm->wp_event[i] = -1;
-+		writeq_relaxed(0, dtm->base + CMN_DTM_WPn_MASK(i));
-+		writeq_relaxed(~0ULL, dtm->base + CMN_DTM_WPn_VAL(i));
- 	}
--	xp->pmu_config_low = CMN_DTM_PMU_CONFIG_PMU_EN;
--	xp->dtc = -1;
- }
- 
- static int arm_cmn_init_dtc(struct arm_cmn *cmn, struct arm_cmn_node *dn, int idx)
- {
- 	struct arm_cmn_dtc *dtc = cmn->dtc + idx;
--	struct arm_cmn_node *xp;
- 
- 	dtc->base = dn->pmu_base - CMN_PMU_OFFSET;
- 	dtc->irq = platform_get_irq(to_platform_device(cmn->dev), idx);
-@@ -1303,10 +1292,6 @@ static int arm_cmn_init_dtc(struct arm_cmn *cmn, struct arm_cmn_node *dn, int id
- 	writel_relaxed(0x1ff, dtc->base + CMN_DT_PMOVSR_CLR);
- 	writel_relaxed(CMN_DT_PMCR_OVFL_INTR_EN, dtc->base + CMN_DT_PMCR);
- 
--	/* We do at least know that a DTC's XP must be in that DTC's domain */
--	xp = arm_cmn_node_to_xp(dn);
--	xp->dtc = idx;
--
- 	return 0;
- }
- 
-@@ -1323,7 +1308,7 @@ static int arm_cmn_node_cmp(const void *a, const void *b)
- 
- static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- {
--	struct arm_cmn_node *dn;
-+	struct arm_cmn_node *dn, *xp;
- 	int dtc_idx = 0;
- 
- 	cmn->dtc = devm_kcalloc(cmn->dev, cmn->num_dtcs, sizeof(cmn->dtc[0]), GFP_KERNEL);
-@@ -1335,13 +1320,24 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- 	cmn->xps = arm_cmn_node(cmn, CMN_TYPE_XP);
- 
- 	for (dn = cmn->dns; dn->type; dn++) {
--		if (dn->type != CMN_TYPE_XP)
--			arm_cmn_init_node_to_xp(cmn, dn);
--		else if (cmn->num_dtcs == 1)
--			dn->dtc = 0;
-+		if (dn->type == CMN_TYPE_XP) {
-+			if (dn->dtc < 0 && cmn->num_dtcs == 1)
-+				dn->dtc = 0;
-+			continue;
-+		}
- 
--		if (dn->type == CMN_TYPE_DTC)
--			arm_cmn_init_dtc(cmn, dn, dtc_idx++);
-+		xp = arm_cmn_node_to_xp(cmn, dn);
-+		dn->dtm = xp->dtm;
-+
-+		if (dn->type == CMN_TYPE_DTC) {
-+			int err;
-+			/* We do at least know that a DTC's XP must be in that DTC's domain */
-+			if (xp->dtc < 0)
-+				xp->dtc = dtc_idx;
-+			err = arm_cmn_init_dtc(cmn, dn, dtc_idx++);
-+			if (err)
-+				return err;
-+		}
- 
- 		/* To the PMU, RN-Ds don't add anything over RN-Is, so smoosh them together */
- 		if (dn->type == CMN_TYPE_RND)
-@@ -1380,6 +1376,7 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- {
- 	void __iomem *cfg_region;
- 	struct arm_cmn_node cfg, *dn;
-+	struct arm_cmn_dtm *dtm;
- 	u16 child_count, child_poff;
- 	u32 xp_offset[CMN_MAX_XPS];
- 	u64 reg;
-@@ -1416,14 +1413,18 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	if (!dn)
- 		return -ENOMEM;
- 
-+	dtm = devm_kcalloc(cmn->dev, cmn->num_xps, sizeof(*dtm), GFP_KERNEL);
-+	if (!dtm)
-+		return -ENOMEM;
-+
- 	/* Pass 2: now we can actually populate the nodes */
- 	cmn->dns = dn;
-+	cmn->dtms = dtm;
- 	for (i = 0; i < cmn->num_xps; i++) {
- 		void __iomem *xp_region = cmn->base + xp_offset[i];
- 		struct arm_cmn_node *xp = dn++;
- 
- 		arm_cmn_init_node_info(cmn, xp_offset[i], xp);
--		arm_cmn_init_dtm(xp);
- 		/*
- 		 * Thanks to the order in which XP logical IDs seem to be
- 		 * assigned, we can handily infer the mesh X dimension by
-@@ -1433,6 +1434,10 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		if (xp->id == (1 << 3))
- 			cmn->mesh_x = xp->logid;
- 
-+		xp->dtc = -1;
-+		xp->dtm = dtm - cmn->dtms;
-+		arm_cmn_init_dtm(dtm++, xp);
-+
- 		reg = readq_relaxed(xp_region + CMN_CHILD_INFO);
- 		child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
- 		child_poff = FIELD_GET(CMN_CI_CHILD_PTR_OFFSET, reg);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0021-perf-arm-cmn-Optimise-DTM-counter-reads.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0021-perf-arm-cmn-Optimise-DTM-counter-reads.patch
deleted file mode 100644
index 07e0484..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0021-perf-arm-cmn-Optimise-DTM-counter-reads.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 2919ec562ca976a0ae5f70b264379b3d45abdaf5 Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:56 +0000
-Subject: [PATCH 21/40] perf/arm-cmn: Optimise DTM counter reads
-
-When multiple nodes of the same type are connected to the same XP
-(particularly in CAL configurations), it seems that they are likely
-to be consecutive in logical ID. Therefore, we're likely to gain a
-small benefit from an easy tweak to optimise out consecutive reads
-of the same set of DTM counters for an aggregated event.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/7777d77c2df17693cd3dabb6e268906e15238d82.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/7777d77c2df17693cd3dabb6e268906e15238d82.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 8b98ca9666d0..005a0d83bcac 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -690,18 +690,19 @@ static void arm_cmn_pmu_disable(struct pmu *pmu)
- static u64 arm_cmn_read_dtm(struct arm_cmn *cmn, struct arm_cmn_hw_event *hw,
- 			    bool snapshot)
- {
-+	struct arm_cmn_dtm *dtm = NULL;
- 	struct arm_cmn_node *dn;
--	unsigned int i, offset;
--	u64 count = 0;
-+	unsigned int i, offset, dtm_idx;
-+	u64 reg, count = 0;
- 
- 	offset = snapshot ? CMN_DTM_PMEVCNTSR : CMN_DTM_PMEVCNT;
- 	for_each_hw_dn(hw, dn, i) {
--		struct arm_cmn_dtm *dtm = &cmn->dtms[dn->dtm];
--		int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
--		u64 reg = readq_relaxed(dtm->base + offset);
--		u16 dtm_count = reg >> (dtm_idx * 16);
--
--		count += dtm_count;
-+		if (dtm != &cmn->dtms[dn->dtm]) {
-+			dtm = &cmn->dtms[dn->dtm];
-+			reg = readq_relaxed(dtm->base + offset);
-+		}
-+		dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
-+		count += (u16)(reg >> (dtm_idx * 16));
- 	}
- 	return count;
- }
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0022-perf-arm-cmn-Optimise-DTC-counter-accesses.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0022-perf-arm-cmn-Optimise-DTC-counter-accesses.patch
deleted file mode 100644
index 93a801b..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0022-perf-arm-cmn-Optimise-DTC-counter-accesses.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 1cf0522e9b4cdad7609c6ce31e848c3d8f2932d5 Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:57 +0000
-Subject: [PATCH 22/40] perf/arm-cmn: Optimise DTC counter accesses
-
-In cases where we do know which DTC domain a node belongs to, we can
-skip initialising or reading the global count in DTCs where we know
-it won't change. The machinery to achieve that is mostly in place
-already, so finish hooking it up by converting the vestigial domain
-tracking to propagate suitable bitmaps all the way through to events.
-
-Note that this does not allow allocating such an unused counter to a
-different event on that DTC, because that is a flippin' nightmare.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/51d930fd945ef51c81f5889ccca055c302b0a1d0.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/51d930fd945ef51c81f5889ccca055c302b0a1d0.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 29 ++++++++++++-----------------
- 1 file changed, 12 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 005a0d83bcac..acff8683af2c 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -193,7 +193,7 @@ struct arm_cmn_node {
- 			u8 occupid_count;
- 		};
- 		/* XP */
--		int dtc;
-+		u8 dtc;
- 	};
- 	union {
- 		u8 event[4];
-@@ -968,14 +968,14 @@ static int arm_cmn_event_init(struct perf_event *event)
- 	if (!hw->dn)
- 		return -EINVAL;
- 	for (dn = hw->dn; dn->type == type; dn++) {
--		if (!bynodeid) {
--			hw->num_dns++;
--		} else if (dn->id != nodeid) {
-+		if (bynodeid && dn->id != nodeid) {
- 			hw->dn++;
--		} else {
--			hw->num_dns = 1;
--			break;
-+			continue;
- 		}
-+		hw->dtcs_used |= arm_cmn_node_to_xp(cmn, dn)->dtc;
-+		hw->num_dns++;
-+		if (bynodeid)
-+			break;
- 	}
- 
- 	if (!hw->num_dns) {
-@@ -985,11 +985,6 @@ static int arm_cmn_event_init(struct perf_event *event)
- 			nodeid, nid.x, nid.y, nid.port, nid.dev, type);
- 		return -EINVAL;
- 	}
--	/*
--	 * By assuming events count in all DTC domains, we cunningly avoid
--	 * needing to know anything about how XPs are assigned to domains.
--	 */
--	hw->dtcs_used = (1U << cmn->num_dtcs) - 1;
- 
- 	return arm_cmn_validate_group(event);
- }
-@@ -1311,6 +1306,7 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- {
- 	struct arm_cmn_node *dn, *xp;
- 	int dtc_idx = 0;
-+	u8 dtcs_present = (1 << cmn->num_dtcs) - 1;
- 
- 	cmn->dtc = devm_kcalloc(cmn->dev, cmn->num_dtcs, sizeof(cmn->dtc[0]), GFP_KERNEL);
- 	if (!cmn->dtc)
-@@ -1322,8 +1318,7 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- 
- 	for (dn = cmn->dns; dn->type; dn++) {
- 		if (dn->type == CMN_TYPE_XP) {
--			if (dn->dtc < 0 && cmn->num_dtcs == 1)
--				dn->dtc = 0;
-+			dn->dtc &= dtcs_present;
- 			continue;
- 		}
- 
-@@ -1333,8 +1328,8 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- 		if (dn->type == CMN_TYPE_DTC) {
- 			int err;
- 			/* We do at least know that a DTC's XP must be in that DTC's domain */
--			if (xp->dtc < 0)
--				xp->dtc = dtc_idx;
-+			if (xp->dtc == 0xf)
-+				xp->dtc = 1 << dtc_idx;
- 			err = arm_cmn_init_dtc(cmn, dn, dtc_idx++);
- 			if (err)
- 				return err;
-@@ -1435,7 +1430,7 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		if (xp->id == (1 << 3))
- 			cmn->mesh_x = xp->logid;
- 
--		xp->dtc = -1;
-+		xp->dtc = 0xf;
- 		xp->dtm = dtm - cmn->dtms;
- 		arm_cmn_init_dtm(dtm++, xp);
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0023-perf-arm-cmn-Move-group-validation-data-off-stack.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0023-perf-arm-cmn-Move-group-validation-data-off-stack.patch
deleted file mode 100644
index b251779..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0023-perf-arm-cmn-Move-group-validation-data-off-stack.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 118a6499d8c5d940210c6543309addc97b48122c Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:58 +0000
-Subject: [PATCH 23/40] perf/arm-cmn: Move group validation data off-stack
-
-With the value of CMN_MAX_DTMS increasing significantly, our validation
-data structure is set to get quite big. Technically we could pack it at
-least twice as densely, since we only need around 19 bits of information
-per DTM, but that makes the code even more mind-bogglingly impenetrable,
-and even half of "quite big" may still be uncomfortably large for a
-stack frame (~1KB). Just move it to an off-stack allocation instead.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/0cabff2e5839ddc0979e757c55515966f65359e4.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/0cabff2e5839ddc0979e757c55515966f65359e4.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 43 ++++++++++++++++++++++++------------------
- 1 file changed, 25 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index acff8683af2c..d2dd02f040b8 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -876,8 +876,8 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 	struct arm_cmn_node *dn;
- 	struct perf_event *sibling, *leader = event->group_leader;
- 	enum cmn_node_type type;
--	struct arm_cmn_val val;
--	int i;
-+	struct arm_cmn_val *val;
-+	int i, ret = -EINVAL;
- 	u8 occupid;
- 
- 	if (leader == event)
-@@ -886,18 +886,22 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 	if (event->pmu != leader->pmu && !is_software_event(leader))
- 		return -EINVAL;
- 
--	memset(&val, 0, sizeof(val));
-+	val = kzalloc(sizeof(*val), GFP_KERNEL);
-+	if (!val)
-+		return -ENOMEM;
- 
--	arm_cmn_val_add_event(&val, leader);
-+	arm_cmn_val_add_event(val, leader);
- 	for_each_sibling_event(sibling, leader)
--		arm_cmn_val_add_event(&val, sibling);
-+		arm_cmn_val_add_event(val, sibling);
- 
- 	type = CMN_EVENT_TYPE(event);
--	if (type == CMN_TYPE_DTC)
--		return val.cycles ? -EINVAL : 0;
-+	if (type == CMN_TYPE_DTC) {
-+		ret = val->cycles ? -EINVAL : 0;
-+		goto done;
-+	}
- 
--	if (val.dtc_count == CMN_DT_NUM_COUNTERS)
--		return -EINVAL;
-+	if (val->dtc_count == CMN_DT_NUM_COUNTERS)
-+		goto done;
- 
- 	if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event)))
- 		occupid = CMN_EVENT_OCCUPID(event) + 1;
-@@ -907,25 +911,28 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 	for_each_hw_dn(hw, dn, i) {
- 		int wp_idx, wp_cmb, dtm = dn->dtm;
- 
--		if (val.dtm_count[dtm] == CMN_DTM_NUM_COUNTERS)
--			return -EINVAL;
-+		if (val->dtm_count[dtm] == CMN_DTM_NUM_COUNTERS)
-+			goto done;
- 
--		if (occupid && val.occupid[dtm] && occupid != val.occupid[dtm])
--			return -EINVAL;
-+		if (occupid && val->occupid[dtm] && occupid != val->occupid[dtm])
-+			goto done;
- 
- 		if (type != CMN_TYPE_WP)
- 			continue;
- 
- 		wp_idx = arm_cmn_wp_idx(event);
--		if (val.wp[dtm][wp_idx])
--			return -EINVAL;
-+		if (val->wp[dtm][wp_idx])
-+			goto done;
- 
--		wp_cmb = val.wp[dtm][wp_idx ^ 1];
-+		wp_cmb = val->wp[dtm][wp_idx ^ 1];
- 		if (wp_cmb && wp_cmb != CMN_EVENT_WP_COMBINE(event) + 1)
--			return -EINVAL;
-+			goto done;
- 	}
- 
--	return 0;
-+	ret = 0;
-+done:
-+	kfree(val);
-+	return ret;
- }
- 
- static int arm_cmn_event_init(struct perf_event *event)
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0024-perf-arm-cmn-Demarcate-CMN-600-specifics.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0024-perf-arm-cmn-Demarcate-CMN-600-specifics.patch
deleted file mode 100644
index c91e591..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0024-perf-arm-cmn-Demarcate-CMN-600-specifics.patch
+++ /dev/null
@@ -1,466 +0,0 @@
-From 86d66852aa85254b823578537f8e125915375d0b Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:44:59 +0000
-Subject: [PATCH 24/40] perf/arm-cmn: Demarcate CMN-600 specifics
-
-In preparation for supporting newer CMN products, let's introduce a
-means to differentiate the features and events which are specific to a
-particular IP from those which remain common to the whole family. The
-newer designs have also smoothed off some of the rough edges in terms
-of discoverability, so separate out the parts of the flow which have
-effectively now become CMN-600 quirks.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/9f6368cdca4c821d801138939508a5bba54ccabb.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/9f6368cdca4c821d801138939508a5bba54ccabb.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 313 +++++++++++++++++++++--------------------
- 1 file changed, 162 insertions(+), 151 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index d2dd02f040b8..ce94f923a607 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -151,7 +151,12 @@
- #define CMN_WP_DOWN			2
- 
- 
--/* r0px probably don't exist in silicon, thankfully */
-+enum cmn_model {
-+	CMN_ANY = -1,
-+	CMN600 = 1,
-+};
-+
-+/* CMN-600 r0px shouldn't exist in silicon, thankfully */
- enum cmn_revision {
- 	CMN600_R1P0,
- 	CMN600_R1P1,
-@@ -159,6 +164,7 @@ enum cmn_revision {
- 	CMN600_R1P3,
- 	CMN600_R2P0,
- 	CMN600_R3P0,
-+	CMN600_R3P1,
- };
- 
- enum cmn_node_type {
-@@ -229,6 +235,7 @@ struct arm_cmn {
- 	void __iomem *base;
- 
- 	enum cmn_revision rev;
-+	enum cmn_model model;
- 	u8 mesh_x;
- 	u8 mesh_y;
- 	u16 num_xps;
-@@ -326,6 +333,7 @@ static unsigned int arm_cmn_get_index(u64 x[], unsigned int pos)
- 
- struct arm_cmn_event_attr {
- 	struct device_attribute attr;
-+	enum cmn_model model;
- 	enum cmn_node_type type;
- 	u8 eventid;
- 	u8 occupid;
-@@ -337,9 +345,10 @@ struct arm_cmn_format_attr {
- 	int config;
- };
- 
--#define CMN_EVENT_ATTR(_name, _type, _eventid, _occupid)		\
-+#define CMN_EVENT_ATTR(_model, _name, _type, _eventid, _occupid)	\
- 	(&((struct arm_cmn_event_attr[]) {{				\
- 		.attr = __ATTR(_name, 0444, arm_cmn_event_show, NULL),	\
-+		.model = _model,					\
- 		.type = _type,						\
- 		.eventid = _eventid,					\
- 		.occupid = _occupid,					\
-@@ -386,12 +395,15 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
- 	eattr = container_of(attr, typeof(*eattr), attr.attr);
- 	type = eattr->type;
- 
-+	if (!(eattr->model & cmn->model))
-+		return 0;
-+
- 	/* Watchpoints aren't nodes */
- 	if (type == CMN_TYPE_WP)
- 		type = CMN_TYPE_XP;
- 
- 	/* Revision-specific differences */
--	if (cmn->rev < CMN600_R1P2) {
-+	if (cmn->model == CMN600 && cmn->rev < CMN600_R1P2) {
- 		if (type == CMN_TYPE_HNF && eattr->eventid == 0x1b)
- 			return 0;
- 	}
-@@ -402,25 +414,27 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
- 	return attr->mode;
- }
- 
--#define _CMN_EVENT_DVM(_name, _event, _occup)			\
--	CMN_EVENT_ATTR(dn_##_name, CMN_TYPE_DVM, _event, _occup)
-+#define _CMN_EVENT_DVM(_model, _name, _event, _occup)		\
-+	CMN_EVENT_ATTR(_model, dn_##_name, CMN_TYPE_DVM, _event, _occup)
- #define CMN_EVENT_DTC(_name)					\
--	CMN_EVENT_ATTR(dtc_##_name, CMN_TYPE_DTC, 0, 0)
--#define _CMN_EVENT_HNF(_name, _event, _occup)			\
--	CMN_EVENT_ATTR(hnf_##_name, CMN_TYPE_HNF, _event, _occup)
-+	CMN_EVENT_ATTR(CMN_ANY, dtc_##_name, CMN_TYPE_DTC, 0, 0)
-+#define _CMN_EVENT_HNF(_model, _name, _event, _occup)		\
-+	CMN_EVENT_ATTR(_model, hnf_##_name, CMN_TYPE_HNF, _event, _occup)
- #define CMN_EVENT_HNI(_name, _event)				\
--	CMN_EVENT_ATTR(hni_##_name, CMN_TYPE_HNI, _event, 0)
-+	CMN_EVENT_ATTR(CMN_ANY, hni_##_name, CMN_TYPE_HNI, _event, 0)
- #define __CMN_EVENT_XP(_name, _event)				\
--	CMN_EVENT_ATTR(mxp_##_name, CMN_TYPE_XP, _event, 0)
--#define CMN_EVENT_SBSX(_name, _event)				\
--	CMN_EVENT_ATTR(sbsx_##_name, CMN_TYPE_SBSX, _event, 0)
--#define CMN_EVENT_RNID(_name, _event)				\
--	CMN_EVENT_ATTR(rnid_##_name, CMN_TYPE_RNI, _event, 0)
--
--#define CMN_EVENT_DVM(_name, _event)				\
--	_CMN_EVENT_DVM(_name, _event, 0)
--#define CMN_EVENT_HNF(_name, _event)				\
--	_CMN_EVENT_HNF(_name, _event, 0)
-+	CMN_EVENT_ATTR(CMN_ANY, mxp_##_name, CMN_TYPE_XP, _event, 0)
-+#define CMN_EVENT_SBSX(_model, _name, _event)			\
-+	CMN_EVENT_ATTR(_model, sbsx_##_name, CMN_TYPE_SBSX, _event, 0)
-+#define CMN_EVENT_RNID(_model, _name, _event)			\
-+	CMN_EVENT_ATTR(_model, rnid_##_name, CMN_TYPE_RNI, _event, 0)
-+#define CMN_EVENT_MTSX(_name, _event)				\
-+	CMN_EVENT_ATTR(CMN_ANY, mtsx_##_name, CMN_TYPE_MTSX, _event, 0)
-+
-+#define CMN_EVENT_DVM(_model, _name, _event)			\
-+	_CMN_EVENT_DVM(_model, _name, _event, 0)
-+#define CMN_EVENT_HNF(_model, _name, _event)			\
-+	_CMN_EVENT_HNF(_model, _name, _event, 0)
- #define _CMN_EVENT_XP(_name, _event)				\
- 	__CMN_EVENT_XP(e_##_name, (_event) | (0 << 2)),		\
- 	__CMN_EVENT_XP(w_##_name, (_event) | (1 << 2)),		\
-@@ -445,115 +459,115 @@ static struct attribute *arm_cmn_event_attrs[] = {
- 	 * slot, but our lazy short-cut of using the DTM counter index for
- 	 * the PMU index as well happens to avoid that by construction.
- 	 */
--	CMN_EVENT_DVM(rxreq_dvmop,	0x01),
--	CMN_EVENT_DVM(rxreq_dvmsync,	0x02),
--	CMN_EVENT_DVM(rxreq_dvmop_vmid_filtered, 0x03),
--	CMN_EVENT_DVM(rxreq_retried,	0x04),
--	_CMN_EVENT_DVM(rxreq_trk_occupancy_all, 0x05, 0),
--	_CMN_EVENT_DVM(rxreq_trk_occupancy_dvmop, 0x05, 1),
--	_CMN_EVENT_DVM(rxreq_trk_occupancy_dvmsync, 0x05, 2),
--
--	CMN_EVENT_HNF(cache_miss,	0x01),
--	CMN_EVENT_HNF(slc_sf_cache_access, 0x02),
--	CMN_EVENT_HNF(cache_fill,	0x03),
--	CMN_EVENT_HNF(pocq_retry,	0x04),
--	CMN_EVENT_HNF(pocq_reqs_recvd,	0x05),
--	CMN_EVENT_HNF(sf_hit,		0x06),
--	CMN_EVENT_HNF(sf_evictions,	0x07),
--	CMN_EVENT_HNF(dir_snoops_sent,	0x08),
--	CMN_EVENT_HNF(brd_snoops_sent,	0x09),
--	CMN_EVENT_HNF(slc_eviction,	0x0a),
--	CMN_EVENT_HNF(slc_fill_invalid_way, 0x0b),
--	CMN_EVENT_HNF(mc_retries,	0x0c),
--	CMN_EVENT_HNF(mc_reqs,		0x0d),
--	CMN_EVENT_HNF(qos_hh_retry,	0x0e),
--	_CMN_EVENT_HNF(qos_pocq_occupancy_all, 0x0f, 0),
--	_CMN_EVENT_HNF(qos_pocq_occupancy_read, 0x0f, 1),
--	_CMN_EVENT_HNF(qos_pocq_occupancy_write, 0x0f, 2),
--	_CMN_EVENT_HNF(qos_pocq_occupancy_atomic, 0x0f, 3),
--	_CMN_EVENT_HNF(qos_pocq_occupancy_stash, 0x0f, 4),
--	CMN_EVENT_HNF(pocq_addrhaz,	0x10),
--	CMN_EVENT_HNF(pocq_atomic_addrhaz, 0x11),
--	CMN_EVENT_HNF(ld_st_swp_adq_full, 0x12),
--	CMN_EVENT_HNF(cmp_adq_full,	0x13),
--	CMN_EVENT_HNF(txdat_stall,	0x14),
--	CMN_EVENT_HNF(txrsp_stall,	0x15),
--	CMN_EVENT_HNF(seq_full,		0x16),
--	CMN_EVENT_HNF(seq_hit,		0x17),
--	CMN_EVENT_HNF(snp_sent,		0x18),
--	CMN_EVENT_HNF(sfbi_dir_snp_sent, 0x19),
--	CMN_EVENT_HNF(sfbi_brd_snp_sent, 0x1a),
--	CMN_EVENT_HNF(snp_sent_untrk,	0x1b),
--	CMN_EVENT_HNF(intv_dirty,	0x1c),
--	CMN_EVENT_HNF(stash_snp_sent,	0x1d),
--	CMN_EVENT_HNF(stash_data_pull,	0x1e),
--	CMN_EVENT_HNF(snp_fwded,	0x1f),
--
--	CMN_EVENT_HNI(rrt_rd_occ_cnt_ovfl, 0x20),
--	CMN_EVENT_HNI(rrt_wr_occ_cnt_ovfl, 0x21),
--	CMN_EVENT_HNI(rdt_rd_occ_cnt_ovfl, 0x22),
--	CMN_EVENT_HNI(rdt_wr_occ_cnt_ovfl, 0x23),
--	CMN_EVENT_HNI(wdb_occ_cnt_ovfl,	0x24),
--	CMN_EVENT_HNI(rrt_rd_alloc,	0x25),
--	CMN_EVENT_HNI(rrt_wr_alloc,	0x26),
--	CMN_EVENT_HNI(rdt_rd_alloc,	0x27),
--	CMN_EVENT_HNI(rdt_wr_alloc,	0x28),
--	CMN_EVENT_HNI(wdb_alloc,	0x29),
--	CMN_EVENT_HNI(txrsp_retryack,	0x2a),
--	CMN_EVENT_HNI(arvalid_no_arready, 0x2b),
--	CMN_EVENT_HNI(arready_no_arvalid, 0x2c),
--	CMN_EVENT_HNI(awvalid_no_awready, 0x2d),
--	CMN_EVENT_HNI(awready_no_awvalid, 0x2e),
--	CMN_EVENT_HNI(wvalid_no_wready,	0x2f),
--	CMN_EVENT_HNI(txdat_stall,	0x30),
--	CMN_EVENT_HNI(nonpcie_serialization, 0x31),
--	CMN_EVENT_HNI(pcie_serialization, 0x32),
--
--	CMN_EVENT_XP(txflit_valid,	0x01),
--	CMN_EVENT_XP(txflit_stall,	0x02),
--	CMN_EVENT_XP(partial_dat_flit,	0x03),
-+	CMN_EVENT_DVM(CMN600, rxreq_dvmop,		0x01),
-+	CMN_EVENT_DVM(CMN600, rxreq_dvmsync,		0x02),
-+	CMN_EVENT_DVM(CMN600, rxreq_dvmop_vmid_filtered, 0x03),
-+	CMN_EVENT_DVM(CMN600, rxreq_retried,		0x04),
-+	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_all, 0x05, 0),
-+	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_dvmop, 0x05, 1),
-+	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_dvmsync, 0x05, 2),
-+
-+	CMN_EVENT_HNF(CMN_ANY, cache_miss,		0x01),
-+	CMN_EVENT_HNF(CMN_ANY, slc_sf_cache_access,	0x02),
-+	CMN_EVENT_HNF(CMN_ANY, cache_fill,		0x03),
-+	CMN_EVENT_HNF(CMN_ANY, pocq_retry,		0x04),
-+	CMN_EVENT_HNF(CMN_ANY, pocq_reqs_recvd,		0x05),
-+	CMN_EVENT_HNF(CMN_ANY, sf_hit,			0x06),
-+	CMN_EVENT_HNF(CMN_ANY, sf_evictions,		0x07),
-+	CMN_EVENT_HNF(CMN_ANY, dir_snoops_sent,		0x08),
-+	CMN_EVENT_HNF(CMN_ANY, brd_snoops_sent,		0x09),
-+	CMN_EVENT_HNF(CMN_ANY, slc_eviction,		0x0a),
-+	CMN_EVENT_HNF(CMN_ANY, slc_fill_invalid_way,	0x0b),
-+	CMN_EVENT_HNF(CMN_ANY, mc_retries,		0x0c),
-+	CMN_EVENT_HNF(CMN_ANY, mc_reqs,			0x0d),
-+	CMN_EVENT_HNF(CMN_ANY, qos_hh_retry,		0x0e),
-+	_CMN_EVENT_HNF(CMN_ANY, qos_pocq_occupancy_all,	0x0f, 0),
-+	_CMN_EVENT_HNF(CMN_ANY, qos_pocq_occupancy_read, 0x0f, 1),
-+	_CMN_EVENT_HNF(CMN_ANY, qos_pocq_occupancy_write, 0x0f, 2),
-+	_CMN_EVENT_HNF(CMN_ANY, qos_pocq_occupancy_atomic, 0x0f, 3),
-+	_CMN_EVENT_HNF(CMN_ANY, qos_pocq_occupancy_stash, 0x0f, 4),
-+	CMN_EVENT_HNF(CMN_ANY, pocq_addrhaz,		0x10),
-+	CMN_EVENT_HNF(CMN_ANY, pocq_atomic_addrhaz,	0x11),
-+	CMN_EVENT_HNF(CMN_ANY, ld_st_swp_adq_full,	0x12),
-+	CMN_EVENT_HNF(CMN_ANY, cmp_adq_full,		0x13),
-+	CMN_EVENT_HNF(CMN_ANY, txdat_stall,		0x14),
-+	CMN_EVENT_HNF(CMN_ANY, txrsp_stall,		0x15),
-+	CMN_EVENT_HNF(CMN_ANY, seq_full,		0x16),
-+	CMN_EVENT_HNF(CMN_ANY, seq_hit,			0x17),
-+	CMN_EVENT_HNF(CMN_ANY, snp_sent,		0x18),
-+	CMN_EVENT_HNF(CMN_ANY, sfbi_dir_snp_sent,	0x19),
-+	CMN_EVENT_HNF(CMN_ANY, sfbi_brd_snp_sent,	0x1a),
-+	CMN_EVENT_HNF(CMN_ANY, snp_sent_untrk,		0x1b),
-+	CMN_EVENT_HNF(CMN_ANY, intv_dirty,		0x1c),
-+	CMN_EVENT_HNF(CMN_ANY, stash_snp_sent,		0x1d),
-+	CMN_EVENT_HNF(CMN_ANY, stash_data_pull,		0x1e),
-+	CMN_EVENT_HNF(CMN_ANY, snp_fwded,		0x1f),
-+
-+	CMN_EVENT_HNI(rrt_rd_occ_cnt_ovfl,		0x20),
-+	CMN_EVENT_HNI(rrt_wr_occ_cnt_ovfl,		0x21),
-+	CMN_EVENT_HNI(rdt_rd_occ_cnt_ovfl,		0x22),
-+	CMN_EVENT_HNI(rdt_wr_occ_cnt_ovfl,		0x23),
-+	CMN_EVENT_HNI(wdb_occ_cnt_ovfl,			0x24),
-+	CMN_EVENT_HNI(rrt_rd_alloc,			0x25),
-+	CMN_EVENT_HNI(rrt_wr_alloc,			0x26),
-+	CMN_EVENT_HNI(rdt_rd_alloc,			0x27),
-+	CMN_EVENT_HNI(rdt_wr_alloc,			0x28),
-+	CMN_EVENT_HNI(wdb_alloc,			0x29),
-+	CMN_EVENT_HNI(txrsp_retryack,			0x2a),
-+	CMN_EVENT_HNI(arvalid_no_arready,		0x2b),
-+	CMN_EVENT_HNI(arready_no_arvalid,		0x2c),
-+	CMN_EVENT_HNI(awvalid_no_awready,		0x2d),
-+	CMN_EVENT_HNI(awready_no_awvalid,		0x2e),
-+	CMN_EVENT_HNI(wvalid_no_wready,			0x2f),
-+	CMN_EVENT_HNI(txdat_stall,			0x30),
-+	CMN_EVENT_HNI(nonpcie_serialization,		0x31),
-+	CMN_EVENT_HNI(pcie_serialization,		0x32),
-+
-+	CMN_EVENT_XP(txflit_valid,			0x01),
-+	CMN_EVENT_XP(txflit_stall,			0x02),
-+	CMN_EVENT_XP(partial_dat_flit,			0x03),
- 	/* We treat watchpoints as a special made-up class of XP events */
--	CMN_EVENT_ATTR(watchpoint_up, CMN_TYPE_WP, 0, 0),
--	CMN_EVENT_ATTR(watchpoint_down, CMN_TYPE_WP, 2, 0),
--
--	CMN_EVENT_SBSX(rd_req,		0x01),
--	CMN_EVENT_SBSX(wr_req,		0x02),
--	CMN_EVENT_SBSX(cmo_req,		0x03),
--	CMN_EVENT_SBSX(txrsp_retryack,	0x04),
--	CMN_EVENT_SBSX(txdat_flitv,	0x05),
--	CMN_EVENT_SBSX(txrsp_flitv,	0x06),
--	CMN_EVENT_SBSX(rd_req_trkr_occ_cnt_ovfl, 0x11),
--	CMN_EVENT_SBSX(wr_req_trkr_occ_cnt_ovfl, 0x12),
--	CMN_EVENT_SBSX(cmo_req_trkr_occ_cnt_ovfl, 0x13),
--	CMN_EVENT_SBSX(wdb_occ_cnt_ovfl, 0x14),
--	CMN_EVENT_SBSX(rd_axi_trkr_occ_cnt_ovfl, 0x15),
--	CMN_EVENT_SBSX(cmo_axi_trkr_occ_cnt_ovfl, 0x16),
--	CMN_EVENT_SBSX(arvalid_no_arready, 0x21),
--	CMN_EVENT_SBSX(awvalid_no_awready, 0x22),
--	CMN_EVENT_SBSX(wvalid_no_wready, 0x23),
--	CMN_EVENT_SBSX(txdat_stall,	0x24),
--	CMN_EVENT_SBSX(txrsp_stall,	0x25),
--
--	CMN_EVENT_RNID(s0_rdata_beats,	0x01),
--	CMN_EVENT_RNID(s1_rdata_beats,	0x02),
--	CMN_EVENT_RNID(s2_rdata_beats,	0x03),
--	CMN_EVENT_RNID(rxdat_flits,	0x04),
--	CMN_EVENT_RNID(txdat_flits,	0x05),
--	CMN_EVENT_RNID(txreq_flits_total, 0x06),
--	CMN_EVENT_RNID(txreq_flits_retried, 0x07),
--	CMN_EVENT_RNID(rrt_occ_ovfl,	0x08),
--	CMN_EVENT_RNID(wrt_occ_ovfl,	0x09),
--	CMN_EVENT_RNID(txreq_flits_replayed, 0x0a),
--	CMN_EVENT_RNID(wrcancel_sent,	0x0b),
--	CMN_EVENT_RNID(s0_wdata_beats,	0x0c),
--	CMN_EVENT_RNID(s1_wdata_beats,	0x0d),
--	CMN_EVENT_RNID(s2_wdata_beats,	0x0e),
--	CMN_EVENT_RNID(rrt_alloc,	0x0f),
--	CMN_EVENT_RNID(wrt_alloc,	0x10),
--	CMN_EVENT_RNID(rdb_unord,	0x11),
--	CMN_EVENT_RNID(rdb_replay,	0x12),
--	CMN_EVENT_RNID(rdb_hybrid,	0x13),
--	CMN_EVENT_RNID(rdb_ord,		0x14),
-+	CMN_EVENT_ATTR(CMN_ANY, watchpoint_up, CMN_TYPE_WP, CMN_WP_UP, 0),
-+	CMN_EVENT_ATTR(CMN_ANY, watchpoint_down, CMN_TYPE_WP, CMN_WP_DOWN, 0),
-+
-+	CMN_EVENT_SBSX(CMN_ANY, rd_req,			0x01),
-+	CMN_EVENT_SBSX(CMN_ANY, wr_req,			0x02),
-+	CMN_EVENT_SBSX(CMN_ANY, cmo_req,		0x03),
-+	CMN_EVENT_SBSX(CMN_ANY, txrsp_retryack,		0x04),
-+	CMN_EVENT_SBSX(CMN_ANY, txdat_flitv,		0x05),
-+	CMN_EVENT_SBSX(CMN_ANY, txrsp_flitv,		0x06),
-+	CMN_EVENT_SBSX(CMN_ANY, rd_req_trkr_occ_cnt_ovfl, 0x11),
-+	CMN_EVENT_SBSX(CMN_ANY, wr_req_trkr_occ_cnt_ovfl, 0x12),
-+	CMN_EVENT_SBSX(CMN_ANY, cmo_req_trkr_occ_cnt_ovfl, 0x13),
-+	CMN_EVENT_SBSX(CMN_ANY, wdb_occ_cnt_ovfl,	0x14),
-+	CMN_EVENT_SBSX(CMN_ANY, rd_axi_trkr_occ_cnt_ovfl, 0x15),
-+	CMN_EVENT_SBSX(CMN_ANY, cmo_axi_trkr_occ_cnt_ovfl, 0x16),
-+	CMN_EVENT_SBSX(CMN_ANY, arvalid_no_arready,	0x21),
-+	CMN_EVENT_SBSX(CMN_ANY, awvalid_no_awready,	0x22),
-+	CMN_EVENT_SBSX(CMN_ANY, wvalid_no_wready,	0x23),
-+	CMN_EVENT_SBSX(CMN_ANY, txdat_stall,		0x24),
-+	CMN_EVENT_SBSX(CMN_ANY, txrsp_stall,		0x25),
-+
-+	CMN_EVENT_RNID(CMN_ANY, s0_rdata_beats,		0x01),
-+	CMN_EVENT_RNID(CMN_ANY, s1_rdata_beats,		0x02),
-+	CMN_EVENT_RNID(CMN_ANY, s2_rdata_beats,		0x03),
-+	CMN_EVENT_RNID(CMN_ANY, rxdat_flits,		0x04),
-+	CMN_EVENT_RNID(CMN_ANY, txdat_flits,		0x05),
-+	CMN_EVENT_RNID(CMN_ANY, txreq_flits_total,	0x06),
-+	CMN_EVENT_RNID(CMN_ANY, txreq_flits_retried,	0x07),
-+	CMN_EVENT_RNID(CMN_ANY, rrt_occ_ovfl,		0x08),
-+	CMN_EVENT_RNID(CMN_ANY, wrt_occ_ovfl,		0x09),
-+	CMN_EVENT_RNID(CMN_ANY, txreq_flits_replayed,	0x0a),
-+	CMN_EVENT_RNID(CMN_ANY, wrcancel_sent,		0x0b),
-+	CMN_EVENT_RNID(CMN_ANY, s0_wdata_beats,		0x0c),
-+	CMN_EVENT_RNID(CMN_ANY, s1_wdata_beats,		0x0d),
-+	CMN_EVENT_RNID(CMN_ANY, s2_wdata_beats,		0x0e),
-+	CMN_EVENT_RNID(CMN_ANY, rrt_alloc,		0x0f),
-+	CMN_EVENT_RNID(CMN_ANY, wrt_alloc,		0x10),
-+	CMN_EVENT_RNID(CMN600, rdb_unord,		0x11),
-+	CMN_EVENT_RNID(CMN600, rdb_replay,		0x12),
-+	CMN_EVENT_RNID(CMN600, rdb_hybrid,		0x13),
-+	CMN_EVENT_RNID(CMN600, rdb_ord,			0x14),
- 
- 	NULL
- };
-@@ -1386,15 +1400,14 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	int i, j;
- 	size_t sz;
- 
--	cfg_region = cmn->base + rgn_offset;
--	reg = readl_relaxed(cfg_region + CMN_CFGM_PERIPH_ID_2);
--	cmn->rev = FIELD_GET(CMN_CFGM_PID2_REVISION, reg);
--	dev_dbg(cmn->dev, "periph_id_2 revision: %d\n", cmn->rev);
--
- 	arm_cmn_init_node_info(cmn, rgn_offset, &cfg);
- 	if (cfg.type != CMN_TYPE_CFG)
- 		return -ENODEV;
- 
-+	cfg_region = cmn->base + rgn_offset;
-+	reg = readl_relaxed(cfg_region + CMN_CFGM_PERIPH_ID_2);
-+	cmn->rev = FIELD_GET(CMN_CFGM_PID2_REVISION, reg);
-+
- 	reg = readq_relaxed(cfg_region + CMN_CHILD_INFO);
- 	child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
- 	child_poff = FIELD_GET(CMN_CI_CHILD_PTR_OFFSET, reg);
-@@ -1507,13 +1520,14 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		cmn->mesh_x = cmn->num_xps;
- 	cmn->mesh_y = cmn->num_xps / cmn->mesh_x;
- 
-+	dev_dbg(cmn->dev, "model %d, periph_id_2 revision %d\n", cmn->model, cmn->rev);
- 	dev_dbg(cmn->dev, "mesh %dx%d, ID width %d\n",
- 		cmn->mesh_x, cmn->mesh_y, arm_cmn_xyidbits(cmn));
- 
- 	return 0;
- }
- 
--static int arm_cmn_acpi_probe(struct platform_device *pdev, struct arm_cmn *cmn)
-+static int arm_cmn600_acpi_probe(struct platform_device *pdev, struct arm_cmn *cmn)
- {
- 	struct resource *cfg, *root;
- 
-@@ -1540,21 +1554,11 @@ static int arm_cmn_acpi_probe(struct platform_device *pdev, struct arm_cmn *cmn)
- 	return root->start - cfg->start;
- }
- 
--static int arm_cmn_of_probe(struct platform_device *pdev, struct arm_cmn *cmn)
-+static int arm_cmn600_of_probe(struct device_node *np)
- {
--	struct device_node *np = pdev->dev.of_node;
- 	u32 rootnode;
--	int ret;
- 
--	cmn->base = devm_platform_ioremap_resource(pdev, 0);
--	if (IS_ERR(cmn->base))
--		return PTR_ERR(cmn->base);
--
--	ret = of_property_read_u32(np, "arm,root-node", &rootnode);
--	if (ret)
--		return ret;
--
--	return rootnode;
-+	return of_property_read_u32(np, "arm,root-node", &rootnode) ?: rootnode;
- }
- 
- static int arm_cmn_probe(struct platform_device *pdev)
-@@ -1569,12 +1573,19 @@ static int arm_cmn_probe(struct platform_device *pdev)
- 		return -ENOMEM;
- 
- 	cmn->dev = &pdev->dev;
-+	cmn->model = (unsigned long)device_get_match_data(cmn->dev);
- 	platform_set_drvdata(pdev, cmn);
- 
--	if (has_acpi_companion(cmn->dev))
--		rootnode = arm_cmn_acpi_probe(pdev, cmn);
--	else
--		rootnode = arm_cmn_of_probe(pdev, cmn);
-+	if (cmn->model == CMN600 && has_acpi_companion(cmn->dev)) {
-+		rootnode = arm_cmn600_acpi_probe(pdev, cmn);
-+	} else {
-+		rootnode = 0;
-+		cmn->base = devm_platform_ioremap_resource(pdev, 0);
-+		if (IS_ERR(cmn->base))
-+			return PTR_ERR(cmn->base);
-+		if (cmn->model == CMN600)
-+			rootnode = arm_cmn600_of_probe(pdev->dev.of_node);
-+	}
- 	if (rootnode < 0)
- 		return rootnode;
- 
-@@ -1637,7 +1648,7 @@ static int arm_cmn_remove(struct platform_device *pdev)
- 
- #ifdef CONFIG_OF
- static const struct of_device_id arm_cmn_of_match[] = {
--	{ .compatible = "arm,cmn-600", },
-+	{ .compatible = "arm,cmn-600", .data = (void *)CMN600 },
- 	{}
- };
- MODULE_DEVICE_TABLE(of, arm_cmn_of_match);
-@@ -1645,7 +1656,7 @@ MODULE_DEVICE_TABLE(of, arm_cmn_of_match);
- 
- #ifdef CONFIG_ACPI
- static const struct acpi_device_id arm_cmn_acpi_match[] = {
--	{ "ARMHC600", },
-+	{ "ARMHC600", CMN600 },
- 	{}
- };
- MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0025-perf-arm-cmn-Support-new-IP-features.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0025-perf-arm-cmn-Support-new-IP-features.patch
deleted file mode 100644
index 8c3c7c1..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0025-perf-arm-cmn-Support-new-IP-features.patch
+++ /dev/null
@@ -1,548 +0,0 @@
-From 821c1c36ba8883a8709bbbcdf4ebc716e69da991 Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:45:00 +0000
-Subject: [PATCH 25/40] perf/arm-cmn: Support new IP features
-
-The second generation of CMN IPs add new node types and significantly
-expand the configuration space with options for extra device ports on
-edge XPs, either plumbed into the regular DTM or with extra dedicated
-DTMs to monitor them, plus larger (and smaller) mesh sizes. Add basic
-support for pulling this new information out of the hardware, piping
-it around as necessary, and handling (most of) the new choices.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/e58b495bcc7deec3882be4bac910ed0bf6979674.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/e58b495bcc7deec3882be4bac910ed0bf6979674.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
----
- drivers/perf/arm-cmn.c | 218 ++++++++++++++++++++++++++++++++---------
- 1 file changed, 171 insertions(+), 47 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index ce94f923a607..0a3f33a83c01 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -24,7 +24,10 @@
- #define CMN_NI_LOGICAL_ID		GENMASK_ULL(47, 32)
- 
- #define CMN_NODEID_DEVID(reg)		((reg) & 3)
-+#define CMN_NODEID_EXT_DEVID(reg)	((reg) & 1)
- #define CMN_NODEID_PID(reg)		(((reg) >> 2) & 1)
-+#define CMN_NODEID_EXT_PID(reg)		(((reg) >> 1) & 3)
-+#define CMN_NODEID_1x1_PID(reg)		(((reg) >> 2) & 7)
- #define CMN_NODEID_X(reg, bits)		((reg) >> (3 + (bits)))
- #define CMN_NODEID_Y(reg, bits)		(((reg) >> 3) & ((1U << (bits)) - 1))
- 
-@@ -37,13 +40,26 @@
- 
- #define CMN_MAX_DIMENSION		8
- #define CMN_MAX_XPS			(CMN_MAX_DIMENSION * CMN_MAX_DIMENSION)
--#define CMN_MAX_DTMS			CMN_MAX_XPS
-+#define CMN_MAX_DTMS			(CMN_MAX_XPS + (CMN_MAX_DIMENSION - 1) * 4)
- 
--/* The CFG node has one other useful purpose */
-+/* The CFG node has various info besides the discovery tree */
- #define CMN_CFGM_PERIPH_ID_2		0x0010
- #define CMN_CFGM_PID2_REVISION		GENMASK(7, 4)
- 
--/* PMU registers occupy the 3rd 4KB page of each node's 16KB space */
-+#define CMN_CFGM_INFO_GLOBAL		0x900
-+#define CMN_INFO_MULTIPLE_DTM_EN	BIT_ULL(63)
-+#define CMN_INFO_RSP_VC_NUM		GENMASK_ULL(53, 52)
-+#define CMN_INFO_DAT_VC_NUM		GENMASK_ULL(51, 50)
-+
-+/* XPs also have some local topology info which has uses too */
-+#define CMN_MXP__CONNECT_INFO_P0	0x0008
-+#define CMN_MXP__CONNECT_INFO_P1	0x0010
-+#define CMN_MXP__CONNECT_INFO_P2	0x0028
-+#define CMN_MXP__CONNECT_INFO_P3	0x0030
-+#define CMN_MXP__CONNECT_INFO_P4	0x0038
-+#define CMN_MXP__CONNECT_INFO_P5	0x0040
-+
-+/* PMU registers occupy the 3rd 4KB page of each node's region */
- #define CMN_PMU_OFFSET			0x2000
- 
- /* For most nodes, this is all there is */
-@@ -53,6 +69,7 @@
- /* DTMs live in the PMU space of XP registers */
- #define CMN_DTM_WPn(n)			(0x1A0 + (n) * 0x18)
- #define CMN_DTM_WPn_CONFIG(n)		(CMN_DTM_WPn(n) + 0x00)
-+#define CMN_DTM_WPn_CONFIG_WP_DEV_SEL2	GENMASK_ULL(18,17)
- #define CMN_DTM_WPn_CONFIG_WP_COMBINE	BIT(6)
- #define CMN_DTM_WPn_CONFIG_WP_EXCLUSIVE	BIT(5)
- #define CMN_DTM_WPn_CONFIG_WP_GRP	BIT(4)
-@@ -77,7 +94,11 @@
- 
- #define CMN_DTM_PMEVCNTSR		0x240
- 
-+#define CMN_DTM_UNIT_INFO		0x0910
-+
- #define CMN_DTM_NUM_COUNTERS		4
-+/* Want more local counters? Why not replicate the whole DTM! Ugh... */
-+#define CMN_DTM_OFFSET(n)		((n) * 0x200)
- 
- /* The DTC node is where the magic happens */
- #define CMN_DT_DTC_CTL			0x0a00
-@@ -131,10 +152,10 @@
- #define CMN_EVENT_NODEID(event)		FIELD_GET(CMN_CONFIG_NODEID, (event)->attr.config)
- 
- #define CMN_CONFIG_WP_COMBINE		GENMASK_ULL(27, 24)
--#define CMN_CONFIG_WP_DEV_SEL		BIT_ULL(48)
--#define CMN_CONFIG_WP_CHN_SEL		GENMASK_ULL(50, 49)
--#define CMN_CONFIG_WP_GRP		BIT_ULL(52)
--#define CMN_CONFIG_WP_EXCLUSIVE		BIT_ULL(53)
-+#define CMN_CONFIG_WP_DEV_SEL		GENMASK_ULL(50, 48)
-+#define CMN_CONFIG_WP_CHN_SEL		GENMASK_ULL(55, 51)
-+#define CMN_CONFIG_WP_GRP		BIT_ULL(56)
-+#define CMN_CONFIG_WP_EXCLUSIVE		BIT_ULL(57)
- #define CMN_CONFIG1_WP_VAL		GENMASK_ULL(63, 0)
- #define CMN_CONFIG2_WP_MASK		GENMASK_ULL(63, 0)
- 
-@@ -176,9 +197,12 @@ enum cmn_node_type {
- 	CMN_TYPE_HNF,
- 	CMN_TYPE_XP,
- 	CMN_TYPE_SBSX,
--	CMN_TYPE_RNI = 0xa,
-+	CMN_TYPE_MPAM_S,
-+	CMN_TYPE_MPAM_NS,
-+	CMN_TYPE_RNI,
- 	CMN_TYPE_RND = 0xd,
- 	CMN_TYPE_RNSAM = 0xf,
-+	CMN_TYPE_MTSX,
- 	CMN_TYPE_CXRA = 0x100,
- 	CMN_TYPE_CXHA = 0x101,
- 	CMN_TYPE_CXLA = 0x102,
-@@ -233,6 +257,7 @@ struct arm_cmn_dtc {
- struct arm_cmn {
- 	struct device *dev;
- 	void __iomem *base;
-+	unsigned int state;
- 
- 	enum cmn_revision rev;
- 	enum cmn_model model;
-@@ -240,6 +265,13 @@ struct arm_cmn {
- 	u8 mesh_y;
- 	u16 num_xps;
- 	u16 num_dns;
-+	bool multi_dtm;
-+	u8 ports_used;
-+	struct {
-+		unsigned int rsp_vc_num : 2;
-+		unsigned int dat_vc_num : 2;
-+	};
-+
- 	struct arm_cmn_node *xps;
- 	struct arm_cmn_node *dns;
- 
-@@ -250,7 +282,6 @@ struct arm_cmn {
- 	int cpu;
- 	struct hlist_node cpuhp_node;
- 
--	unsigned int state;
- 	struct pmu pmu;
- };
- 
-@@ -275,13 +306,25 @@ static int arm_cmn_xyidbits(const struct arm_cmn *cmn)
- static struct arm_cmn_nodeid arm_cmn_nid(const struct arm_cmn *cmn, u16 id)
- {
- 	struct arm_cmn_nodeid nid;
--	int bits = arm_cmn_xyidbits(cmn);
- 
--	nid.x = CMN_NODEID_X(id, bits);
--	nid.y = CMN_NODEID_Y(id, bits);
--	nid.port = CMN_NODEID_PID(id);
--	nid.dev = CMN_NODEID_DEVID(id);
-+	if (cmn->num_xps == 1) {
-+		nid.x = 0;
-+		nid.y = 0;
-+		nid.port = CMN_NODEID_1x1_PID(id);
-+		nid.dev = CMN_NODEID_DEVID(id);
-+	} else {
-+		int bits = arm_cmn_xyidbits(cmn);
- 
-+		nid.x = CMN_NODEID_X(id, bits);
-+		nid.y = CMN_NODEID_Y(id, bits);
-+		if (cmn->ports_used & 0xc) {
-+			nid.port = CMN_NODEID_EXT_PID(id);
-+			nid.dev = CMN_NODEID_EXT_DEVID(id);
-+		} else {
-+			nid.port = CMN_NODEID_PID(id);
-+			nid.dev = CMN_NODEID_DEVID(id);
-+		}
-+	}
- 	return nid;
- }
- 
-@@ -310,6 +353,7 @@ struct arm_cmn_hw_event {
- 	unsigned int dtc_idx;
- 	u8 dtcs_used;
- 	u8 num_dns;
-+	u8 dtm_offset;
- };
- 
- #define for_each_hw_dn(hw, dn, i) \
-@@ -354,7 +398,8 @@ struct arm_cmn_format_attr {
- 		.occupid = _occupid,					\
- 	}})[0].attr.attr)
- 
--static bool arm_cmn_is_occup_event(enum cmn_node_type type, unsigned int id)
-+static bool arm_cmn_is_occup_event(enum cmn_model model,
-+				   enum cmn_node_type type, unsigned int id)
- {
- 	return (type == CMN_TYPE_DVM && id == 0x05) ||
- 	       (type == CMN_TYPE_HNF && id == 0x0f);
-@@ -375,7 +420,7 @@ static ssize_t arm_cmn_event_show(struct device *dev,
- 				  "type=0x%x,eventid=0x%x,wp_dev_sel=?,wp_chn_sel=?,wp_grp=?,wp_val=?,wp_mask=?\n",
- 				  eattr->type, eattr->eventid);
- 
--	if (arm_cmn_is_occup_event(eattr->type, eattr->eventid))
-+	if (arm_cmn_is_occup_event(eattr->model, eattr->type, eattr->eventid))
- 		return sysfs_emit(buf, "type=0x%x,eventid=0x%x,occupid=0x%x\n",
- 				  eattr->type, eattr->eventid, eattr->occupid);
- 
-@@ -390,25 +435,36 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
- 	struct device *dev = kobj_to_dev(kobj);
- 	struct arm_cmn *cmn = to_cmn(dev_get_drvdata(dev));
- 	struct arm_cmn_event_attr *eattr;
--	enum cmn_node_type type;
- 
- 	eattr = container_of(attr, typeof(*eattr), attr.attr);
--	type = eattr->type;
- 
- 	if (!(eattr->model & cmn->model))
- 		return 0;
- 
--	/* Watchpoints aren't nodes */
--	if (type == CMN_TYPE_WP)
--		type = CMN_TYPE_XP;
-+	/* Watchpoints aren't nodes, so avoid confusion */
-+	if (eattr->type == CMN_TYPE_WP)
-+		return attr->mode;
-+
-+	/* Hide XP events for unused interfaces/channels */
-+	if (eattr->type == CMN_TYPE_XP) {
-+		unsigned int intf = (eattr->eventid >> 2) & 7;
-+		unsigned int chan = eattr->eventid >> 5;
-+
-+		if ((intf & 4) && !(cmn->ports_used & BIT(intf & 3)))
-+			return 0;
-+
-+		if ((chan == 5 && cmn->rsp_vc_num < 2) ||
-+		    (chan == 6 && cmn->dat_vc_num < 2))
-+			return 0;
-+	}
- 
- 	/* Revision-specific differences */
- 	if (cmn->model == CMN600 && cmn->rev < CMN600_R1P2) {
--		if (type == CMN_TYPE_HNF && eattr->eventid == 0x1b)
-+		if (eattr->type == CMN_TYPE_HNF && eattr->eventid == 0x1b)
- 			return 0;
- 	}
- 
--	if (!arm_cmn_node(cmn, type))
-+	if (!arm_cmn_node(cmn, eattr->type))
- 		return 0;
- 
- 	return attr->mode;
-@@ -669,7 +725,8 @@ static u32 arm_cmn_wp_config(struct perf_event *event)
- 	config = FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_DEV_SEL, dev) |
- 		 FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_CHN_SEL, chn) |
- 		 FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_GRP, grp) |
--		 FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_EXCLUSIVE, exc);
-+		 FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_EXCLUSIVE, exc) |
-+		 FIELD_PREP(CMN_DTM_WPn_CONFIG_WP_DEV_SEL2, dev >> 1);
- 	if (combine && !grp)
- 		config |= CMN_DTM_WPn_CONFIG_WP_COMBINE;
- 
-@@ -712,7 +769,7 @@ static u64 arm_cmn_read_dtm(struct arm_cmn *cmn, struct arm_cmn_hw_event *hw,
- 	offset = snapshot ? CMN_DTM_PMEVCNTSR : CMN_DTM_PMEVCNT;
- 	for_each_hw_dn(hw, dn, i) {
- 		if (dtm != &cmn->dtms[dn->dtm]) {
--			dtm = &cmn->dtms[dn->dtm];
-+			dtm = &cmn->dtms[dn->dtm] + hw->dtm_offset;
- 			reg = readq_relaxed(dtm->base + offset);
- 		}
- 		dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
-@@ -800,8 +857,10 @@ static void arm_cmn_event_start(struct perf_event *event, int flags)
- 		u64 mask = CMN_EVENT_WP_MASK(event);
- 
- 		for_each_hw_dn(hw, dn, i) {
--			writeq_relaxed(val, dn->pmu_base + CMN_DTM_WPn_VAL(wp_idx));
--			writeq_relaxed(mask, dn->pmu_base + CMN_DTM_WPn_MASK(wp_idx));
-+			void __iomem *base = dn->pmu_base + CMN_DTM_OFFSET(hw->dtm_offset);
-+
-+			writeq_relaxed(val, base + CMN_DTM_WPn_VAL(wp_idx));
-+			writeq_relaxed(mask, base + CMN_DTM_WPn_MASK(wp_idx));
- 		}
- 	} else for_each_hw_dn(hw, dn, i) {
- 		int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
-@@ -826,8 +885,10 @@ static void arm_cmn_event_stop(struct perf_event *event, int flags)
- 		int wp_idx = arm_cmn_wp_idx(event);
- 
- 		for_each_hw_dn(hw, dn, i) {
--			writeq_relaxed(0, dn->pmu_base + CMN_DTM_WPn_MASK(wp_idx));
--			writeq_relaxed(~0ULL, dn->pmu_base + CMN_DTM_WPn_VAL(wp_idx));
-+			void __iomem *base = dn->pmu_base + CMN_DTM_OFFSET(hw->dtm_offset);
-+
-+			writeq_relaxed(0, base + CMN_DTM_WPn_MASK(wp_idx));
-+			writeq_relaxed(~0ULL, base + CMN_DTM_WPn_VAL(wp_idx));
- 		}
- 	} else for_each_hw_dn(hw, dn, i) {
- 		int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
-@@ -847,7 +908,8 @@ struct arm_cmn_val {
- 	bool cycles;
- };
- 
--static void arm_cmn_val_add_event(struct arm_cmn_val *val, struct perf_event *event)
-+static void arm_cmn_val_add_event(struct arm_cmn *cmn, struct arm_cmn_val *val,
-+				  struct perf_event *event)
- {
- 	struct arm_cmn_hw_event *hw = to_cmn_hw(event);
- 	struct arm_cmn_node *dn;
-@@ -865,7 +927,7 @@ static void arm_cmn_val_add_event(struct arm_cmn_val *val, struct perf_event *ev
- 	}
- 
- 	val->dtc_count++;
--	if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event)))
-+	if (arm_cmn_is_occup_event(cmn->model, type, CMN_EVENT_EVENTID(event)))
- 		occupid = CMN_EVENT_OCCUPID(event) + 1;
- 	else
- 		occupid = 0;
-@@ -884,7 +946,7 @@ static void arm_cmn_val_add_event(struct arm_cmn_val *val, struct perf_event *ev
- 	}
- }
- 
--static int arm_cmn_validate_group(struct perf_event *event)
-+static int arm_cmn_validate_group(struct arm_cmn *cmn, struct perf_event *event)
- {
- 	struct arm_cmn_hw_event *hw = to_cmn_hw(event);
- 	struct arm_cmn_node *dn;
-@@ -904,9 +966,9 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 	if (!val)
- 		return -ENOMEM;
- 
--	arm_cmn_val_add_event(val, leader);
-+	arm_cmn_val_add_event(cmn, val, leader);
- 	for_each_sibling_event(sibling, leader)
--		arm_cmn_val_add_event(val, sibling);
-+		arm_cmn_val_add_event(cmn, val, sibling);
- 
- 	type = CMN_EVENT_TYPE(event);
- 	if (type == CMN_TYPE_DTC) {
-@@ -917,7 +979,7 @@ static int arm_cmn_validate_group(struct perf_event *event)
- 	if (val->dtc_count == CMN_DT_NUM_COUNTERS)
- 		goto done;
- 
--	if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event)))
-+	if (arm_cmn_is_occup_event(cmn->model, type, CMN_EVENT_EVENTID(event)))
- 		occupid = CMN_EVENT_OCCUPID(event) + 1;
- 	else
- 		occupid = 0;
-@@ -980,6 +1042,9 @@ static int arm_cmn_event_init(struct perf_event *event)
- 		eventid = CMN_EVENT_EVENTID(event);
- 		if (eventid != CMN_WP_UP && eventid != CMN_WP_DOWN)
- 			return -EINVAL;
-+		/* ...but the DTM may depend on which port we're watching */
-+		if (cmn->multi_dtm)
-+			hw->dtm_offset = CMN_EVENT_WP_DEV_SEL(event) / 2;
- 	}
- 
- 	bynodeid = CMN_EVENT_BYNODEID(event);
-@@ -1007,7 +1072,7 @@ static int arm_cmn_event_init(struct perf_event *event)
- 		return -EINVAL;
- 	}
- 
--	return arm_cmn_validate_group(event);
-+	return arm_cmn_validate_group(cmn, event);
- }
- 
- static void arm_cmn_event_clear(struct arm_cmn *cmn, struct perf_event *event,
-@@ -1017,13 +1082,13 @@ static void arm_cmn_event_clear(struct arm_cmn *cmn, struct perf_event *event,
- 	enum cmn_node_type type = CMN_EVENT_TYPE(event);
- 
- 	while (i--) {
--		struct arm_cmn_dtm *dtm = &cmn->dtms[hw->dn[i].dtm];
-+		struct arm_cmn_dtm *dtm = &cmn->dtms[hw->dn[i].dtm] + hw->dtm_offset;
- 		unsigned int dtm_idx = arm_cmn_get_index(hw->dtm_idx, i);
- 
- 		if (type == CMN_TYPE_WP)
- 			dtm->wp_event[arm_cmn_wp_idx(event)] = -1;
- 
--		if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event)))
-+		if (arm_cmn_is_occup_event(cmn->model, type, CMN_EVENT_EVENTID(event)))
- 			hw->dn[i].occupid_count--;
- 
- 		dtm->pmu_config_low &= ~CMN__PMEVCNT_PAIRED(dtm_idx);
-@@ -1069,7 +1134,7 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 
- 	/* ...then the local counters to feed it. */
- 	for_each_hw_dn(hw, dn, i) {
--		struct arm_cmn_dtm *dtm = &cmn->dtms[dn->dtm];
-+		struct arm_cmn_dtm *dtm = &cmn->dtms[dn->dtm] + hw->dtm_offset;
- 		unsigned int dtm_idx, shift;
- 		u64 reg;
- 
-@@ -1098,10 +1163,13 @@ static int arm_cmn_event_add(struct perf_event *event, int flags)
- 		} else {
- 			struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
- 
-+			if (cmn->multi_dtm)
-+				nid.port %= 2;
-+
- 			input_sel = CMN__PMEVCNT0_INPUT_SEL_DEV + dtm_idx +
- 				    (nid.port << 4) + (nid.dev << 2);
- 
--			if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event))) {
-+			if (arm_cmn_is_occup_event(cmn->model, type, CMN_EVENT_EVENTID(event))) {
- 				u8 occupid = CMN_EVENT_OCCUPID(event);
- 
- 				if (dn->occupid_count == 0) {
-@@ -1283,11 +1351,11 @@ static int arm_cmn_init_irqs(struct arm_cmn *cmn)
- 	return 0;
- }
- 
--static void arm_cmn_init_dtm(struct arm_cmn_dtm *dtm, struct arm_cmn_node *xp)
-+static void arm_cmn_init_dtm(struct arm_cmn_dtm *dtm, struct arm_cmn_node *xp, int idx)
- {
- 	int i;
- 
--	dtm->base = xp->pmu_base;
-+	dtm->base = xp->pmu_base + CMN_DTM_OFFSET(idx);
- 	dtm->pmu_config_low = CMN_DTM_PMU_CONFIG_PMU_EN;
- 	for (i = 0; i < 4; i++) {
- 		dtm->wp_event[i] = -1;
-@@ -1345,6 +1413,8 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
- 
- 		xp = arm_cmn_node_to_xp(cmn, dn);
- 		dn->dtm = xp->dtm;
-+		if (cmn->multi_dtm)
-+			dn->dtm += arm_cmn_nid(cmn, dn->id).port / 2;
- 
- 		if (dn->type == CMN_TYPE_DTC) {
- 			int err;
-@@ -1408,6 +1478,11 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	reg = readl_relaxed(cfg_region + CMN_CFGM_PERIPH_ID_2);
- 	cmn->rev = FIELD_GET(CMN_CFGM_PID2_REVISION, reg);
- 
-+	reg = readq_relaxed(cfg_region + CMN_CFGM_INFO_GLOBAL);
-+	cmn->multi_dtm = reg & CMN_INFO_MULTIPLE_DTM_EN;
-+	cmn->rsp_vc_num = FIELD_GET(CMN_INFO_RSP_VC_NUM, reg);
-+	cmn->dat_vc_num = FIELD_GET(CMN_INFO_DAT_VC_NUM, reg);
-+
- 	reg = readq_relaxed(cfg_region + CMN_CHILD_INFO);
- 	child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
- 	child_poff = FIELD_GET(CMN_CI_CHILD_PTR_OFFSET, reg);
-@@ -1429,7 +1504,11 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	if (!dn)
- 		return -ENOMEM;
- 
--	dtm = devm_kcalloc(cmn->dev, cmn->num_xps, sizeof(*dtm), GFP_KERNEL);
-+	/* Initial safe upper bound on DTMs for any possible mesh layout */
-+	i = cmn->num_xps;
-+	if (cmn->multi_dtm)
-+		i += cmn->num_xps + 1;
-+	dtm = devm_kcalloc(cmn->dev, i, sizeof(*dtm), GFP_KERNEL);
- 	if (!dtm)
- 		return -ENOMEM;
- 
-@@ -1439,6 +1518,7 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	for (i = 0; i < cmn->num_xps; i++) {
- 		void __iomem *xp_region = cmn->base + xp_offset[i];
- 		struct arm_cmn_node *xp = dn++;
-+		unsigned int xp_ports = 0;
- 
- 		arm_cmn_init_node_info(cmn, xp_offset[i], xp);
- 		/*
-@@ -1450,9 +1530,39 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		if (xp->id == (1 << 3))
- 			cmn->mesh_x = xp->logid;
- 
--		xp->dtc = 0xf;
-+		if (cmn->model == CMN600)
-+			xp->dtc = 0xf;
-+		else
-+			xp->dtc = 1 << readl_relaxed(xp_region + CMN_DTM_UNIT_INFO);
-+
- 		xp->dtm = dtm - cmn->dtms;
--		arm_cmn_init_dtm(dtm++, xp);
-+		arm_cmn_init_dtm(dtm++, xp, 0);
-+		/*
-+		 * Keeping track of connected ports will let us filter out
-+		 * unnecessary XP events easily. We can also reliably infer the
-+		 * "extra device ports" configuration for the node ID format
-+		 * from this, since in that case we will see at least one XP
-+		 * with port 2 connected, for the HN-D.
-+		 */
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P0))
-+			xp_ports |= BIT(0);
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P1))
-+			xp_ports |= BIT(1);
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P2))
-+			xp_ports |= BIT(2);
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P3))
-+			xp_ports |= BIT(3);
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P4))
-+			xp_ports |= BIT(4);
-+		if (readq_relaxed(xp_region + CMN_MXP__CONNECT_INFO_P5))
-+			xp_ports |= BIT(5);
-+
-+		if (cmn->multi_dtm && (xp_ports & 0xc))
-+			arm_cmn_init_dtm(dtm++, xp, 1);
-+		if (cmn->multi_dtm && (xp_ports & 0x30))
-+			arm_cmn_init_dtm(dtm++, xp, 2);
-+
-+		cmn->ports_used |= xp_ports;
- 
- 		reg = readq_relaxed(xp_region + CMN_CHILD_INFO);
- 		child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
-@@ -1488,11 +1598,14 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 			case CMN_TYPE_SBSX:
- 			case CMN_TYPE_RNI:
- 			case CMN_TYPE_RND:
-+			case CMN_TYPE_MTSX:
- 			case CMN_TYPE_CXRA:
- 			case CMN_TYPE_CXHA:
- 				dn++;
- 				break;
- 			/* Nothing to see here */
-+			case CMN_TYPE_MPAM_S:
-+			case CMN_TYPE_MPAM_NS:
- 			case CMN_TYPE_RNSAM:
- 			case CMN_TYPE_CXLA:
- 				break;
-@@ -1512,6 +1625,11 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 	if (dn)
- 		cmn->dns = dn;
- 
-+	sz = (void *)dtm - (void *)cmn->dtms;
-+	dtm = devm_krealloc(cmn->dev, cmn->dtms, sz, GFP_KERNEL);
-+	if (dtm)
-+		cmn->dtms = dtm;
-+
- 	/*
- 	 * If mesh_x wasn't set during discovery then we never saw
- 	 * an XP at (0,1), thus we must have an Nx1 configuration.
-@@ -1520,9 +1638,15 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
- 		cmn->mesh_x = cmn->num_xps;
- 	cmn->mesh_y = cmn->num_xps / cmn->mesh_x;
- 
-+	/* 1x1 config plays havoc with XP event encodings */
-+	if (cmn->num_xps == 1)
-+		dev_warn(cmn->dev, "1x1 config not fully supported, translate XP events manually\n");
-+
- 	dev_dbg(cmn->dev, "model %d, periph_id_2 revision %d\n", cmn->model, cmn->rev);
--	dev_dbg(cmn->dev, "mesh %dx%d, ID width %d\n",
--		cmn->mesh_x, cmn->mesh_y, arm_cmn_xyidbits(cmn));
-+	reg = cmn->ports_used;
-+	dev_dbg(cmn->dev, "mesh %dx%d, ID width %d, ports %6pbl%s\n",
-+		cmn->mesh_x, cmn->mesh_y, arm_cmn_xyidbits(cmn), &reg,
-+		cmn->multi_dtm ? ", multi-DTM" : "");
- 
- 	return 0;
- }
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0026-perf-arm-cmn-Add-CI-700-Support.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0026-perf-arm-cmn-Add-CI-700-Support.patch
deleted file mode 100644
index 4e5bae4..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0026-perf-arm-cmn-Add-CI-700-Support.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 806c281f4307dd321fe8a38ce557e8c983c3ce84 Mon Sep 17 00:00:00 2001
-From: Robin Murphy <robin.murphy@arm.com>
-Date: Fri, 3 Dec 2021 11:45:02 +0000
-Subject: [PATCH 26/40] perf/arm-cmn: Add CI-700 Support
-
-Add the identifiers and events for the CI-700 coherent interconnect.
-
-Signed-off-by: Robin Murphy <robin.murphy@arm.com>
-Link: https://lore.kernel.org/r/28f566ab23a83733c6c9ef9414c010b760b4549c.1638530442.git.robin.murphy@arm.com
-Signed-off-by: Will Deacon <will@kernel.org>
-
-Upstream-Status: Backport [https://lore.kernel.org/r/28f566ab23a83733c6c9ef9414c010b760b4549c.1638530442.git.robin.murphy@arm.com]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- drivers/perf/arm-cmn.c | 57 +++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 53 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
-index 0a3f33a83c01..28ab87a6cde4 100644
---- a/drivers/perf/arm-cmn.c
-+++ b/drivers/perf/arm-cmn.c
-@@ -175,6 +175,7 @@
- enum cmn_model {
- 	CMN_ANY = -1,
- 	CMN600 = 1,
-+	CI700 = 2,
- };
- 
- /* CMN-600 r0px shouldn't exist in silicon, thankfully */
-@@ -186,6 +187,9 @@ enum cmn_revision {
- 	CMN600_R2P0,
- 	CMN600_R3P0,
- 	CMN600_R3P1,
-+	CI700_R0P0 = 0,
-+	CI700_R1P0,
-+	CI700_R2P0,
- };
- 
- enum cmn_node_type {
-@@ -401,8 +405,10 @@ struct arm_cmn_format_attr {
- static bool arm_cmn_is_occup_event(enum cmn_model model,
- 				   enum cmn_node_type type, unsigned int id)
- {
--	return (type == CMN_TYPE_DVM && id == 0x05) ||
--	       (type == CMN_TYPE_HNF && id == 0x0f);
-+	if (type == CMN_TYPE_DVM)
-+		return (model == CMN600 && id == 0x05) ||
-+		       (model == CI700 && id == 0x0c);
-+	return type == CMN_TYPE_HNF && id == 0x0f;
- }
- 
- static ssize_t arm_cmn_event_show(struct device *dev,
-@@ -497,14 +503,19 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
- 	__CMN_EVENT_XP(n_##_name, (_event) | (2 << 2)),		\
- 	__CMN_EVENT_XP(s_##_name, (_event) | (3 << 2)),		\
- 	__CMN_EVENT_XP(p0_##_name, (_event) | (4 << 2)),	\
--	__CMN_EVENT_XP(p1_##_name, (_event) | (5 << 2))
-+	__CMN_EVENT_XP(p1_##_name, (_event) | (5 << 2)),	\
-+	__CMN_EVENT_XP(p2_##_name, (_event) | (6 << 2)),	\
-+	__CMN_EVENT_XP(p3_##_name, (_event) | (7 << 2))
- 
- /* Good thing there are only 3 fundamental XP events... */
- #define CMN_EVENT_XP(_name, _event)				\
- 	_CMN_EVENT_XP(req_##_name, (_event) | (0 << 5)),	\
- 	_CMN_EVENT_XP(rsp_##_name, (_event) | (1 << 5)),	\
- 	_CMN_EVENT_XP(snp_##_name, (_event) | (2 << 5)),	\
--	_CMN_EVENT_XP(dat_##_name, (_event) | (3 << 5))
-+	_CMN_EVENT_XP(dat_##_name, (_event) | (3 << 5)),	\
-+	_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)),	\
-+	_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)),	\
-+	_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5))
- 
- 
- static struct attribute *arm_cmn_event_attrs[] = {
-@@ -522,6 +533,20 @@ static struct attribute *arm_cmn_event_attrs[] = {
- 	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_all, 0x05, 0),
- 	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_dvmop, 0x05, 1),
- 	_CMN_EVENT_DVM(CMN600, rxreq_trk_occupancy_dvmsync, 0x05, 2),
-+	CMN_EVENT_DVM(CI700, dvmop_tlbi,		0x01),
-+	CMN_EVENT_DVM(CI700, dvmop_bpi,			0x02),
-+	CMN_EVENT_DVM(CI700, dvmop_pici,		0x03),
-+	CMN_EVENT_DVM(CI700, dvmop_vici,		0x04),
-+	CMN_EVENT_DVM(CI700, dvmsync,			0x05),
-+	CMN_EVENT_DVM(CI700, vmid_filtered,		0x06),
-+	CMN_EVENT_DVM(CI700, rndop_filtered,		0x07),
-+	CMN_EVENT_DVM(CI700, retry,			0x08),
-+	CMN_EVENT_DVM(CI700, txsnp_flitv,		0x09),
-+	CMN_EVENT_DVM(CI700, txsnp_stall,		0x0a),
-+	CMN_EVENT_DVM(CI700, trkfull,			0x0b),
-+	_CMN_EVENT_DVM(CI700, trk_occupancy_all,	0x0c, 0),
-+	_CMN_EVENT_DVM(CI700, trk_occupancy_dvmop,	0x0c, 1),
-+	_CMN_EVENT_DVM(CI700, trk_occupancy_dvmsync,	0x0c, 2),
- 
- 	CMN_EVENT_HNF(CMN_ANY, cache_miss,		0x01),
- 	CMN_EVENT_HNF(CMN_ANY, slc_sf_cache_access,	0x02),
-@@ -558,6 +583,9 @@ static struct attribute *arm_cmn_event_attrs[] = {
- 	CMN_EVENT_HNF(CMN_ANY, stash_snp_sent,		0x1d),
- 	CMN_EVENT_HNF(CMN_ANY, stash_data_pull,		0x1e),
- 	CMN_EVENT_HNF(CMN_ANY, snp_fwded,		0x1f),
-+	CMN_EVENT_HNF(CI700, atomic_fwd,		0x20),
-+	CMN_EVENT_HNF(CI700, mpam_hardlim,		0x21),
-+	CMN_EVENT_HNF(CI700, mpam_softlim,		0x22),
- 
- 	CMN_EVENT_HNI(rrt_rd_occ_cnt_ovfl,		0x20),
- 	CMN_EVENT_HNI(rrt_wr_occ_cnt_ovfl,		0x21),
-@@ -598,6 +626,7 @@ static struct attribute *arm_cmn_event_attrs[] = {
- 	CMN_EVENT_SBSX(CMN_ANY, wdb_occ_cnt_ovfl,	0x14),
- 	CMN_EVENT_SBSX(CMN_ANY, rd_axi_trkr_occ_cnt_ovfl, 0x15),
- 	CMN_EVENT_SBSX(CMN_ANY, cmo_axi_trkr_occ_cnt_ovfl, 0x16),
-+	CMN_EVENT_SBSX(CI700, rdb_occ_cnt_ovfl,		0x17),
- 	CMN_EVENT_SBSX(CMN_ANY, arvalid_no_arready,	0x21),
- 	CMN_EVENT_SBSX(CMN_ANY, awvalid_no_awready,	0x22),
- 	CMN_EVENT_SBSX(CMN_ANY, wvalid_no_wready,	0x23),
-@@ -624,6 +653,25 @@ static struct attribute *arm_cmn_event_attrs[] = {
- 	CMN_EVENT_RNID(CMN600, rdb_replay,		0x12),
- 	CMN_EVENT_RNID(CMN600, rdb_hybrid,		0x13),
- 	CMN_EVENT_RNID(CMN600, rdb_ord,			0x14),
-+	CMN_EVENT_RNID(CI700, padb_occ_ovfl,		0x11),
-+	CMN_EVENT_RNID(CI700, rpdb_occ_ovfl,		0x12),
-+	CMN_EVENT_RNID(CI700, rrt_occup_ovfl_slice1,	0x13),
-+	CMN_EVENT_RNID(CI700, rrt_occup_ovfl_slice2,	0x14),
-+	CMN_EVENT_RNID(CI700, rrt_occup_ovfl_slice3,	0x15),
-+	CMN_EVENT_RNID(CI700, wrt_throttled,		0x16),
-+
-+	CMN_EVENT_MTSX(tc_lookup,			0x01),
-+	CMN_EVENT_MTSX(tc_fill,				0x02),
-+	CMN_EVENT_MTSX(tc_miss,				0x03),
-+	CMN_EVENT_MTSX(tdb_forward,			0x04),
-+	CMN_EVENT_MTSX(tcq_hazard,			0x05),
-+	CMN_EVENT_MTSX(tcq_rd_alloc,			0x06),
-+	CMN_EVENT_MTSX(tcq_wr_alloc,			0x07),
-+	CMN_EVENT_MTSX(tcq_cmo_alloc,			0x08),
-+	CMN_EVENT_MTSX(axi_rd_req,			0x09),
-+	CMN_EVENT_MTSX(axi_wr_req,			0x0a),
-+	CMN_EVENT_MTSX(tcq_occ_cnt_ovfl,		0x0b),
-+	CMN_EVENT_MTSX(tdb_occ_cnt_ovfl,		0x0c),
- 
- 	NULL
- };
-@@ -1773,6 +1821,7 @@ static int arm_cmn_remove(struct platform_device *pdev)
- #ifdef CONFIG_OF
- static const struct of_device_id arm_cmn_of_match[] = {
- 	{ .compatible = "arm,cmn-600", .data = (void *)CMN600 },
-+	{ .compatible = "arm,ci-700", .data = (void *)CI700 },
- 	{}
- };
- MODULE_DEVICE_TABLE(of, arm_cmn_of_match);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0027-ANDROID-trusty-Backport-of-trusty-driver.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0027-ANDROID-trusty-Backport-of-trusty-driver.patch
deleted file mode 100644
index b318760..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0027-ANDROID-trusty-Backport-of-trusty-driver.patch
+++ /dev/null
@@ -1,8100 +0,0 @@
-From 8db3072225e852c2ef8bcc6c95f5b22f05104f35 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
-Date: Mon, 18 Nov 2013 20:46:48 -0800
-Subject: [PATCH 27/40] ANDROID: trusty: Backport of trusty driver
-
-This adds Trusty driver from android-trusty-5.10
-
-Original commits:
-b60d55f33484 ANDROID: trusty-ipc: Allow registering multiple handles
-629a4d3318cc ANDROID: trusty: Support setting trusty_shared_mem_id_t
-94a36a1374e7 ANDROID: trusty-log: Don't copy Trusty logs to linux kernel log
-efc21cced8af ANDROID: trusty-log: rework buffer allocation
-8cb1a07ca814 ANDROID: trusty-ipc: Fix lock protection of shared_handles
-52cdd137fae0 ANDROID: trusty-log: support poll()
-24c3649dceb9 ANDROID: trusty-irq: enqueue work in trusty_irq_cpu_up
-05a05bdd921e ANDROID: trusty: Add config TRUSTY_CRASH_IS_PANIC
-b5fbdba2ec72 ANDROID: trusty-ipc: Fix crash when running out of txbuffers
-46da5b95605e ANDROID: trusty: Allow TRUSTY_LEND of buffers
-2ebfb16645af ANDROID: trusty-virtio: remove unnecessary include of dma-mapping.h
-bf9d994a65a2 ANDROID: trusty-log: Complement logging sink with unthrottled virtual file
-d5cb51d0365d ANDROID: trusty-log: Refactor logging state to support concurrent sinks
-b421a5ad3eb3 ANDROID: trusty-log: Sanitize u32 overflow of the log ring buffer write index
-58e9681c57af ANDROID: trusty-log: On trusty panic, unthrottle sink to the kernel log
-ba12be0f203a ANDROID: trusty-log: Update trusty log buffer size to hold a complete  Trusty crash logs
-a8a3f83e52b6 ANDROID: trusty_qemu_defconfig: Enable dma-buf and ion system heaps
-988b52b392a1 ANDROID: trusty: Support setting FF-A Tag
-f544e96489aa ANDROID: Add trusty_qemu_defconfig
-8a9b09317f29 ANDROID: trusty-ipc: Switch from memfd to dma_buf
-5460418ec9a4 ANDROID: trusty-irq: document new way of specifying IPIs
-da3c30b943c2 ANDROID: trusty-irq: specify IPIs in new way
-5b5bb7f74856 ANDROID: trusty: Add trusty-test driver
-e80d87f422fd ANDROID: trusty: Add trusty-ipc driver
-03c248cbf693 ANDROID: trusty: Add trusty-virtio driver
-1047661edb97 ANDROID: trusty: Add trusty-log driver
-18fd5c59b423 ANDROID: trusty: Add trusty-irq driver
-479c39a683f8 ANDROID: trusty: Add trusty-core driver
-
-Upstream-Status: Backport
-Change-Id: I91f71b891a1091383a298e7fb2f9030382a19ca5
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
----
- .../devicetree/bindings/trusty/trusty-irq.txt |   67 +
- .../devicetree/bindings/trusty/trusty-smc.txt |    6 +
- arch/arm/configs/trusty_qemu_defconfig        |  291 +++
- .../configs/trusty_qemu_defconfig.fragment    |   26 +
- drivers/Kconfig                               |    2 +
- drivers/Makefile                              |    1 +
- drivers/trusty/Kconfig                        |  116 +
- drivers/trusty/Makefile                       |   14 +
- drivers/trusty/trusty-ipc.c                   | 2256 +++++++++++++++++
- drivers/trusty/trusty-irq.c                   |  645 +++++
- drivers/trusty/trusty-log.c                   |  830 ++++++
- drivers/trusty/trusty-log.h                   |   28 +
- drivers/trusty/trusty-mem.c                   |  139 +
- drivers/trusty/trusty-smc-arm.S               |   41 +
- drivers/trusty/trusty-smc-arm64.S             |   35 +
- drivers/trusty/trusty-smc.h                   |   26 +
- drivers/trusty/trusty-test.c                  |  440 ++++
- drivers/trusty/trusty-test.h                  |   13 +
- drivers/trusty/trusty-virtio.c                |  840 ++++++
- drivers/trusty/trusty.c                       |  981 +++++++
- include/linux/trusty/arm_ffa.h                |  590 +++++
- include/linux/trusty/sm_err.h                 |   28 +
- include/linux/trusty/smcall.h                 |  124 +
- include/linux/trusty/trusty.h                 |  131 +
- include/linux/trusty/trusty_ipc.h             |   89 +
- include/uapi/linux/trusty/ipc.h               |   65 +
- include/uapi/linux/virtio_ids.h               |    1 +
- 27 files changed, 7825 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/trusty/trusty-irq.txt
- create mode 100644 Documentation/devicetree/bindings/trusty/trusty-smc.txt
- create mode 100644 arch/arm/configs/trusty_qemu_defconfig
- create mode 100644 arch/arm64/configs/trusty_qemu_defconfig.fragment
- create mode 100644 drivers/trusty/Kconfig
- create mode 100644 drivers/trusty/Makefile
- create mode 100644 drivers/trusty/trusty-ipc.c
- create mode 100644 drivers/trusty/trusty-irq.c
- create mode 100644 drivers/trusty/trusty-log.c
- create mode 100644 drivers/trusty/trusty-log.h
- create mode 100644 drivers/trusty/trusty-mem.c
- create mode 100644 drivers/trusty/trusty-smc-arm.S
- create mode 100644 drivers/trusty/trusty-smc-arm64.S
- create mode 100644 drivers/trusty/trusty-smc.h
- create mode 100644 drivers/trusty/trusty-test.c
- create mode 100644 drivers/trusty/trusty-test.h
- create mode 100644 drivers/trusty/trusty-virtio.c
- create mode 100644 drivers/trusty/trusty.c
- create mode 100644 include/linux/trusty/arm_ffa.h
- create mode 100644 include/linux/trusty/sm_err.h
- create mode 100644 include/linux/trusty/smcall.h
- create mode 100644 include/linux/trusty/trusty.h
- create mode 100644 include/linux/trusty/trusty_ipc.h
- create mode 100644 include/uapi/linux/trusty/ipc.h
-
-diff --git a/Documentation/devicetree/bindings/trusty/trusty-irq.txt b/Documentation/devicetree/bindings/trusty/trusty-irq.txt
-new file mode 100644
-index 000000000000..cbb545ad452b
---- /dev/null
-+++ b/Documentation/devicetree/bindings/trusty/trusty-irq.txt
-@@ -0,0 +1,67 @@
-+Trusty irq interface
-+
-+Trusty requires non-secure irqs to be forwarded to the secure OS.
-+
-+Required properties:
-+- compatible: "android,trusty-irq-v1"
-+
-+Optional properties:
-+
-+- interrupt-templates: is an optional property that works together
-+  with "interrupt-ranges" to specify secure side to kernel IRQs mapping.
-+
-+  It is a list of entries, each one of which defines a group of interrupts
-+  having common properties, and has the following format:
-+    < phandle irq_id_pos [templ_data]>
-+      phandle - phandle of interrupt controller this template is for
-+      irq_id_pos - the position of irq id in interrupt specifier array
-+                   for interrupt controller referenced by phandle.
-+      templ_data - is an array of u32 values (could be empty) in the same
-+                   format as interrupt specifier for interrupt controller
-+                   referenced by phandle but with omitted irq id field.
-+
-+- interrupt-ranges: list of entries that specifies secure side to kernel
-+  IRQs mapping.
-+
-+  Each entry in the "interrupt-ranges" list has the following format:
-+    <beg end templ_idx>
-+      beg - first entry in this range
-+      end - last entry in this range
-+      templ_idx  - index of entry in "interrupt-templates" property
-+                   that must be used as a template for all interrupts
-+                   in this range
-+
-+- ipi-range: optional mapping of a linear range of trusty IRQs to a linear range
-+  of IPIs (inter-processor interrupts).  This has the following format:
-+    <beg end ipi_base>
-+      beg - first trusty IRQ number that is an IPI
-+      end - last trusty IRQ number that is an IPI
-+      ipi_base - IPI number of 'beg'
-+
-+Example:
-+{
-+	gic: interrupt-controller@50041000 {
-+		compatible = "arm,gic-400";
-+		#interrupt-cells = <3>;
-+		interrupt-controller;
-+		...
-+	};
-+	...
-+	trusty {
-+		compatible = "android,trusty-smc-v1";
-+		ranges;
-+		#address-cells = <2>;
-+		#size-cells = <2>;
-+
-+		irq {
-+			compatible = "android,trusty-irq-v1";
-+			interrupt-templates = <&gic 1 GIC_PPI 0>,
-+					      <&gic 1 GIC_SPI 0>;
-+			interrupt-ranges = <16  31 0>,
-+					   <32 223 1>;
-+			ipi-range = <8 15 8>;
-+		};
-+	}
-+}
-+
-+Must be a child of the node that provides the trusty std/fast call interface.
-diff --git a/Documentation/devicetree/bindings/trusty/trusty-smc.txt b/Documentation/devicetree/bindings/trusty/trusty-smc.txt
-new file mode 100644
-index 000000000000..1b39ad317c67
---- /dev/null
-+++ b/Documentation/devicetree/bindings/trusty/trusty-smc.txt
-@@ -0,0 +1,6 @@
-+Trusty smc interface
-+
-+Trusty is running in secure mode on the same (arm) cpu(s) as the current os.
-+
-+Required properties:
-+- compatible: "android,trusty-smc-v1"
-diff --git a/arch/arm/configs/trusty_qemu_defconfig b/arch/arm/configs/trusty_qemu_defconfig
-new file mode 100644
-index 000000000000..46ad9504c23d
---- /dev/null
-+++ b/arch/arm/configs/trusty_qemu_defconfig
-@@ -0,0 +1,291 @@
-+# CONFIG_LOCALVERSION_AUTO is not set
-+# CONFIG_SWAP is not set
-+CONFIG_POSIX_MQUEUE=y
-+CONFIG_AUDIT=y
-+CONFIG_NO_HZ=y
-+CONFIG_HIGH_RES_TIMERS=y
-+CONFIG_PREEMPT=y
-+CONFIG_BSD_PROCESS_ACCT=y
-+CONFIG_BSD_PROCESS_ACCT_V3=y
-+CONFIG_TASKSTATS=y
-+CONFIG_TASK_DELAY_ACCT=y
-+CONFIG_TASK_XACCT=y
-+CONFIG_TASK_IO_ACCOUNTING=y
-+CONFIG_IKCONFIG=y
-+CONFIG_IKCONFIG_PROC=y
-+CONFIG_LOG_BUF_SHIFT=14
-+CONFIG_RT_GROUP_SCHED=y
-+CONFIG_CGROUP_FREEZER=y
-+CONFIG_CGROUP_CPUACCT=y
-+CONFIG_CGROUP_DEBUG=y
-+CONFIG_SCHED_AUTOGROUP=y
-+CONFIG_BLK_DEV_INITRD=y
-+CONFIG_KALLSYMS_ALL=y
-+CONFIG_EMBEDDED=y
-+# CONFIG_COMPAT_BRK is not set
-+CONFIG_PROFILING=y
-+CONFIG_ARCH_VIRT=y
-+CONFIG_PCI=y
-+CONFIG_PCI_HOST_GENERIC=y
-+CONFIG_SMP=y
-+CONFIG_HIGHMEM=y
-+CONFIG_SECCOMP=y
-+CONFIG_CMDLINE="console=ttyAMA0"
-+CONFIG_PM_AUTOSLEEP=y
-+CONFIG_PM_WAKELOCKS=y
-+CONFIG_PM_WAKELOCKS_LIMIT=0
-+# CONFIG_PM_WAKELOCKS_GC is not set
-+CONFIG_PM_DEBUG=y
-+# CONFIG_BLK_DEV_BSG is not set
-+# CONFIG_IOSCHED_DEADLINE is not set
-+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-+CONFIG_KSM=y
-+CONFIG_NET=y
-+CONFIG_PACKET=y
-+CONFIG_UNIX=y
-+CONFIG_XFRM_USER=y
-+CONFIG_NET_KEY=y
-+CONFIG_INET=y
-+CONFIG_IP_MULTICAST=y
-+CONFIG_IP_ADVANCED_ROUTER=y
-+CONFIG_IP_MULTIPLE_TABLES=y
-+CONFIG_IP_PNP=y
-+CONFIG_IP_PNP_DHCP=y
-+CONFIG_IP_PNP_BOOTP=y
-+CONFIG_INET_ESP=y
-+CONFIG_INET_DIAG_DESTROY=y
-+CONFIG_IPV6_ROUTER_PREF=y
-+CONFIG_IPV6_ROUTE_INFO=y
-+CONFIG_IPV6_OPTIMISTIC_DAD=y
-+CONFIG_INET6_AH=y
-+CONFIG_INET6_ESP=y
-+CONFIG_INET6_IPCOMP=y
-+CONFIG_IPV6_MIP6=y
-+CONFIG_IPV6_MULTIPLE_TABLES=y
-+CONFIG_NETFILTER=y
-+CONFIG_NF_CONNTRACK=y
-+CONFIG_NF_CONNTRACK_SECMARK=y
-+CONFIG_NF_CONNTRACK_EVENTS=y
-+CONFIG_NF_CONNTRACK_AMANDA=y
-+CONFIG_NF_CONNTRACK_FTP=y
-+CONFIG_NF_CONNTRACK_H323=y
-+CONFIG_NF_CONNTRACK_IRC=y
-+CONFIG_NF_CONNTRACK_NETBIOS_NS=y
-+CONFIG_NF_CONNTRACK_PPTP=y
-+CONFIG_NF_CONNTRACK_SANE=y
-+CONFIG_NF_CONNTRACK_TFTP=y
-+CONFIG_NF_CT_NETLINK=y
-+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
-+CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
-+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
-+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
-+CONFIG_NETFILTER_XT_TARGET_MARK=y
-+CONFIG_NETFILTER_XT_TARGET_NFLOG=y
-+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
-+CONFIG_NETFILTER_XT_TARGET_TPROXY=y
-+CONFIG_NETFILTER_XT_TARGET_TRACE=y
-+CONFIG_NETFILTER_XT_TARGET_SECMARK=y
-+CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
-+CONFIG_NETFILTER_XT_MATCH_COMMENT=y
-+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
-+CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
-+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
-+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
-+CONFIG_NETFILTER_XT_MATCH_HELPER=y
-+CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
-+CONFIG_NETFILTER_XT_MATCH_LENGTH=y
-+CONFIG_NETFILTER_XT_MATCH_LIMIT=y
-+CONFIG_NETFILTER_XT_MATCH_MAC=y
-+CONFIG_NETFILTER_XT_MATCH_MARK=y
-+CONFIG_NETFILTER_XT_MATCH_POLICY=y
-+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
-+CONFIG_NETFILTER_XT_MATCH_QUOTA=y
-+CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
-+CONFIG_NETFILTER_XT_MATCH_SOCKET=y
-+CONFIG_NETFILTER_XT_MATCH_STATE=y
-+CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
-+CONFIG_NETFILTER_XT_MATCH_STRING=y
-+CONFIG_NETFILTER_XT_MATCH_TIME=y
-+CONFIG_NETFILTER_XT_MATCH_U32=y
-+CONFIG_IP_NF_IPTABLES=y
-+CONFIG_IP_NF_MATCH_AH=y
-+CONFIG_IP_NF_MATCH_ECN=y
-+CONFIG_IP_NF_MATCH_RPFILTER=y
-+CONFIG_IP_NF_MATCH_TTL=y
-+CONFIG_IP_NF_FILTER=y
-+CONFIG_IP_NF_TARGET_REJECT=y
-+CONFIG_IP_NF_MANGLE=y
-+CONFIG_IP_NF_TARGET_ECN=y
-+CONFIG_IP_NF_TARGET_TTL=y
-+CONFIG_IP_NF_RAW=y
-+CONFIG_IP_NF_SECURITY=y
-+CONFIG_IP_NF_ARPTABLES=y
-+CONFIG_IP_NF_ARPFILTER=y
-+CONFIG_IP_NF_ARP_MANGLE=y
-+CONFIG_IP6_NF_IPTABLES=y
-+CONFIG_IP6_NF_MATCH_AH=y
-+CONFIG_IP6_NF_MATCH_EUI64=y
-+CONFIG_IP6_NF_MATCH_FRAG=y
-+CONFIG_IP6_NF_MATCH_OPTS=y
-+CONFIG_IP6_NF_MATCH_HL=y
-+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
-+CONFIG_IP6_NF_MATCH_MH=y
-+CONFIG_IP6_NF_MATCH_RT=y
-+CONFIG_IP6_NF_TARGET_HL=y
-+CONFIG_IP6_NF_FILTER=y
-+CONFIG_IP6_NF_TARGET_REJECT=y
-+CONFIG_IP6_NF_MANGLE=y
-+CONFIG_IP6_NF_RAW=y
-+CONFIG_BRIDGE=y
-+CONFIG_NET_SCHED=y
-+CONFIG_NET_SCH_HTB=y
-+CONFIG_NET_CLS_U32=y
-+CONFIG_NET_EMATCH=y
-+CONFIG_NET_EMATCH_U32=y
-+CONFIG_NET_CLS_ACT=y
-+# CONFIG_WIRELESS is not set
-+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_BLK_DEV_LOOP=y
-+CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_SIZE=8192
-+CONFIG_VIRTIO_BLK=y
-+CONFIG_SCSI=y
-+# CONFIG_SCSI_PROC_FS is not set
-+CONFIG_BLK_DEV_SD=y
-+# CONFIG_SCSI_LOWLEVEL is not set
-+CONFIG_MD=y
-+CONFIG_BLK_DEV_DM=y
-+CONFIG_DM_CRYPT=y
-+CONFIG_DM_UEVENT=y
-+CONFIG_DM_VERITY=y
-+CONFIG_DM_VERITY_FEC=y
-+CONFIG_NETDEVICES=y
-+CONFIG_TUN=y
-+CONFIG_VIRTIO_NET=y
-+CONFIG_E1000=y
-+CONFIG_E1000E=y
-+CONFIG_PPP=y
-+CONFIG_PPP_BSDCOMP=y
-+CONFIG_PPP_DEFLATE=y
-+CONFIG_PPP_MPPE=y
-+# CONFIG_WLAN is not set
-+CONFIG_INPUT_EVDEV=y
-+CONFIG_KEYBOARD_GOLDFISH_EVENTS=y
-+# CONFIG_INPUT_MOUSE is not set
-+CONFIG_INPUT_JOYSTICK=y
-+CONFIG_INPUT_TABLET=y
-+CONFIG_INPUT_MISC=y
-+CONFIG_INPUT_UINPUT=y
-+# CONFIG_SERIO_SERPORT is not set
-+# CONFIG_VT is not set
-+# CONFIG_LEGACY_PTYS is not set
-+# CONFIG_DEVMEM is not set
-+CONFIG_SERIAL_AMBA_PL011=y
-+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-+CONFIG_VIRTIO_CONSOLE=y
-+# CONFIG_HW_RANDOM is not set
-+CONFIG_BATTERY_GOLDFISH=y
-+# CONFIG_HWMON is not set
-+CONFIG_TRUSTY=y
-+CONFIG_MEDIA_SUPPORT=y
-+CONFIG_FB=y
-+CONFIG_FB_GOLDFISH=y
-+CONFIG_FB_SIMPLE=y
-+CONFIG_BACKLIGHT_LCD_SUPPORT=y
-+CONFIG_LOGO=y
-+# CONFIG_LOGO_LINUX_MONO is not set
-+# CONFIG_LOGO_LINUX_VGA16 is not set
-+CONFIG_SOUND=y
-+CONFIG_SND=y
-+CONFIG_HIDRAW=y
-+CONFIG_UHID=y
-+CONFIG_HID_A4TECH=y
-+CONFIG_HID_ACRUX=y
-+CONFIG_HID_ACRUX_FF=y
-+CONFIG_HID_APPLE=y
-+CONFIG_HID_BELKIN=y
-+CONFIG_HID_CHERRY=y
-+CONFIG_HID_CHICONY=y
-+CONFIG_HID_PRODIKEYS=y
-+CONFIG_HID_CYPRESS=y
-+CONFIG_HID_DRAGONRISE=y
-+CONFIG_DRAGONRISE_FF=y
-+CONFIG_HID_EMS_FF=y
-+CONFIG_HID_ELECOM=y
-+CONFIG_HID_EZKEY=y
-+CONFIG_HID_KEYTOUCH=y
-+CONFIG_HID_KYE=y
-+CONFIG_HID_WALTOP=y
-+CONFIG_HID_GYRATION=y
-+CONFIG_HID_TWINHAN=y
-+CONFIG_HID_KENSINGTON=y
-+CONFIG_HID_LCPOWER=y
-+CONFIG_HID_LOGITECH=y
-+CONFIG_HID_LOGITECH_DJ=y
-+CONFIG_LOGITECH_FF=y
-+CONFIG_LOGIRUMBLEPAD2_FF=y
-+CONFIG_LOGIG940_FF=y
-+CONFIG_HID_MAGICMOUSE=y
-+CONFIG_HID_MICROSOFT=y
-+CONFIG_HID_MONTEREY=y
-+CONFIG_HID_MULTITOUCH=y
-+CONFIG_HID_ORTEK=y
-+CONFIG_HID_PANTHERLORD=y
-+CONFIG_PANTHERLORD_FF=y
-+CONFIG_HID_PETALYNX=y
-+CONFIG_HID_PICOLCD=y
-+CONFIG_HID_PRIMAX=y
-+CONFIG_HID_SAITEK=y
-+CONFIG_HID_SAMSUNG=y
-+CONFIG_HID_SPEEDLINK=y
-+CONFIG_HID_SUNPLUS=y
-+CONFIG_HID_GREENASIA=y
-+CONFIG_GREENASIA_FF=y
-+CONFIG_HID_SMARTJOYPLUS=y
-+CONFIG_SMARTJOYPLUS_FF=y
-+CONFIG_HID_TIVO=y
-+CONFIG_HID_TOPSEED=y
-+CONFIG_HID_THRUSTMASTER=y
-+CONFIG_HID_ZEROPLUS=y
-+CONFIG_HID_ZYDACRON=y
-+# CONFIG_USB_SUPPORT is not set
-+CONFIG_RTC_CLASS=y
-+CONFIG_VIRTIO_PCI=y
-+CONFIG_VIRTIO_MMIO=y
-+CONFIG_STAGING=y
-+CONFIG_ASHMEM=y
-+CONFIG_ION=y
-+CONFIG_GOLDFISH_AUDIO=y
-+CONFIG_GOLDFISH=y
-+CONFIG_GOLDFISH_PIPE=y
-+# CONFIG_IOMMU_SUPPORT is not set
-+CONFIG_ANDROID=y
-+CONFIG_ANDROID_BINDER_IPC=y
-+CONFIG_EXT2_FS=y
-+CONFIG_EXT4_FS=y
-+CONFIG_EXT4_FS_SECURITY=y
-+CONFIG_QUOTA=y
-+CONFIG_FUSE_FS=y
-+CONFIG_CUSE=y
-+CONFIG_MSDOS_FS=y
-+CONFIG_VFAT_FS=y
-+CONFIG_TMPFS=y
-+CONFIG_TMPFS_POSIX_ACL=y
-+# CONFIG_MISC_FILESYSTEMS is not set
-+CONFIG_NFS_FS=y
-+CONFIG_ROOT_NFS=y
-+CONFIG_NLS_CODEPAGE_437=y
-+CONFIG_NLS_ISO8859_1=y
-+CONFIG_SECURITY=y
-+CONFIG_SECURITY_NETWORK=y
-+CONFIG_SECURITY_SELINUX=y
-+CONFIG_DYNAMIC_DEBUG=y
-+CONFIG_DEBUG_INFO=y
-+CONFIG_DEBUG_FS=y
-+CONFIG_MAGIC_SYSRQ=y
-+CONFIG_PANIC_TIMEOUT=5
-+# CONFIG_SCHED_DEBUG is not set
-+CONFIG_SCHEDSTATS=y
-+# CONFIG_FTRACE is not set
-+CONFIG_DMA_API_DEBUG=y
-+CONFIG_ATOMIC64_SELFTEST=y
-diff --git a/arch/arm64/configs/trusty_qemu_defconfig.fragment b/arch/arm64/configs/trusty_qemu_defconfig.fragment
-new file mode 100644
-index 000000000000..166eef1797fd
---- /dev/null
-+++ b/arch/arm64/configs/trusty_qemu_defconfig.fragment
-@@ -0,0 +1,26 @@
-+# From goldfish
-+CONFIG_VIRTIO_BLK=y
-+CONFIG_VIRTIO_CONSOLE=y
-+CONFIG_VIRTIO_INPUT=y
-+CONFIG_VIRTIO_MMIO=y
-+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
-+CONFIG_VIRTIO_NET=y
-+CONFIG_VIRTIO_PCI=y
-+CONFIG_VIRTIO_PMEM=y
-+# From Trusty
-+CONFIG_TRUSTY=y
-+CONFIG_DMA_API_DEBUG=y
-+CONFIG_DYNAMIC_DEBUG=y
-+CONFIG_PROVE_LOCKING=y
-+CONFIG_DEBUG_ATOMIC_SLEEP=y
-+CONFIG_SEMIHOSTING_EXIT=y
-+CONFIG_E1000=y
-+CONFIG_E1000E=y
-+CONFIG_REBOOT_EMULATOR_EXIT=y
-+CONFIG_DMABUF_HEAPS_SYSTEM=y
-+# securefb test uses ION
-+CONFIG_ION=y
-+CONFIG_ION_SYSTEM_HEAP=y
-+# LTO slows down build times considerably. Disable it.
-+# CONFIG_LTO_CLANG is not set
-+# CONFIG_LTO_CLANG_FULL is not set
-diff --git a/drivers/Kconfig b/drivers/Kconfig
-index 0d399ddaa185..e346c35f42b4 100644
---- a/drivers/Kconfig
-+++ b/drivers/Kconfig
-@@ -85,6 +85,8 @@ source "drivers/hwmon/Kconfig"
- 
- source "drivers/thermal/Kconfig"
- 
-+source "drivers/trusty/Kconfig"
-+
- source "drivers/watchdog/Kconfig"
- 
- source "drivers/ssb/Kconfig"
-diff --git a/drivers/Makefile b/drivers/Makefile
-index a110338c860c..d3165b877622 100644
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -117,6 +117,7 @@ obj-$(CONFIG_W1)		+= w1/
- obj-y				+= power/
- obj-$(CONFIG_HWMON)		+= hwmon/
- obj-$(CONFIG_THERMAL)		+= thermal/
-+obj-$(CONFIG_TRUSTY)		+= trusty/
- obj-$(CONFIG_WATCHDOG)		+= watchdog/
- obj-$(CONFIG_MD)		+= md/
- obj-$(CONFIG_BT)		+= bluetooth/
-diff --git a/drivers/trusty/Kconfig b/drivers/trusty/Kconfig
-new file mode 100644
-index 000000000000..fcde7f097acf
---- /dev/null
-+++ b/drivers/trusty/Kconfig
-@@ -0,0 +1,116 @@
-+# SPDX-License-Identifier: GPL-2.0-only
-+#
-+# Trusty driver
-+#
-+
-+menu "Trusty driver"
-+
-+config TRUSTY
-+	tristate "Trusty core driver"
-+	depends on ARM || ARM64
-+	help
-+	  Trusty is a secure OS that provides a Trusted Execution Environment
-+	  (TEE) for Android.  Trusty runs on the same processor as Linux but is
-+	  isolated from the rest of the system by both hardware and software.
-+
-+	  This option enables the core part of the Linux kernel driver for
-+	  Trusty.  This doesn't do much by itself; you'll need to enable some of
-+	  the sub-modules too.
-+
-+	  If you build this as a module, it will be called trusty-core.
-+
-+if TRUSTY
-+
-+config TRUSTY_IRQ
-+	tristate "Trusty IRQ support"
-+	default y
-+	help
-+	  Enable forwarding of IRQs from Linux to Trusty.  This module retrieves
-+	  from Trusty a list of IRQs that Trusty uses, and it registers handlers
-+	  for them which notify Trusty that the IRQ has been received.
-+
-+	  If you build this as a module, it will be called trusty-irq.
-+
-+	  Usually this is needed for Trusty to work, so say 'y' or 'm'.
-+
-+config TRUSTY_LOG
-+	tristate "Trusty log support"
-+	default y
-+	help
-+	  Print log messages generated by the secure OS to the Linux kernel log.
-+
-+	  While this module is loaded, messages are retrieved and printed after
-+	  each call into Trusty, and also during Linux kernel panics.
-+
-+	  If you build this as a module, it will be called trusty-log.
-+
-+config TRUSTY_TEST
-+	tristate "Trusty stdcall test"
-+	default y
-+	help
-+	  Allow running tests of the Trusty stdcall interface.  Running these
-+	  tests is initiated by userspace writing to a sysfs file.
-+
-+	  This depends on having a test sevice running on the Trusty side.
-+
-+	  If you build this as a module, it will be called trusty-test.
-+
-+config TRUSTY_VIRTIO
-+	tristate "Trusty virtio support"
-+	select VIRTIO
-+	default y
-+	help
-+	  Enable the Trusty virtio driver, which is responsible for management
-+	  and interaction with virtio devices exposed by Trusty.  This driver
-+	  requests the virtio device descriptors from Trusty, then parses them
-+	  and adds the corresponding virtio devices.
-+
-+	  If you build this as a module, it will be called trusty-virtio.
-+
-+config TRUSTY_VIRTIO_IPC
-+	tristate "Trusty Virtio IPC driver"
-+	depends on TRUSTY_VIRTIO
-+	default y
-+	help
-+	  Enable support for communicating with Trusty services.
-+
-+	  If you build this as a module, it will be called trusty-ipc.
-+
-+config TRUSTY_DMA_BUF_FFA_TAG
-+	bool "Availability of trusty_dma_buf_get_ffa_tag"
-+	default n
-+	help
-+	  Whether trusty_dma_buf_get_ffa_tag is provided on this platform.
-+	  Providing this function will allow the platform to select what tag
-+	  should be passed to the SPM when attempting to transfer the buffer
-+	  to secure world. The value passed here is implementation defined and
-+	  may depend on your SPM.
-+
-+	  If set to N, a default implementation which returns 0 will be used.
-+
-+config TRUSTY_DMA_BUF_SHARED_MEM_ID
-+	bool "Availability of trusty_dma_buf_get_shared_mem_id"
-+	default n
-+	help
-+	  Whether trusty_dma_buf_get_shared_mem_id is provided on this platform.
-+	  Providing this function allows the platform to manage memory
-+	  transaction life cycle of DMA bufs independently of Trusty IPC driver.
-+	  The latter can query trusty_shared_mem_id_t value allocated for a
-+	  given DMA buf using trusty_dma_buf_get_shared_mem_id interface.
-+
-+	  If set to N, a default implementation which does not allocate any IDs
-+	  will be used.
-+
-+config TRUSTY_CRASH_IS_PANIC
-+	bool "When trusty panics, then panic the kernel"
-+	help
-+	 This option will treat Trusty panics as fatal.  This is useful if
-+	 your system cannot recover from Trusty panic/halt and you require
-+	 the system to reboot to recover.
-+
-+	 If N, it will contine to run the kernel, but trusty operations will
-+	 return errors.
-+
-+endif # TRUSTY
-+
-+endmenu
-diff --git a/drivers/trusty/Makefile b/drivers/trusty/Makefile
-new file mode 100644
-index 000000000000..2cf1cfccf97b
---- /dev/null
-+++ b/drivers/trusty/Makefile
-@@ -0,0 +1,14 @@
-+# SPDX-License-Identifier: GPL-2.0-only
-+#
-+# Makefile for trusty components
-+#
-+
-+obj-$(CONFIG_TRUSTY)		+= trusty-core.o
-+trusty-core-objs		+= trusty.o trusty-mem.o
-+trusty-core-$(CONFIG_ARM)	+= trusty-smc-arm.o
-+trusty-core-$(CONFIG_ARM64)	+= trusty-smc-arm64.o
-+obj-$(CONFIG_TRUSTY_IRQ)	+= trusty-irq.o
-+obj-$(CONFIG_TRUSTY_LOG)	+= trusty-log.o
-+obj-$(CONFIG_TRUSTY_TEST)	+= trusty-test.o
-+obj-$(CONFIG_TRUSTY_VIRTIO)	+= trusty-virtio.o
-+obj-$(CONFIG_TRUSTY_VIRTIO_IPC)	+= trusty-ipc.o
-diff --git a/drivers/trusty/trusty-ipc.c b/drivers/trusty/trusty-ipc.c
-new file mode 100644
-index 000000000000..82d6ddeb41f4
---- /dev/null
-+++ b/drivers/trusty/trusty-ipc.c
-@@ -0,0 +1,2256 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ */
-+
-+#include <linux/aio.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/cdev.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/poll.h>
-+#include <linux/idr.h>
-+#include <linux/completion.h>
-+#include <linux/dma-buf.h>
-+#include <linux/sched.h>
-+#include <linux/sched/signal.h>
-+#include <linux/compat.h>
-+#include <linux/uio.h>
-+#include <linux/file.h>
-+
-+#include <linux/virtio.h>
-+#include <linux/virtio_ids.h>
-+#include <linux/virtio_config.h>
-+
-+#include <linux/trusty/trusty.h>
-+#include <linux/trusty/trusty_ipc.h>
-+
-+#include <uapi/linux/trusty/ipc.h>
-+
-+#define MAX_DEVICES			4
-+
-+#define REPLY_TIMEOUT			5000
-+#define TXBUF_TIMEOUT			15000
-+
-+#define MAX_SRV_NAME_LEN		256
-+#define MAX_DEV_NAME_LEN		32
-+
-+#define DEFAULT_MSG_BUF_SIZE		PAGE_SIZE
-+#define DEFAULT_MSG_BUF_ALIGN		PAGE_SIZE
-+
-+#define TIPC_CTRL_ADDR			53
-+#define TIPC_ANY_ADDR			0xFFFFFFFF
-+
-+#define TIPC_MIN_LOCAL_ADDR		1024
-+
-+#ifdef CONFIG_COMPAT
-+#define TIPC_IOC32_CONNECT	_IOW(TIPC_IOC_MAGIC, 0x80, compat_uptr_t)
-+#endif
-+
-+struct tipc_virtio_dev;
-+
-+struct tipc_dev_config {
-+	u32 msg_buf_max_size;
-+	u32 msg_buf_alignment;
-+	char dev_name[MAX_DEV_NAME_LEN];
-+} __packed;
-+
-+struct tipc_shm {
-+	trusty_shared_mem_id_t obj_id;
-+	u64 size;
-+	u64 tag;
-+};
-+
-+struct tipc_msg_hdr {
-+	u32 src;
-+	u32 dst;
-+	u16 reserved;
-+	u16 shm_cnt;
-+	u16 len;
-+	u16 flags;
-+	u8 data[];
-+} __packed;
-+
-+enum tipc_ctrl_msg_types {
-+	TIPC_CTRL_MSGTYPE_GO_ONLINE = 1,
-+	TIPC_CTRL_MSGTYPE_GO_OFFLINE,
-+	TIPC_CTRL_MSGTYPE_CONN_REQ,
-+	TIPC_CTRL_MSGTYPE_CONN_RSP,
-+	TIPC_CTRL_MSGTYPE_DISC_REQ,
-+	TIPC_CTRL_MSGTYPE_RELEASE,
-+};
-+
-+struct tipc_ctrl_msg {
-+	u32 type;
-+	u32 body_len;
-+	u8  body[];
-+} __packed;
-+
-+struct tipc_conn_req_body {
-+	char name[MAX_SRV_NAME_LEN];
-+} __packed;
-+
-+struct tipc_conn_rsp_body {
-+	u32 target;
-+	u32 status;
-+	u32 remote;
-+	u32 max_msg_size;
-+	u32 max_msg_cnt;
-+} __packed;
-+
-+struct tipc_disc_req_body {
-+	u32 target;
-+} __packed;
-+
-+struct tipc_release_body {
-+	trusty_shared_mem_id_t id;
-+} __packed;
-+
-+struct tipc_cdev_node {
-+	struct cdev cdev;
-+	struct device *dev;
-+	unsigned int minor;
-+};
-+
-+enum tipc_device_state {
-+	VDS_OFFLINE = 0,
-+	VDS_ONLINE,
-+	VDS_DEAD,
-+};
-+
-+struct tipc_virtio_dev {
-+	struct kref refcount;
-+	struct mutex lock; /* protects access to this device */
-+	struct virtio_device *vdev;
-+	struct virtqueue *rxvq;
-+	struct virtqueue *txvq;
-+	unsigned int msg_buf_cnt;
-+	unsigned int msg_buf_max_cnt;
-+	size_t msg_buf_max_sz;
-+	unsigned int free_msg_buf_cnt;
-+	struct list_head free_buf_list;
-+	wait_queue_head_t sendq;
-+	struct idr addr_idr;
-+	enum tipc_device_state state;
-+	struct tipc_cdev_node cdev_node;
-+	/* protects shared_handles, dev lock never acquired while held */
-+	struct mutex shared_handles_lock;
-+	struct rb_root shared_handles;
-+	char   cdev_name[MAX_DEV_NAME_LEN];
-+};
-+
-+enum tipc_chan_state {
-+	TIPC_DISCONNECTED = 0,
-+	TIPC_CONNECTING,
-+	TIPC_CONNECTED,
-+	TIPC_STALE,
-+};
-+
-+struct tipc_chan {
-+	struct mutex lock; /* protects channel state  */
-+	struct kref refcount;
-+	enum tipc_chan_state state;
-+	struct tipc_virtio_dev *vds;
-+	const struct tipc_chan_ops *ops;
-+	void *ops_arg;
-+	u32 remote;
-+	u32 local;
-+	u32 max_msg_size;
-+	u32 max_msg_cnt;
-+	char srv_name[MAX_SRV_NAME_LEN];
-+};
-+
-+struct tipc_shared_handle {
-+	struct rb_node node;
-+	struct tipc_shm tipc;
-+	struct tipc_virtio_dev *vds;
-+	struct dma_buf *dma_buf;
-+	bool shared;
-+	/*
-+	 * Following fields are only used if dma_buf does not own a
-+	 * trusty_shared_mem_id_t.
-+	 */
-+	struct dma_buf_attachment *attach;
-+	struct sg_table *sgt;
-+};
-+
-+static struct class *tipc_class;
-+static unsigned int tipc_major;
-+
-+static struct virtio_device *default_vdev;
-+
-+static DEFINE_IDR(tipc_devices);
-+static DEFINE_MUTEX(tipc_devices_lock);
-+
-+static int _match_any(int id, void *p, void *data)
-+{
-+	return id;
-+}
-+
-+static int _match_data(int id, void *p, void *data)
-+{
-+	return (p == data);
-+}
-+
-+static void *_alloc_shareable_mem(size_t sz, gfp_t gfp)
-+{
-+	return alloc_pages_exact(sz, gfp);
-+}
-+
-+static void _free_shareable_mem(size_t sz, void *va)
-+{
-+	free_pages_exact(va, sz);
-+}
-+
-+static struct tipc_msg_buf *vds_alloc_msg_buf(struct tipc_virtio_dev *vds,
-+					      bool share_write)
-+{
-+	int ret;
-+	struct tipc_msg_buf *mb;
-+	size_t sz = vds->msg_buf_max_sz;
-+	pgprot_t pgprot = share_write ? PAGE_KERNEL : PAGE_KERNEL_RO;
-+
-+	/* allocate tracking structure */
-+	mb = kzalloc(sizeof(struct tipc_msg_buf), GFP_KERNEL);
-+	if (!mb)
-+		return NULL;
-+
-+	/* allocate buffer that can be shared with secure world */
-+	mb->buf_va = _alloc_shareable_mem(sz, GFP_KERNEL);
-+	if (!mb->buf_va)
-+		goto err_alloc;
-+
-+	sg_init_one(&mb->sg, mb->buf_va, sz);
-+	ret = trusty_share_memory_compat(vds->vdev->dev.parent->parent,
-+					 &mb->buf_id, &mb->sg, 1, pgprot);
-+	if (ret) {
-+		dev_err(&vds->vdev->dev, "trusty_share_memory failed: %d\n",
-+			ret);
-+		goto err_share;
-+	}
-+
-+	mb->buf_sz = sz;
-+	mb->shm_cnt = 0;
-+
-+	return mb;
-+
-+err_share:
-+	_free_shareable_mem(sz, mb->buf_va);
-+err_alloc:
-+	kfree(mb);
-+	return NULL;
-+}
-+
-+static void vds_free_msg_buf(struct tipc_virtio_dev *vds,
-+			     struct tipc_msg_buf *mb)
-+{
-+	int ret;
-+
-+	ret = trusty_reclaim_memory(vds->vdev->dev.parent->parent, mb->buf_id,
-+				    &mb->sg, 1);
-+	if (WARN_ON(ret)) {
-+		dev_err(&vds->vdev->dev,
-+			"trusty_revoke_memory failed: %d txbuf %lld\n",
-+			ret, mb->buf_id);
-+
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+	} else {
-+		_free_shareable_mem(mb->buf_sz, mb->buf_va);
-+	}
-+	kfree(mb);
-+}
-+
-+static void vds_free_msg_buf_list(struct tipc_virtio_dev *vds,
-+				  struct list_head *list)
-+{
-+	struct tipc_msg_buf *mb = NULL;
-+
-+	mb = list_first_entry_or_null(list, struct tipc_msg_buf, node);
-+	while (mb) {
-+		list_del(&mb->node);
-+		vds_free_msg_buf(vds, mb);
-+		mb = list_first_entry_or_null(list, struct tipc_msg_buf, node);
-+	}
-+}
-+
-+static inline void mb_reset(struct tipc_msg_buf *mb)
-+{
-+	mb->wpos = 0;
-+	mb->rpos = 0;
-+}
-+
-+static inline void mb_reset_read(struct tipc_msg_buf *mb)
-+{
-+	mb->rpos = 0;
-+}
-+
-+static void _free_vds(struct kref *kref)
-+{
-+	struct tipc_virtio_dev *vds =
-+		container_of(kref, struct tipc_virtio_dev, refcount);
-+	/*
-+	 * If this WARN triggers, we're leaking remote memory references.
-+	 *
-+	 * No need to lock shared_handles_lock. All references to this lock
-+	 * should already be gone by this point, since we are freeing it in this
-+	 * function.
-+	 */
-+	WARN_ON(!RB_EMPTY_ROOT(&vds->shared_handles));
-+	kfree(vds);
-+}
-+
-+static void _free_chan(struct kref *kref)
-+{
-+	struct tipc_chan *ch = container_of(kref, struct tipc_chan, refcount);
-+
-+	if (ch->ops && ch->ops->handle_release)
-+		ch->ops->handle_release(ch->ops_arg);
-+
-+	kref_put(&ch->vds->refcount, _free_vds);
-+	kfree(ch);
-+}
-+
-+static bool _put_txbuf_locked(struct tipc_virtio_dev *vds,
-+			      struct tipc_msg_buf *mb)
-+{
-+	list_add_tail(&mb->node, &vds->free_buf_list);
-+	return vds->free_msg_buf_cnt++ == 0;
-+}
-+
-+static struct tipc_msg_buf *_get_txbuf_locked(struct tipc_virtio_dev *vds)
-+{
-+	struct tipc_msg_buf *mb;
-+
-+	if (vds->state != VDS_ONLINE)
-+		return  ERR_PTR(-ENODEV);
-+
-+	if (vds->free_msg_buf_cnt) {
-+		/* take it out of free list */
-+		mb = list_first_entry(&vds->free_buf_list,
-+				      struct tipc_msg_buf, node);
-+		list_del(&mb->node);
-+		mb->shm_cnt = 0;
-+		vds->free_msg_buf_cnt--;
-+	} else {
-+		if (vds->msg_buf_cnt >= vds->msg_buf_max_cnt)
-+			return ERR_PTR(-EAGAIN);
-+
-+		/* try to allocate it */
-+		mb = vds_alloc_msg_buf(vds, false);
-+		if (!mb)
-+			return ERR_PTR(-ENOMEM);
-+
-+		vds->msg_buf_cnt++;
-+	}
-+	return mb;
-+}
-+
-+static struct tipc_msg_buf *_vds_get_txbuf(struct tipc_virtio_dev *vds)
-+{
-+	struct tipc_msg_buf *mb;
-+
-+	mutex_lock(&vds->lock);
-+	mb = _get_txbuf_locked(vds);
-+	mutex_unlock(&vds->lock);
-+
-+	return mb;
-+}
-+
-+static void vds_put_txbuf(struct tipc_virtio_dev *vds, struct tipc_msg_buf *mb)
-+{
-+	mutex_lock(&vds->lock);
-+	_put_txbuf_locked(vds, mb);
-+	wake_up_interruptible(&vds->sendq);
-+	mutex_unlock(&vds->lock);
-+}
-+
-+static struct tipc_msg_buf *vds_get_txbuf(struct tipc_virtio_dev *vds,
-+					  long timeout)
-+{
-+	struct tipc_msg_buf *mb;
-+
-+	mb = _vds_get_txbuf(vds);
-+
-+	if ((PTR_ERR(mb) == -EAGAIN) && timeout) {
-+		DEFINE_WAIT_FUNC(wait, woken_wake_function);
-+
-+		timeout = msecs_to_jiffies(timeout);
-+		add_wait_queue(&vds->sendq, &wait);
-+		for (;;) {
-+			timeout = wait_woken(&wait, TASK_INTERRUPTIBLE,
-+					     timeout);
-+			if (!timeout) {
-+				mb = ERR_PTR(-ETIMEDOUT);
-+				break;
-+			}
-+
-+			if (signal_pending(current)) {
-+				mb = ERR_PTR(-ERESTARTSYS);
-+				break;
-+			}
-+
-+			mb = _vds_get_txbuf(vds);
-+			if (PTR_ERR(mb) != -EAGAIN)
-+				break;
-+		}
-+		remove_wait_queue(&vds->sendq, &wait);
-+	}
-+
-+	if (IS_ERR(mb))
-+		return mb;
-+
-+	if (WARN_ON(!mb))
-+		return ERR_PTR(-EINVAL);
-+
-+	/* reset and reserve space for message header */
-+	mb_reset(mb);
-+	mb_put_data(mb, sizeof(struct tipc_msg_hdr));
-+
-+	return mb;
-+}
-+
-+static int vds_queue_txbuf(struct tipc_virtio_dev *vds,
-+			   struct tipc_msg_buf *mb)
-+{
-+	int err;
-+	struct scatterlist sg;
-+	bool need_notify = false;
-+
-+	mutex_lock(&vds->lock);
-+	if (vds->state == VDS_ONLINE) {
-+		sg_init_one(&sg, mb, mb->wpos);
-+		err = virtqueue_add_outbuf(vds->txvq, &sg, 1, mb, GFP_KERNEL);
-+		need_notify = virtqueue_kick_prepare(vds->txvq);
-+	} else {
-+		err = -ENODEV;
-+	}
-+	mutex_unlock(&vds->lock);
-+
-+	if (need_notify)
-+		virtqueue_notify(vds->txvq);
-+
-+	return err;
-+}
-+
-+static int vds_add_channel(struct tipc_virtio_dev *vds,
-+			   struct tipc_chan *chan)
-+{
-+	int ret;
-+
-+	mutex_lock(&vds->lock);
-+	if (vds->state == VDS_ONLINE) {
-+		ret = idr_alloc(&vds->addr_idr, chan,
-+				TIPC_MIN_LOCAL_ADDR, TIPC_ANY_ADDR - 1,
-+				GFP_KERNEL);
-+		if (ret > 0) {
-+			chan->local = ret;
-+			kref_get(&chan->refcount);
-+			ret = 0;
-+		}
-+	} else {
-+		ret = -EINVAL;
-+	}
-+	mutex_unlock(&vds->lock);
-+
-+	return ret;
-+}
-+
-+static void vds_del_channel(struct tipc_virtio_dev *vds,
-+			    struct tipc_chan *chan)
-+{
-+	mutex_lock(&vds->lock);
-+	if (chan->local) {
-+		idr_remove(&vds->addr_idr, chan->local);
-+		chan->local = 0;
-+		chan->remote = 0;
-+		kref_put(&chan->refcount, _free_chan);
-+	}
-+	mutex_unlock(&vds->lock);
-+}
-+
-+static struct tipc_chan *vds_lookup_channel(struct tipc_virtio_dev *vds,
-+					    u32 addr)
-+{
-+	int id;
-+	struct tipc_chan *chan = NULL;
-+
-+	mutex_lock(&vds->lock);
-+	if (addr == TIPC_ANY_ADDR) {
-+		id = idr_for_each(&vds->addr_idr, _match_any, NULL);
-+		if (id > 0)
-+			chan = idr_find(&vds->addr_idr, id);
-+	} else {
-+		chan = idr_find(&vds->addr_idr, addr);
-+	}
-+	if (chan)
-+		kref_get(&chan->refcount);
-+	mutex_unlock(&vds->lock);
-+
-+	return chan;
-+}
-+
-+static struct tipc_chan *vds_create_channel(struct tipc_virtio_dev *vds,
-+					    const struct tipc_chan_ops *ops,
-+					    void *ops_arg)
-+{
-+	int ret;
-+	struct tipc_chan *chan = NULL;
-+
-+	if (!vds)
-+		return ERR_PTR(-ENOENT);
-+
-+	if (!ops)
-+		return ERR_PTR(-EINVAL);
-+
-+	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
-+	if (!chan)
-+		return ERR_PTR(-ENOMEM);
-+
-+	kref_get(&vds->refcount);
-+	chan->vds = vds;
-+	chan->ops = ops;
-+	chan->ops_arg = ops_arg;
-+	mutex_init(&chan->lock);
-+	kref_init(&chan->refcount);
-+	chan->state = TIPC_DISCONNECTED;
-+
-+	ret = vds_add_channel(vds, chan);
-+	if (ret) {
-+		kfree(chan);
-+		kref_put(&vds->refcount, _free_vds);
-+		return ERR_PTR(ret);
-+	}
-+
-+	return chan;
-+}
-+
-+static void fill_msg_hdr(struct tipc_msg_buf *mb, u32 src, u32 dst)
-+{
-+	struct tipc_msg_hdr *hdr = mb_get_data(mb, sizeof(*hdr));
-+
-+	hdr->src = src;
-+	hdr->dst = dst;
-+	hdr->len = mb_avail_data(mb);
-+	hdr->flags = 0;
-+	hdr->shm_cnt = mb->shm_cnt;
-+	hdr->reserved = 0;
-+}
-+
-+static int tipc_shared_handle_new(struct tipc_shared_handle **shared_handle,
-+				  struct tipc_virtio_dev *vds)
-+{
-+	struct tipc_shared_handle *out = kzalloc(sizeof(*out), GFP_KERNEL);
-+
-+	if (!out)
-+		return -ENOMEM;
-+
-+	out->vds = vds;
-+	*shared_handle = out;
-+
-+	return 0;
-+}
-+
-+static struct device *tipc_shared_handle_dev(struct tipc_shared_handle
-+					     *shared_handle)
-+{
-+	return shared_handle->vds->vdev->dev.parent->parent;
-+}
-+
-+static bool is_same_memory_region(struct tipc_shared_handle *h1,
-+				  struct tipc_shared_handle *h2)
-+{
-+	return h1->tipc.obj_id == h2->tipc.obj_id &&
-+			h1->tipc.size == h2->tipc.size &&
-+			h1->tipc.tag == h2->tipc.tag &&
-+			h1->dma_buf == h2->dma_buf &&
-+			h1->shared == h2->shared;
-+}
-+
-+static bool dma_buf_owns_shared_mem_id(struct tipc_shared_handle *h)
-+{
-+	/* h->shared is true only if dma_buf did not own an shared memory ID */
-+	return !h->shared;
-+}
-+
-+static void tipc_shared_handle_register(struct tipc_shared_handle
-+					*new_handle)
-+{
-+	struct tipc_virtio_dev *vds = new_handle->vds;
-+	struct rb_node **new;
-+	struct rb_node *parent = NULL;
-+
-+	mutex_lock(&vds->shared_handles_lock);
-+
-+	new = &vds->shared_handles.rb_node;
-+	while (*new) {
-+		struct tipc_shared_handle *handle =
-+			rb_entry(*new, struct tipc_shared_handle, node);
-+		parent = *new;
-+		/*
-+		 * An obj_id can be registered multiple times if it's owned by a
-+		 * dma_buf, because in this case we use the same obj_id across
-+		 * multiple memory transfer operations.
-+		 */
-+		if (handle->tipc.obj_id == new_handle->tipc.obj_id) {
-+			if (dma_buf_owns_shared_mem_id(new_handle)) {
-+				WARN_ON(!is_same_memory_region(handle,
-+							       new_handle));
-+			} else {
-+				WARN(1, "This handle is already registered");
-+				goto already_registered;
-+			}
-+		}
-+
-+		if (handle->tipc.obj_id > new_handle->tipc.obj_id)
-+			new = &((*new)->rb_left);
-+		else
-+			new = &((*new)->rb_right);
-+	}
-+
-+	rb_link_node(&new_handle->node, parent, new);
-+	rb_insert_color(&new_handle->node, &vds->shared_handles);
-+
-+already_registered:
-+	mutex_unlock(&vds->shared_handles_lock);
-+}
-+
-+static struct tipc_shared_handle *tipc_shared_handle_take(struct tipc_virtio_dev
-+							  *vds,
-+							  trusty_shared_mem_id_t
-+							  obj_id)
-+{
-+	struct rb_node *node;
-+	struct tipc_shared_handle *out = NULL;
-+
-+	mutex_lock(&vds->shared_handles_lock);
-+
-+	node = vds->shared_handles.rb_node;
-+	while (node) {
-+		struct tipc_shared_handle *handle =
-+			rb_entry(node, struct tipc_shared_handle, node);
-+		if (obj_id == handle->tipc.obj_id) {
-+			rb_erase(node, &vds->shared_handles);
-+			out = handle;
-+			break;
-+		} else if (obj_id < handle->tipc.obj_id) {
-+			node = node->rb_left;
-+		} else {
-+			node = node->rb_right;
-+		}
-+	}
-+
-+	mutex_unlock(&vds->shared_handles_lock);
-+
-+	return out;
-+}
-+
-+static int tipc_shared_handle_drop(struct tipc_shared_handle *shared_handle)
-+{
-+	int ret;
-+	struct tipc_virtio_dev *vds = shared_handle->vds;
-+	struct device *dev = tipc_shared_handle_dev(shared_handle);
-+
-+	if (shared_handle->shared) {
-+		/*
-+		 * If this warning fires, it means this shared handle was still
-+		 * in the set of active handles. This shouldn't happen (calling
-+		 * code should ensure it is out if the tree) but this serves as
-+		 * an extra check before it is released.
-+		 *
-+		 * However, the take itself should clean this incorrect state up
-+		 * by removing the handle from the tree.
-+		 *
-+		 * This warning is only applicable when registering a handle
-+		 * multiple times is not allowed, i.e. when dma_buf doesn't own
-+		 * the handle.
-+		 */
-+		WARN_ON(tipc_shared_handle_take(vds,
-+						shared_handle->tipc.obj_id));
-+
-+		ret = trusty_reclaim_memory(dev,
-+					    shared_handle->tipc.obj_id,
-+					    shared_handle->sgt->sgl,
-+					    shared_handle->sgt->orig_nents);
-+		if (ret) {
-+			/*
-+			 * We can't safely release this, it may still be in
-+			 * use outside Linux.
-+			 */
-+			dev_warn(dev, "Failed to drop handle, leaking...\n");
-+			return ret;
-+		}
-+	}
-+
-+	if (shared_handle->sgt)
-+		dma_buf_unmap_attachment(shared_handle->attach,
-+					 shared_handle->sgt, DMA_BIDIRECTIONAL);
-+	if (shared_handle->attach)
-+		dma_buf_detach(shared_handle->dma_buf, shared_handle->attach);
-+	if (shared_handle->dma_buf)
-+		dma_buf_put(shared_handle->dma_buf);
-+
-+	kfree(shared_handle);
-+
-+	return 0;
-+}
-+
-+/*****************************************************************************/
-+
-+struct tipc_chan *tipc_create_channel(struct device *dev,
-+				      const struct tipc_chan_ops *ops,
-+				      void *ops_arg)
-+{
-+	struct virtio_device *vd;
-+	struct tipc_chan *chan;
-+	struct tipc_virtio_dev *vds;
-+
-+	mutex_lock(&tipc_devices_lock);
-+	if (dev) {
-+		vd = container_of(dev, struct virtio_device, dev);
-+	} else {
-+		vd = default_vdev;
-+		if (!vd) {
-+			mutex_unlock(&tipc_devices_lock);
-+			return ERR_PTR(-ENOENT);
-+		}
-+	}
-+	vds = vd->priv;
-+	kref_get(&vds->refcount);
-+	mutex_unlock(&tipc_devices_lock);
-+
-+	chan = vds_create_channel(vds, ops, ops_arg);
-+	kref_put(&vds->refcount, _free_vds);
-+	return chan;
-+}
-+EXPORT_SYMBOL(tipc_create_channel);
-+
-+struct tipc_msg_buf *tipc_chan_get_rxbuf(struct tipc_chan *chan)
-+{
-+	return vds_alloc_msg_buf(chan->vds, true);
-+}
-+EXPORT_SYMBOL(tipc_chan_get_rxbuf);
-+
-+void tipc_chan_put_rxbuf(struct tipc_chan *chan, struct tipc_msg_buf *mb)
-+{
-+	vds_free_msg_buf(chan->vds, mb);
-+}
-+EXPORT_SYMBOL(tipc_chan_put_rxbuf);
-+
-+struct tipc_msg_buf *tipc_chan_get_txbuf_timeout(struct tipc_chan *chan,
-+						 long timeout)
-+{
-+	return vds_get_txbuf(chan->vds, timeout);
-+}
-+EXPORT_SYMBOL(tipc_chan_get_txbuf_timeout);
-+
-+void tipc_chan_put_txbuf(struct tipc_chan *chan, struct tipc_msg_buf *mb)
-+{
-+	vds_put_txbuf(chan->vds, mb);
-+}
-+EXPORT_SYMBOL(tipc_chan_put_txbuf);
-+
-+int tipc_chan_queue_msg(struct tipc_chan *chan, struct tipc_msg_buf *mb)
-+{
-+	int err;
-+
-+	mutex_lock(&chan->lock);
-+	switch (chan->state) {
-+	case TIPC_CONNECTED:
-+		fill_msg_hdr(mb, chan->local, chan->remote);
-+		err = vds_queue_txbuf(chan->vds, mb);
-+		if (err) {
-+			/* this should never happen */
-+			dev_err(&chan->vds->vdev->dev,
-+				"%s: failed to queue tx buffer (%d)\n",
-+			       __func__, err);
-+		}
-+		break;
-+	case TIPC_DISCONNECTED:
-+	case TIPC_CONNECTING:
-+		err = -ENOTCONN;
-+		break;
-+	case TIPC_STALE:
-+		err = -ESHUTDOWN;
-+		break;
-+	default:
-+		err = -EBADFD;
-+		dev_err(&chan->vds->vdev->dev,
-+			"%s: unexpected channel state %d\n",
-+			__func__, chan->state);
-+	}
-+	mutex_unlock(&chan->lock);
-+	return err;
-+}
-+EXPORT_SYMBOL(tipc_chan_queue_msg);
-+
-+
-+int tipc_chan_connect(struct tipc_chan *chan, const char *name)
-+{
-+	int err;
-+	struct tipc_ctrl_msg *msg;
-+	struct tipc_conn_req_body *body;
-+	struct tipc_msg_buf *txbuf;
-+
-+	txbuf = vds_get_txbuf(chan->vds, TXBUF_TIMEOUT);
-+	if (IS_ERR(txbuf))
-+		return PTR_ERR(txbuf);
-+
-+	/* reserve space for connection request control message */
-+	msg = mb_put_data(txbuf, sizeof(*msg) + sizeof(*body));
-+	body = (struct tipc_conn_req_body *)msg->body;
-+
-+	/* fill message */
-+	msg->type = TIPC_CTRL_MSGTYPE_CONN_REQ;
-+	msg->body_len  = sizeof(*body);
-+
-+	strncpy(body->name, name, sizeof(body->name));
-+	body->name[sizeof(body->name)-1] = '\0';
-+
-+	mutex_lock(&chan->lock);
-+	switch (chan->state) {
-+	case TIPC_DISCONNECTED:
-+		/* save service name we are connecting to */
-+		strcpy(chan->srv_name, body->name);
-+
-+		fill_msg_hdr(txbuf, chan->local, TIPC_CTRL_ADDR);
-+		err = vds_queue_txbuf(chan->vds, txbuf);
-+		if (err) {
-+			/* this should never happen */
-+			dev_err(&chan->vds->vdev->dev,
-+				"%s: failed to queue tx buffer (%d)\n",
-+				__func__, err);
-+		} else {
-+			chan->state = TIPC_CONNECTING;
-+			txbuf = NULL; /* prevents discarding buffer */
-+		}
-+		break;
-+	case TIPC_CONNECTED:
-+	case TIPC_CONNECTING:
-+		/* check if we are trying to connect to the same service */
-+		if (strcmp(chan->srv_name, body->name) == 0)
-+			err = 0;
-+		else
-+			if (chan->state == TIPC_CONNECTING)
-+				err = -EALREADY; /* in progress */
-+			else
-+				err = -EISCONN;  /* already connected */
-+		break;
-+
-+	case TIPC_STALE:
-+		err = -ESHUTDOWN;
-+		break;
-+	default:
-+		err = -EBADFD;
-+		dev_err(&chan->vds->vdev->dev,
-+			"%s: unexpected channel state %d\n",
-+			__func__, chan->state);
-+		break;
-+	}
-+	mutex_unlock(&chan->lock);
-+
-+	if (txbuf)
-+		tipc_chan_put_txbuf(chan, txbuf); /* discard it */
-+
-+	return err;
-+}
-+EXPORT_SYMBOL(tipc_chan_connect);
-+
-+int tipc_chan_shutdown(struct tipc_chan *chan)
-+{
-+	int err;
-+	struct tipc_ctrl_msg *msg;
-+	struct tipc_disc_req_body *body;
-+	struct tipc_msg_buf *txbuf = NULL;
-+
-+	/* get tx buffer */
-+	txbuf = vds_get_txbuf(chan->vds, TXBUF_TIMEOUT);
-+	if (IS_ERR(txbuf))
-+		return PTR_ERR(txbuf);
-+
-+	mutex_lock(&chan->lock);
-+	if (chan->state == TIPC_CONNECTED || chan->state == TIPC_CONNECTING) {
-+		/* reserve space for disconnect request control message */
-+		msg = mb_put_data(txbuf, sizeof(*msg) + sizeof(*body));
-+		body = (struct tipc_disc_req_body *)msg->body;
-+
-+		msg->type = TIPC_CTRL_MSGTYPE_DISC_REQ;
-+		msg->body_len = sizeof(*body);
-+		body->target = chan->remote;
-+
-+		fill_msg_hdr(txbuf, chan->local, TIPC_CTRL_ADDR);
-+		err = vds_queue_txbuf(chan->vds, txbuf);
-+		if (err) {
-+			/* this should never happen */
-+			dev_err(&chan->vds->vdev->dev,
-+				"%s: failed to queue tx buffer (%d)\n",
-+				__func__, err);
-+		}
-+	} else {
-+		err = -ENOTCONN;
-+	}
-+	chan->state = TIPC_STALE;
-+	mutex_unlock(&chan->lock);
-+
-+	if (err) {
-+		/* release buffer */
-+		tipc_chan_put_txbuf(chan, txbuf);
-+	}
-+
-+	return err;
-+}
-+EXPORT_SYMBOL(tipc_chan_shutdown);
-+
-+void tipc_chan_destroy(struct tipc_chan *chan)
-+{
-+	vds_del_channel(chan->vds, chan);
-+	kref_put(&chan->refcount, _free_chan);
-+}
-+EXPORT_SYMBOL(tipc_chan_destroy);
-+
-+/***************************************************************************/
-+
-+struct tipc_dn_chan {
-+	int state;
-+	struct mutex lock; /* protects rx_msg_queue list and channel state */
-+	struct tipc_chan *chan;
-+	wait_queue_head_t readq;
-+	struct completion reply_comp;
-+	struct list_head rx_msg_queue;
-+};
-+
-+static int dn_wait_for_reply(struct tipc_dn_chan *dn, int timeout)
-+{
-+	int ret;
-+
-+	ret = wait_for_completion_interruptible_timeout(&dn->reply_comp,
-+					msecs_to_jiffies(timeout));
-+	if (ret < 0)
-+		return ret;
-+
-+	mutex_lock(&dn->lock);
-+	if (!ret) {
-+		/* no reply from remote */
-+		dn->state = TIPC_STALE;
-+		ret = -ETIMEDOUT;
-+	} else {
-+		/* got reply */
-+		if (dn->state == TIPC_CONNECTED)
-+			ret = 0;
-+		else if (dn->state == TIPC_DISCONNECTED)
-+			if (!list_empty(&dn->rx_msg_queue))
-+				ret = 0;
-+			else
-+				ret = -ENOTCONN;
-+		else
-+			ret = -EIO;
-+	}
-+	mutex_unlock(&dn->lock);
-+
-+	return ret;
-+}
-+
-+static struct tipc_msg_buf *dn_handle_msg(void *data,
-+					  struct tipc_msg_buf *rxbuf)
-+{
-+	struct tipc_dn_chan *dn = data;
-+	struct tipc_msg_buf *newbuf = rxbuf;
-+
-+	mutex_lock(&dn->lock);
-+	if (dn->state == TIPC_CONNECTED) {
-+		/* get new buffer */
-+		newbuf = tipc_chan_get_rxbuf(dn->chan);
-+		if (newbuf) {
-+			/* queue an old buffer and return a new one */
-+			list_add_tail(&rxbuf->node, &dn->rx_msg_queue);
-+			wake_up_interruptible(&dn->readq);
-+		} else {
-+			/*
-+			 * return an old buffer effectively discarding
-+			 * incoming message
-+			 */
-+			dev_err(&dn->chan->vds->vdev->dev,
-+				"%s: discard incoming message\n", __func__);
-+			newbuf = rxbuf;
-+		}
-+	}
-+	mutex_unlock(&dn->lock);
-+
-+	return newbuf;
-+}
-+
-+static void dn_connected(struct tipc_dn_chan *dn)
-+{
-+	mutex_lock(&dn->lock);
-+	dn->state = TIPC_CONNECTED;
-+
-+	/* complete all pending  */
-+	complete(&dn->reply_comp);
-+
-+	mutex_unlock(&dn->lock);
-+}
-+
-+static void dn_disconnected(struct tipc_dn_chan *dn)
-+{
-+	mutex_lock(&dn->lock);
-+	dn->state = TIPC_DISCONNECTED;
-+
-+	/* complete all pending  */
-+	complete(&dn->reply_comp);
-+
-+	/* wakeup all readers */
-+	wake_up_interruptible_all(&dn->readq);
-+
-+	mutex_unlock(&dn->lock);
-+}
-+
-+static void dn_shutdown(struct tipc_dn_chan *dn)
-+{
-+	mutex_lock(&dn->lock);
-+
-+	/* set state to STALE */
-+	dn->state = TIPC_STALE;
-+
-+	/* complete all pending  */
-+	complete(&dn->reply_comp);
-+
-+	/* wakeup all readers */
-+	wake_up_interruptible_all(&dn->readq);
-+
-+	mutex_unlock(&dn->lock);
-+}
-+
-+static void dn_handle_event(void *data, int event)
-+{
-+	struct tipc_dn_chan *dn = data;
-+
-+	switch (event) {
-+	case TIPC_CHANNEL_SHUTDOWN:
-+		dn_shutdown(dn);
-+		break;
-+
-+	case TIPC_CHANNEL_DISCONNECTED:
-+		dn_disconnected(dn);
-+		break;
-+
-+	case TIPC_CHANNEL_CONNECTED:
-+		dn_connected(dn);
-+		break;
-+
-+	default:
-+		dev_err(&dn->chan->vds->vdev->dev,
-+			"%s: unhandled event %d\n", __func__, event);
-+		break;
-+	}
-+}
-+
-+static void dn_handle_release(void *data)
-+{
-+	kfree(data);
-+}
-+
-+static const struct tipc_chan_ops _dn_ops = {
-+	.handle_msg = dn_handle_msg,
-+	.handle_event = dn_handle_event,
-+	.handle_release = dn_handle_release,
-+};
-+
-+#define cdev_to_cdn(c) container_of((c), struct tipc_cdev_node, cdev)
-+#define cdn_to_vds(cdn) container_of((cdn), struct tipc_virtio_dev, cdev_node)
-+
-+static struct tipc_virtio_dev *_dn_lookup_vds(struct tipc_cdev_node *cdn)
-+{
-+	int ret;
-+	struct tipc_virtio_dev *vds = NULL;
-+
-+	mutex_lock(&tipc_devices_lock);
-+	ret = idr_for_each(&tipc_devices, _match_data, cdn);
-+	if (ret) {
-+		vds = cdn_to_vds(cdn);
-+		kref_get(&vds->refcount);
-+	}
-+	mutex_unlock(&tipc_devices_lock);
-+	return vds;
-+}
-+
-+static int tipc_open(struct inode *inode, struct file *filp)
-+{
-+	int ret;
-+	struct tipc_virtio_dev *vds;
-+	struct tipc_dn_chan *dn;
-+	struct tipc_cdev_node *cdn = cdev_to_cdn(inode->i_cdev);
-+
-+	vds = _dn_lookup_vds(cdn);
-+	if (!vds) {
-+		ret = -ENOENT;
-+		goto err_vds_lookup;
-+	}
-+
-+	dn = kzalloc(sizeof(*dn), GFP_KERNEL);
-+	if (!dn) {
-+		ret = -ENOMEM;
-+		goto err_alloc_chan;
-+	}
-+
-+	mutex_init(&dn->lock);
-+	init_waitqueue_head(&dn->readq);
-+	init_completion(&dn->reply_comp);
-+	INIT_LIST_HEAD(&dn->rx_msg_queue);
-+
-+	dn->state = TIPC_DISCONNECTED;
-+
-+	dn->chan = vds_create_channel(vds, &_dn_ops, dn);
-+	if (IS_ERR(dn->chan)) {
-+		ret = PTR_ERR(dn->chan);
-+		goto err_create_chan;
-+	}
-+
-+	filp->private_data = dn;
-+	kref_put(&vds->refcount, _free_vds);
-+	return 0;
-+
-+err_create_chan:
-+	kfree(dn);
-+err_alloc_chan:
-+	kref_put(&vds->refcount, _free_vds);
-+err_vds_lookup:
-+	return ret;
-+}
-+
-+
-+static int dn_connect_ioctl(struct tipc_dn_chan *dn, char __user *usr_name)
-+{
-+	int ret;
-+	char name[MAX_SRV_NAME_LEN];
-+
-+	/* copy in service name from user space */
-+	ret = strncpy_from_user(name, usr_name, sizeof(name));
-+	if (ret < 0)
-+		return ret;
-+	if (ret == sizeof(name))
-+		return -ENAMETOOLONG;
-+
-+	/* send connect request */
-+	ret = tipc_chan_connect(dn->chan, name);
-+	if (ret)
-+		return ret;
-+
-+	/* and wait for reply */
-+	return dn_wait_for_reply(dn, REPLY_TIMEOUT);
-+}
-+
-+static int dn_share_fd(struct tipc_dn_chan *dn, int fd,
-+		       enum transfer_kind transfer_kind,
-+		       struct tipc_shared_handle **out)
-+{
-+	int ret = 0;
-+	struct tipc_shared_handle *shared_handle = NULL;
-+	struct file *file = NULL;
-+	struct device *dev = &dn->chan->vds->vdev->dev;
-+	bool writable = false;
-+	pgprot_t prot;
-+	u64 tag = 0;
-+	trusty_shared_mem_id_t mem_id;
-+	bool lend;
-+
-+	if (dn->state != TIPC_CONNECTED) {
-+		dev_dbg(dev, "Tried to share fd while not connected\n");
-+		return -ENOTCONN;
-+	}
-+
-+	file = fget(fd);
-+	if (!file) {
-+		dev_dbg(dev, "Invalid fd (%d)\n", fd);
-+		return -EBADF;
-+	}
-+
-+	if (!(file->f_mode & FMODE_READ)) {
-+		dev_dbg(dev, "Cannot create write-only mapping\n");
-+		fput(file);
-+		return -EACCES;
-+	}
-+
-+	writable = file->f_mode & FMODE_WRITE;
-+	prot = writable ? PAGE_KERNEL : PAGE_KERNEL_RO;
-+	fput(file);
-+	file = NULL;
-+
-+	ret = tipc_shared_handle_new(&shared_handle, dn->chan->vds);
-+	if (ret)
-+		return ret;
-+
-+	shared_handle->dma_buf = dma_buf_get(fd);
-+	if (IS_ERR(shared_handle->dma_buf)) {
-+		ret = PTR_ERR(shared_handle->dma_buf);
-+		shared_handle->dma_buf = NULL;
-+		dev_dbg(dev, "Unable to get dma buf from fd (%d)\n", ret);
-+		goto cleanup_handle;
-+	}
-+
-+	tag = trusty_dma_buf_get_ffa_tag(shared_handle->dma_buf);
-+	ret = trusty_dma_buf_get_shared_mem_id(shared_handle->dma_buf, &mem_id);
-+	/*
-+	 * Buffers with a preallocated mem_id should only be sent to Trusty
-+	 * using TRUSTY_SEND_SECURE. And conversely, TRUSTY_SEND_SECURE should
-+	 * only be used to send buffers with preallcoated mem_id.
-+	 */
-+	if (!ret) {
-+		/* Use shared memory ID owned by dma_buf */
-+		/* TODO: Enforce transfer_kind == TRUSTY_SEND_SECURE */
-+		WARN_ONCE(transfer_kind != TRUSTY_SEND_SECURE,
-+			  "Use TRUSTY_SEND_SECURE instead");
-+		goto mem_id_allocated;
-+	}
-+
-+	if (ret != -ENODATA) {
-+		dev_err(dev, "dma_buf can't be transferred (%d)\n", ret);
-+		goto cleanup_handle;
-+	}
-+
-+	if (transfer_kind == TRUSTY_SEND_SECURE) {
-+		dev_err(dev, "No mem ID for TRUSTY_SEND_SECURE\n");
-+		goto cleanup_handle;
-+	}
-+	lend = (transfer_kind == TRUSTY_LEND);
-+
-+	shared_handle->attach = dma_buf_attach(shared_handle->dma_buf, dev);
-+	if (IS_ERR(shared_handle->attach)) {
-+		ret = PTR_ERR(shared_handle->attach);
-+		shared_handle->attach = NULL;
-+		dev_dbg(dev, "Unable to attach to dma_buf (%d)\n", ret);
-+		goto cleanup_handle;
-+	}
-+
-+	shared_handle->sgt = dma_buf_map_attachment(shared_handle->attach,
-+						    DMA_BIDIRECTIONAL);
-+	if (IS_ERR(shared_handle->sgt)) {
-+		ret = PTR_ERR(shared_handle->sgt);
-+		shared_handle->sgt = NULL;
-+		dev_dbg(dev, "Failed to match attachment (%d)\n", ret);
-+		goto cleanup_handle;
-+	}
-+
-+	ret = trusty_transfer_memory(tipc_shared_handle_dev(shared_handle),
-+				     &mem_id, shared_handle->sgt->sgl,
-+				     shared_handle->sgt->orig_nents, prot, tag,
-+				     lend);
-+
-+	if (ret < 0) {
-+		dev_dbg(dev, "Transferring memory failed: %d\n", ret);
-+		/*
-+		 * The handle now has a sgt containing the pages, so we no
-+		 * longer need to clean up the pages directly.
-+		 */
-+		goto cleanup_handle;
-+	}
-+	shared_handle->shared = true;
-+
-+mem_id_allocated:
-+	shared_handle->tipc.obj_id = mem_id;
-+	shared_handle->tipc.size = shared_handle->dma_buf->size;
-+	shared_handle->tipc.tag = tag;
-+	*out = shared_handle;
-+	return 0;
-+
-+cleanup_handle:
-+	tipc_shared_handle_drop(shared_handle);
-+	return ret;
-+}
-+
-+static ssize_t txbuf_write_iter(struct tipc_msg_buf *txbuf,
-+				struct iov_iter *iter)
-+{
-+	size_t len;
-+	/* message length */
-+	len = iov_iter_count(iter);
-+
-+	/* check available space */
-+	if (len > mb_avail_space(txbuf))
-+		return -EMSGSIZE;
-+
-+	/* copy in message data */
-+	if (copy_from_iter(mb_put_data(txbuf, len), len, iter) != len)
-+		return -EFAULT;
-+
-+	return len;
-+}
-+
-+static ssize_t txbuf_write_handles(struct tipc_msg_buf *txbuf,
-+				   struct tipc_shared_handle **shm_handles,
-+				   size_t shm_cnt)
-+{
-+	size_t idx;
-+
-+	/* message length */
-+	size_t len = shm_cnt * sizeof(struct tipc_shm);
-+
-+	/* check available space */
-+	if (len > mb_avail_space(txbuf))
-+		return -EMSGSIZE;
-+
-+	/* copy over handles */
-+	for (idx = 0; idx < shm_cnt; idx++) {
-+		memcpy(mb_put_data(txbuf, sizeof(struct tipc_shm)),
-+		       &shm_handles[idx]->tipc,
-+		       sizeof(struct tipc_shm));
-+	}
-+
-+	txbuf->shm_cnt += shm_cnt;
-+
-+	return len;
-+}
-+
-+static long filp_send_ioctl(struct file *filp,
-+			    const struct tipc_send_msg_req __user *arg)
-+{
-+	struct tipc_send_msg_req req;
-+	struct iovec fast_iovs[UIO_FASTIOV];
-+	struct iovec *iov = fast_iovs;
-+	struct iov_iter iter;
-+	struct trusty_shm *shm = NULL;
-+	struct tipc_shared_handle **shm_handles = NULL;
-+	int shm_idx = 0;
-+	int release_idx;
-+	struct tipc_dn_chan *dn = filp->private_data;
-+	struct tipc_virtio_dev *vds = dn->chan->vds;
-+	struct device *dev = &vds->vdev->dev;
-+	long timeout = TXBUF_TIMEOUT;
-+	struct tipc_msg_buf *txbuf = NULL;
-+	long ret = 0;
-+	ssize_t data_len = 0;
-+	ssize_t shm_len = 0;
-+
-+	if (copy_from_user(&req, arg, sizeof(req)))
-+		return -EFAULT;
-+
-+	if (req.shm_cnt > U16_MAX)
-+		return -E2BIG;
-+
-+	shm = kmalloc_array(req.shm_cnt, sizeof(*shm), GFP_KERNEL);
-+	if (!shm)
-+		return -ENOMEM;
-+
-+	shm_handles = kmalloc_array(req.shm_cnt, sizeof(*shm_handles),
-+				    GFP_KERNEL);
-+	if (!shm_handles) {
-+		ret = -ENOMEM;
-+		goto shm_handles_alloc_failed;
-+	}
-+
-+	if (copy_from_user(shm, u64_to_user_ptr(req.shm),
-+			   req.shm_cnt * sizeof(struct trusty_shm))) {
-+		ret = -EFAULT;
-+		goto load_shm_args_failed;
-+	}
-+
-+	ret = import_iovec(READ, u64_to_user_ptr(req.iov), req.iov_cnt,
-+			   ARRAY_SIZE(fast_iovs), &iov, &iter);
-+	if (ret < 0) {
-+		dev_dbg(dev, "Failed to import iovec\n");
-+		goto iov_import_failed;
-+	}
-+
-+	for (shm_idx = 0; shm_idx < req.shm_cnt; shm_idx++) {
-+		switch (shm[shm_idx].transfer) {
-+		case TRUSTY_SHARE:
-+		case TRUSTY_LEND:
-+		case TRUSTY_SEND_SECURE:
-+			break;
-+		default:
-+			dev_err(dev, "Unknown transfer type: 0x%x\n",
-+				shm[shm_idx].transfer);
-+			goto shm_share_failed;
-+		}
-+		ret = dn_share_fd(dn, shm[shm_idx].fd, shm[shm_idx].transfer,
-+				  &shm_handles[shm_idx]);
-+		if (ret) {
-+			dev_dbg(dev, "Forwarding memory failed\n"
-+				);
-+			goto shm_share_failed;
-+		}
-+	}
-+
-+	if (filp->f_flags & O_NONBLOCK)
-+		timeout = 0;
-+
-+	txbuf = tipc_chan_get_txbuf_timeout(dn->chan, timeout);
-+	if (IS_ERR(txbuf)) {
-+		dev_dbg(dev, "Failed to get txbuffer\n");
-+		ret = PTR_ERR(txbuf);
-+		goto get_txbuf_failed;
-+	}
-+
-+	data_len = txbuf_write_iter(txbuf, &iter);
-+	if (data_len < 0) {
-+		ret = data_len;
-+		goto txbuf_write_failed;
-+	}
-+
-+	shm_len = txbuf_write_handles(txbuf, shm_handles, req.shm_cnt);
-+	if (shm_len < 0) {
-+		ret = shm_len;
-+		goto txbuf_write_failed;
-+	}
-+
-+	/*
-+	 * These need to be aded to the index before queueing the message.
-+	 * As soon as the message is sent, we may receive a message back from
-+	 * Trusty saying it's no longer in use, and the shared_handle needs
-+	 * to be there when that happens.
-+	 */
-+	for (shm_idx = 0; shm_idx < req.shm_cnt; shm_idx++)
-+		tipc_shared_handle_register(shm_handles[shm_idx]);
-+
-+	ret = tipc_chan_queue_msg(dn->chan, txbuf);
-+
-+	if (ret)
-+		goto queue_failed;
-+
-+	ret = data_len;
-+
-+common_cleanup:
-+	kfree(iov);
-+iov_import_failed:
-+load_shm_args_failed:
-+	kfree(shm_handles);
-+shm_handles_alloc_failed:
-+	kfree(shm);
-+	return ret;
-+
-+queue_failed:
-+	for (release_idx = 0; release_idx < req.shm_cnt; release_idx++)
-+		tipc_shared_handle_take(vds,
-+					shm_handles[release_idx]->tipc.obj_id);
-+txbuf_write_failed:
-+	tipc_chan_put_txbuf(dn->chan, txbuf);
-+get_txbuf_failed:
-+shm_share_failed:
-+	for (shm_idx--; shm_idx >= 0; shm_idx--)
-+		tipc_shared_handle_drop(shm_handles[shm_idx]);
-+	goto common_cleanup;
-+}
-+
-+static long tipc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-+{
-+	struct tipc_dn_chan *dn = filp->private_data;
-+
-+	switch (cmd) {
-+	case TIPC_IOC_CONNECT:
-+		return dn_connect_ioctl(dn, (char __user *)arg);
-+	case TIPC_IOC_SEND_MSG:
-+		return filp_send_ioctl(filp,
-+				       (const struct tipc_send_msg_req __user *)
-+				       arg);
-+	default:
-+		dev_dbg(&dn->chan->vds->vdev->dev,
-+			"Unhandled ioctl cmd: 0x%x\n", cmd);
-+		return -ENOTTY;
-+	}
-+}
-+
-+#ifdef CONFIG_COMPAT
-+static long tipc_compat_ioctl(struct file *filp,
-+			      unsigned int cmd, unsigned long arg)
-+{
-+	struct tipc_dn_chan *dn = filp->private_data;
-+
-+	switch (cmd) {
-+	case TIPC_IOC32_CONNECT:
-+		cmd = TIPC_IOC_CONNECT;
-+		break;
-+	default:
-+		dev_dbg(&dn->chan->vds->vdev->dev,
-+			"Unhandled compat ioctl command: 0x%x\n", cmd);
-+		return -ENOTTY;
-+	}
-+	return tipc_ioctl(filp, cmd, (unsigned long)compat_ptr(arg));
-+}
-+#endif
-+
-+static inline bool _got_rx(struct tipc_dn_chan *dn)
-+{
-+	if (dn->state != TIPC_CONNECTED)
-+		return true;
-+
-+	if (!list_empty(&dn->rx_msg_queue))
-+		return true;
-+
-+	return false;
-+}
-+
-+static ssize_t tipc_read_iter(struct kiocb *iocb, struct iov_iter *iter)
-+{
-+	ssize_t ret;
-+	size_t len;
-+	struct tipc_msg_buf *mb;
-+	struct file *filp = iocb->ki_filp;
-+	struct tipc_dn_chan *dn = filp->private_data;
-+
-+	mutex_lock(&dn->lock);
-+
-+	while (list_empty(&dn->rx_msg_queue)) {
-+		if (dn->state != TIPC_CONNECTED) {
-+			if (dn->state == TIPC_CONNECTING)
-+				ret = -ENOTCONN;
-+			else if (dn->state == TIPC_DISCONNECTED)
-+				ret = -ENOTCONN;
-+			else if (dn->state == TIPC_STALE)
-+				ret = -ESHUTDOWN;
-+			else
-+				ret = -EBADFD;
-+			goto out;
-+		}
-+
-+		mutex_unlock(&dn->lock);
-+
-+		if (filp->f_flags & O_NONBLOCK)
-+			return -EAGAIN;
-+
-+		if (wait_event_interruptible(dn->readq, _got_rx(dn)))
-+			return -ERESTARTSYS;
-+
-+		mutex_lock(&dn->lock);
-+	}
-+
-+	mb = list_first_entry(&dn->rx_msg_queue, struct tipc_msg_buf, node);
-+
-+	len = mb_avail_data(mb);
-+	if (len > iov_iter_count(iter)) {
-+		ret = -EMSGSIZE;
-+		goto out;
-+	}
-+
-+	if (copy_to_iter(mb_get_data(mb, len), len, iter) != len) {
-+		ret = -EFAULT;
-+		goto out;
-+	}
-+
-+	ret = len;
-+	list_del(&mb->node);
-+	tipc_chan_put_rxbuf(dn->chan, mb);
-+
-+out:
-+	mutex_unlock(&dn->lock);
-+	return ret;
-+}
-+
-+static ssize_t tipc_write_iter(struct kiocb *iocb, struct iov_iter *iter)
-+{
-+	struct file *filp = iocb->ki_filp;
-+	struct tipc_dn_chan *dn = filp->private_data;
-+	long timeout = TXBUF_TIMEOUT;
-+	struct tipc_msg_buf *txbuf = NULL;
-+	ssize_t ret = 0;
-+	ssize_t len = 0;
-+
-+	if (filp->f_flags & O_NONBLOCK)
-+		timeout = 0;
-+
-+	txbuf = tipc_chan_get_txbuf_timeout(dn->chan, timeout);
-+
-+	if (IS_ERR(txbuf))
-+		return PTR_ERR(txbuf);
-+
-+	len = txbuf_write_iter(txbuf, iter);
-+	if (len < 0)
-+		goto err_out;
-+
-+	/* queue message */
-+	ret = tipc_chan_queue_msg(dn->chan, txbuf);
-+	if (ret)
-+		goto err_out;
-+
-+	return len;
-+
-+err_out:
-+	tipc_chan_put_txbuf(dn->chan, txbuf);
-+	return ret;
-+}
-+
-+static __poll_t tipc_poll(struct file *filp, poll_table *wait)
-+{
-+	__poll_t mask = 0;
-+	struct tipc_dn_chan *dn = filp->private_data;
-+
-+	mutex_lock(&dn->lock);
-+
-+	poll_wait(filp, &dn->readq, wait);
-+
-+	/* Writes always succeed for now */
-+	mask |= EPOLLOUT | EPOLLWRNORM;
-+
-+	if (!list_empty(&dn->rx_msg_queue))
-+		mask |= EPOLLIN | EPOLLRDNORM;
-+
-+	if (dn->state != TIPC_CONNECTED)
-+		mask |= EPOLLERR;
-+
-+	mutex_unlock(&dn->lock);
-+	return mask;
-+}
-+
-+
-+static int tipc_release(struct inode *inode, struct file *filp)
-+{
-+	struct tipc_dn_chan *dn = filp->private_data;
-+
-+	dn_shutdown(dn);
-+
-+	/* free all pending buffers */
-+	vds_free_msg_buf_list(dn->chan->vds, &dn->rx_msg_queue);
-+
-+	/* shutdown channel  */
-+	tipc_chan_shutdown(dn->chan);
-+
-+	/* and destroy it */
-+	tipc_chan_destroy(dn->chan);
-+
-+	return 0;
-+}
-+
-+static const struct file_operations tipc_fops = {
-+	.open		= tipc_open,
-+	.release	= tipc_release,
-+	.unlocked_ioctl	= tipc_ioctl,
-+#ifdef CONFIG_COMPAT
-+	.compat_ioctl	= tipc_compat_ioctl,
-+#endif
-+	.read_iter	= tipc_read_iter,
-+	.write_iter	= tipc_write_iter,
-+	.poll		= tipc_poll,
-+	.owner		= THIS_MODULE,
-+};
-+
-+/*****************************************************************************/
-+
-+static void chan_trigger_event(struct tipc_chan *chan, int event)
-+{
-+	if (!event)
-+		return;
-+
-+	chan->ops->handle_event(chan->ops_arg, event);
-+}
-+
-+static void _cleanup_vq(struct tipc_virtio_dev *vds, struct virtqueue *vq)
-+{
-+	struct tipc_msg_buf *mb;
-+
-+	while ((mb = virtqueue_detach_unused_buf(vq)) != NULL)
-+		vds_free_msg_buf(vds, mb);
-+}
-+
-+static int _create_cdev_node(struct device *parent,
-+			     struct tipc_cdev_node *cdn,
-+			     const char *name)
-+{
-+	int ret;
-+	dev_t devt;
-+
-+	if (!name) {
-+		dev_dbg(parent, "%s: cdev name has to be provided\n",
-+			__func__);
-+		return -EINVAL;
-+	}
-+
-+	/* allocate minor */
-+	ret = idr_alloc(&tipc_devices, cdn, 0, MAX_DEVICES, GFP_KERNEL);
-+	if (ret < 0) {
-+		dev_dbg(parent, "%s: failed (%d) to get id\n",
-+			__func__, ret);
-+		return ret;
-+	}
-+
-+	cdn->minor = ret;
-+	cdev_init(&cdn->cdev, &tipc_fops);
-+	cdn->cdev.owner = THIS_MODULE;
-+
-+	/* Add character device */
-+	devt = MKDEV(tipc_major, cdn->minor);
-+	ret = cdev_add(&cdn->cdev, devt, 1);
-+	if (ret) {
-+		dev_dbg(parent, "%s: cdev_add failed (%d)\n",
-+			__func__, ret);
-+		goto err_add_cdev;
-+	}
-+
-+	/* Create a device node */
-+	cdn->dev = device_create(tipc_class, parent,
-+				 devt, NULL, "trusty-ipc-%s", name);
-+	if (IS_ERR(cdn->dev)) {
-+		ret = PTR_ERR(cdn->dev);
-+		dev_dbg(parent, "%s: device_create failed: %d\n",
-+			__func__, ret);
-+		goto err_device_create;
-+	}
-+
-+	return 0;
-+
-+err_device_create:
-+	cdn->dev = NULL;
-+	cdev_del(&cdn->cdev);
-+err_add_cdev:
-+	idr_remove(&tipc_devices, cdn->minor);
-+	return ret;
-+}
-+
-+static void create_cdev_node(struct tipc_virtio_dev *vds,
-+			     struct tipc_cdev_node *cdn)
-+{
-+	int err;
-+
-+	mutex_lock(&tipc_devices_lock);
-+
-+	if (!default_vdev) {
-+		kref_get(&vds->refcount);
-+		default_vdev = vds->vdev;
-+	}
-+
-+	if (vds->cdev_name[0] && !cdn->dev) {
-+		kref_get(&vds->refcount);
-+		err = _create_cdev_node(&vds->vdev->dev, cdn, vds->cdev_name);
-+		if (err) {
-+			dev_err(&vds->vdev->dev,
-+				"failed (%d) to create cdev node\n", err);
-+			kref_put(&vds->refcount, _free_vds);
-+		}
-+	}
-+	mutex_unlock(&tipc_devices_lock);
-+}
-+
-+static void destroy_cdev_node(struct tipc_virtio_dev *vds,
-+			      struct tipc_cdev_node *cdn)
-+{
-+	mutex_lock(&tipc_devices_lock);
-+	if (cdn->dev) {
-+		device_destroy(tipc_class, MKDEV(tipc_major, cdn->minor));
-+		cdev_del(&cdn->cdev);
-+		idr_remove(&tipc_devices, cdn->minor);
-+		cdn->dev = NULL;
-+		kref_put(&vds->refcount, _free_vds);
-+	}
-+
-+	if (default_vdev == vds->vdev) {
-+		default_vdev = NULL;
-+		kref_put(&vds->refcount, _free_vds);
-+	}
-+
-+	mutex_unlock(&tipc_devices_lock);
-+}
-+
-+static void _go_online(struct tipc_virtio_dev *vds)
-+{
-+	mutex_lock(&vds->lock);
-+	if (vds->state == VDS_OFFLINE)
-+		vds->state = VDS_ONLINE;
-+	mutex_unlock(&vds->lock);
-+
-+	create_cdev_node(vds, &vds->cdev_node);
-+
-+	dev_info(&vds->vdev->dev, "is online\n");
-+}
-+
-+static void _go_offline(struct tipc_virtio_dev *vds)
-+{
-+	struct tipc_chan *chan;
-+
-+	/* change state to OFFLINE */
-+	mutex_lock(&vds->lock);
-+	if (vds->state != VDS_ONLINE) {
-+		mutex_unlock(&vds->lock);
-+		return;
-+	}
-+	vds->state = VDS_OFFLINE;
-+	mutex_unlock(&vds->lock);
-+
-+	/* wakeup all waiters */
-+	wake_up_interruptible_all(&vds->sendq);
-+
-+	/* shutdown all channels */
-+	while ((chan = vds_lookup_channel(vds, TIPC_ANY_ADDR))) {
-+		mutex_lock(&chan->lock);
-+		chan->state = TIPC_STALE;
-+		chan->remote = 0;
-+		chan_trigger_event(chan, TIPC_CHANNEL_SHUTDOWN);
-+		mutex_unlock(&chan->lock);
-+		kref_put(&chan->refcount, _free_chan);
-+	}
-+
-+	/* shutdown device node */
-+	destroy_cdev_node(vds, &vds->cdev_node);
-+
-+	dev_info(&vds->vdev->dev, "is offline\n");
-+}
-+
-+static void _handle_conn_rsp(struct tipc_virtio_dev *vds,
-+			     struct tipc_conn_rsp_body *rsp, size_t len)
-+{
-+	struct tipc_chan *chan;
-+
-+	if (sizeof(*rsp) != len) {
-+		dev_err(&vds->vdev->dev, "%s: Invalid response length %zd\n",
-+			__func__, len);
-+		return;
-+	}
-+
-+	dev_dbg(&vds->vdev->dev,
-+		"%s: connection response: for addr 0x%x: status %d remote addr 0x%x\n",
-+		__func__, rsp->target, rsp->status, rsp->remote);
-+
-+	/* Lookup channel */
-+	chan = vds_lookup_channel(vds, rsp->target);
-+	if (chan) {
-+		mutex_lock(&chan->lock);
-+		if (chan->state == TIPC_CONNECTING) {
-+			if (!rsp->status) {
-+				chan->state = TIPC_CONNECTED;
-+				chan->remote = rsp->remote;
-+				chan->max_msg_cnt = rsp->max_msg_cnt;
-+				chan->max_msg_size = rsp->max_msg_size;
-+				chan_trigger_event(chan,
-+						   TIPC_CHANNEL_CONNECTED);
-+			} else {
-+				chan->state = TIPC_DISCONNECTED;
-+				chan->remote = 0;
-+				chan_trigger_event(chan,
-+						   TIPC_CHANNEL_DISCONNECTED);
-+			}
-+		}
-+		mutex_unlock(&chan->lock);
-+		kref_put(&chan->refcount, _free_chan);
-+	}
-+}
-+
-+static void _handle_disc_req(struct tipc_virtio_dev *vds,
-+			     struct tipc_disc_req_body *req, size_t len)
-+{
-+	struct tipc_chan *chan;
-+
-+	if (sizeof(*req) != len) {
-+		dev_err(&vds->vdev->dev, "%s: Invalid request length %zd\n",
-+			__func__, len);
-+		return;
-+	}
-+
-+	dev_dbg(&vds->vdev->dev, "%s: disconnect request: for addr 0x%x\n",
-+		__func__, req->target);
-+
-+	chan = vds_lookup_channel(vds, req->target);
-+	if (chan) {
-+		mutex_lock(&chan->lock);
-+		if (chan->state == TIPC_CONNECTED ||
-+			chan->state == TIPC_CONNECTING) {
-+			chan->state = TIPC_DISCONNECTED;
-+			chan->remote = 0;
-+			chan_trigger_event(chan, TIPC_CHANNEL_DISCONNECTED);
-+		}
-+		mutex_unlock(&chan->lock);
-+		kref_put(&chan->refcount, _free_chan);
-+	}
-+}
-+
-+static void _handle_release(struct tipc_virtio_dev *vds,
-+			    struct tipc_release_body *req, size_t len)
-+{
-+	struct tipc_shared_handle *handle = NULL;
-+	struct device *dev = &vds->vdev->dev;
-+	int ret = 0;
-+
-+	if (len < sizeof(*req)) {
-+		dev_err(dev, "Received undersized release control message\n");
-+		return;
-+	}
-+
-+	handle = tipc_shared_handle_take(vds, req->id);
-+	if (!handle) {
-+		dev_err(dev,
-+			"Received release control message for untracked handle: 0x%llx\n",
-+			req->id);
-+		return;
-+	}
-+
-+	ret = tipc_shared_handle_drop(handle);
-+
-+	if (ret) {
-+		dev_err(dev,
-+			"Failed to release handle 0x%llx upon request: (%d)\n",
-+			req->id, ret);
-+		/*
-+		 * Put the handle back in case we got a spurious release now and
-+		 * get a real one later. This path should not happen, we're
-+		 * just trying to be robust.
-+		 */
-+		tipc_shared_handle_register(handle);
-+	}
-+}
-+
-+static void _handle_ctrl_msg(struct tipc_virtio_dev *vds,
-+			     void *data, int len, u32 src)
-+{
-+	struct tipc_ctrl_msg *msg = data;
-+
-+	if ((len < sizeof(*msg)) || (sizeof(*msg) + msg->body_len != len)) {
-+		dev_err(&vds->vdev->dev,
-+			"%s: Invalid message length ( %d vs. %d)\n",
-+			__func__, (int)(sizeof(*msg) + msg->body_len), len);
-+		return;
-+	}
-+
-+	dev_dbg(&vds->vdev->dev,
-+		"%s: Incoming ctrl message: src 0x%x type %d len %d\n",
-+		__func__, src, msg->type, msg->body_len);
-+
-+	switch (msg->type) {
-+	case TIPC_CTRL_MSGTYPE_GO_ONLINE:
-+		_go_online(vds);
-+		break;
-+
-+	case TIPC_CTRL_MSGTYPE_GO_OFFLINE:
-+		_go_offline(vds);
-+		break;
-+
-+	case TIPC_CTRL_MSGTYPE_CONN_RSP:
-+		_handle_conn_rsp(vds, (struct tipc_conn_rsp_body *)msg->body,
-+				 msg->body_len);
-+		break;
-+
-+	case TIPC_CTRL_MSGTYPE_DISC_REQ:
-+		_handle_disc_req(vds, (struct tipc_disc_req_body *)msg->body,
-+				 msg->body_len);
-+		break;
-+
-+	case TIPC_CTRL_MSGTYPE_RELEASE:
-+		_handle_release(vds, (struct tipc_release_body *)msg->body,
-+				msg->body_len);
-+	break;
-+
-+	default:
-+		dev_warn(&vds->vdev->dev,
-+			 "%s: Unexpected message type: %d\n",
-+			 __func__, msg->type);
-+	}
-+}
-+
-+static void handle_dropped_chan_msg(struct tipc_virtio_dev *vds,
-+				    struct tipc_msg_buf *mb,
-+				    struct tipc_msg_hdr *msg)
-+{
-+	int shm_idx;
-+	struct tipc_shm *shm;
-+	struct tipc_shared_handle *shared_handle;
-+	struct device *dev = &vds->vdev->dev;
-+	size_t len;
-+
-+	if (msg->len < msg->shm_cnt * sizeof(*shm)) {
-+		dev_err(dev, "shm_cnt does not fit in dropped message");
-+		/* The message is corrupt, so we can't recover resources */
-+		return;
-+	}
-+
-+	len = msg->len - msg->shm_cnt * sizeof(*shm);
-+	/* skip normal data */
-+	(void)mb_get_data(mb, len);
-+
-+	for (shm_idx = 0; shm_idx < msg->shm_cnt; shm_idx++) {
-+		shm = mb_get_data(mb, sizeof(*shm));
-+		shared_handle = tipc_shared_handle_take(vds, shm->obj_id);
-+		if (shared_handle) {
-+			if (tipc_shared_handle_drop(shared_handle))
-+				dev_err(dev,
-+					"Failed to drop handle found in dropped buffer");
-+		} else {
-+			dev_err(dev,
-+				"Found handle in dropped buffer which was not registered to tipc device...");
-+		}
-+	}
-+}
-+
-+static void handle_dropped_mb(struct tipc_virtio_dev *vds,
-+			      struct tipc_msg_buf *mb)
-+{
-+	struct tipc_msg_hdr *msg;
-+
-+	mb_reset_read(mb);
-+	msg = mb_get_data(mb, sizeof(*msg));
-+	if (msg->dst != TIPC_CTRL_ADDR) {
-+		handle_dropped_chan_msg(vds, mb, msg);
-+	}
-+}
-+
-+static int _handle_rxbuf(struct tipc_virtio_dev *vds,
-+			 struct tipc_msg_buf *rxbuf, size_t rxlen)
-+{
-+	int err;
-+	struct scatterlist sg;
-+	struct tipc_msg_hdr *msg;
-+	struct device *dev = &vds->vdev->dev;
-+
-+	/* message sanity check */
-+	if (rxlen > rxbuf->buf_sz) {
-+		dev_warn(dev, "inbound msg is too big: %zd\n", rxlen);
-+		goto drop_it;
-+	}
-+
-+	if (rxlen < sizeof(*msg)) {
-+		dev_warn(dev, "inbound msg is too short: %zd\n", rxlen);
-+		goto drop_it;
-+	}
-+
-+	/* reset buffer and put data  */
-+	mb_reset(rxbuf);
-+	mb_put_data(rxbuf, rxlen);
-+
-+	/* get message header */
-+	msg = mb_get_data(rxbuf, sizeof(*msg));
-+	if (mb_avail_data(rxbuf) != msg->len) {
-+		dev_warn(dev, "inbound msg length mismatch: (%zu vs. %d)\n",
-+			 mb_avail_data(rxbuf), msg->len);
-+		goto drop_it;
-+	}
-+
-+	dev_dbg(dev, "From: %d, To: %d, Len: %d, Flags: 0x%x, Reserved: %d, shm_cnt: %d\n",
-+		msg->src, msg->dst, msg->len, msg->flags, msg->reserved,
-+		msg->shm_cnt);
-+
-+	/* message directed to control endpoint is a special case */
-+	if (msg->dst == TIPC_CTRL_ADDR) {
-+		_handle_ctrl_msg(vds, msg->data, msg->len, msg->src);
-+	} else {
-+		struct tipc_chan *chan = NULL;
-+		/* Lookup channel */
-+		chan = vds_lookup_channel(vds, msg->dst);
-+		if (chan) {
-+			/* handle it */
-+			rxbuf = chan->ops->handle_msg(chan->ops_arg, rxbuf);
-+			kref_put(&chan->refcount, _free_chan);
-+			if (WARN_ON(!rxbuf))
-+				return -EINVAL;
-+		}
-+	}
-+
-+drop_it:
-+	/* add the buffer back to the virtqueue */
-+	sg_init_one(&sg, rxbuf, rxbuf->buf_sz);
-+	err = virtqueue_add_inbuf(vds->rxvq, &sg, 1, rxbuf, GFP_KERNEL);
-+	if (err < 0) {
-+		dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
-+		return err;
-+	}
-+
-+	return 0;
-+}
-+
-+static void _rxvq_cb(struct virtqueue *rxvq)
-+{
-+	unsigned int len;
-+	struct tipc_msg_buf *mb;
-+	unsigned int msg_cnt = 0;
-+	struct tipc_virtio_dev *vds = rxvq->vdev->priv;
-+
-+	while ((mb = virtqueue_get_buf(rxvq, &len)) != NULL) {
-+		if (_handle_rxbuf(vds, mb, len))
-+			break;
-+		msg_cnt++;
-+	}
-+
-+	/* tell the other size that we added rx buffers */
-+	if (msg_cnt)
-+		virtqueue_kick(rxvq);
-+}
-+
-+static void _txvq_cb(struct virtqueue *txvq)
-+{
-+	unsigned int len;
-+	struct tipc_msg_buf *mb;
-+	bool need_wakeup = false;
-+	struct tipc_virtio_dev *vds = txvq->vdev->priv;
-+
-+	/* detach all buffers */
-+	mutex_lock(&vds->lock);
-+	while ((mb = virtqueue_get_buf(txvq, &len)) != NULL) {
-+		if ((int)len < 0)
-+			handle_dropped_mb(vds, mb);
-+		need_wakeup |= _put_txbuf_locked(vds, mb);
-+	}
-+	mutex_unlock(&vds->lock);
-+
-+	if (need_wakeup) {
-+		/* wake up potential senders waiting for a tx buffer */
-+		wake_up_interruptible_all(&vds->sendq);
-+	}
-+}
-+
-+static int tipc_virtio_probe(struct virtio_device *vdev)
-+{
-+	int err, i;
-+	struct tipc_virtio_dev *vds;
-+	struct tipc_dev_config config;
-+	struct virtqueue *vqs[2];
-+	vq_callback_t *vq_cbs[] = {_rxvq_cb, _txvq_cb};
-+	static const char * const vq_names[] = { "rx", "tx" };
-+
-+	vds = kzalloc(sizeof(*vds), GFP_KERNEL);
-+	if (!vds)
-+		return -ENOMEM;
-+
-+	vds->vdev = vdev;
-+
-+	mutex_init(&vds->lock);
-+	mutex_init(&vds->shared_handles_lock);
-+	kref_init(&vds->refcount);
-+	init_waitqueue_head(&vds->sendq);
-+	INIT_LIST_HEAD(&vds->free_buf_list);
-+	idr_init(&vds->addr_idr);
-+	vds->shared_handles = RB_ROOT;
-+	dma_coerce_mask_and_coherent(&vds->vdev->dev,
-+				     *vds->vdev->dev.parent->parent->dma_mask);
-+
-+	/* set default max message size and alignment */
-+	memset(&config, 0, sizeof(config));
-+	config.msg_buf_max_size  = DEFAULT_MSG_BUF_SIZE;
-+	config.msg_buf_alignment = DEFAULT_MSG_BUF_ALIGN;
-+
-+	/* get configuration if present */
-+	vdev->config->get(vdev, 0, &config, sizeof(config));
-+
-+	/* copy dev name */
-+	strncpy(vds->cdev_name, config.dev_name, sizeof(vds->cdev_name));
-+	vds->cdev_name[sizeof(vds->cdev_name)-1] = '\0';
-+
-+	/* find tx virtqueues (rx and tx and in this order) */
-+	err = vdev->config->find_vqs(vdev, 2, vqs, vq_cbs, vq_names, NULL,
-+				     NULL);
-+	if (err)
-+		goto err_find_vqs;
-+
-+	vds->rxvq = vqs[0];
-+	vds->txvq = vqs[1];
-+
-+	/* save max buffer size and count */
-+	vds->msg_buf_max_sz = config.msg_buf_max_size;
-+	vds->msg_buf_max_cnt = virtqueue_get_vring_size(vds->txvq);
-+
-+	/* set up the receive buffers */
-+	for (i = 0; i < virtqueue_get_vring_size(vds->rxvq); i++) {
-+		struct scatterlist sg;
-+		struct tipc_msg_buf *rxbuf;
-+
-+		rxbuf = vds_alloc_msg_buf(vds, true);
-+		if (!rxbuf) {
-+			dev_err(&vdev->dev, "failed to allocate rx buffer\n");
-+			err = -ENOMEM;
-+			goto err_free_rx_buffers;
-+		}
-+
-+		sg_init_one(&sg, rxbuf, rxbuf->buf_sz);
-+		err = virtqueue_add_inbuf(vds->rxvq, &sg, 1, rxbuf, GFP_KERNEL);
-+		WARN_ON(err); /* sanity check; this can't really happen */
-+	}
-+
-+	vdev->priv = vds;
-+	vds->state = VDS_OFFLINE;
-+
-+	dev_dbg(&vdev->dev, "%s: done\n", __func__);
-+	return 0;
-+
-+err_free_rx_buffers:
-+	_cleanup_vq(vds, vds->rxvq);
-+err_find_vqs:
-+	kref_put(&vds->refcount, _free_vds);
-+	return err;
-+}
-+
-+static void tipc_virtio_remove(struct virtio_device *vdev)
-+{
-+	struct tipc_virtio_dev *vds = vdev->priv;
-+
-+	_go_offline(vds);
-+
-+	mutex_lock(&vds->lock);
-+	vds->state = VDS_DEAD;
-+	vds->vdev = NULL;
-+	mutex_unlock(&vds->lock);
-+
-+	vdev->config->reset(vdev);
-+
-+	idr_destroy(&vds->addr_idr);
-+
-+	_cleanup_vq(vds, vds->rxvq);
-+	_cleanup_vq(vds, vds->txvq);
-+	vds_free_msg_buf_list(vds, &vds->free_buf_list);
-+
-+	vdev->config->del_vqs(vds->vdev);
-+
-+	kref_put(&vds->refcount, _free_vds);
-+}
-+
-+static const struct virtio_device_id tipc_virtio_id_table[] = {
-+	{ VIRTIO_ID_TRUSTY_IPC, VIRTIO_DEV_ANY_ID },
-+	{ 0 },
-+};
-+
-+static const unsigned int features[] = {
-+	0,
-+};
-+
-+static struct virtio_driver virtio_tipc_driver = {
-+	.feature_table	= features,
-+	.feature_table_size = ARRAY_SIZE(features),
-+	.driver.name	= KBUILD_MODNAME,
-+	.driver.owner	= THIS_MODULE,
-+	.id_table	= tipc_virtio_id_table,
-+	.probe		= tipc_virtio_probe,
-+	.remove		= tipc_virtio_remove,
-+};
-+
-+static int __init tipc_init(void)
-+{
-+	int ret;
-+	dev_t dev;
-+
-+	ret = alloc_chrdev_region(&dev, 0, MAX_DEVICES, KBUILD_MODNAME);
-+	if (ret) {
-+		pr_err("%s: alloc_chrdev_region failed: %d\n", __func__, ret);
-+		return ret;
-+	}
-+
-+	tipc_major = MAJOR(dev);
-+	tipc_class = class_create(THIS_MODULE, KBUILD_MODNAME);
-+	if (IS_ERR(tipc_class)) {
-+		ret = PTR_ERR(tipc_class);
-+		pr_err("%s: class_create failed: %d\n", __func__, ret);
-+		goto err_class_create;
-+	}
-+
-+	ret = register_virtio_driver(&virtio_tipc_driver);
-+	if (ret) {
-+		pr_err("failed to register virtio driver: %d\n", ret);
-+		goto err_register_virtio_drv;
-+	}
-+
-+	return 0;
-+
-+err_register_virtio_drv:
-+	class_destroy(tipc_class);
-+
-+err_class_create:
-+	unregister_chrdev_region(dev, MAX_DEVICES);
-+	return ret;
-+}
-+
-+static void __exit tipc_exit(void)
-+{
-+	unregister_virtio_driver(&virtio_tipc_driver);
-+	class_destroy(tipc_class);
-+	unregister_chrdev_region(MKDEV(tipc_major, 0), MAX_DEVICES);
-+}
-+
-+/* We need to init this early */
-+subsys_initcall(tipc_init);
-+module_exit(tipc_exit);
-+
-+MODULE_DEVICE_TABLE(tipc, tipc_virtio_id_table);
-+MODULE_DESCRIPTION("Trusty IPC driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/trusty/trusty-irq.c b/drivers/trusty/trusty-irq.c
-new file mode 100644
-index 000000000000..5c6076108d0e
---- /dev/null
-+++ b/drivers/trusty/trusty-irq.c
-@@ -0,0 +1,645 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2013 Google, Inc.
-+ */
-+
-+#include <linux/cpu.h>
-+#include <linux/interrupt.h>
-+#include <linux/irq.h>
-+#include <linux/irqdomain.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_irq.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/string.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/sm_err.h>
-+#include <linux/trusty/trusty.h>
-+
-+struct trusty_irq {
-+	struct trusty_irq_state *is;
-+	struct hlist_node node;
-+	unsigned int irq;
-+	bool percpu;
-+	bool enable;
-+	bool doorbell;
-+	struct trusty_irq __percpu *percpu_ptr;
-+};
-+
-+struct trusty_irq_irqset {
-+	struct hlist_head pending;
-+	struct hlist_head inactive;
-+};
-+
-+struct trusty_irq_state {
-+	struct device *dev;
-+	struct device *trusty_dev;
-+	struct trusty_irq_irqset normal_irqs;
-+	spinlock_t normal_irqs_lock;
-+	struct trusty_irq_irqset __percpu *percpu_irqs;
-+	struct notifier_block trusty_call_notifier;
-+	struct hlist_node cpuhp_node;
-+};
-+
-+static int trusty_irq_cpuhp_slot = -1;
-+
-+static void trusty_irq_enable_pending_irqs(struct trusty_irq_state *is,
-+					   struct trusty_irq_irqset *irqset,
-+					   bool percpu)
-+{
-+	struct hlist_node *n;
-+	struct trusty_irq *trusty_irq;
-+
-+	hlist_for_each_entry_safe(trusty_irq, n, &irqset->pending, node) {
-+		dev_dbg(is->dev,
-+			"%s: enable pending irq %d, percpu %d, cpu %d\n",
-+			__func__, trusty_irq->irq, percpu, smp_processor_id());
-+		if (percpu)
-+			enable_percpu_irq(trusty_irq->irq, 0);
-+		else
-+			enable_irq(trusty_irq->irq);
-+		hlist_del(&trusty_irq->node);
-+		hlist_add_head(&trusty_irq->node, &irqset->inactive);
-+	}
-+}
-+
-+static void trusty_irq_enable_irqset(struct trusty_irq_state *is,
-+				      struct trusty_irq_irqset *irqset)
-+{
-+	struct trusty_irq *trusty_irq;
-+
-+	hlist_for_each_entry(trusty_irq, &irqset->inactive, node) {
-+		if (trusty_irq->enable) {
-+			dev_warn(is->dev,
-+				 "%s: percpu irq %d already enabled, cpu %d\n",
-+				 __func__, trusty_irq->irq, smp_processor_id());
-+			continue;
-+		}
-+		dev_dbg(is->dev, "%s: enable percpu irq %d, cpu %d\n",
-+			__func__, trusty_irq->irq, smp_processor_id());
-+		enable_percpu_irq(trusty_irq->irq, 0);
-+		trusty_irq->enable = true;
-+	}
-+}
-+
-+static void trusty_irq_disable_irqset(struct trusty_irq_state *is,
-+				      struct trusty_irq_irqset *irqset)
-+{
-+	struct hlist_node *n;
-+	struct trusty_irq *trusty_irq;
-+
-+	hlist_for_each_entry(trusty_irq, &irqset->inactive, node) {
-+		if (!trusty_irq->enable) {
-+			dev_warn(is->dev,
-+				 "irq %d already disabled, percpu %d, cpu %d\n",
-+				 trusty_irq->irq, trusty_irq->percpu,
-+				 smp_processor_id());
-+			continue;
-+		}
-+		dev_dbg(is->dev, "%s: disable irq %d, percpu %d, cpu %d\n",
-+			__func__, trusty_irq->irq, trusty_irq->percpu,
-+			smp_processor_id());
-+		trusty_irq->enable = false;
-+		if (trusty_irq->percpu)
-+			disable_percpu_irq(trusty_irq->irq);
-+		else
-+			disable_irq_nosync(trusty_irq->irq);
-+	}
-+	hlist_for_each_entry_safe(trusty_irq, n, &irqset->pending, node) {
-+		if (!trusty_irq->enable) {
-+			dev_warn(is->dev,
-+				 "pending irq %d already disabled, percpu %d, cpu %d\n",
-+				 trusty_irq->irq, trusty_irq->percpu,
-+				 smp_processor_id());
-+		}
-+		dev_dbg(is->dev,
-+			"%s: disable pending irq %d, percpu %d, cpu %d\n",
-+			__func__, trusty_irq->irq, trusty_irq->percpu,
-+			smp_processor_id());
-+		trusty_irq->enable = false;
-+		hlist_del(&trusty_irq->node);
-+		hlist_add_head(&trusty_irq->node, &irqset->inactive);
-+	}
-+}
-+
-+static int trusty_irq_call_notify(struct notifier_block *nb,
-+				  unsigned long action, void *data)
-+{
-+	struct trusty_irq_state *is;
-+
-+	if (WARN_ON(!irqs_disabled()))
-+		return NOTIFY_DONE;
-+
-+	if (action != TRUSTY_CALL_PREPARE)
-+		return NOTIFY_DONE;
-+
-+	is = container_of(nb, struct trusty_irq_state, trusty_call_notifier);
-+
-+	spin_lock(&is->normal_irqs_lock);
-+	trusty_irq_enable_pending_irqs(is, &is->normal_irqs, false);
-+	spin_unlock(&is->normal_irqs_lock);
-+	trusty_irq_enable_pending_irqs(is, this_cpu_ptr(is->percpu_irqs), true);
-+
-+	return NOTIFY_OK;
-+}
-+
-+static irqreturn_t trusty_irq_handler(int irq, void *data)
-+{
-+	struct trusty_irq *trusty_irq = data;
-+	struct trusty_irq_state *is = trusty_irq->is;
-+	struct trusty_irq_irqset *irqset;
-+
-+	dev_dbg(is->dev, "%s: irq %d, percpu %d, cpu %d, enable %d\n",
-+		__func__, irq, trusty_irq->irq, smp_processor_id(),
-+		trusty_irq->enable);
-+
-+	if (!trusty_irq->doorbell) {
-+		if (trusty_irq->percpu) {
-+			disable_percpu_irq(irq);
-+			irqset = this_cpu_ptr(is->percpu_irqs);
-+		} else {
-+			disable_irq_nosync(irq);
-+			irqset = &is->normal_irqs;
-+		}
-+
-+		spin_lock(&is->normal_irqs_lock);
-+		if (trusty_irq->enable) {
-+			hlist_del(&trusty_irq->node);
-+			hlist_add_head(&trusty_irq->node, &irqset->pending);
-+		}
-+		spin_unlock(&is->normal_irqs_lock);
-+	}
-+
-+	trusty_enqueue_nop(is->trusty_dev, NULL);
-+
-+	dev_dbg(is->dev, "%s: irq %d done\n", __func__, irq);
-+
-+	return IRQ_HANDLED;
-+}
-+
-+static int trusty_irq_cpu_up(unsigned int cpu, struct hlist_node *node)
-+{
-+	unsigned long irq_flags;
-+	struct trusty_irq_state *is;
-+
-+	is = container_of(node, struct trusty_irq_state, cpuhp_node);
-+
-+	dev_dbg(is->dev, "%s: cpu %d\n", __func__, cpu);
-+
-+	local_irq_save(irq_flags);
-+	trusty_irq_enable_irqset(is, this_cpu_ptr(is->percpu_irqs));
-+	local_irq_restore(irq_flags);
-+
-+	/*
-+	 * Temporary workaround blindly enqueuing work to force trusty scheduler
-+	 * to run after a cpu suspend.
-+	 * Root causing the workqueue being inappropriately empty
-+	 * (e.g. loss of an IPI) may make this workaround unnecessary
-+	 * in the future.
-+	 */
-+	trusty_enqueue_nop(is->trusty_dev, NULL);
-+
-+	return 0;
-+}
-+
-+static int trusty_irq_cpu_down(unsigned int cpu, struct hlist_node *node)
-+{
-+	unsigned long irq_flags;
-+	struct trusty_irq_state *is;
-+
-+	is = container_of(node, struct trusty_irq_state, cpuhp_node);
-+
-+	dev_dbg(is->dev, "%s: cpu %d\n", __func__, cpu);
-+
-+	local_irq_save(irq_flags);
-+	trusty_irq_disable_irqset(is, this_cpu_ptr(is->percpu_irqs));
-+	local_irq_restore(irq_flags);
-+
-+	return 0;
-+}
-+
-+static int trusty_irq_map_ipi(struct trusty_irq_state *is, int irq)
-+{
-+	int ret;
-+	u32 ipi_range[3];
-+	struct device_node *gic;
-+	struct of_phandle_args oirq = {};
-+	u32 beg, end, ipi_base;
-+
-+	ret = of_property_read_u32_array(is->dev->of_node, "ipi-range",
-+					 ipi_range, ARRAY_SIZE(ipi_range));
-+	if (ret != 0)
-+		return -ENODATA;
-+	beg = ipi_range[0];
-+	end = ipi_range[1];
-+	ipi_base = ipi_range[2];
-+
-+	if (irq < beg || irq > end)
-+		return -ENODATA;
-+
-+	gic = of_irq_find_parent(is->dev->of_node);
-+	if (!gic)
-+		return -ENXIO;
-+
-+	oirq.np = gic;
-+	oirq.args_count = 1;
-+	oirq.args[0] = ipi_base + (irq - beg);
-+
-+	ret = irq_create_of_mapping(&oirq);
-+
-+	of_node_put(gic);
-+	return (!ret) ? -EINVAL : ret;
-+}
-+
-+static int trusty_irq_create_irq_mapping(struct trusty_irq_state *is, int irq)
-+{
-+	int ret;
-+	int index;
-+	u32 irq_pos;
-+	u32 templ_idx;
-+	u32 range_base;
-+	u32 range_end;
-+	struct of_phandle_args oirq;
-+
-+	/* check if this is an IPI (inter-processor interrupt) */
-+	ret = trusty_irq_map_ipi(is, irq);
-+	if (ret != -ENODATA)
-+		return ret;
-+
-+	/* check if "interrupt-ranges" property is present */
-+	if (!of_find_property(is->dev->of_node, "interrupt-ranges", NULL)) {
-+		/* fallback to old behavior to be backward compatible with
-+		 * systems that do not need IRQ domains.
-+		 */
-+		return irq;
-+	}
-+
-+	/* find irq range */
-+	for (index = 0;; index += 3) {
-+		ret = of_property_read_u32_index(is->dev->of_node,
-+						 "interrupt-ranges",
-+						 index, &range_base);
-+		if (ret)
-+			return ret;
-+
-+		ret = of_property_read_u32_index(is->dev->of_node,
-+						 "interrupt-ranges",
-+						 index + 1, &range_end);
-+		if (ret)
-+			return ret;
-+
-+		if (irq >= range_base && irq <= range_end)
-+			break;
-+	}
-+
-+	/*  read the rest of range entry: template index and irq_pos */
-+	ret = of_property_read_u32_index(is->dev->of_node,
-+					 "interrupt-ranges",
-+					 index + 2, &templ_idx);
-+	if (ret)
-+		return ret;
-+
-+	/* read irq template */
-+	ret = of_parse_phandle_with_args(is->dev->of_node,
-+					 "interrupt-templates",
-+					 "#interrupt-cells",
-+					 templ_idx, &oirq);
-+	if (ret)
-+		return ret;
-+
-+	WARN_ON(!oirq.np);
-+	WARN_ON(!oirq.args_count);
-+
-+	/*
-+	 * An IRQ template is a non empty array of u32 values describing group
-+	 * of interrupts having common properties. The u32 entry with index
-+	 * zero contains the position of irq_id in interrupt specifier array
-+	 * followed by data representing interrupt specifier array with irq id
-+	 * field omitted, so to convert irq template to interrupt specifier
-+	 * array we have to move down one slot the first irq_pos entries and
-+	 * replace the resulting gap with real irq id.
-+	 */
-+	irq_pos = oirq.args[0];
-+
-+	if (irq_pos >= oirq.args_count) {
-+		dev_err(is->dev, "irq pos is out of range: %d\n", irq_pos);
-+		return -EINVAL;
-+	}
-+
-+	for (index = 1; index <= irq_pos; index++)
-+		oirq.args[index - 1] = oirq.args[index];
-+
-+	oirq.args[irq_pos] = irq - range_base;
-+
-+	ret = irq_create_of_mapping(&oirq);
-+
-+	return (!ret) ? -EINVAL : ret;
-+}
-+
-+static int trusty_irq_init_normal_irq(struct trusty_irq_state *is, int tirq)
-+{
-+	int ret;
-+	int irq;
-+	unsigned long irq_flags;
-+	struct trusty_irq *trusty_irq;
-+
-+	dev_dbg(is->dev, "%s: irq %d\n", __func__, tirq);
-+
-+	irq = trusty_irq_create_irq_mapping(is, tirq);
-+	if (irq < 0) {
-+		dev_err(is->dev,
-+			"trusty_irq_create_irq_mapping failed (%d)\n", irq);
-+		return irq;
-+	}
-+
-+	trusty_irq = kzalloc(sizeof(*trusty_irq), GFP_KERNEL);
-+	if (!trusty_irq)
-+		return -ENOMEM;
-+
-+	trusty_irq->is = is;
-+	trusty_irq->irq = irq;
-+	trusty_irq->enable = true;
-+
-+	spin_lock_irqsave(&is->normal_irqs_lock, irq_flags);
-+	hlist_add_head(&trusty_irq->node, &is->normal_irqs.inactive);
-+	spin_unlock_irqrestore(&is->normal_irqs_lock, irq_flags);
-+
-+	ret = request_irq(irq, trusty_irq_handler, IRQF_NO_THREAD,
-+			  "trusty", trusty_irq);
-+	if (ret) {
-+		dev_err(is->dev, "request_irq failed %d\n", ret);
-+		goto err_request_irq;
-+	}
-+	return 0;
-+
-+err_request_irq:
-+	spin_lock_irqsave(&is->normal_irqs_lock, irq_flags);
-+	hlist_del(&trusty_irq->node);
-+	spin_unlock_irqrestore(&is->normal_irqs_lock, irq_flags);
-+	kfree(trusty_irq);
-+	return ret;
-+}
-+
-+static int trusty_irq_init_per_cpu_irq(struct trusty_irq_state *is, int tirq,
-+				       unsigned int type)
-+{
-+	int ret;
-+	int irq;
-+	unsigned int cpu;
-+	struct trusty_irq __percpu *trusty_irq_handler_data;
-+
-+	dev_dbg(is->dev, "%s: irq %d\n", __func__, tirq);
-+
-+	irq = trusty_irq_create_irq_mapping(is, tirq);
-+	if (irq <= 0) {
-+		dev_err(is->dev,
-+			"trusty_irq_create_irq_mapping failed (%d)\n", irq);
-+		return irq;
-+	}
-+
-+	trusty_irq_handler_data = alloc_percpu(struct trusty_irq);
-+	if (!trusty_irq_handler_data)
-+		return -ENOMEM;
-+
-+	for_each_possible_cpu(cpu) {
-+		struct trusty_irq *trusty_irq;
-+		struct trusty_irq_irqset *irqset;
-+
-+		trusty_irq = per_cpu_ptr(trusty_irq_handler_data, cpu);
-+		irqset = per_cpu_ptr(is->percpu_irqs, cpu);
-+
-+		trusty_irq->is = is;
-+		hlist_add_head(&trusty_irq->node, &irqset->inactive);
-+		trusty_irq->irq = irq;
-+		trusty_irq->percpu = true;
-+		trusty_irq->doorbell = type == TRUSTY_IRQ_TYPE_DOORBELL;
-+		trusty_irq->percpu_ptr = trusty_irq_handler_data;
-+	}
-+
-+	ret = request_percpu_irq(irq, trusty_irq_handler, "trusty",
-+				 trusty_irq_handler_data);
-+	if (ret) {
-+		dev_err(is->dev, "request_percpu_irq failed %d\n", ret);
-+		goto err_request_percpu_irq;
-+	}
-+
-+	return 0;
-+
-+err_request_percpu_irq:
-+	for_each_possible_cpu(cpu) {
-+		struct trusty_irq *trusty_irq;
-+
-+		trusty_irq = per_cpu_ptr(trusty_irq_handler_data, cpu);
-+		hlist_del(&trusty_irq->node);
-+	}
-+
-+	free_percpu(trusty_irq_handler_data);
-+	return ret;
-+}
-+
-+static int trusty_smc_get_next_irq(struct trusty_irq_state *is,
-+				   unsigned long min_irq, unsigned int type)
-+{
-+	return trusty_fast_call32(is->trusty_dev, SMC_FC_GET_NEXT_IRQ,
-+				  min_irq, type, 0);
-+}
-+
-+static int trusty_irq_init_one(struct trusty_irq_state *is,
-+			       int irq, unsigned int type)
-+{
-+	int ret;
-+
-+	irq = trusty_smc_get_next_irq(is, irq, type);
-+	if (irq < 0)
-+		return irq;
-+
-+	if (type != TRUSTY_IRQ_TYPE_NORMAL)
-+		ret = trusty_irq_init_per_cpu_irq(is, irq, type);
-+	else
-+		ret = trusty_irq_init_normal_irq(is, irq);
-+
-+	if (ret) {
-+		dev_warn(is->dev,
-+			 "failed to initialize irq %d, irq will be ignored\n",
-+			 irq);
-+	}
-+
-+	return irq + 1;
-+}
-+
-+static void trusty_irq_free_irqs(struct trusty_irq_state *is)
-+{
-+	struct trusty_irq *irq;
-+	struct hlist_node *n;
-+	unsigned int cpu;
-+
-+	hlist_for_each_entry_safe(irq, n, &is->normal_irqs.inactive, node) {
-+		dev_dbg(is->dev, "%s: irq %d\n", __func__, irq->irq);
-+		free_irq(irq->irq, irq);
-+		hlist_del(&irq->node);
-+		kfree(irq);
-+	}
-+	hlist_for_each_entry_safe(irq, n,
-+				  &this_cpu_ptr(is->percpu_irqs)->inactive,
-+				  node) {
-+		struct trusty_irq __percpu *trusty_irq_handler_data;
-+
-+		dev_dbg(is->dev, "%s: percpu irq %d\n", __func__, irq->irq);
-+		trusty_irq_handler_data = irq->percpu_ptr;
-+		free_percpu_irq(irq->irq, trusty_irq_handler_data);
-+		for_each_possible_cpu(cpu) {
-+			struct trusty_irq *irq_tmp;
-+
-+			irq_tmp = per_cpu_ptr(trusty_irq_handler_data, cpu);
-+			hlist_del(&irq_tmp->node);
-+		}
-+		free_percpu(trusty_irq_handler_data);
-+	}
-+}
-+
-+static int trusty_irq_probe(struct platform_device *pdev)
-+{
-+	int ret;
-+	int irq;
-+	unsigned long irq_flags;
-+	struct trusty_irq_state *is;
-+
-+	is = kzalloc(sizeof(*is), GFP_KERNEL);
-+	if (!is) {
-+		ret = -ENOMEM;
-+		goto err_alloc_is;
-+	}
-+
-+	is->dev = &pdev->dev;
-+	is->trusty_dev = is->dev->parent;
-+	spin_lock_init(&is->normal_irqs_lock);
-+	is->percpu_irqs = alloc_percpu(struct trusty_irq_irqset);
-+	if (!is->percpu_irqs) {
-+		ret = -ENOMEM;
-+		goto err_alloc_pending_percpu_irqs;
-+	}
-+
-+	platform_set_drvdata(pdev, is);
-+
-+	is->trusty_call_notifier.notifier_call = trusty_irq_call_notify;
-+	ret = trusty_call_notifier_register(is->trusty_dev,
-+					    &is->trusty_call_notifier);
-+	if (ret) {
-+		dev_err(&pdev->dev,
-+			"failed to register trusty call notifier\n");
-+		goto err_trusty_call_notifier_register;
-+	}
-+
-+	for (irq = 0; irq >= 0;)
-+		irq = trusty_irq_init_one(is, irq, TRUSTY_IRQ_TYPE_PER_CPU);
-+	for (irq = 0; irq >= 0;)
-+		irq = trusty_irq_init_one(is, irq, TRUSTY_IRQ_TYPE_NORMAL);
-+	for (irq = 0; irq >= 0;)
-+		irq = trusty_irq_init_one(is, irq, TRUSTY_IRQ_TYPE_DOORBELL);
-+
-+	ret = cpuhp_state_add_instance(trusty_irq_cpuhp_slot, &is->cpuhp_node);
-+	if (ret < 0) {
-+		dev_err(&pdev->dev, "cpuhp_state_add_instance failed %d\n",
-+			ret);
-+		goto err_add_cpuhp_instance;
-+	}
-+
-+	return 0;
-+
-+err_add_cpuhp_instance:
-+	spin_lock_irqsave(&is->normal_irqs_lock, irq_flags);
-+	trusty_irq_disable_irqset(is, &is->normal_irqs);
-+	spin_unlock_irqrestore(&is->normal_irqs_lock, irq_flags);
-+	trusty_irq_free_irqs(is);
-+	trusty_call_notifier_unregister(is->trusty_dev,
-+					&is->trusty_call_notifier);
-+err_trusty_call_notifier_register:
-+	free_percpu(is->percpu_irqs);
-+err_alloc_pending_percpu_irqs:
-+	kfree(is);
-+err_alloc_is:
-+	return ret;
-+}
-+
-+static int trusty_irq_remove(struct platform_device *pdev)
-+{
-+	int ret;
-+	unsigned long irq_flags;
-+	struct trusty_irq_state *is = platform_get_drvdata(pdev);
-+
-+	ret = cpuhp_state_remove_instance(trusty_irq_cpuhp_slot,
-+					  &is->cpuhp_node);
-+	if (WARN_ON(ret))
-+		return ret;
-+
-+	spin_lock_irqsave(&is->normal_irqs_lock, irq_flags);
-+	trusty_irq_disable_irqset(is, &is->normal_irqs);
-+	spin_unlock_irqrestore(&is->normal_irqs_lock, irq_flags);
-+
-+	trusty_irq_free_irqs(is);
-+
-+	trusty_call_notifier_unregister(is->trusty_dev,
-+					&is->trusty_call_notifier);
-+	free_percpu(is->percpu_irqs);
-+	kfree(is);
-+
-+	return 0;
-+}
-+
-+static const struct of_device_id trusty_test_of_match[] = {
-+	{ .compatible = "android,trusty-irq-v1", },
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(trusty, trusty_test_of_match);
-+
-+static struct platform_driver trusty_irq_driver = {
-+	.probe = trusty_irq_probe,
-+	.remove = trusty_irq_remove,
-+	.driver	= {
-+		.name = "trusty-irq",
-+		.of_match_table = trusty_test_of_match,
-+	},
-+};
-+
-+static int __init trusty_irq_driver_init(void)
-+{
-+	int ret;
-+
-+	/* allocate dynamic cpuhp state slot */
-+	ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
-+				      "trusty-irq:cpu:online",
-+				      trusty_irq_cpu_up,
-+				      trusty_irq_cpu_down);
-+	if (ret < 0)
-+		return ret;
-+	trusty_irq_cpuhp_slot = ret;
-+
-+	/* Register platform driver */
-+	ret = platform_driver_register(&trusty_irq_driver);
-+	if (ret < 0)
-+		goto err_driver_register;
-+
-+	return ret;
-+
-+err_driver_register:
-+	/* undo cpuhp slot allocation */
-+	cpuhp_remove_multi_state(trusty_irq_cpuhp_slot);
-+	trusty_irq_cpuhp_slot = -1;
-+
-+	return ret;
-+}
-+
-+static void __exit trusty_irq_driver_exit(void)
-+{
-+	platform_driver_unregister(&trusty_irq_driver);
-+	cpuhp_remove_multi_state(trusty_irq_cpuhp_slot);
-+	trusty_irq_cpuhp_slot = -1;
-+}
-+
-+module_init(trusty_irq_driver_init);
-+module_exit(trusty_irq_driver_exit);
-+
-+MODULE_LICENSE("GPL v2");
-+MODULE_DESCRIPTION("Trusty IRQ driver");
-diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c
-new file mode 100644
-index 000000000000..7b279fe63766
---- /dev/null
-+++ b/drivers/trusty/trusty-log.c
-@@ -0,0 +1,830 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2015 Google, Inc.
-+ */
-+#include <linux/platform_device.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/trusty.h>
-+#include <linux/notifier.h>
-+#include <linux/scatterlist.h>
-+#include <linux/slab.h>
-+#include <linux/mm.h>
-+#include <linux/mod_devicetable.h>
-+#include <linux/module.h>
-+#include <linux/moduleparam.h>
-+#include <linux/log2.h>
-+#include <linux/miscdevice.h>
-+#include <linux/poll.h>
-+#include <linux/seq_file.h>
-+#include <asm/page.h>
-+#include "trusty-log.h"
-+
-+/*
-+ * Rationale for the chosen default log buffer size:
-+ *  - the log buffer shall contain unthrottled Trusty crash dump.
-+ *  - the register list portion of a crash dump is about 1KB
-+ *  - the memory-around-registers portion of a crash dump can be up to 12 KB
-+ *  - an average size backtrace is about 1 KB
-+ *  - average length of non-crash trusty logs during boot is about 85 characters
-+ *  - a crash dump with 50 lines of context therefore requires up to 18 KB
-+ *  - buffer size needs to be power-of-two number of bytes
-+ *  - rounding up to power of two from 18 KB gives 32 KB
-+ *  The log size can be adjusted by setting the "trusty_log.log_size" parameter
-+ *  on the kernel command line. The specified value will be adjusted as needed.
-+ */
-+
-+#define TRUSTY_LOG_DEFAULT_SIZE (32768)
-+#define TRUSTY_LOG_MIN_SIZE (PAGE_SIZE / 2)
-+#define TRUSTY_LOG_MAX_SIZE (1 * 1024 * 1024 * 1024)
-+#define TRUSTY_LINE_BUFFER_SIZE (256)
-+
-+static size_t log_size_param = TRUSTY_LOG_DEFAULT_SIZE;
-+
-+static int trusty_log_size_set(const char *val, const struct kernel_param *kp)
-+{
-+	unsigned long long requested = memparse(val, NULL);
-+
-+	if (requested < TRUSTY_LOG_MIN_SIZE)
-+		requested = TRUSTY_LOG_MIN_SIZE;
-+	if (requested > TRUSTY_LOG_MAX_SIZE)
-+		requested = TRUSTY_LOG_MAX_SIZE;
-+	requested = rounddown_pow_of_two(requested);
-+	log_size_param = requested;
-+	return 0;
-+}
-+
-+static int trusty_log_size_get(char *buffer, const struct kernel_param *kp)
-+{
-+	sprintf(buffer, "%zu", log_size_param);
-+	return strlen(buffer);
-+}
-+
-+module_param_call(log_size, trusty_log_size_set, trusty_log_size_get, NULL,
-+		  0644);
-+/*
-+ * If we log too much and a UART or other slow source is connected, we can stall
-+ * out another thread which is doing printk.
-+ *
-+ * Trusty crash logs are currently ~16 lines, so 100 should include context and
-+ * the crash most of the time.
-+ */
-+static struct ratelimit_state trusty_log_rate_limit =
-+	RATELIMIT_STATE_INIT("trusty_log", 1 * HZ, 100);
-+
-+/**
-+ * struct trusty_log_sfile - trusty log misc device state
-+ *
-+ * @misc:          misc device created for the trusty log virtual file
-+ * @device_name:   misc device name following the convention
-+ *                 "trusty-<name><id>"
-+ */
-+struct trusty_log_sfile {
-+	struct miscdevice misc;
-+	char device_name[64];
-+};
-+
-+/**
-+ * struct trusty_log_sink_state - trusty log sink state
-+ *
-+ * @get:              current read unwrapped index
-+ * @trusty_panicked:  trusty panic status at the start of the sink interation
-+ *                    (only used for kernel log sink)
-+ * @sfile:            seq_file used for sinking to a virtual file (misc device);
-+ *                    set to NULL for the kernel log sink.
-+ * @ignore_overflow:  ignore_overflow used to coalesce overflow messages and
-+ *                    avoid reporting an overflow when sinking the oldest
-+ *                    line to the virtual file (only used for virtual file sink)
-+ *
-+ * A sink state structure is used for both the kernel log sink
-+ * and the virtual device sink.
-+ * An instance of the sink state structure is dynamically created
-+ * for each read iteration of the trusty log virtual file (misc device).
-+ *
-+ */
-+struct trusty_log_sink_state {
-+	u32 get;
-+	bool trusty_panicked;
-+
-+	/* virtual file sink specific attributes */
-+	struct seq_file *sfile;
-+	bool ignore_overflow;
-+};
-+
-+struct trusty_log_state {
-+	struct device *dev;
-+	struct device *trusty_dev;
-+	struct trusty_log_sfile log_sfile;
-+
-+	struct log_rb *log;
-+	struct trusty_log_sink_state klog_sink;
-+
-+	u32 log_num_pages;
-+	struct scatterlist *sg;
-+	trusty_shared_mem_id_t log_pages_shared_mem_id;
-+
-+	struct notifier_block call_notifier;
-+	struct notifier_block panic_notifier;
-+	char line_buffer[TRUSTY_LINE_BUFFER_SIZE];
-+	wait_queue_head_t poll_waiters;
-+	/* this lock protects access to wake_put */
-+	spinlock_t wake_up_lock;
-+	u32 last_wake_put;
-+};
-+
-+static inline u32 u32_add_overflow(u32 a, u32 b)
-+{
-+	u32 d;
-+
-+	if (check_add_overflow(a, b, &d)) {
-+		/*
-+		 * silence the overflow,
-+		 * what matters in the log buffer context
-+		 * is the casted addition
-+		 */
-+	}
-+	return d;
-+}
-+
-+static inline u32 u32_sub_overflow(u32 a, u32 b)
-+{
-+	u32 d;
-+
-+	if (check_sub_overflow(a, b, &d)) {
-+		/*
-+		 * silence the overflow,
-+		 * what matters in the log buffer context
-+		 * is the casted substraction
-+		 */
-+	}
-+	return d;
-+}
-+
-+static int log_read_line(struct trusty_log_state *s, u32 put, u32 get)
-+{
-+	struct log_rb *log = s->log;
-+	int i;
-+	char c = '\0';
-+	size_t max_to_read =
-+		min_t(size_t,
-+		      u32_sub_overflow(put, get),
-+		      sizeof(s->line_buffer) - 1);
-+	size_t mask = log->sz - 1;
-+
-+	for (i = 0; i < max_to_read && c != '\n';) {
-+		c = log->data[get & mask];
-+		s->line_buffer[i++] = c;
-+		get = u32_add_overflow(get, 1);
-+	}
-+	s->line_buffer[i] = '\0';
-+
-+	return i;
-+}
-+
-+/**
-+ * trusty_log_has_data() - returns true when more data is available to sink
-+ * @s:         Current log state.
-+ * @sink:      trusty_log_sink_state holding the get index on a given sink
-+ *
-+ * Return: true if data is available.
-+ */
-+static bool trusty_log_has_data(struct trusty_log_state *s,
-+				struct trusty_log_sink_state *sink)
-+{
-+	struct log_rb *log = s->log;
-+
-+	return (log->put != sink->get);
-+}
-+
-+/**
-+ * trusty_log_start() - initialize the sink iteration either to kernel log
-+ * or to secondary log_sfile
-+ * @s:         Current log state.
-+ * @sink:      trusty_log_sink_state holding the get index on a given sink
-+ * @index:     Unwrapped ring buffer index from where iteration shall start
-+ *
-+ * Return: 0 if successful, negative error code otherwise
-+ */
-+static int trusty_log_start(struct trusty_log_state *s,
-+			    struct trusty_log_sink_state *sink,
-+			    u32 index)
-+{
-+	struct log_rb *log;
-+
-+	if (WARN_ON(!s))
-+		return -EINVAL;
-+
-+	log = s->log;
-+	if (WARN_ON(!is_power_of_2(log->sz)))
-+		return -EINVAL;
-+
-+	sink->get = index;
-+	return 0;
-+}
-+
-+/**
-+ * trusty_log_show() - sink log entry at current iteration
-+ * @s:         Current log state.
-+ * @sink:      trusty_log_sink_state holding the get index on a given sink
-+ */
-+static void trusty_log_show(struct trusty_log_state *s,
-+			    struct trusty_log_sink_state *sink)
-+{
-+	struct log_rb *log = s->log;
-+	u32 alloc, put, get;
-+	int read_chars;
-+
-+	/*
-+	 * For this ring buffer, at any given point, alloc >= put >= get.
-+	 * The producer side of the buffer is not locked, so the put and alloc
-+	 * pointers must be read in a defined order (put before alloc) so
-+	 * that the above condition is maintained. A read barrier is needed
-+	 * to make sure the hardware and compiler keep the reads ordered.
-+	 */
-+	get = sink->get;
-+	put = log->put;
-+
-+	/* Make sure that the read of put occurs before the read of log data */
-+	rmb();
-+
-+	/* Read a line from the log */
-+	read_chars = log_read_line(s, put, get);
-+
-+	/* Force the loads from log_read_line to complete. */
-+	rmb();
-+	alloc = log->alloc;
-+
-+	/*
-+	 * Discard the line that was just read if the data could
-+	 * have been corrupted by the producer.
-+	 */
-+	if (u32_sub_overflow(alloc, get) > log->sz) {
-+		/*
-+		 * this condition is acceptable in the case of the sfile sink
-+		 * when attempting to read the oldest entry (at alloc-log->sz)
-+		 * which may be overrun by a new one when ring buffer write
-+		 * index wraps around.
-+		 * So the overrun is not reported in case the oldest line
-+		 * was being read.
-+		 */
-+		if (sink->sfile) {
-+			if (!sink->ignore_overflow)
-+				seq_puts(sink->sfile, "log overflow.\n");
-+			/* coalesce subsequent contiguous overflows. */
-+			sink->ignore_overflow = true;
-+		} else {
-+			dev_err(s->dev, "log overflow.\n");
-+		}
-+		sink->get = u32_sub_overflow(alloc, log->sz);
-+		return;
-+	}
-+	/* compute next line index */
-+	sink->get = u32_add_overflow(get, read_chars);
-+	/* once a line is valid, ignore_overflow must be disabled */
-+	sink->ignore_overflow = false;
-+	if (sink->sfile) {
-+		seq_printf(sink->sfile, "%s", s->line_buffer);
-+	} else {
-+		if (sink->trusty_panicked ||
-+		    __ratelimit(&trusty_log_rate_limit)) {
-+			dev_info(s->dev, "%s", s->line_buffer);
-+		}
-+	}
-+}
-+
-+static void *trusty_log_seq_start(struct seq_file *sfile, loff_t *pos)
-+{
-+	struct trusty_log_sfile *lb;
-+	struct trusty_log_state *s;
-+	struct log_rb *log;
-+	struct trusty_log_sink_state *log_sfile_sink;
-+	u32 index;
-+	int rc;
-+
-+	if (WARN_ON(!pos))
-+		return ERR_PTR(-EINVAL);
-+
-+	lb = sfile->private;
-+	if (WARN_ON(!lb))
-+		return ERR_PTR(-EINVAL);
-+
-+	log_sfile_sink = kzalloc(sizeof(*log_sfile_sink), GFP_KERNEL);
-+	if (!log_sfile_sink)
-+		return ERR_PTR(-ENOMEM);
-+
-+	s = container_of(lb, struct trusty_log_state, log_sfile);
-+	log_sfile_sink->sfile = sfile;
-+	log = s->log;
-+	if (*pos == 0) {
-+		/* start at the oldest line */
-+		index = 0;
-+		if (log->alloc > log->sz)
-+			index = u32_sub_overflow(log->alloc, log->sz);
-+	} else {
-+		/*
-+		 * '*pos>0': pos hold the 32bits unwrapped index from where
-+		 * to start iterating
-+		 */
-+		index = (u32)*pos;
-+	}
-+	pr_debug("%s start=%u\n", __func__, index);
-+
-+	log_sfile_sink->ignore_overflow = true;
-+	rc = trusty_log_start(s, log_sfile_sink, index);
-+	if (rc < 0)
-+		goto free_sink;
-+
-+	if (!trusty_log_has_data(s, log_sfile_sink))
-+		goto free_sink;
-+
-+	return log_sfile_sink;
-+
-+free_sink:
-+	pr_debug("%s kfree\n", __func__);
-+	kfree(log_sfile_sink);
-+	return rc < 0 ? ERR_PTR(rc) : NULL;
-+}
-+
-+static void *trusty_log_seq_next(struct seq_file *sfile, void *v, loff_t *pos)
-+{
-+	struct trusty_log_sfile *lb;
-+	struct trusty_log_state *s;
-+	struct trusty_log_sink_state *log_sfile_sink = v;
-+	int rc = 0;
-+
-+	if (WARN_ON(!log_sfile_sink))
-+		return ERR_PTR(-EINVAL);
-+
-+	lb = sfile->private;
-+	if (WARN_ON(!lb)) {
-+		rc = -EINVAL;
-+		goto end_of_iter;
-+	}
-+	s = container_of(lb, struct trusty_log_state, log_sfile);
-+
-+	if (WARN_ON(!pos)) {
-+		rc = -EINVAL;
-+		goto end_of_iter;
-+	}
-+	/*
-+	 * When starting a virtual file sink, the start function is invoked
-+	 * with a pos argument which value is set to zero.
-+	 * Subsequent starts are invoked with pos being set to
-+	 * the unwrapped read index (get).
-+	 * Upon u32 wraparound, the get index could be reset to zero.
-+	 * Thus a msb is used to distinguish the `get` zero value
-+	 * from the `start of file` zero value.
-+	 */
-+	*pos = (1UL << 32) + log_sfile_sink->get;
-+	if (!trusty_log_has_data(s, log_sfile_sink))
-+		goto end_of_iter;
-+
-+	return log_sfile_sink;
-+
-+end_of_iter:
-+	pr_debug("%s kfree\n", __func__);
-+	kfree(log_sfile_sink);
-+	return rc < 0 ? ERR_PTR(rc) : NULL;
-+}
-+
-+static void trusty_log_seq_stop(struct seq_file *sfile, void *v)
-+{
-+	/*
-+	 * When iteration completes or on error, the next callback frees
-+	 * the sink structure and returns NULL/error-code.
-+	 * In that case stop (being invoked with void* v set to the last next
-+	 * return value) would be invoked with v == NULL or error code.
-+	 * When user space stops the iteration earlier than the end
-+	 * (in case of user-space memory allocation limit for example)
-+	 * then the stop function receives a non NULL get pointer
-+	 * and is in charge or freeing the sink structure.
-+	 */
-+	struct trusty_log_sink_state *log_sfile_sink = v;
-+
-+	/* nothing to do - sink structure already freed */
-+	if (IS_ERR_OR_NULL(log_sfile_sink))
-+		return;
-+
-+	kfree(log_sfile_sink);
-+
-+	pr_debug("%s kfree\n", __func__);
-+}
-+
-+static int trusty_log_seq_show(struct seq_file *sfile, void *v)
-+{
-+	struct trusty_log_sfile *lb;
-+	struct trusty_log_state *s;
-+	struct trusty_log_sink_state *log_sfile_sink = v;
-+
-+	if (WARN_ON(!log_sfile_sink))
-+		return -EINVAL;
-+
-+	lb = sfile->private;
-+	if (WARN_ON(!lb))
-+		return -EINVAL;
-+
-+	s = container_of(lb, struct trusty_log_state, log_sfile);
-+
-+	trusty_log_show(s, log_sfile_sink);
-+	return 0;
-+}
-+
-+static void trusty_dump_logs(struct trusty_log_state *s)
-+{
-+	int rc;
-+	/*
-+	 * note: klog_sink.get initialized to zero by kzalloc
-+	 */
-+	s->klog_sink.trusty_panicked = trusty_get_panic_status(s->trusty_dev);
-+
-+	rc = trusty_log_start(s, &s->klog_sink, s->klog_sink.get);
-+	if (rc < 0)
-+		return;
-+
-+	while (trusty_log_has_data(s, &s->klog_sink))
-+		trusty_log_show(s, &s->klog_sink);
-+}
-+
-+static int trusty_log_call_notify(struct notifier_block *nb,
-+				  unsigned long action, void *data)
-+{
-+	struct trusty_log_state *s;
-+	unsigned long flags;
-+	u32 cur_put;
-+
-+	if (action != TRUSTY_CALL_RETURNED)
-+		return NOTIFY_DONE;
-+
-+	s = container_of(nb, struct trusty_log_state, call_notifier);
-+	spin_lock_irqsave(&s->wake_up_lock, flags);
-+	cur_put = s->log->put;
-+	if (cur_put != s->last_wake_put) {
-+		s->last_wake_put = cur_put;
-+		wake_up_all(&s->poll_waiters);
-+	}
-+	spin_unlock_irqrestore(&s->wake_up_lock, flags);
-+	return NOTIFY_OK;
-+}
-+
-+static int trusty_log_panic_notify(struct notifier_block *nb,
-+				   unsigned long action, void *data)
-+{
-+	struct trusty_log_state *s;
-+
-+	/*
-+	 * Don't grab the spin lock to hold up the panic notifier, even
-+	 * though this is racy.
-+	 */
-+	s = container_of(nb, struct trusty_log_state, panic_notifier);
-+	dev_info(s->dev, "panic notifier - trusty version %s",
-+		 trusty_version_str_get(s->trusty_dev));
-+	trusty_dump_logs(s);
-+	return NOTIFY_OK;
-+}
-+
-+const struct seq_operations trusty_log_seq_ops = {
-+	.start = trusty_log_seq_start,
-+	.stop = trusty_log_seq_stop,
-+	.next = trusty_log_seq_next,
-+	.show = trusty_log_seq_show,
-+};
-+
-+static int trusty_log_sfile_dev_open(struct inode *inode, struct file *file)
-+{
-+	struct trusty_log_sfile *ls;
-+	struct seq_file *sfile;
-+	int rc;
-+
-+	/*
-+	 * file->private_data contains a pointer to the misc_device struct
-+	 * passed to misc_register()
-+	 */
-+	if (WARN_ON(!file->private_data))
-+		return -EINVAL;
-+
-+	ls = container_of(file->private_data, struct trusty_log_sfile, misc);
-+
-+	/*
-+	 * seq_open uses file->private_data to store the seq_file associated
-+	 * with the struct file, but it must be NULL when seq_open is called
-+	 */
-+	file->private_data = NULL;
-+	rc = seq_open(file, &trusty_log_seq_ops);
-+	if (rc < 0)
-+		return rc;
-+
-+	sfile = file->private_data;
-+	if (WARN_ON(!sfile))
-+		return -EINVAL;
-+
-+	sfile->private = ls;
-+	return 0;
-+}
-+
-+static unsigned int trusty_log_sfile_dev_poll(struct file *filp,
-+					      struct poll_table_struct *wait)
-+{
-+	struct seq_file *sfile;
-+	struct trusty_log_sfile *lb;
-+	struct trusty_log_state *s;
-+	struct log_rb *log;
-+
-+	/*
-+	 * trusty_log_sfile_dev_open() pointed filp->private_data to a
-+	 * seq_file, and that seq_file->private to the trusty_log_sfile
-+	 * field of a trusty_log_state
-+	 */
-+	sfile = filp->private_data;
-+	lb = sfile->private;
-+	s = container_of(lb, struct trusty_log_state, log_sfile);
-+	poll_wait(filp, &s->poll_waiters, wait);
-+	log = s->log;
-+
-+	/*
-+	 * Userspace has read up to filp->f_pos so far. Update klog_sink
-+	 * to indicate that, so that we don't end up dumping the entire
-+	 * Trusty log in case of panic.
-+	 */
-+	s->klog_sink.get = (u32)filp->f_pos;
-+
-+	if (log->put != (u32)filp->f_pos) {
-+		/* data ready to read */
-+		return EPOLLIN | EPOLLRDNORM;
-+	}
-+	/* no data available, go to sleep */
-+	return 0;
-+}
-+
-+static const struct file_operations log_sfile_dev_operations = {
-+	.owner = THIS_MODULE,
-+	.open = trusty_log_sfile_dev_open,
-+	.poll = trusty_log_sfile_dev_poll,
-+	.read = seq_read,
-+	.release = seq_release,
-+};
-+
-+static int trusty_log_sfile_register(struct trusty_log_state *s)
-+{
-+	int ret;
-+	struct trusty_log_sfile *ls = &s->log_sfile;
-+
-+	if (WARN_ON(!ls))
-+		return -EINVAL;
-+
-+	snprintf(ls->device_name, sizeof(ls->device_name),
-+		 "trusty-log%d", s->dev->id);
-+	ls->misc.minor = MISC_DYNAMIC_MINOR;
-+	ls->misc.name = ls->device_name;
-+	ls->misc.fops = &log_sfile_dev_operations;
-+
-+	ret = misc_register(&ls->misc);
-+	if (ret) {
-+		dev_err(s->dev,
-+			"log_sfile error while doing misc_register ret=%d\n",
-+			ret);
-+		return ret;
-+	}
-+	dev_info(s->dev, "/dev/%s registered\n",
-+		 ls->device_name);
-+	return 0;
-+}
-+
-+static void trusty_log_sfile_unregister(struct trusty_log_state *s)
-+{
-+	struct trusty_log_sfile *ls = &s->log_sfile;
-+
-+	misc_deregister(&ls->misc);
-+	if (s->dev) {
-+		dev_info(s->dev, "/dev/%s unregistered\n",
-+			 ls->misc.name);
-+	}
-+}
-+
-+static bool trusty_supports_logging(struct device *device)
-+{
-+	int result;
-+
-+	result = trusty_std_call32(device, SMC_SC_SHARED_LOG_VERSION,
-+				   TRUSTY_LOG_API_VERSION, 0, 0);
-+	if (result == SM_ERR_UNDEFINED_SMC) {
-+		dev_info(device, "trusty-log not supported on secure side.\n");
-+		return false;
-+	} else if (result < 0) {
-+		dev_err(device,
-+			"trusty std call (SMC_SC_SHARED_LOG_VERSION) failed: %d\n",
-+			result);
-+		return false;
-+	}
-+
-+	if (result != TRUSTY_LOG_API_VERSION) {
-+		dev_info(device, "unsupported api version: %d, supported: %d\n",
-+			 result, TRUSTY_LOG_API_VERSION);
-+		return false;
-+	}
-+	return true;
-+}
-+
-+static int trusty_log_init(struct platform_device *pdev)
-+{
-+	struct trusty_log_state *s;
-+	struct scatterlist *sg;
-+	unsigned char *mem;
-+	int i;
-+	int result;
-+	trusty_shared_mem_id_t mem_id;
-+	int log_size;
-+
-+	s = kzalloc(sizeof(*s), GFP_KERNEL);
-+	if (!s) {
-+		result = -ENOMEM;
-+		goto error_alloc_state;
-+	}
-+
-+	s->dev = &pdev->dev;
-+	s->trusty_dev = s->dev->parent;
-+
-+	s->log_num_pages = DIV_ROUND_UP(log_size_param + sizeof(struct log_rb),
-+					PAGE_SIZE);
-+	s->sg = kcalloc(s->log_num_pages, sizeof(*s->sg), GFP_KERNEL);
-+	if (!s->sg) {
-+		result = -ENOMEM;
-+		goto error_alloc_sg;
-+	}
-+
-+	log_size = s->log_num_pages * PAGE_SIZE;
-+	mem = vzalloc(log_size);
-+	if (!mem) {
-+		result = -ENOMEM;
-+		goto error_alloc_log;
-+	}
-+
-+	s->log = (struct log_rb *)mem;
-+
-+	sg_init_table(s->sg, s->log_num_pages);
-+	for_each_sg(s->sg, sg, s->log_num_pages, i) {
-+		struct page *pg = vmalloc_to_page(mem + (i * PAGE_SIZE));
-+
-+		if (!pg) {
-+			result = -ENOMEM;
-+			goto err_share_memory;
-+		}
-+		sg_set_page(sg, pg, PAGE_SIZE, 0);
-+	}
-+	/*
-+	 * This will fail for Trusty api version < TRUSTY_API_VERSION_MEM_OBJ
-+	 * if s->log_num_pages > 1
-+	 * Use trusty_share_memory_compat instead of trusty_share_memory in case
-+	 * s->log_num_pages == 1 and api version < TRUSTY_API_VERSION_MEM_OBJ,
-+	 * In that case SMC_SC_SHARED_LOG_ADD expects a different value than
-+	 * what trusty_share_memory returns
-+	 */
-+	result = trusty_share_memory_compat(s->trusty_dev, &mem_id, s->sg,
-+					    s->log_num_pages, PAGE_KERNEL);
-+	if (result) {
-+		dev_err(s->dev, "trusty_share_memory failed: %d\n", result);
-+		goto err_share_memory;
-+	}
-+	s->log_pages_shared_mem_id = mem_id;
-+
-+	result = trusty_std_call32(s->trusty_dev,
-+				   SMC_SC_SHARED_LOG_ADD,
-+				   (u32)(mem_id), (u32)(mem_id >> 32),
-+				   log_size);
-+	if (result < 0) {
-+		dev_err(s->dev,
-+			"trusty std call (SMC_SC_SHARED_LOG_ADD) failed: %d 0x%llx\n",
-+			result, mem_id);
-+		goto error_std_call;
-+	}
-+
-+	init_waitqueue_head(&s->poll_waiters);
-+	spin_lock_init(&s->wake_up_lock);
-+
-+	s->call_notifier.notifier_call = trusty_log_call_notify;
-+	result = trusty_call_notifier_register(s->trusty_dev,
-+					       &s->call_notifier);
-+	if (result < 0) {
-+		dev_err(&pdev->dev,
-+			"failed to register trusty call notifier\n");
-+		goto error_call_notifier;
-+	}
-+
-+	s->panic_notifier.notifier_call = trusty_log_panic_notify;
-+	result = atomic_notifier_chain_register(&panic_notifier_list,
-+						&s->panic_notifier);
-+	if (result < 0) {
-+		dev_err(&pdev->dev,
-+			"failed to register panic notifier\n");
-+		goto error_panic_notifier;
-+	}
-+
-+	result = trusty_log_sfile_register(s);
-+	if (result < 0) {
-+		dev_err(&pdev->dev, "failed to register log_sfile\n");
-+		goto error_log_sfile;
-+	}
-+
-+	platform_set_drvdata(pdev, s);
-+
-+	return 0;
-+
-+error_log_sfile:
-+	atomic_notifier_chain_unregister(&panic_notifier_list,
-+					 &s->panic_notifier);
-+error_panic_notifier:
-+	trusty_call_notifier_unregister(s->trusty_dev, &s->call_notifier);
-+error_call_notifier:
-+	trusty_std_call32(s->trusty_dev, SMC_SC_SHARED_LOG_RM,
-+			  (u32)mem_id, (u32)(mem_id >> 32), 0);
-+error_std_call:
-+	if (WARN_ON(trusty_reclaim_memory(s->trusty_dev, mem_id, s->sg,
-+					  s->log_num_pages))) {
-+		dev_err(&pdev->dev, "trusty_revoke_memory failed: %d 0x%llx\n",
-+			result, mem_id);
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+	} else {
-+err_share_memory:
-+		vfree(s->log);
-+	}
-+error_alloc_log:
-+	kfree(s->sg);
-+error_alloc_sg:
-+	kfree(s);
-+error_alloc_state:
-+	return result;
-+}
-+
-+static int trusty_log_probe(struct platform_device *pdev)
-+{
-+	int rc;
-+
-+	if (!trusty_supports_logging(pdev->dev.parent))
-+		return -ENXIO;
-+
-+	rc = trusty_log_init(pdev);
-+	if (rc && log_size_param > TRUSTY_LOG_MIN_SIZE) {
-+		dev_warn(&pdev->dev, "init failed, retrying with 1-page log\n");
-+		log_size_param = TRUSTY_LOG_MIN_SIZE;
-+		rc = trusty_log_init(pdev);
-+	}
-+	return rc;
-+}
-+
-+static int trusty_log_remove(struct platform_device *pdev)
-+{
-+	int result;
-+	struct trusty_log_state *s = platform_get_drvdata(pdev);
-+	trusty_shared_mem_id_t mem_id = s->log_pages_shared_mem_id;
-+
-+	trusty_log_sfile_unregister(s);
-+	atomic_notifier_chain_unregister(&panic_notifier_list,
-+					 &s->panic_notifier);
-+	trusty_call_notifier_unregister(s->trusty_dev, &s->call_notifier);
-+
-+	result = trusty_std_call32(s->trusty_dev, SMC_SC_SHARED_LOG_RM,
-+				   (u32)mem_id, (u32)(mem_id >> 32), 0);
-+	if (result) {
-+		dev_err(&pdev->dev,
-+			"trusty std call (SMC_SC_SHARED_LOG_RM) failed: %d\n",
-+			result);
-+	}
-+	result = trusty_reclaim_memory(s->trusty_dev, mem_id, s->sg,
-+				       s->log_num_pages);
-+	if (WARN_ON(result)) {
-+		dev_err(&pdev->dev,
-+			"trusty failed to remove shared memory: %d\n", result);
-+	} else {
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+		vfree(s->log);
-+	}
-+	kfree(s->sg);
-+	kfree(s);
-+
-+	return 0;
-+}
-+
-+static const struct of_device_id trusty_test_of_match[] = {
-+	{ .compatible = "android,trusty-log-v1", },
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(trusty, trusty_test_of_match);
-+
-+static struct platform_driver trusty_log_driver = {
-+	.probe = trusty_log_probe,
-+	.remove = trusty_log_remove,
-+	.driver = {
-+		.name = "trusty-log",
-+		.of_match_table = trusty_test_of_match,
-+	},
-+};
-+
-+module_platform_driver(trusty_log_driver);
-+
-+MODULE_LICENSE("GPL v2");
-+MODULE_DESCRIPTION("Trusty logging driver");
-diff --git a/drivers/trusty/trusty-log.h b/drivers/trusty/trusty-log.h
-new file mode 100644
-index 000000000000..7b5e6096b51e
---- /dev/null
-+++ b/drivers/trusty/trusty-log.h
-@@ -0,0 +1,28 @@
-+/* SPDX-License-Identifier: MIT */
-+/*
-+ * Copyright (c) 2015 Google, Inc.
-+ *
-+ * Trusty also has a copy of this header.  Please keep the copies in sync.
-+ */
-+#ifndef _TRUSTY_LOG_H_
-+#define _TRUSTY_LOG_H_
-+
-+/*
-+ * Ring buffer that supports one secure producer thread and one
-+ * linux side consumer thread.
-+ */
-+struct log_rb {
-+	volatile uint32_t alloc;
-+	volatile uint32_t put;
-+	uint32_t sz;
-+	volatile char data[];
-+} __packed;
-+
-+#define SMC_SC_SHARED_LOG_VERSION	SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 0)
-+#define SMC_SC_SHARED_LOG_ADD		SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 1)
-+#define SMC_SC_SHARED_LOG_RM		SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 2)
-+
-+#define TRUSTY_LOG_API_VERSION	1
-+
-+#endif
-+
-diff --git a/drivers/trusty/trusty-mem.c b/drivers/trusty/trusty-mem.c
-new file mode 100644
-index 000000000000..8a360298e501
---- /dev/null
-+++ b/drivers/trusty/trusty-mem.c
-@@ -0,0 +1,139 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2015 Google, Inc.
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/printk.h>
-+#include <linux/trusty/arm_ffa.h>
-+#include <linux/trusty/trusty.h>
-+#include <linux/trusty/smcall.h>
-+
-+#define MEM_ATTR_STRONGLY_ORDERED (0x00U)
-+#define MEM_ATTR_DEVICE (0x04U)
-+#define MEM_ATTR_NORMAL_NON_CACHEABLE (0x44U)
-+#define MEM_ATTR_NORMAL_WRITE_THROUGH (0xAAU)
-+#define MEM_ATTR_NORMAL_WRITE_BACK_READ_ALLOCATE (0xEEU)
-+#define MEM_ATTR_NORMAL_WRITE_BACK_WRITE_ALLOCATE (0xFFU)
-+
-+#define ATTR_RDONLY (1U << 7)
-+#define ATTR_INNER_SHAREABLE (3U << 8)
-+
-+static int get_mem_attr(struct page *page, pgprot_t pgprot)
-+{
-+#if defined(CONFIG_ARM64)
-+	u64 mair;
-+	unsigned int attr_index = (pgprot_val(pgprot) & PTE_ATTRINDX_MASK) >> 2;
-+
-+	asm ("mrs %0, mair_el1\n" : "=&r" (mair));
-+	return (mair >> (attr_index * 8)) & 0xff;
-+
-+#elif defined(CONFIG_ARM_LPAE)
-+	u32 mair;
-+	unsigned int attr_index = ((pgprot_val(pgprot) & L_PTE_MT_MASK) >> 2);
-+
-+	if (attr_index >= 4) {
-+		attr_index -= 4;
-+		asm volatile("mrc p15, 0, %0, c10, c2, 1\n" : "=&r" (mair));
-+	} else {
-+		asm volatile("mrc p15, 0, %0, c10, c2, 0\n" : "=&r" (mair));
-+	}
-+	return (mair >> (attr_index * 8)) & 0xff;
-+
-+#elif defined(CONFIG_ARM)
-+	/* check memory type */
-+	switch (pgprot_val(pgprot) & L_PTE_MT_MASK) {
-+	case L_PTE_MT_WRITEALLOC:
-+		return MEM_ATTR_NORMAL_WRITE_BACK_WRITE_ALLOCATE;
-+
-+	case L_PTE_MT_BUFFERABLE:
-+		return MEM_ATTR_NORMAL_NON_CACHEABLE;
-+
-+	case L_PTE_MT_WRITEBACK:
-+		return MEM_ATTR_NORMAL_WRITE_BACK_READ_ALLOCATE;
-+
-+	case L_PTE_MT_WRITETHROUGH:
-+		return MEM_ATTR_NORMAL_WRITE_THROUGH;
-+
-+	case L_PTE_MT_UNCACHED:
-+		return MEM_ATTR_STRONGLY_ORDERED;
-+
-+	case L_PTE_MT_DEV_SHARED:
-+	case L_PTE_MT_DEV_NONSHARED:
-+		return MEM_ATTR_DEVICE;
-+
-+	default:
-+		return -EINVAL;
-+	}
-+#else
-+	return 0;
-+#endif
-+}
-+
-+int trusty_encode_page_info(struct ns_mem_page_info *inf,
-+			    struct page *page, pgprot_t pgprot)
-+{
-+	int mem_attr;
-+	u64 pte;
-+	u8 ffa_mem_attr;
-+	u8 ffa_mem_perm = 0;
-+
-+	if (!inf || !page)
-+		return -EINVAL;
-+
-+	/* get physical address */
-+	pte = (u64)page_to_phys(page);
-+
-+	/* get memory attributes */
-+	mem_attr = get_mem_attr(page, pgprot);
-+	if (mem_attr < 0)
-+		return mem_attr;
-+
-+	switch (mem_attr) {
-+	case MEM_ATTR_STRONGLY_ORDERED:
-+		ffa_mem_attr = FFA_MEM_ATTR_DEVICE_NGNRNE;
-+		break;
-+
-+	case MEM_ATTR_DEVICE:
-+		ffa_mem_attr = FFA_MEM_ATTR_DEVICE_NGNRE;
-+		break;
-+
-+	case MEM_ATTR_NORMAL_NON_CACHEABLE:
-+		ffa_mem_attr = FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED;
-+		break;
-+
-+	case MEM_ATTR_NORMAL_WRITE_BACK_READ_ALLOCATE:
-+	case MEM_ATTR_NORMAL_WRITE_BACK_WRITE_ALLOCATE:
-+		ffa_mem_attr = FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB;
-+		break;
-+
-+	default:
-+		return -EINVAL;
-+	}
-+
-+	inf->paddr = pte;
-+
-+	/* add other attributes */
-+#if defined(CONFIG_ARM64) || defined(CONFIG_ARM_LPAE)
-+	pte |= pgprot_val(pgprot);
-+#elif defined(CONFIG_ARM)
-+	if (pgprot_val(pgprot) & L_PTE_RDONLY)
-+		pte |= ATTR_RDONLY;
-+	if (pgprot_val(pgprot) & L_PTE_SHARED)
-+		pte |= ATTR_INNER_SHAREABLE; /* inner sharable */
-+#endif
-+
-+	if (!(pte & ATTR_RDONLY))
-+		ffa_mem_perm |= FFA_MEM_PERM_RW;
-+	else
-+		ffa_mem_perm |= FFA_MEM_PERM_RO;
-+
-+	if ((pte & ATTR_INNER_SHAREABLE) == ATTR_INNER_SHAREABLE)
-+		ffa_mem_attr |= FFA_MEM_ATTR_INNER_SHAREABLE;
-+
-+	inf->ffa_mem_attr = ffa_mem_attr;
-+	inf->ffa_mem_perm = ffa_mem_perm;
-+	inf->compat_attr = (pte & 0x0000FFFFFFFFFFFFull) |
-+			   ((u64)mem_attr << 48);
-+	return 0;
-+}
-diff --git a/drivers/trusty/trusty-smc-arm.S b/drivers/trusty/trusty-smc-arm.S
-new file mode 100644
-index 000000000000..8ff83547d33f
---- /dev/null
-+++ b/drivers/trusty/trusty-smc-arm.S
-@@ -0,0 +1,41 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ */
-+
-+#include <linux/linkage.h>
-+
-+.arch_extension sec
-+
-+ENTRY(trusty_smc8)
-+    /* Save stack location where r3-r7 smc arguments are stored */
-+    mov     r12, sp
-+
-+    /* Save original r4-r7 values as caller expects these to be preserved */
-+    push    {r4-r7}
-+
-+    /* Save return value pointer and return address */
-+    push    {r0, lr}
-+
-+    /* arm abi shifts arguments when returning a struct, shift them back */
-+    mov     r0, r1
-+    mov     r1, r2
-+    mov     r2, r3
-+
-+    /* Load stack based arguments */
-+    ldmia   r12, {r3-r7}
-+
-+    smc     #0
-+
-+    /* Restore return address and get return value pointer */
-+    pop     {r12, lr}
-+
-+    /* Copy 8-register smc return value to struct smc_ret8 return value */
-+    stmia   r12, {r0-r7}
-+
-+    /* Restore original r4-r7 values */
-+    pop     {r4-r7}
-+
-+    /* Return */
-+    bx      lr
-+ENDPROC(trusty_smc8)
-diff --git a/drivers/trusty/trusty-smc-arm64.S b/drivers/trusty/trusty-smc-arm64.S
-new file mode 100644
-index 000000000000..14c8fed28a5e
---- /dev/null
-+++ b/drivers/trusty/trusty-smc-arm64.S
-@@ -0,0 +1,35 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ */
-+
-+#include <linux/linkage.h>
-+
-+.macro push ra, rb
-+stp \ra, \rb, [sp,#-16]!
-+.endm
-+
-+.macro pop ra, rb
-+ldp \ra, \rb, [sp], #16
-+.endm
-+
-+lr .req x30
-+
-+SYM_FUNC_START(trusty_smc8)
-+    /*
-+     * Save x8 (return value ptr) and lr. The SMC calling convention says el3
-+     * does not need to preserve x8. The normal ABI does not require either x8
-+     * or lr to be preserved.
-+     */
-+    push    x8, lr
-+    smc     #0
-+    pop     x8, lr
-+
-+    /* Copy 8-register smc return value to struct smc_ret8 return value */
-+    stp     x0, x1, [x8], #16
-+    stp     x2, x3, [x8], #16
-+    stp     x4, x5, [x8], #16
-+    stp     x6, x7, [x8], #16
-+
-+    ret
-+SYM_FUNC_END(trusty_smc8)
-diff --git a/drivers/trusty/trusty-smc.h b/drivers/trusty/trusty-smc.h
-new file mode 100644
-index 000000000000..b53e5abb4d05
---- /dev/null
-+++ b/drivers/trusty/trusty-smc.h
-@@ -0,0 +1,26 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ */
-+#ifndef _TRUSTY_SMC_H
-+#define _TRUSTY_SMC_H
-+
-+#include <linux/types.h>
-+
-+struct smc_ret8 {
-+	unsigned long r0;
-+	unsigned long r1;
-+	unsigned long r2;
-+	unsigned long r3;
-+	unsigned long r4;
-+	unsigned long r5;
-+	unsigned long r6;
-+	unsigned long r7;
-+};
-+
-+struct smc_ret8 trusty_smc8(unsigned long r0, unsigned long r1,
-+			    unsigned long r2, unsigned long r3,
-+			    unsigned long r4, unsigned long r5,
-+			    unsigned long r6, unsigned long r7);
-+
-+#endif /* _TRUSTY_SMC_H */
-diff --git a/drivers/trusty/trusty-test.c b/drivers/trusty/trusty-test.c
-new file mode 100644
-index 000000000000..844868981fa5
---- /dev/null
-+++ b/drivers/trusty/trusty-test.c
-@@ -0,0 +1,440 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ */
-+
-+#include <linux/ctype.h>
-+#include <linux/list.h>
-+#include <linux/platform_device.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/trusty.h>
-+#include <linux/scatterlist.h>
-+#include <linux/slab.h>
-+#include <linux/mm.h>
-+#include <linux/mod_devicetable.h>
-+#include <linux/module.h>
-+
-+#include "trusty-test.h"
-+
-+struct trusty_test_state {
-+	struct device *dev;
-+	struct device *trusty_dev;
-+};
-+
-+struct trusty_test_shmem_obj {
-+	struct list_head node;
-+	size_t page_count;
-+	struct page **pages;
-+	void *buf;
-+	struct sg_table sgt;
-+	trusty_shared_mem_id_t mem_id;
-+};
-+
-+/*
-+ * Allocate a test object with @page_count number of pages, map it and add it to
-+ * @list.
-+ * For multi-page allocations, order the pages so they are not contiguous.
-+ */
-+static int trusty_test_alloc_obj(struct trusty_test_state *s,
-+				 size_t page_count,
-+				 struct list_head *list)
-+{
-+	size_t i;
-+	int ret = -ENOMEM;
-+	struct trusty_test_shmem_obj *obj;
-+
-+	obj = kzalloc(sizeof(*obj), GFP_KERNEL);
-+	if (!obj)
-+		goto err_alloc_obj;
-+	obj->page_count = page_count;
-+
-+	obj->pages = kmalloc_array(page_count, sizeof(*obj->pages), GFP_KERNEL);
-+	if (!obj->pages) {
-+		ret = -ENOMEM;
-+		dev_err(s->dev, "failed to allocate page array, count %zd\n",
-+			page_count);
-+		goto err_alloc_pages;
-+	}
-+
-+	for (i = 0; i < page_count; i++) {
-+		obj->pages[i] = alloc_page(GFP_KERNEL);
-+		if (!obj->pages[i]) {
-+			ret = -ENOMEM;
-+			dev_err(s->dev, "failed to allocate page %zd/%zd\n",
-+				i, page_count);
-+			goto err_alloc_page;
-+		}
-+		if (i > 0 && obj->pages[i - 1] + 1 == obj->pages[i]) {
-+			/* swap adacent pages to increase fragmentation */
-+			swap(obj->pages[i - 1], obj->pages[i]);
-+		}
-+	}
-+
-+	obj->buf = vmap(obj->pages, page_count, VM_MAP, PAGE_KERNEL);
-+	if (!obj->buf) {
-+		ret = -ENOMEM;
-+		dev_err(s->dev, "failed to map test buffer page count %zd\n",
-+			page_count);
-+		goto err_map_pages;
-+	}
-+
-+	ret = sg_alloc_table_from_pages(&obj->sgt, obj->pages, page_count,
-+					0, page_count * PAGE_SIZE, GFP_KERNEL);
-+	if (ret) {
-+		dev_err(s->dev, "sg_alloc_table_from_pages failed: %d\n", ret);
-+		goto err_alloc_sgt;
-+	}
-+	list_add_tail(&obj->node, list);
-+	dev_dbg(s->dev, "buffer has %d page runs\n", obj->sgt.nents);
-+	return 0;
-+
-+err_alloc_sgt:
-+	vunmap(obj->buf);
-+err_map_pages:
-+	for (i = page_count; i > 0; i--) {
-+		__free_page(obj->pages[i - 1]);
-+err_alloc_page:
-+		;
-+	}
-+	kfree(obj->pages);
-+err_alloc_pages:
-+	kfree(obj);
-+err_alloc_obj:
-+	return ret;
-+}
-+
-+/* Unlink, unmap and free a test object and its pages */
-+static void trusty_test_free_obj(struct trusty_test_state *s,
-+				 struct trusty_test_shmem_obj *obj)
-+{
-+	size_t i;
-+
-+	list_del(&obj->node);
-+	sg_free_table(&obj->sgt);
-+	vunmap(obj->buf);
-+	for (i = obj->page_count; i > 0; i--)
-+		__free_page(obj->pages[i - 1]);
-+	kfree(obj->pages);
-+	kfree(obj);
-+}
-+
-+/*
-+ * Share all the pages of all the test object in &obj_list.
-+ * If sharing a test object fails, free it so that every test object that
-+ * remains in @obj_list has been shared when this function returns.
-+ * Return a error if any test object failed to be shared.
-+ */
-+static int trusty_test_share_objs(struct trusty_test_state *s,
-+				  struct list_head *obj_list, size_t size)
-+{
-+	int ret = 0;
-+	int tmpret;
-+	struct trusty_test_shmem_obj *obj;
-+	struct trusty_test_shmem_obj *next_obj;
-+	ktime_t t1;
-+	ktime_t t2;
-+
-+	list_for_each_entry_safe(obj, next_obj, obj_list, node) {
-+		t1 = ktime_get();
-+		tmpret = trusty_share_memory(s->trusty_dev, &obj->mem_id,
-+					     obj->sgt.sgl, obj->sgt.nents,
-+					     PAGE_KERNEL);
-+		t2 = ktime_get();
-+		if (tmpret) {
-+			ret = tmpret;
-+			dev_err(s->dev,
-+				"trusty_share_memory failed: %d, size=%zd\n",
-+				ret, size);
-+
-+			/*
-+			 * Free obj and continue, so we can revoke the
-+			 * whole list in trusty_test_reclaim_objs.
-+			 */
-+			trusty_test_free_obj(s, obj);
-+		}
-+		dev_dbg(s->dev, "share id=0x%llx, size=%zu took %lld ns\n",
-+			obj->mem_id, size,
-+			ktime_to_ns(ktime_sub(t2, t1)));
-+	}
-+
-+	return ret;
-+}
-+
-+/* Reclaim memory shared with trusty for all test objects in @obj_list. */
-+static int trusty_test_reclaim_objs(struct trusty_test_state *s,
-+				    struct list_head *obj_list, size_t size)
-+{
-+	int ret = 0;
-+	int tmpret;
-+	struct trusty_test_shmem_obj *obj;
-+	struct trusty_test_shmem_obj *next_obj;
-+	ktime_t t1;
-+	ktime_t t2;
-+
-+	list_for_each_entry_safe(obj, next_obj, obj_list, node) {
-+		t1 = ktime_get();
-+		tmpret = trusty_reclaim_memory(s->trusty_dev, obj->mem_id,
-+					       obj->sgt.sgl, obj->sgt.nents);
-+		t2 = ktime_get();
-+		if (tmpret) {
-+			ret = tmpret;
-+			dev_err(s->dev,
-+				"trusty_reclaim_memory failed: %d, id=0x%llx\n",
-+				ret, obj->mem_id);
-+
-+			/*
-+			 * It is not safe to free this memory if
-+			 * trusty_reclaim_memory fails. Leak it in that
-+			 * case.
-+			 */
-+			list_del(&obj->node);
-+		}
-+		dev_dbg(s->dev, "revoke id=0x%llx, size=%zu took %lld ns\n",
-+			obj->mem_id, size,
-+			ktime_to_ns(ktime_sub(t2, t1)));
-+	}
-+
-+	return ret;
-+}
-+
-+/*
-+ * Test a test object. First, initialize the memory, then make a std call into
-+ * trusty which will read it and return an error if the initialized value does
-+ * not match what it expects. If trusty reads the correct values, it will modify
-+ * the memory and return 0. This function then checks that it can read the
-+ * correct modified value.
-+ */
-+static int trusty_test_rw(struct trusty_test_state *s,
-+			  struct trusty_test_shmem_obj *obj)
-+{
-+	size_t size = obj->page_count * PAGE_SIZE;
-+	int ret;
-+	size_t i;
-+	u64 *buf = obj->buf;
-+	ktime_t t1;
-+	ktime_t t2;
-+
-+	for (i = 0; i < size / sizeof(*buf); i++)
-+		buf[i] = i;
-+
-+	t1 = ktime_get();
-+	ret = trusty_std_call32(s->trusty_dev, SMC_SC_TEST_SHARED_MEM_RW,
-+				(u32)(obj->mem_id), (u32)(obj->mem_id >> 32),
-+				size);
-+	t2 = ktime_get();
-+	if (ret < 0) {
-+		dev_err(s->dev,
-+			"trusty std call (SMC_SC_TEST_SHARED_MEM_RW) failed: %d 0x%llx\n",
-+			ret, obj->mem_id);
-+		return ret;
-+	}
-+
-+	for (i = 0; i < size / sizeof(*buf); i++) {
-+		if (buf[i] != size - i) {
-+			dev_err(s->dev,
-+				"input mismatch at %zd, got 0x%llx instead of 0x%zx\n",
-+				i, buf[i], size - i);
-+			return -EIO;
-+		}
-+	}
-+
-+	dev_dbg(s->dev, "rw id=0x%llx, size=%zu took %lld ns\n", obj->mem_id,
-+		size, ktime_to_ns(ktime_sub(t2, t1)));
-+
-+	return 0;
-+}
-+
-+/*
-+ * Run test on every test object in @obj_list. Repeat @repeat_access times.
-+ */
-+static int trusty_test_rw_objs(struct trusty_test_state *s,
-+			       struct list_head *obj_list,
-+			       size_t repeat_access)
-+{
-+	int ret;
-+	size_t i;
-+	struct trusty_test_shmem_obj *obj;
-+
-+	for (i = 0; i < repeat_access; i++) {
-+		/*
-+		 * Repeat test in case the memory attributes don't match
-+		 * and either side see old data.
-+		 */
-+		list_for_each_entry(obj, obj_list, node) {
-+			ret = trusty_test_rw(s, obj);
-+			if (ret)
-+				return ret;
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+/*
-+ * Allocate @obj_count test object that each have @page_count pages. Share each
-+ * object @repeat_share times, each time running tests on every object
-+ * @repeat_access times.
-+ */
-+static int trusty_test_run(struct trusty_test_state *s, size_t page_count,
-+			   size_t obj_count, size_t repeat_share,
-+			   size_t repeat_access)
-+{
-+	int ret = 0;
-+	int tmpret;
-+	size_t i;
-+	size_t size = page_count * PAGE_SIZE;
-+	LIST_HEAD(obj_list);
-+	struct trusty_test_shmem_obj *obj;
-+	struct trusty_test_shmem_obj *next_obj;
-+
-+	for (i = 0; i < obj_count && !ret; i++)
-+		ret = trusty_test_alloc_obj(s, page_count, &obj_list);
-+
-+	for (i = 0; i < repeat_share && !ret; i++) {
-+		ret = trusty_test_share_objs(s, &obj_list, size);
-+		if (ret) {
-+			dev_err(s->dev,
-+				"trusty_share_memory failed: %d, i=%zd/%zd, size=%zd\n",
-+				ret, i, repeat_share, size);
-+		} else {
-+			ret = trusty_test_rw_objs(s, &obj_list, repeat_access);
-+			if (ret)
-+				dev_err(s->dev,
-+					"test failed: %d, i=%zd/%zd, size=%zd\n",
-+					ret, i, repeat_share, size);
-+		}
-+		tmpret = trusty_test_reclaim_objs(s, &obj_list, size);
-+		if (tmpret) {
-+			ret = tmpret;
-+			dev_err(s->dev,
-+				"trusty_reclaim_memory failed: %d, i=%zd/%zd\n",
-+				ret, i, repeat_share);
-+		}
-+	}
-+
-+	list_for_each_entry_safe(obj, next_obj, &obj_list, node)
-+		trusty_test_free_obj(s, obj);
-+
-+	dev_info(s->dev, "[ %s ] size %zd, obj_count %zd, repeat_share %zd, repeat_access %zd\n",
-+		 ret ? "FAILED" : "PASSED", size, obj_count, repeat_share,
-+		 repeat_access);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Get an optional numeric argument from @buf, update @buf and return the value.
-+ * If @buf does not start with ",", return @default_val instead.
-+ */
-+static size_t trusty_test_get_arg(const char **buf, size_t default_val)
-+{
-+	char *buf_next;
-+	size_t ret;
-+
-+	if (**buf != ',')
-+		return default_val;
-+
-+	(*buf)++;
-+	ret = simple_strtoul(*buf, &buf_next, 0);
-+	if (buf_next == *buf)
-+		return default_val;
-+
-+	*buf = buf_next;
-+
-+	return ret;
-+}
-+
-+/*
-+ * Run tests described by a string in this format:
-+ * <obj_size>,<obj_count=1>,<repeat_share=1>,<repeat_access=3>
-+ */
-+static ssize_t trusty_test_run_store(struct device *dev,
-+				     struct device_attribute *attr,
-+				     const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct trusty_test_state *s = platform_get_drvdata(pdev);
-+	size_t size;
-+	size_t obj_count;
-+	size_t repeat_share;
-+	size_t repeat_access;
-+	int ret;
-+	char *buf_next;
-+
-+	while (true) {
-+		while (isspace(*buf))
-+			buf++;
-+		size = simple_strtoul(buf, &buf_next, 0);
-+		if (buf_next == buf)
-+			return count;
-+		buf = buf_next;
-+		obj_count = trusty_test_get_arg(&buf, 1);
-+		repeat_share = trusty_test_get_arg(&buf, 1);
-+		repeat_access = trusty_test_get_arg(&buf, 3);
-+
-+		ret = trusty_test_run(s, DIV_ROUND_UP(size, PAGE_SIZE),
-+				      obj_count, repeat_share, repeat_access);
-+		if (ret)
-+			return ret;
-+	}
-+}
-+
-+static DEVICE_ATTR_WO(trusty_test_run);
-+
-+static struct attribute *trusty_test_attrs[] = {
-+	&dev_attr_trusty_test_run.attr,
-+	NULL,
-+};
-+ATTRIBUTE_GROUPS(trusty_test);
-+
-+static int trusty_test_probe(struct platform_device *pdev)
-+{
-+	struct trusty_test_state *s;
-+	int ret;
-+
-+	ret = trusty_std_call32(pdev->dev.parent, SMC_SC_TEST_VERSION,
-+				TRUSTY_STDCALLTEST_API_VERSION, 0, 0);
-+	if (ret != TRUSTY_STDCALLTEST_API_VERSION)
-+		return -ENOENT;
-+
-+	s = kzalloc(sizeof(*s), GFP_KERNEL);
-+	if (!s)
-+		return -ENOMEM;
-+
-+	s->dev = &pdev->dev;
-+	s->trusty_dev = s->dev->parent;
-+
-+	platform_set_drvdata(pdev, s);
-+
-+	return 0;
-+}
-+
-+static int trusty_test_remove(struct platform_device *pdev)
-+{
-+	struct trusty_log_state *s = platform_get_drvdata(pdev);
-+
-+	kfree(s);
-+	return 0;
-+}
-+
-+static const struct of_device_id trusty_test_of_match[] = {
-+	{ .compatible = "android,trusty-test-v1", },
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(trusty, trusty_test_of_match);
-+
-+static struct platform_driver trusty_test_driver = {
-+	.probe = trusty_test_probe,
-+	.remove = trusty_test_remove,
-+	.driver = {
-+		.name = "trusty-test",
-+		.of_match_table = trusty_test_of_match,
-+		.dev_groups = trusty_test_groups,
-+	},
-+};
-+
-+module_platform_driver(trusty_test_driver);
-+
-+MODULE_LICENSE("GPL v2");
-+MODULE_DESCRIPTION("Trusty test driver");
-diff --git a/drivers/trusty/trusty-test.h b/drivers/trusty/trusty-test.h
-new file mode 100644
-index 000000000000..eea7beb96876
---- /dev/null
-+++ b/drivers/trusty/trusty-test.h
-@@ -0,0 +1,13 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (c) 2020 Google, Inc.
-+ */
-+#ifndef _TRUSTY_TEST_H
-+#define _TRUSTY_TEST_H
-+
-+#define SMC_SC_TEST_VERSION SMC_STDCALL_NR(SMC_ENTITY_TEST, 0)
-+#define SMC_SC_TEST_SHARED_MEM_RW SMC_STDCALL_NR(SMC_ENTITY_TEST, 1)
-+
-+#define TRUSTY_STDCALLTEST_API_VERSION 1
-+
-+#endif /* _TRUSTY_TEST_H */
-diff --git a/drivers/trusty/trusty-virtio.c b/drivers/trusty/trusty-virtio.c
-new file mode 100644
-index 000000000000..fea59cd2e218
---- /dev/null
-+++ b/drivers/trusty/trusty-virtio.c
-@@ -0,0 +1,840 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Trusty Virtio driver
-+ *
-+ * Copyright (C) 2015 Google, Inc.
-+ */
-+#include <linux/device.h>
-+#include <linux/err.h>
-+#include <linux/kernel.h>
-+
-+#include <linux/dma-map-ops.h>
-+#include <linux/module.h>
-+#include <linux/mutex.h>
-+#include <linux/notifier.h>
-+#include <linux/workqueue.h>
-+#include <linux/remoteproc.h>
-+#include <linux/slab.h>
-+
-+#include <linux/platform_device.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/trusty.h>
-+#include <linux/trusty/trusty_ipc.h>
-+
-+#include <linux/virtio.h>
-+#include <linux/virtio_config.h>
-+#include <linux/virtio_ids.h>
-+#include <linux/virtio_ring.h>
-+
-+#include <linux/atomic.h>
-+
-+#define  RSC_DESCR_VER  1
-+
-+struct trusty_vdev;
-+
-+struct trusty_ctx {
-+	struct device		*dev;
-+	void			*shared_va;
-+	struct scatterlist	shared_sg;
-+	trusty_shared_mem_id_t	shared_id;
-+	size_t			shared_sz;
-+	struct work_struct	check_vqs;
-+	struct work_struct	kick_vqs;
-+	struct notifier_block	call_notifier;
-+	struct list_head	vdev_list;
-+	struct mutex		mlock; /* protects vdev_list */
-+	struct workqueue_struct	*kick_wq;
-+	struct workqueue_struct	*check_wq;
-+};
-+
-+struct trusty_vring {
-+	void			*vaddr;
-+	struct scatterlist	sg;
-+	trusty_shared_mem_id_t	shared_mem_id;
-+	size_t			size;
-+	unsigned int		align;
-+	unsigned int		elem_num;
-+	u32			notifyid;
-+	atomic_t		needs_kick;
-+	struct fw_rsc_vdev_vring *vr_descr;
-+	struct virtqueue	*vq;
-+	struct trusty_vdev	*tvdev;
-+	struct trusty_nop	kick_nop;
-+};
-+
-+struct trusty_vdev {
-+	struct list_head	node;
-+	struct virtio_device	vdev;
-+	struct trusty_ctx	*tctx;
-+	u32			notifyid;
-+	unsigned int		config_len;
-+	void			*config;
-+	struct fw_rsc_vdev	*vdev_descr;
-+	unsigned int		vring_num;
-+	struct trusty_vring	vrings[];
-+};
-+
-+#define vdev_to_tvdev(vd)  container_of((vd), struct trusty_vdev, vdev)
-+
-+static void check_all_vqs(struct work_struct *work)
-+{
-+	unsigned int i;
-+	struct trusty_ctx *tctx = container_of(work, struct trusty_ctx,
-+					       check_vqs);
-+	struct trusty_vdev *tvdev;
-+
-+	list_for_each_entry(tvdev, &tctx->vdev_list, node) {
-+		for (i = 0; i < tvdev->vring_num; i++)
-+			if (tvdev->vrings[i].vq)
-+				vring_interrupt(0, tvdev->vrings[i].vq);
-+	}
-+}
-+
-+static int trusty_call_notify(struct notifier_block *nb,
-+			      unsigned long action, void *data)
-+{
-+	struct trusty_ctx *tctx;
-+
-+	if (action != TRUSTY_CALL_RETURNED)
-+		return NOTIFY_DONE;
-+
-+	tctx = container_of(nb, struct trusty_ctx, call_notifier);
-+	queue_work(tctx->check_wq, &tctx->check_vqs);
-+
-+	return NOTIFY_OK;
-+}
-+
-+static void kick_vq(struct trusty_ctx *tctx,
-+		    struct trusty_vdev *tvdev,
-+		    struct trusty_vring *tvr)
-+{
-+	int ret;
-+
-+	dev_dbg(tctx->dev, "%s: vdev_id=%d: vq_id=%d\n",
-+		__func__, tvdev->notifyid, tvr->notifyid);
-+
-+	ret = trusty_std_call32(tctx->dev->parent, SMC_SC_VDEV_KICK_VQ,
-+				tvdev->notifyid, tvr->notifyid, 0);
-+	if (ret) {
-+		dev_err(tctx->dev, "vq notify (%d, %d) returned %d\n",
-+			tvdev->notifyid, tvr->notifyid, ret);
-+	}
-+}
-+
-+static void kick_vqs(struct work_struct *work)
-+{
-+	unsigned int i;
-+	struct trusty_vdev *tvdev;
-+	struct trusty_ctx *tctx = container_of(work, struct trusty_ctx,
-+					       kick_vqs);
-+	mutex_lock(&tctx->mlock);
-+	list_for_each_entry(tvdev, &tctx->vdev_list, node) {
-+		for (i = 0; i < tvdev->vring_num; i++) {
-+			struct trusty_vring *tvr = &tvdev->vrings[i];
-+
-+			if (atomic_xchg(&tvr->needs_kick, 0))
-+				kick_vq(tctx, tvdev, tvr);
-+		}
-+	}
-+	mutex_unlock(&tctx->mlock);
-+}
-+
-+static bool trusty_virtio_notify(struct virtqueue *vq)
-+{
-+	struct trusty_vring *tvr = vq->priv;
-+	struct trusty_vdev *tvdev = tvr->tvdev;
-+	struct trusty_ctx *tctx = tvdev->tctx;
-+	u32 api_ver = trusty_get_api_version(tctx->dev->parent);
-+
-+	if (api_ver < TRUSTY_API_VERSION_SMP_NOP) {
-+		atomic_set(&tvr->needs_kick, 1);
-+		queue_work(tctx->kick_wq, &tctx->kick_vqs);
-+	} else {
-+		trusty_enqueue_nop(tctx->dev->parent, &tvr->kick_nop);
-+	}
-+
-+	return true;
-+}
-+
-+static int trusty_load_device_descr(struct trusty_ctx *tctx,
-+				    trusty_shared_mem_id_t id, size_t sz)
-+{
-+	int ret;
-+
-+	dev_dbg(tctx->dev, "%s: %zu bytes @ id %llu\n", __func__, sz, id);
-+
-+	ret = trusty_std_call32(tctx->dev->parent, SMC_SC_VIRTIO_GET_DESCR,
-+				(u32)id, id >> 32, sz);
-+	if (ret < 0) {
-+		dev_err(tctx->dev, "%s: virtio get descr returned (%d)\n",
-+			__func__, ret);
-+		return -ENODEV;
-+	}
-+	return ret;
-+}
-+
-+static void trusty_virtio_stop(struct trusty_ctx *tctx,
-+			       trusty_shared_mem_id_t id, size_t sz)
-+{
-+	int ret;
-+
-+	dev_dbg(tctx->dev, "%s: %zu bytes @ id %llu\n", __func__, sz, id);
-+
-+	ret = trusty_std_call32(tctx->dev->parent, SMC_SC_VIRTIO_STOP,
-+				(u32)id, id >> 32, sz);
-+	if (ret) {
-+		dev_err(tctx->dev, "%s: virtio done returned (%d)\n",
-+			__func__, ret);
-+		return;
-+	}
-+}
-+
-+static int trusty_virtio_start(struct trusty_ctx *tctx,
-+			       trusty_shared_mem_id_t id, size_t sz)
-+{
-+	int ret;
-+
-+	dev_dbg(tctx->dev, "%s: %zu bytes @ id %llu\n", __func__, sz, id);
-+
-+	ret = trusty_std_call32(tctx->dev->parent, SMC_SC_VIRTIO_START,
-+				(u32)id, id >> 32, sz);
-+	if (ret) {
-+		dev_err(tctx->dev, "%s: virtio start returned (%d)\n",
-+			__func__, ret);
-+		return -ENODEV;
-+	}
-+	return 0;
-+}
-+
-+static void trusty_virtio_reset(struct virtio_device *vdev)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+	struct trusty_ctx *tctx = tvdev->tctx;
-+
-+	dev_dbg(&vdev->dev, "reset vdev_id=%d\n", tvdev->notifyid);
-+	trusty_std_call32(tctx->dev->parent, SMC_SC_VDEV_RESET,
-+			  tvdev->notifyid, 0, 0);
-+}
-+
-+static u64 trusty_virtio_get_features(struct virtio_device *vdev)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+
-+	return tvdev->vdev_descr->dfeatures |
-+		(1ULL << VIRTIO_F_ACCESS_PLATFORM);
-+}
-+
-+static int trusty_virtio_finalize_features(struct virtio_device *vdev)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+	u64 features = vdev->features;
-+
-+	/*
-+	 * We set VIRTIO_F_ACCESS_PLATFORM to enable the dma mapping hooks.
-+	 * The other side does not need to know.
-+	 */
-+	features &= ~(1ULL << VIRTIO_F_ACCESS_PLATFORM);
-+
-+	/* Make sure we don't have any features > 32 bits! */
-+	if (WARN_ON((u32)vdev->features != features))
-+		return -EINVAL;
-+
-+	tvdev->vdev_descr->gfeatures = vdev->features;
-+	return 0;
-+}
-+
-+static void trusty_virtio_get_config(struct virtio_device *vdev,
-+				     unsigned int offset, void *buf,
-+				     unsigned int len)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+
-+	dev_dbg(&vdev->dev, "%s: %d bytes @ offset %d\n",
-+		__func__, len, offset);
-+
-+	if (tvdev->config) {
-+		if (offset + len <= tvdev->config_len)
-+			memcpy(buf, tvdev->config + offset, len);
-+	}
-+}
-+
-+static void trusty_virtio_set_config(struct virtio_device *vdev,
-+				     unsigned int offset, const void *buf,
-+				     unsigned int len)
-+{
-+}
-+
-+static u8 trusty_virtio_get_status(struct virtio_device *vdev)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+
-+	return tvdev->vdev_descr->status;
-+}
-+
-+static void trusty_virtio_set_status(struct virtio_device *vdev, u8 status)
-+{
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+
-+	tvdev->vdev_descr->status = status;
-+}
-+
-+static void _del_vqs(struct virtio_device *vdev)
-+{
-+	unsigned int i;
-+	int ret;
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+	struct trusty_vring *tvr = &tvdev->vrings[0];
-+
-+	for (i = 0; i < tvdev->vring_num; i++, tvr++) {
-+		/* dequeue kick_nop */
-+		trusty_dequeue_nop(tvdev->tctx->dev->parent, &tvr->kick_nop);
-+
-+		/* delete vq */
-+		if (tvr->vq) {
-+			vring_del_virtqueue(tvr->vq);
-+			tvr->vq = NULL;
-+		}
-+		/* delete vring */
-+		if (tvr->vaddr) {
-+			ret = trusty_reclaim_memory(tvdev->tctx->dev->parent,
-+						    tvr->shared_mem_id,
-+						    &tvr->sg, 1);
-+			if (WARN_ON(ret)) {
-+				dev_err(&vdev->dev,
-+					"trusty_revoke_memory failed: %d 0x%llx\n",
-+					ret, tvr->shared_mem_id);
-+				/*
-+				 * It is not safe to free this memory if
-+				 * trusty_revoke_memory fails. Leak it in that
-+				 * case.
-+				 */
-+			} else {
-+				free_pages_exact(tvr->vaddr, tvr->size);
-+			}
-+			tvr->vaddr = NULL;
-+		}
-+	}
-+}
-+
-+static void trusty_virtio_del_vqs(struct virtio_device *vdev)
-+{
-+	_del_vqs(vdev);
-+}
-+
-+
-+static struct virtqueue *_find_vq(struct virtio_device *vdev,
-+				  unsigned int id,
-+				  void (*callback)(struct virtqueue *vq),
-+				  const char *name,
-+				  bool ctx)
-+{
-+	struct trusty_vring *tvr;
-+	struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
-+	phys_addr_t pa;
-+	int ret;
-+
-+	if (!name)
-+		return ERR_PTR(-EINVAL);
-+
-+	if (id >= tvdev->vring_num)
-+		return ERR_PTR(-EINVAL);
-+
-+	tvr = &tvdev->vrings[id];
-+
-+	/* actual size of vring (in bytes) */
-+	tvr->size = PAGE_ALIGN(vring_size(tvr->elem_num, tvr->align));
-+
-+	/* allocate memory for the vring. */
-+	tvr->vaddr = alloc_pages_exact(tvr->size, GFP_KERNEL | __GFP_ZERO);
-+	if (!tvr->vaddr) {
-+		dev_err(&vdev->dev, "vring alloc failed\n");
-+		return ERR_PTR(-ENOMEM);
-+	}
-+
-+	sg_init_one(&tvr->sg, tvr->vaddr, tvr->size);
-+	ret = trusty_share_memory_compat(tvdev->tctx->dev->parent,
-+					 &tvr->shared_mem_id, &tvr->sg, 1,
-+					 PAGE_KERNEL);
-+	if (ret) {
-+		pa = virt_to_phys(tvr->vaddr);
-+		dev_err(&vdev->dev, "trusty_share_memory failed: %d %pa\n",
-+			ret, &pa);
-+		goto err_share_memory;
-+	}
-+
-+	/* save vring address to shared structure */
-+	tvr->vr_descr->da = (u32)tvr->shared_mem_id;
-+
-+	/* da field is only 32 bit wide. Use previously unused 'reserved' field
-+	 * to store top 32 bits of 64-bit shared_mem_id
-+	 */
-+	tvr->vr_descr->pa = (u32)(tvr->shared_mem_id >> 32);
-+
-+	dev_info(&vdev->dev, "vring%d: va(id)  %p(%llx) qsz %d notifyid %d\n",
-+		 id, tvr->vaddr, (u64)tvr->shared_mem_id, tvr->elem_num,
-+		 tvr->notifyid);
-+
-+	tvr->vq = vring_new_virtqueue(id, tvr->elem_num, tvr->align,
-+				      vdev, true, ctx, tvr->vaddr,
-+				      trusty_virtio_notify, callback, name);
-+	if (!tvr->vq) {
-+		dev_err(&vdev->dev, "vring_new_virtqueue %s failed\n",
-+			name);
-+		goto err_new_virtqueue;
-+	}
-+
-+	tvr->vq->priv = tvr;
-+
-+	return tvr->vq;
-+
-+err_new_virtqueue:
-+	ret = trusty_reclaim_memory(tvdev->tctx->dev->parent,
-+				    tvr->shared_mem_id, &tvr->sg, 1);
-+	if (WARN_ON(ret)) {
-+		dev_err(&vdev->dev, "trusty_revoke_memory failed: %d 0x%llx\n",
-+			ret, tvr->shared_mem_id);
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+	} else {
-+err_share_memory:
-+		free_pages_exact(tvr->vaddr, tvr->size);
-+	}
-+	tvr->vaddr = NULL;
-+	return ERR_PTR(-ENOMEM);
-+}
-+
-+static int trusty_virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
-+				  struct virtqueue *vqs[],
-+				  vq_callback_t *callbacks[],
-+				  const char * const names[],
-+				  const bool *ctxs,
-+				  struct irq_affinity *desc)
-+{
-+	unsigned int i;
-+	int ret;
-+	bool ctx = false;
-+
-+	for (i = 0; i < nvqs; i++) {
-+		ctx = false;
-+		if (ctxs)
-+			ctx = ctxs[i];
-+		vqs[i] = _find_vq(vdev, i, callbacks[i], names[i], ctx);
-+		if (IS_ERR(vqs[i])) {
-+			ret = PTR_ERR(vqs[i]);
-+			_del_vqs(vdev);
-+			return ret;
-+		}
-+	}
-+	return 0;
-+}
-+
-+static const char *trusty_virtio_bus_name(struct virtio_device *vdev)
-+{
-+	return "trusty-virtio";
-+}
-+
-+/* The ops structure which hooks everything together. */
-+static const struct virtio_config_ops trusty_virtio_config_ops = {
-+	.get_features = trusty_virtio_get_features,
-+	.finalize_features = trusty_virtio_finalize_features,
-+	.get = trusty_virtio_get_config,
-+	.set = trusty_virtio_set_config,
-+	.get_status = trusty_virtio_get_status,
-+	.set_status = trusty_virtio_set_status,
-+	.reset    = trusty_virtio_reset,
-+	.find_vqs = trusty_virtio_find_vqs,
-+	.del_vqs  = trusty_virtio_del_vqs,
-+	.bus_name = trusty_virtio_bus_name,
-+};
-+
-+static int trusty_virtio_add_device(struct trusty_ctx *tctx,
-+				    struct fw_rsc_vdev *vdev_descr,
-+				    struct fw_rsc_vdev_vring *vr_descr,
-+				    void *config)
-+{
-+	int i, ret;
-+	struct trusty_vdev *tvdev;
-+
-+	tvdev = kzalloc(struct_size(tvdev, vrings, vdev_descr->num_of_vrings),
-+			GFP_KERNEL);
-+	if (!tvdev)
-+		return -ENOMEM;
-+
-+	/* setup vdev */
-+	tvdev->tctx = tctx;
-+	tvdev->vdev.dev.parent = tctx->dev;
-+	tvdev->vdev.id.device  = vdev_descr->id;
-+	tvdev->vdev.config = &trusty_virtio_config_ops;
-+	tvdev->vdev_descr = vdev_descr;
-+	tvdev->notifyid = vdev_descr->notifyid;
-+
-+	/* setup config */
-+	tvdev->config = config;
-+	tvdev->config_len = vdev_descr->config_len;
-+
-+	/* setup vrings and vdev resource */
-+	tvdev->vring_num = vdev_descr->num_of_vrings;
-+
-+	for (i = 0; i < tvdev->vring_num; i++, vr_descr++) {
-+		struct trusty_vring *tvr = &tvdev->vrings[i];
-+
-+		tvr->tvdev    = tvdev;
-+		tvr->vr_descr = vr_descr;
-+		tvr->align    = vr_descr->align;
-+		tvr->elem_num = vr_descr->num;
-+		tvr->notifyid = vr_descr->notifyid;
-+		trusty_nop_init(&tvr->kick_nop, SMC_NC_VDEV_KICK_VQ,
-+				tvdev->notifyid, tvr->notifyid);
-+	}
-+
-+	/* register device */
-+	ret = register_virtio_device(&tvdev->vdev);
-+	if (ret) {
-+		dev_err(tctx->dev,
-+			"Failed (%d) to register device dev type %u\n",
-+			ret, vdev_descr->id);
-+		goto err_register;
-+	}
-+
-+	/* add it to tracking list */
-+	list_add_tail(&tvdev->node, &tctx->vdev_list);
-+
-+	return 0;
-+
-+err_register:
-+	kfree(tvdev);
-+	return ret;
-+}
-+
-+static int trusty_parse_device_descr(struct trusty_ctx *tctx,
-+				     void *descr_va, size_t descr_sz)
-+{
-+	u32 i;
-+	struct resource_table *descr = descr_va;
-+
-+	if (descr_sz < sizeof(*descr)) {
-+		dev_err(tctx->dev, "descr table is too small (0x%x)\n",
-+			(int)descr_sz);
-+		return -ENODEV;
-+	}
-+
-+	if (descr->ver != RSC_DESCR_VER) {
-+		dev_err(tctx->dev, "unexpected descr ver (0x%x)\n",
-+			(int)descr->ver);
-+		return -ENODEV;
-+	}
-+
-+	if (descr_sz < (sizeof(*descr) + descr->num * sizeof(u32))) {
-+		dev_err(tctx->dev, "descr table is too small (0x%x)\n",
-+			(int)descr->ver);
-+		return -ENODEV;
-+	}
-+
-+	for (i = 0; i < descr->num; i++) {
-+		struct fw_rsc_hdr *hdr;
-+		struct fw_rsc_vdev *vd;
-+		struct fw_rsc_vdev_vring *vr;
-+		void *cfg;
-+		size_t vd_sz;
-+
-+		u32 offset = descr->offset[i];
-+
-+		if (offset >= descr_sz) {
-+			dev_err(tctx->dev, "offset is out of bounds (%u)\n",
-+				offset);
-+			return -ENODEV;
-+		}
-+
-+		/* check space for rsc header */
-+		if ((descr_sz - offset) < sizeof(struct fw_rsc_hdr)) {
-+			dev_err(tctx->dev, "no space for rsc header (%u)\n",
-+				offset);
-+			return -ENODEV;
-+		}
-+		hdr = (struct fw_rsc_hdr *)((u8 *)descr + offset);
-+		offset += sizeof(struct fw_rsc_hdr);
-+
-+		/* check type */
-+		if (hdr->type != RSC_VDEV) {
-+			dev_err(tctx->dev, "unsupported rsc type (%u)\n",
-+				hdr->type);
-+			continue;
-+		}
-+
-+		/* got vdev: check space for vdev */
-+		if ((descr_sz - offset) < sizeof(struct fw_rsc_vdev)) {
-+			dev_err(tctx->dev, "no space for vdev descr (%u)\n",
-+				offset);
-+			return -ENODEV;
-+		}
-+		vd = (struct fw_rsc_vdev *)((u8 *)descr + offset);
-+
-+		/* check space for vrings and config area */
-+		vd_sz = sizeof(struct fw_rsc_vdev) +
-+			vd->num_of_vrings * sizeof(struct fw_rsc_vdev_vring) +
-+			vd->config_len;
-+
-+		if ((descr_sz - offset) < vd_sz) {
-+			dev_err(tctx->dev, "no space for vdev (%u)\n", offset);
-+			return -ENODEV;
-+		}
-+		vr = (struct fw_rsc_vdev_vring *)vd->vring;
-+		cfg = (void *)(vr + vd->num_of_vrings);
-+
-+		trusty_virtio_add_device(tctx, vd, vr, cfg);
-+	}
-+
-+	return 0;
-+}
-+
-+static void _remove_devices_locked(struct trusty_ctx *tctx)
-+{
-+	struct trusty_vdev *tvdev, *next;
-+
-+	list_for_each_entry_safe(tvdev, next, &tctx->vdev_list, node) {
-+		list_del(&tvdev->node);
-+		unregister_virtio_device(&tvdev->vdev);
-+		kfree(tvdev);
-+	}
-+}
-+
-+static void trusty_virtio_remove_devices(struct trusty_ctx *tctx)
-+{
-+	mutex_lock(&tctx->mlock);
-+	_remove_devices_locked(tctx);
-+	mutex_unlock(&tctx->mlock);
-+}
-+
-+static int trusty_virtio_add_devices(struct trusty_ctx *tctx)
-+{
-+	int ret;
-+	int ret_tmp;
-+	void *descr_va;
-+	trusty_shared_mem_id_t descr_id;
-+	size_t descr_sz;
-+	size_t descr_buf_sz;
-+
-+	/* allocate buffer to load device descriptor into */
-+	descr_buf_sz = PAGE_SIZE;
-+	descr_va = alloc_pages_exact(descr_buf_sz, GFP_KERNEL | __GFP_ZERO);
-+	if (!descr_va) {
-+		dev_err(tctx->dev, "Failed to allocate shared area\n");
-+		return -ENOMEM;
-+	}
-+
-+	sg_init_one(&tctx->shared_sg, descr_va, descr_buf_sz);
-+	ret = trusty_share_memory(tctx->dev->parent, &descr_id,
-+				  &tctx->shared_sg, 1, PAGE_KERNEL);
-+	if (ret) {
-+		dev_err(tctx->dev, "trusty_share_memory failed: %d\n", ret);
-+		goto err_share_memory;
-+	}
-+
-+	/* load device descriptors */
-+	ret = trusty_load_device_descr(tctx, descr_id, descr_buf_sz);
-+	if (ret < 0) {
-+		dev_err(tctx->dev, "failed (%d) to load device descr\n", ret);
-+		goto err_load_descr;
-+	}
-+
-+	descr_sz = (size_t)ret;
-+
-+	mutex_lock(&tctx->mlock);
-+
-+	/* parse device descriptor and add virtio devices */
-+	ret = trusty_parse_device_descr(tctx, descr_va, descr_sz);
-+	if (ret) {
-+		dev_err(tctx->dev, "failed (%d) to parse device descr\n", ret);
-+		goto err_parse_descr;
-+	}
-+
-+	/* register call notifier */
-+	ret = trusty_call_notifier_register(tctx->dev->parent,
-+					    &tctx->call_notifier);
-+	if (ret) {
-+		dev_err(tctx->dev, "%s: failed (%d) to register notifier\n",
-+			__func__, ret);
-+		goto err_register_notifier;
-+	}
-+
-+	/* start virtio */
-+	ret = trusty_virtio_start(tctx, descr_id, descr_sz);
-+	if (ret) {
-+		dev_err(tctx->dev, "failed (%d) to start virtio\n", ret);
-+		goto err_start_virtio;
-+	}
-+
-+	/* attach shared area */
-+	tctx->shared_va = descr_va;
-+	tctx->shared_id = descr_id;
-+	tctx->shared_sz = descr_buf_sz;
-+
-+	mutex_unlock(&tctx->mlock);
-+
-+	return 0;
-+
-+err_start_virtio:
-+	trusty_call_notifier_unregister(tctx->dev->parent,
-+					&tctx->call_notifier);
-+	cancel_work_sync(&tctx->check_vqs);
-+err_register_notifier:
-+err_parse_descr:
-+	_remove_devices_locked(tctx);
-+	mutex_unlock(&tctx->mlock);
-+	cancel_work_sync(&tctx->kick_vqs);
-+	trusty_virtio_stop(tctx, descr_id, descr_sz);
-+err_load_descr:
-+	ret_tmp = trusty_reclaim_memory(tctx->dev->parent, descr_id,
-+					&tctx->shared_sg, 1);
-+	if (WARN_ON(ret_tmp)) {
-+		dev_err(tctx->dev, "trusty_revoke_memory failed: %d 0x%llx\n",
-+			ret_tmp, tctx->shared_id);
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+	} else {
-+err_share_memory:
-+		free_pages_exact(descr_va, descr_buf_sz);
-+	}
-+	return ret;
-+}
-+
-+static dma_addr_t trusty_virtio_dma_map_page(struct device *dev,
-+					     struct page *page,
-+					     unsigned long offset, size_t size,
-+					     enum dma_data_direction dir,
-+					     unsigned long attrs)
-+{
-+	struct tipc_msg_buf *buf = page_to_virt(page) + offset;
-+
-+	return buf->buf_id;
-+}
-+
-+static const struct dma_map_ops trusty_virtio_dma_map_ops = {
-+	.map_page = trusty_virtio_dma_map_page,
-+};
-+
-+static int trusty_virtio_probe(struct platform_device *pdev)
-+{
-+	int ret;
-+	struct trusty_ctx *tctx;
-+
-+	tctx = kzalloc(sizeof(*tctx), GFP_KERNEL);
-+	if (!tctx)
-+		return -ENOMEM;
-+
-+	tctx->dev = &pdev->dev;
-+	tctx->call_notifier.notifier_call = trusty_call_notify;
-+	mutex_init(&tctx->mlock);
-+	INIT_LIST_HEAD(&tctx->vdev_list);
-+	INIT_WORK(&tctx->check_vqs, check_all_vqs);
-+	INIT_WORK(&tctx->kick_vqs, kick_vqs);
-+	platform_set_drvdata(pdev, tctx);
-+
-+	set_dma_ops(&pdev->dev, &trusty_virtio_dma_map_ops);
-+
-+	tctx->check_wq = alloc_workqueue("trusty-check-wq", WQ_UNBOUND, 0);
-+	if (!tctx->check_wq) {
-+		ret = -ENODEV;
-+		dev_err(&pdev->dev, "Failed create trusty-check-wq\n");
-+		goto err_create_check_wq;
-+	}
-+
-+	tctx->kick_wq = alloc_workqueue("trusty-kick-wq",
-+					WQ_UNBOUND | WQ_CPU_INTENSIVE, 0);
-+	if (!tctx->kick_wq) {
-+		ret = -ENODEV;
-+		dev_err(&pdev->dev, "Failed create trusty-kick-wq\n");
-+		goto err_create_kick_wq;
-+	}
-+
-+	ret = trusty_virtio_add_devices(tctx);
-+	if (ret) {
-+		dev_err(&pdev->dev, "Failed to add virtio devices\n");
-+		goto err_add_devices;
-+	}
-+
-+	dev_info(&pdev->dev, "initializing done\n");
-+	return 0;
-+
-+err_add_devices:
-+	destroy_workqueue(tctx->kick_wq);
-+err_create_kick_wq:
-+	destroy_workqueue(tctx->check_wq);
-+err_create_check_wq:
-+	kfree(tctx);
-+	return ret;
-+}
-+
-+static int trusty_virtio_remove(struct platform_device *pdev)
-+{
-+	struct trusty_ctx *tctx = platform_get_drvdata(pdev);
-+	int ret;
-+
-+	/* unregister call notifier and wait until workqueue is done */
-+	trusty_call_notifier_unregister(tctx->dev->parent,
-+					&tctx->call_notifier);
-+	cancel_work_sync(&tctx->check_vqs);
-+
-+	/* remove virtio devices */
-+	trusty_virtio_remove_devices(tctx);
-+	cancel_work_sync(&tctx->kick_vqs);
-+
-+	/* destroy workqueues */
-+	destroy_workqueue(tctx->kick_wq);
-+	destroy_workqueue(tctx->check_wq);
-+
-+	/* notify remote that shared area goes away */
-+	trusty_virtio_stop(tctx, tctx->shared_id, tctx->shared_sz);
-+
-+	/* free shared area */
-+	ret = trusty_reclaim_memory(tctx->dev->parent, tctx->shared_id,
-+				    &tctx->shared_sg, 1);
-+	if (WARN_ON(ret)) {
-+		dev_err(tctx->dev, "trusty_revoke_memory failed: %d 0x%llx\n",
-+			ret, tctx->shared_id);
-+		/*
-+		 * It is not safe to free this memory if trusty_revoke_memory
-+		 * fails. Leak it in that case.
-+		 */
-+	} else {
-+		free_pages_exact(tctx->shared_va, tctx->shared_sz);
-+	}
-+
-+	/* free context */
-+	kfree(tctx);
-+	return 0;
-+}
-+
-+static const struct of_device_id trusty_of_match[] = {
-+	{
-+		.compatible = "android,trusty-virtio-v1",
-+	},
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(of, trusty_of_match);
-+
-+static struct platform_driver trusty_virtio_driver = {
-+	.probe = trusty_virtio_probe,
-+	.remove = trusty_virtio_remove,
-+	.driver = {
-+		.name = "trusty-virtio",
-+		.of_match_table = trusty_of_match,
-+	},
-+};
-+
-+module_platform_driver(trusty_virtio_driver);
-+
-+MODULE_LICENSE("GPL v2");
-+MODULE_DESCRIPTION("Trusty virtio driver");
-+/*
-+ * TODO(b/168322325): trusty-virtio and trusty-ipc should be independent.
-+ * However, trusty-virtio is not completely generic and is aware of trusty-ipc.
-+ * See header includes. Particularly, trusty-virtio.ko can't be loaded before
-+ * trusty-ipc.ko.
-+ */
-+MODULE_SOFTDEP("pre: trusty-ipc");
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-new file mode 100644
-index 000000000000..265eab52aea0
---- /dev/null
-+++ b/drivers/trusty/trusty.c
-@@ -0,0 +1,981 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2013 Google, Inc.
-+ */
-+
-+#include <linux/delay.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_platform.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/stat.h>
-+#include <linux/string.h>
-+#include <linux/trusty/arm_ffa.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/sm_err.h>
-+#include <linux/trusty/trusty.h>
-+
-+#include <linux/scatterlist.h>
-+#include <linux/dma-mapping.h>
-+
-+#include "trusty-smc.h"
-+
-+struct trusty_state;
-+static struct platform_driver trusty_driver;
-+
-+struct trusty_work {
-+	struct trusty_state *ts;
-+	struct work_struct work;
-+};
-+
-+struct trusty_state {
-+	struct mutex smc_lock;
-+	struct atomic_notifier_head notifier;
-+	struct completion cpu_idle_completion;
-+	char *version_str;
-+	u32 api_version;
-+	bool trusty_panicked;
-+	struct device *dev;
-+	struct workqueue_struct *nop_wq;
-+	struct trusty_work __percpu *nop_works;
-+	struct list_head nop_queue;
-+	spinlock_t nop_lock; /* protects nop_queue */
-+	struct device_dma_parameters dma_parms;
-+	void *ffa_tx;
-+	void *ffa_rx;
-+	u16 ffa_local_id;
-+	u16 ffa_remote_id;
-+	struct mutex share_memory_msg_lock; /* protects share_memory_msg */
-+};
-+
-+static inline unsigned long smc(unsigned long r0, unsigned long r1,
-+				unsigned long r2, unsigned long r3)
-+{
-+	return trusty_smc8(r0, r1, r2, r3, 0, 0, 0, 0).r0;
-+}
-+
-+s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(!s))
-+		return SM_ERR_INVALID_PARAMETERS;
-+	if (WARN_ON(!SMC_IS_FASTCALL(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+	if (WARN_ON(SMC_IS_SMC64(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+
-+	return smc(smcnr, a0, a1, a2);
-+}
-+EXPORT_SYMBOL(trusty_fast_call32);
-+
-+#ifdef CONFIG_64BIT
-+s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(!s))
-+		return SM_ERR_INVALID_PARAMETERS;
-+	if (WARN_ON(!SMC_IS_FASTCALL(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+	if (WARN_ON(!SMC_IS_SMC64(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+
-+	return smc(smcnr, a0, a1, a2);
-+}
-+EXPORT_SYMBOL(trusty_fast_call64);
-+#endif
-+
-+static unsigned long trusty_std_call_inner(struct device *dev,
-+					   unsigned long smcnr,
-+					   unsigned long a0, unsigned long a1,
-+					   unsigned long a2)
-+{
-+	unsigned long ret;
-+	int retry = 5;
-+
-+	dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx)\n",
-+		__func__, smcnr, a0, a1, a2);
-+	while (true) {
-+		ret = smc(smcnr, a0, a1, a2);
-+		while ((s32)ret == SM_ERR_FIQ_INTERRUPTED)
-+			ret = smc(SMC_SC_RESTART_FIQ, 0, 0, 0);
-+		if ((int)ret != SM_ERR_BUSY || !retry)
-+			break;
-+
-+		dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy, retry\n",
-+			__func__, smcnr, a0, a1, a2);
-+		retry--;
-+	}
-+
-+	return ret;
-+}
-+
-+static unsigned long trusty_std_call_helper(struct device *dev,
-+					    unsigned long smcnr,
-+					    unsigned long a0, unsigned long a1,
-+					    unsigned long a2)
-+{
-+	unsigned long ret;
-+	int sleep_time = 1;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	while (true) {
-+		local_irq_disable();
-+		atomic_notifier_call_chain(&s->notifier, TRUSTY_CALL_PREPARE,
-+					   NULL);
-+		ret = trusty_std_call_inner(dev, smcnr, a0, a1, a2);
-+		if (ret == SM_ERR_PANIC) {
-+			s->trusty_panicked = true;
-+			if (IS_ENABLED(CONFIG_TRUSTY_CRASH_IS_PANIC))
-+				panic("trusty crashed");
-+			else
-+				WARN_ONCE(1, "trusty crashed");
-+		}
-+
-+		atomic_notifier_call_chain(&s->notifier, TRUSTY_CALL_RETURNED,
-+					   NULL);
-+		if (ret == SM_ERR_INTERRUPTED) {
-+			/*
-+			 * Make sure this cpu will eventually re-enter trusty
-+			 * even if the std_call resumes on another cpu.
-+			 */
-+			trusty_enqueue_nop(dev, NULL);
-+		}
-+		local_irq_enable();
-+
-+		if ((int)ret != SM_ERR_BUSY)
-+			break;
-+
-+		if (sleep_time == 256)
-+			dev_warn(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy\n",
-+				 __func__, smcnr, a0, a1, a2);
-+		dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy, wait %d ms\n",
-+			__func__, smcnr, a0, a1, a2, sleep_time);
-+
-+		msleep(sleep_time);
-+		if (sleep_time < 1000)
-+			sleep_time <<= 1;
-+
-+		dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) retry\n",
-+			__func__, smcnr, a0, a1, a2);
-+	}
-+
-+	if (sleep_time > 256)
-+		dev_warn(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) busy cleared\n",
-+			 __func__, smcnr, a0, a1, a2);
-+
-+	return ret;
-+}
-+
-+static void trusty_std_call_cpu_idle(struct trusty_state *s)
-+{
-+	int ret;
-+
-+	ret = wait_for_completion_timeout(&s->cpu_idle_completion, HZ * 10);
-+	if (!ret) {
-+		dev_warn(s->dev,
-+			 "%s: timed out waiting for cpu idle to clear, retry anyway\n",
-+			 __func__);
-+	}
-+}
-+
-+s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
-+{
-+	int ret;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(SMC_IS_FASTCALL(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+
-+	if (WARN_ON(SMC_IS_SMC64(smcnr)))
-+		return SM_ERR_INVALID_PARAMETERS;
-+
-+	if (s->trusty_panicked) {
-+		/*
-+		 * Avoid calling the notifiers if trusty has panicked as they
-+		 * can trigger more calls.
-+		 */
-+		return SM_ERR_PANIC;
-+	}
-+
-+	if (smcnr != SMC_SC_NOP) {
-+		mutex_lock(&s->smc_lock);
-+		reinit_completion(&s->cpu_idle_completion);
-+	}
-+
-+	dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) started\n",
-+		__func__, smcnr, a0, a1, a2);
-+
-+	ret = trusty_std_call_helper(dev, smcnr, a0, a1, a2);
-+	while (ret == SM_ERR_INTERRUPTED || ret == SM_ERR_CPU_IDLE) {
-+		dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) interrupted\n",
-+			__func__, smcnr, a0, a1, a2);
-+		if (ret == SM_ERR_CPU_IDLE)
-+			trusty_std_call_cpu_idle(s);
-+		ret = trusty_std_call_helper(dev, SMC_SC_RESTART_LAST, 0, 0, 0);
-+	}
-+	dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) returned 0x%x\n",
-+		__func__, smcnr, a0, a1, a2, ret);
-+
-+	if (smcnr == SMC_SC_NOP)
-+		complete(&s->cpu_idle_completion);
-+	else
-+		mutex_unlock(&s->smc_lock);
-+
-+	return ret;
-+}
-+EXPORT_SYMBOL(trusty_std_call32);
-+
-+int trusty_share_memory(struct device *dev, u64 *id,
-+			struct scatterlist *sglist, unsigned int nents,
-+			pgprot_t pgprot)
-+{
-+	return trusty_transfer_memory(dev, id, sglist, nents, pgprot, 0,
-+				      false);
-+}
-+EXPORT_SYMBOL(trusty_share_memory);
-+
-+int trusty_transfer_memory(struct device *dev, u64 *id,
-+			   struct scatterlist *sglist, unsigned int nents,
-+			   pgprot_t pgprot, u64 tag, bool lend)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	int ret;
-+	struct ns_mem_page_info pg_inf;
-+	struct scatterlist *sg;
-+	size_t count;
-+	size_t i;
-+	size_t len;
-+	u64 ffa_handle = 0;
-+	size_t total_len;
-+	size_t endpoint_count = 1;
-+	struct ffa_mtd *mtd = s->ffa_tx;
-+	size_t comp_mrd_offset = offsetof(struct ffa_mtd, emad[endpoint_count]);
-+	struct ffa_comp_mrd *comp_mrd = s->ffa_tx + comp_mrd_offset;
-+	struct ffa_cons_mrd *cons_mrd = comp_mrd->address_range_array;
-+	size_t cons_mrd_offset = (void *)cons_mrd - s->ffa_tx;
-+	struct smc_ret8 smc_ret;
-+	u32 cookie_low;
-+	u32 cookie_high;
-+
-+	if (WARN_ON(dev->driver != &trusty_driver.driver))
-+		return -EINVAL;
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	if (nents != 1 && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		dev_err(s->dev, "%s: old trusty version does not support non-contiguous memory objects\n",
-+			__func__);
-+		return -EOPNOTSUPP;
-+	}
-+
-+	count = dma_map_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+	if (count != nents) {
-+		dev_err(s->dev, "failed to dma map sg_table\n");
-+		return -EINVAL;
-+	}
-+
-+	sg = sglist;
-+	ret = trusty_encode_page_info(&pg_inf, phys_to_page(sg_dma_address(sg)),
-+				      pgprot);
-+	if (ret) {
-+		dev_err(s->dev, "%s: trusty_encode_page_info failed\n",
-+			__func__);
-+		goto err_encode_page_info;
-+	}
-+
-+	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		*id = pg_inf.compat_attr;
-+		return 0;
-+	}
-+
-+	len = 0;
-+	for_each_sg(sglist, sg, nents, i)
-+		len += sg_dma_len(sg);
-+
-+	mutex_lock(&s->share_memory_msg_lock);
-+
-+	mtd->sender_id = s->ffa_local_id;
-+	mtd->memory_region_attributes = pg_inf.ffa_mem_attr;
-+	mtd->reserved_3 = 0;
-+	mtd->flags = 0;
-+	mtd->handle = 0;
-+	mtd->tag = tag;
-+	mtd->reserved_24_27 = 0;
-+	mtd->emad_count = endpoint_count;
-+	for (i = 0; i < endpoint_count; i++) {
-+		struct ffa_emad *emad = &mtd->emad[i];
-+		/* TODO: support stream ids */
-+		emad->mapd.endpoint_id = s->ffa_remote_id;
-+		emad->mapd.memory_access_permissions = pg_inf.ffa_mem_perm;
-+		emad->mapd.flags = 0;
-+		emad->comp_mrd_offset = comp_mrd_offset;
-+		emad->reserved_8_15 = 0;
-+	}
-+	comp_mrd->total_page_count = len / PAGE_SIZE;
-+	comp_mrd->address_range_count = nents;
-+	comp_mrd->reserved_8_15 = 0;
-+
-+	total_len = cons_mrd_offset + nents * sizeof(*cons_mrd);
-+	sg = sglist;
-+	while (count) {
-+		size_t lcount =
-+			min_t(size_t, count, (PAGE_SIZE - cons_mrd_offset) /
-+			      sizeof(*cons_mrd));
-+		size_t fragment_len = lcount * sizeof(*cons_mrd) +
-+				      cons_mrd_offset;
-+
-+		for (i = 0; i < lcount; i++) {
-+			cons_mrd[i].address = sg_dma_address(sg);
-+			cons_mrd[i].page_count = sg_dma_len(sg) / PAGE_SIZE;
-+			cons_mrd[i].reserved_12_15 = 0;
-+			sg = sg_next(sg);
-+		}
-+		count -= lcount;
-+		if (cons_mrd_offset) {
-+			u32 smc = lend ? SMC_FC_FFA_MEM_LEND :
-+					 SMC_FC_FFA_MEM_SHARE;
-+			/* First fragment */
-+			smc_ret = trusty_smc8(smc, total_len,
-+					      fragment_len, 0, 0, 0, 0, 0);
-+		} else {
-+			smc_ret = trusty_smc8(SMC_FC_FFA_MEM_FRAG_TX,
-+					      cookie_low, cookie_high,
-+					      fragment_len, 0, 0, 0, 0);
-+		}
-+		if (smc_ret.r0 == SMC_FC_FFA_MEM_FRAG_RX) {
-+			cookie_low = smc_ret.r1;
-+			cookie_high = smc_ret.r2;
-+			dev_dbg(s->dev, "cookie %x %x", cookie_low,
-+				cookie_high);
-+			if (!count) {
-+				/*
-+				 * We have sent all our descriptors. Expected
-+				 * SMC_FC_FFA_SUCCESS, not a request to send
-+				 * another fragment.
-+				 */
-+				dev_err(s->dev, "%s: fragment_len %zd/%zd, unexpected SMC_FC_FFA_MEM_FRAG_RX\n",
-+					__func__, fragment_len, total_len);
-+				ret = -EIO;
-+				break;
-+			}
-+		} else if (smc_ret.r0 == SMC_FC_FFA_SUCCESS) {
-+			ffa_handle = smc_ret.r2 | (u64)smc_ret.r3 << 32;
-+			dev_dbg(s->dev, "%s: fragment_len %zu/%zu, got handle 0x%llx\n",
-+				__func__, fragment_len, total_len,
-+				ffa_handle);
-+			if (count) {
-+				/*
-+				 * We have not sent all our descriptors.
-+				 * Expected SMC_FC_FFA_MEM_FRAG_RX not
-+				 * SMC_FC_FFA_SUCCESS.
-+				 */
-+				dev_err(s->dev, "%s: fragment_len %zu/%zu, unexpected SMC_FC_FFA_SUCCESS, count %zu != 0\n",
-+					__func__, fragment_len, total_len,
-+					count);
-+				ret = -EIO;
-+				break;
-+			}
-+		} else {
-+			dev_err(s->dev, "%s: fragment_len %zu/%zu, SMC_FC_FFA_MEM_SHARE failed 0x%lx 0x%lx 0x%lx",
-+				__func__, fragment_len, total_len,
-+				smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+			ret = -EIO;
-+			break;
-+		}
-+
-+		cons_mrd = s->ffa_tx;
-+		cons_mrd_offset = 0;
-+	}
-+
-+	mutex_unlock(&s->share_memory_msg_lock);
-+
-+	if (!ret) {
-+		*id = ffa_handle;
-+		dev_dbg(s->dev, "%s: done\n", __func__);
-+		return 0;
-+	}
-+
-+	dev_err(s->dev, "%s: failed %d", __func__, ret);
-+
-+err_encode_page_info:
-+	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+	return ret;
-+}
-+EXPORT_SYMBOL(trusty_transfer_memory);
-+
-+/*
-+ * trusty_share_memory_compat - trusty_share_memory wrapper for old apis
-+ *
-+ * Call trusty_share_memory and filter out memory attributes if trusty version
-+ * is old. Used by clients that used to pass just a physical address to trusty
-+ * instead of a physical address plus memory attributes value.
-+ */
-+int trusty_share_memory_compat(struct device *dev, u64 *id,
-+			       struct scatterlist *sglist, unsigned int nents,
-+			       pgprot_t pgprot)
-+{
-+	int ret;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	ret = trusty_share_memory(dev, id, sglist, nents, pgprot);
-+	if (!ret && s->api_version < TRUSTY_API_VERSION_PHYS_MEM_OBJ)
-+		*id &= 0x0000FFFFFFFFF000ull;
-+
-+	return ret;
-+}
-+EXPORT_SYMBOL(trusty_share_memory_compat);
-+
-+int trusty_reclaim_memory(struct device *dev, u64 id,
-+			  struct scatterlist *sglist, unsigned int nents)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	int ret = 0;
-+	struct smc_ret8 smc_ret;
-+
-+	if (WARN_ON(dev->driver != &trusty_driver.driver))
-+		return -EINVAL;
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		if (nents != 1) {
-+			dev_err(s->dev, "%s: not supported\n", __func__);
-+			return -EOPNOTSUPP;
-+		}
-+
-+		dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+
-+		dev_dbg(s->dev, "%s: done\n", __func__);
-+		return 0;
-+	}
-+
-+	mutex_lock(&s->share_memory_msg_lock);
-+
-+	smc_ret = trusty_smc8(SMC_FC_FFA_MEM_RECLAIM, (u32)id, id >> 32, 0, 0,
-+			      0, 0, 0);
-+	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
-+		dev_err(s->dev, "%s: SMC_FC_FFA_MEM_RECLAIM failed 0x%lx 0x%lx 0x%lx",
-+			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+		if (smc_ret.r0 == SMC_FC_FFA_ERROR &&
-+		    smc_ret.r2 == FFA_ERROR_DENIED)
-+			ret = -EBUSY;
-+		else
-+			ret = -EIO;
-+	}
-+
-+	mutex_unlock(&s->share_memory_msg_lock);
-+
-+	if (ret != 0)
-+		return ret;
-+
-+	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+
-+	dev_dbg(s->dev, "%s: done\n", __func__);
-+	return 0;
-+}
-+EXPORT_SYMBOL(trusty_reclaim_memory);
-+
-+int trusty_call_notifier_register(struct device *dev, struct notifier_block *n)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	return atomic_notifier_chain_register(&s->notifier, n);
-+}
-+EXPORT_SYMBOL(trusty_call_notifier_register);
-+
-+int trusty_call_notifier_unregister(struct device *dev,
-+				    struct notifier_block *n)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	return atomic_notifier_chain_unregister(&s->notifier, n);
-+}
-+EXPORT_SYMBOL(trusty_call_notifier_unregister);
-+
-+static int trusty_remove_child(struct device *dev, void *data)
-+{
-+	platform_device_unregister(to_platform_device(dev));
-+	return 0;
-+}
-+
-+static ssize_t trusty_version_show(struct device *dev,
-+				   struct device_attribute *attr, char *buf)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	return scnprintf(buf, PAGE_SIZE, "%s\n", s->version_str ?: "unknown");
-+}
-+
-+static DEVICE_ATTR(trusty_version, 0400, trusty_version_show, NULL);
-+
-+static struct attribute *trusty_attrs[] = {
-+	&dev_attr_trusty_version.attr,
-+	NULL,
-+};
-+ATTRIBUTE_GROUPS(trusty);
-+
-+const char *trusty_version_str_get(struct device *dev)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	return s->version_str;
-+}
-+EXPORT_SYMBOL(trusty_version_str_get);
-+
-+static int trusty_init_msg_buf(struct trusty_state *s, struct device *dev)
-+{
-+	phys_addr_t tx_paddr;
-+	phys_addr_t rx_paddr;
-+	int ret;
-+	struct smc_ret8 smc_ret;
-+
-+	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ)
-+		return 0;
-+
-+	/* Get supported FF-A version and check if it is compatible */
-+	smc_ret = trusty_smc8(SMC_FC_FFA_VERSION, FFA_CURRENT_VERSION, 0, 0,
-+			      0, 0, 0, 0);
-+	if (FFA_VERSION_TO_MAJOR(smc_ret.r0) != FFA_CURRENT_VERSION_MAJOR) {
-+		dev_err(s->dev,
-+			"%s: Unsupported FF-A version 0x%lx, expected 0x%x\n",
-+			__func__, smc_ret.r0, FFA_CURRENT_VERSION);
-+		ret = -EIO;
-+		goto err_version;
-+	}
-+
-+	/* Check that SMC_FC_FFA_MEM_SHARE is implemented */
-+	smc_ret = trusty_smc8(SMC_FC_FFA_FEATURES, SMC_FC_FFA_MEM_SHARE, 0, 0,
-+			      0, 0, 0, 0);
-+	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
-+		dev_err(s->dev,
-+			"%s: SMC_FC_FFA_FEATURES(SMC_FC_FFA_MEM_SHARE) failed 0x%lx 0x%lx 0x%lx\n",
-+			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+		ret = -EIO;
-+		goto err_features;
-+	}
-+
-+	/*
-+	 * Set FF-A endpoint IDs.
-+	 *
-+	 * Hardcode 0x8000 for the secure os.
-+	 * TODO: Use FF-A call or device tree to configure this dynamically
-+	 */
-+	smc_ret = trusty_smc8(SMC_FC_FFA_ID_GET, 0, 0, 0, 0, 0, 0, 0);
-+	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
-+		dev_err(s->dev,
-+			"%s: SMC_FC_FFA_ID_GET failed 0x%lx 0x%lx 0x%lx\n",
-+			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+		ret = -EIO;
-+		goto err_id_get;
-+	}
-+
-+	s->ffa_local_id = smc_ret.r2;
-+	s->ffa_remote_id = 0x8000;
-+
-+	s->ffa_tx = kmalloc(PAGE_SIZE, GFP_KERNEL);
-+	if (!s->ffa_tx) {
-+		ret = -ENOMEM;
-+		goto err_alloc_tx;
-+	}
-+	tx_paddr = virt_to_phys(s->ffa_tx);
-+	if (WARN_ON(tx_paddr & (PAGE_SIZE - 1))) {
-+		ret = -EINVAL;
-+		goto err_unaligned_tx_buf;
-+	}
-+
-+	s->ffa_rx = kmalloc(PAGE_SIZE, GFP_KERNEL);
-+	if (!s->ffa_rx) {
-+		ret = -ENOMEM;
-+		goto err_alloc_rx;
-+	}
-+	rx_paddr = virt_to_phys(s->ffa_rx);
-+	if (WARN_ON(rx_paddr & (PAGE_SIZE - 1))) {
-+		ret = -EINVAL;
-+		goto err_unaligned_rx_buf;
-+	}
-+
-+	smc_ret = trusty_smc8(SMC_FCZ_FFA_RXTX_MAP, tx_paddr, rx_paddr, 1, 0,
-+			      0, 0, 0);
-+	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
-+		dev_err(s->dev, "%s: SMC_FCZ_FFA_RXTX_MAP failed 0x%lx 0x%lx 0x%lx\n",
-+			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+		ret = -EIO;
-+		goto err_rxtx_map;
-+	}
-+
-+	return 0;
-+
-+err_rxtx_map:
-+err_unaligned_rx_buf:
-+	kfree(s->ffa_rx);
-+	s->ffa_rx = NULL;
-+err_alloc_rx:
-+err_unaligned_tx_buf:
-+	kfree(s->ffa_tx);
-+	s->ffa_tx = NULL;
-+err_alloc_tx:
-+err_id_get:
-+err_features:
-+err_version:
-+	return ret;
-+}
-+
-+static void trusty_free_msg_buf(struct trusty_state *s, struct device *dev)
-+{
-+	struct smc_ret8 smc_ret;
-+
-+	smc_ret = trusty_smc8(SMC_FC_FFA_RXTX_UNMAP, 0, 0, 0, 0, 0, 0, 0);
-+	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
-+		dev_err(s->dev, "%s: SMC_FC_FFA_RXTX_UNMAP failed 0x%lx 0x%lx 0x%lx\n",
-+			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
-+	} else {
-+		kfree(s->ffa_rx);
-+		kfree(s->ffa_tx);
-+	}
-+}
-+
-+static void trusty_init_version(struct trusty_state *s, struct device *dev)
-+{
-+	int ret;
-+	int i;
-+	int version_str_len;
-+
-+	ret = trusty_fast_call32(dev, SMC_FC_GET_VERSION_STR, -1, 0, 0);
-+	if (ret <= 0)
-+		goto err_get_size;
-+
-+	version_str_len = ret;
-+
-+	s->version_str = kmalloc(version_str_len + 1, GFP_KERNEL);
-+	for (i = 0; i < version_str_len; i++) {
-+		ret = trusty_fast_call32(dev, SMC_FC_GET_VERSION_STR, i, 0, 0);
-+		if (ret < 0)
-+			goto err_get_char;
-+		s->version_str[i] = ret;
-+	}
-+	s->version_str[i] = '\0';
-+
-+	dev_info(dev, "trusty version: %s\n", s->version_str);
-+	return;
-+
-+err_get_char:
-+	kfree(s->version_str);
-+	s->version_str = NULL;
-+err_get_size:
-+	dev_err(dev, "failed to get version: %d\n", ret);
-+}
-+
-+u32 trusty_get_api_version(struct device *dev)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	return s->api_version;
-+}
-+EXPORT_SYMBOL(trusty_get_api_version);
-+
-+bool trusty_get_panic_status(struct device *dev)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	if (WARN_ON(dev->driver != &trusty_driver.driver))
-+		return false;
-+	return s->trusty_panicked;
-+}
-+EXPORT_SYMBOL(trusty_get_panic_status);
-+
-+static int trusty_init_api_version(struct trusty_state *s, struct device *dev)
-+{
-+	u32 api_version;
-+
-+	api_version = trusty_fast_call32(dev, SMC_FC_API_VERSION,
-+					 TRUSTY_API_VERSION_CURRENT, 0, 0);
-+	if (api_version == SM_ERR_UNDEFINED_SMC)
-+		api_version = 0;
-+
-+	if (api_version > TRUSTY_API_VERSION_CURRENT) {
-+		dev_err(dev, "unsupported api version %u > %u\n",
-+			api_version, TRUSTY_API_VERSION_CURRENT);
-+		return -EINVAL;
-+	}
-+
-+	dev_info(dev, "selected api version: %u (requested %u)\n",
-+		 api_version, TRUSTY_API_VERSION_CURRENT);
-+	s->api_version = api_version;
-+
-+	return 0;
-+}
-+
-+static bool dequeue_nop(struct trusty_state *s, u32 *args)
-+{
-+	unsigned long flags;
-+	struct trusty_nop *nop = NULL;
-+
-+	spin_lock_irqsave(&s->nop_lock, flags);
-+	if (!list_empty(&s->nop_queue)) {
-+		nop = list_first_entry(&s->nop_queue,
-+				       struct trusty_nop, node);
-+		list_del_init(&nop->node);
-+		args[0] = nop->args[0];
-+		args[1] = nop->args[1];
-+		args[2] = nop->args[2];
-+	} else {
-+		args[0] = 0;
-+		args[1] = 0;
-+		args[2] = 0;
-+	}
-+	spin_unlock_irqrestore(&s->nop_lock, flags);
-+	return nop;
-+}
-+
-+static void locked_nop_work_func(struct work_struct *work)
-+{
-+	int ret;
-+	struct trusty_work *tw = container_of(work, struct trusty_work, work);
-+	struct trusty_state *s = tw->ts;
-+
-+	ret = trusty_std_call32(s->dev, SMC_SC_LOCKED_NOP, 0, 0, 0);
-+	if (ret != 0)
-+		dev_err(s->dev, "%s: SMC_SC_LOCKED_NOP failed %d",
-+			__func__, ret);
-+
-+	dev_dbg(s->dev, "%s: done\n", __func__);
-+}
-+
-+static void nop_work_func(struct work_struct *work)
-+{
-+	int ret;
-+	bool next;
-+	u32 args[3];
-+	u32 last_arg0;
-+	struct trusty_work *tw = container_of(work, struct trusty_work, work);
-+	struct trusty_state *s = tw->ts;
-+
-+	dequeue_nop(s, args);
-+	do {
-+		dev_dbg(s->dev, "%s: %x %x %x\n",
-+			__func__, args[0], args[1], args[2]);
-+
-+		last_arg0 = args[0];
-+		ret = trusty_std_call32(s->dev, SMC_SC_NOP,
-+					args[0], args[1], args[2]);
-+
-+		next = dequeue_nop(s, args);
-+
-+		if (ret == SM_ERR_NOP_INTERRUPTED) {
-+			next = true;
-+		} else if (ret != SM_ERR_NOP_DONE) {
-+			dev_err(s->dev, "%s: SMC_SC_NOP %x failed %d",
-+				__func__, last_arg0, ret);
-+			if (last_arg0) {
-+				/*
-+				 * Don't break out of the loop if a non-default
-+				 * nop-handler returns an error.
-+				 */
-+				next = true;
-+			}
-+		}
-+	} while (next);
-+
-+	dev_dbg(s->dev, "%s: done\n", __func__);
-+}
-+
-+void trusty_enqueue_nop(struct device *dev, struct trusty_nop *nop)
-+{
-+	unsigned long flags;
-+	struct trusty_work *tw;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	preempt_disable();
-+	tw = this_cpu_ptr(s->nop_works);
-+	if (nop) {
-+		WARN_ON(s->api_version < TRUSTY_API_VERSION_SMP_NOP);
-+
-+		spin_lock_irqsave(&s->nop_lock, flags);
-+		if (list_empty(&nop->node))
-+			list_add_tail(&nop->node, &s->nop_queue);
-+		spin_unlock_irqrestore(&s->nop_lock, flags);
-+	}
-+	queue_work(s->nop_wq, &tw->work);
-+	preempt_enable();
-+}
-+EXPORT_SYMBOL(trusty_enqueue_nop);
-+
-+void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop)
-+{
-+	unsigned long flags;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(!nop))
-+		return;
-+
-+	spin_lock_irqsave(&s->nop_lock, flags);
-+	if (!list_empty(&nop->node))
-+		list_del_init(&nop->node);
-+	spin_unlock_irqrestore(&s->nop_lock, flags);
-+}
-+EXPORT_SYMBOL(trusty_dequeue_nop);
-+
-+static int trusty_probe(struct platform_device *pdev)
-+{
-+	int ret;
-+	unsigned int cpu;
-+	work_func_t work_func;
-+	struct trusty_state *s;
-+	struct device_node *node = pdev->dev.of_node;
-+
-+	if (!node) {
-+		dev_err(&pdev->dev, "of_node required\n");
-+		return -EINVAL;
-+	}
-+
-+	s = kzalloc(sizeof(*s), GFP_KERNEL);
-+	if (!s) {
-+		ret = -ENOMEM;
-+		goto err_allocate_state;
-+	}
-+
-+	s->dev = &pdev->dev;
-+	spin_lock_init(&s->nop_lock);
-+	INIT_LIST_HEAD(&s->nop_queue);
-+	mutex_init(&s->smc_lock);
-+	mutex_init(&s->share_memory_msg_lock);
-+	ATOMIC_INIT_NOTIFIER_HEAD(&s->notifier);
-+	init_completion(&s->cpu_idle_completion);
-+
-+	s->dev->dma_parms = &s->dma_parms;
-+	dma_set_max_seg_size(s->dev, 0xfffff000); /* dma_parms limit */
-+	/*
-+	 * Set dma mask to 48 bits. This is the current limit of
-+	 * trusty_encode_page_info.
-+	 */
-+	dma_coerce_mask_and_coherent(s->dev, DMA_BIT_MASK(48));
-+
-+	platform_set_drvdata(pdev, s);
-+
-+	trusty_init_version(s, &pdev->dev);
-+
-+	ret = trusty_init_api_version(s, &pdev->dev);
-+	if (ret < 0)
-+		goto err_api_version;
-+
-+	ret = trusty_init_msg_buf(s, &pdev->dev);
-+	if (ret < 0)
-+		goto err_init_msg_buf;
-+
-+	s->nop_wq = alloc_workqueue("trusty-nop-wq", WQ_CPU_INTENSIVE, 0);
-+	if (!s->nop_wq) {
-+		ret = -ENODEV;
-+		dev_err(&pdev->dev, "Failed create trusty-nop-wq\n");
-+		goto err_create_nop_wq;
-+	}
-+
-+	s->nop_works = alloc_percpu(struct trusty_work);
-+	if (!s->nop_works) {
-+		ret = -ENOMEM;
-+		dev_err(&pdev->dev, "Failed to allocate works\n");
-+		goto err_alloc_works;
-+	}
-+
-+	if (s->api_version < TRUSTY_API_VERSION_SMP)
-+		work_func = locked_nop_work_func;
-+	else
-+		work_func = nop_work_func;
-+
-+	for_each_possible_cpu(cpu) {
-+		struct trusty_work *tw = per_cpu_ptr(s->nop_works, cpu);
-+
-+		tw->ts = s;
-+		INIT_WORK(&tw->work, work_func);
-+	}
-+
-+	ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
-+	if (ret < 0) {
-+		dev_err(&pdev->dev, "Failed to add children: %d\n", ret);
-+		goto err_add_children;
-+	}
-+
-+	return 0;
-+
-+err_add_children:
-+	for_each_possible_cpu(cpu) {
-+		struct trusty_work *tw = per_cpu_ptr(s->nop_works, cpu);
-+
-+		flush_work(&tw->work);
-+	}
-+	free_percpu(s->nop_works);
-+err_alloc_works:
-+	destroy_workqueue(s->nop_wq);
-+err_create_nop_wq:
-+	trusty_free_msg_buf(s, &pdev->dev);
-+err_init_msg_buf:
-+err_api_version:
-+	s->dev->dma_parms = NULL;
-+	kfree(s->version_str);
-+	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
-+	mutex_destroy(&s->share_memory_msg_lock);
-+	mutex_destroy(&s->smc_lock);
-+	kfree(s);
-+err_allocate_state:
-+	return ret;
-+}
-+
-+static int trusty_remove(struct platform_device *pdev)
-+{
-+	unsigned int cpu;
-+	struct trusty_state *s = platform_get_drvdata(pdev);
-+
-+	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
-+
-+	for_each_possible_cpu(cpu) {
-+		struct trusty_work *tw = per_cpu_ptr(s->nop_works, cpu);
-+
-+		flush_work(&tw->work);
-+	}
-+	free_percpu(s->nop_works);
-+	destroy_workqueue(s->nop_wq);
-+
-+	mutex_destroy(&s->share_memory_msg_lock);
-+	mutex_destroy(&s->smc_lock);
-+	trusty_free_msg_buf(s, &pdev->dev);
-+	s->dev->dma_parms = NULL;
-+	kfree(s->version_str);
-+	kfree(s);
-+	return 0;
-+}
-+
-+static const struct of_device_id trusty_of_match[] = {
-+	{ .compatible = "android,trusty-smc-v1", },
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(trusty, trusty_of_match);
-+
-+static struct platform_driver trusty_driver = {
-+	.probe = trusty_probe,
-+	.remove = trusty_remove,
-+	.driver	= {
-+		.name = "trusty",
-+		.of_match_table = trusty_of_match,
-+		.dev_groups = trusty_groups,
-+	},
-+};
-+
-+static int __init trusty_driver_init(void)
-+{
-+	return platform_driver_register(&trusty_driver);
-+}
-+
-+static void __exit trusty_driver_exit(void)
-+{
-+	platform_driver_unregister(&trusty_driver);
-+}
-+
-+subsys_initcall(trusty_driver_init);
-+module_exit(trusty_driver_exit);
-+
-+MODULE_LICENSE("GPL v2");
-+MODULE_DESCRIPTION("Trusty core driver");
-diff --git a/include/linux/trusty/arm_ffa.h b/include/linux/trusty/arm_ffa.h
-new file mode 100644
-index 000000000000..ab7b2afb794c
---- /dev/null
-+++ b/include/linux/trusty/arm_ffa.h
-@@ -0,0 +1,590 @@
-+/* SPDX-License-Identifier: MIT */
-+/*
-+ * Copyright (C) 2020 Google, Inc.
-+ *
-+ * Trusty and TF-A also have a copy of this header.
-+ * Please keep the copies in sync.
-+ */
-+#ifndef __LINUX_TRUSTY_ARM_FFA_H
-+#define __LINUX_TRUSTY_ARM_FFA_H
-+
-+/*
-+ * Subset of Arm PSA Firmware Framework for Arm v8-A 1.0 EAC 1_0
-+ * (https://developer.arm.com/docs/den0077/a) needed for shared memory.
-+ */
-+
-+#include "smcall.h"
-+
-+#ifndef STATIC_ASSERT
-+#define STATIC_ASSERT(e) _Static_assert(e, #e)
-+#endif
-+
-+#define FFA_CURRENT_VERSION_MAJOR (1U)
-+#define FFA_CURRENT_VERSION_MINOR (0U)
-+
-+#define FFA_VERSION_TO_MAJOR(version) ((version) >> 16)
-+#define FFA_VERSION_TO_MINOR(version) ((version) & (0xffff))
-+#define FFA_VERSION(major, minor) (((major) << 16) | (minor))
-+#define FFA_CURRENT_VERSION \
-+	FFA_VERSION(FFA_CURRENT_VERSION_MAJOR, FFA_CURRENT_VERSION_MINOR)
-+
-+#define SMC_ENTITY_SHARED_MEMORY 4
-+
-+#define SMC_FASTCALL_NR_SHARED_MEMORY(nr) \
-+	SMC_FASTCALL_NR(SMC_ENTITY_SHARED_MEMORY, nr)
-+#define SMC_FASTCALL64_NR_SHARED_MEMORY(nr) \
-+	SMC_FASTCALL64_NR(SMC_ENTITY_SHARED_MEMORY, nr)
-+
-+/**
-+ * typedef ffa_endpoint_id16_t - Endpoint ID
-+ *
-+ * Current implementation only supports VMIDs. FFA spec also support stream
-+ * endpoint ids.
-+ */
-+typedef uint16_t ffa_endpoint_id16_t;
-+
-+/**
-+ * struct ffa_cons_mrd - Constituent memory region descriptor
-+ * @address:
-+ *         Start address of contiguous memory region. Must be 4K page aligned.
-+ * @page_count:
-+ *         Number of 4K pages in region.
-+ * @reserved_12_15:
-+ *         Reserve bytes 12-15 to pad struct size to 16 bytes.
-+ */
-+struct ffa_cons_mrd {
-+	uint64_t address;
-+	uint32_t page_count;
-+	uint32_t reserved_12_15;
-+};
-+STATIC_ASSERT(sizeof(struct ffa_cons_mrd) == 16);
-+
-+/**
-+ * struct ffa_comp_mrd - Composite memory region descriptor
-+ * @total_page_count:
-+ *         Number of 4k pages in memory region. Must match sum of
-+ *         @address_range_array[].page_count.
-+ * @address_range_count:
-+ *         Number of entries in @address_range_array.
-+ * @reserved_8_15:
-+ *         Reserve bytes 8-15 to pad struct size to 16 byte alignment and
-+ *         make @address_range_array 16 byte aligned.
-+ * @address_range_array:
-+ *         Array of &struct ffa_cons_mrd entries.
-+ */
-+struct ffa_comp_mrd {
-+	uint32_t total_page_count;
-+	uint32_t address_range_count;
-+	uint64_t reserved_8_15;
-+	struct ffa_cons_mrd address_range_array[];
-+};
-+STATIC_ASSERT(sizeof(struct ffa_comp_mrd) == 16);
-+
-+/**
-+ * typedef ffa_mem_attr8_t - Memory region attributes
-+ *
-+ * * @FFA_MEM_ATTR_DEVICE_NGNRNE:
-+ *     Device-nGnRnE.
-+ * * @FFA_MEM_ATTR_DEVICE_NGNRE:
-+ *     Device-nGnRE.
-+ * * @FFA_MEM_ATTR_DEVICE_NGRE:
-+ *     Device-nGRE.
-+ * * @FFA_MEM_ATTR_DEVICE_GRE:
-+ *     Device-GRE.
-+ * * @FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED
-+ *     Normal memory. Non-cacheable.
-+ * * @FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB
-+ *     Normal memory. Write-back cached.
-+ * * @FFA_MEM_ATTR_NON_SHAREABLE
-+ *     Non-shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-+ * * @FFA_MEM_ATTR_OUTER_SHAREABLE
-+ *     Outer Shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-+ * * @FFA_MEM_ATTR_INNER_SHAREABLE
-+ *     Inner Shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-+ */
-+typedef uint8_t ffa_mem_attr8_t;
-+#define FFA_MEM_ATTR_DEVICE_NGNRNE ((1U << 4) | (0x0U << 2))
-+#define FFA_MEM_ATTR_DEVICE_NGNRE ((1U << 4) | (0x1U << 2))
-+#define FFA_MEM_ATTR_DEVICE_NGRE ((1U << 4) | (0x2U << 2))
-+#define FFA_MEM_ATTR_DEVICE_GRE ((1U << 4) | (0x3U << 2))
-+#define FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED ((2U << 4) | (0x1U << 2))
-+#define FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB ((2U << 4) | (0x3U << 2))
-+#define FFA_MEM_ATTR_NON_SHAREABLE (0x0U << 0)
-+#define FFA_MEM_ATTR_OUTER_SHAREABLE (0x2U << 0)
-+#define FFA_MEM_ATTR_INNER_SHAREABLE (0x3U << 0)
-+
-+/**
-+ * typedef ffa_mem_perm8_t - Memory access permissions
-+ *
-+ * * @FFA_MEM_ATTR_RO
-+ *     Request or specify read-only mapping.
-+ * * @FFA_MEM_ATTR_RW
-+ *     Request or allow read-write mapping.
-+ * * @FFA_MEM_PERM_NX
-+ *     Deny executable mapping.
-+ * * @FFA_MEM_PERM_X
-+ *     Request executable mapping.
-+ */
-+typedef uint8_t ffa_mem_perm8_t;
-+#define FFA_MEM_PERM_RO (1U << 0)
-+#define FFA_MEM_PERM_RW (1U << 1)
-+#define FFA_MEM_PERM_NX (1U << 2)
-+#define FFA_MEM_PERM_X (1U << 3)
-+
-+/**
-+ * typedef ffa_mem_flag8_t - Endpoint memory flags
-+ *
-+ * * @FFA_MEM_FLAG_OTHER
-+ *     Other borrower. Memory region must not be or was not retrieved on behalf
-+ *     of this endpoint.
-+ */
-+typedef uint8_t ffa_mem_flag8_t;
-+#define FFA_MEM_FLAG_OTHER (1U << 0)
-+
-+/**
-+ * typedef ffa_mtd_flag32_t - Memory transaction descriptor flags
-+ *
-+ * * @FFA_MTD_FLAG_ZERO_MEMORY
-+ *     Zero memory after unmapping from sender (must be 0 for share).
-+ * * @FFA_MTD_FLAG_TIME_SLICING
-+ *     Not supported by this implementation.
-+ * * @FFA_MTD_FLAG_ZERO_MEMORY_AFTER_RELINQUISH
-+ *     Zero memory after unmapping from borrowers (must be 0 for share).
-+ * * @FFA_MTD_FLAG_TYPE_MASK
-+ *     Bit-mask to extract memory management transaction type from flags.
-+ * * @FFA_MTD_FLAG_TYPE_SHARE_MEMORY
-+ *     Share memory transaction flag.
-+ *     Used by @SMC_FC_FFA_MEM_RETRIEVE_RESP to indicate that memory came from
-+ *     @SMC_FC_FFA_MEM_SHARE and by @SMC_FC_FFA_MEM_RETRIEVE_REQ to specify that
-+ *     it must have.
-+ * * @FFA_MTD_FLAG_ADDRESS_RANGE_ALIGNMENT_HINT_MASK
-+ *     Not supported by this implementation.
-+ */
-+typedef uint32_t ffa_mtd_flag32_t;
-+#define FFA_MTD_FLAG_ZERO_MEMORY (1U << 0)
-+#define FFA_MTD_FLAG_TIME_SLICING (1U << 1)
-+#define FFA_MTD_FLAG_ZERO_MEMORY_AFTER_RELINQUISH (1U << 2)
-+#define FFA_MTD_FLAG_TYPE_MASK (3U << 3)
-+#define FFA_MTD_FLAG_TYPE_SHARE_MEMORY (1U << 3)
-+#define FFA_MTD_FLAG_ADDRESS_RANGE_ALIGNMENT_HINT_MASK (0x1FU << 5)
-+
-+/**
-+ * struct ffa_mapd - Memory access permissions descriptor
-+ * @endpoint_id:
-+ *         Endpoint id that @memory_access_permissions and @flags apply to.
-+ *         (&typedef ffa_endpoint_id16_t).
-+ * @memory_access_permissions:
-+ *         FFA_MEM_PERM_* values or'ed together (&typedef ffa_mem_perm8_t).
-+ * @flags:
-+ *         FFA_MEM_FLAG_* values or'ed together (&typedef ffa_mem_flag8_t).
-+ */
-+struct ffa_mapd {
-+	ffa_endpoint_id16_t endpoint_id;
-+	ffa_mem_perm8_t memory_access_permissions;
-+	ffa_mem_flag8_t flags;
-+};
-+STATIC_ASSERT(sizeof(struct ffa_mapd) == 4);
-+
-+/**
-+ * struct ffa_emad - Endpoint memory access descriptor.
-+ * @mapd:  &struct ffa_mapd.
-+ * @comp_mrd_offset:
-+ *         Offset of &struct ffa_comp_mrd form start of &struct ffa_mtd.
-+ * @reserved_8_15:
-+ *         Reserved bytes 8-15. Must be 0.
-+ */
-+struct ffa_emad {
-+	struct ffa_mapd mapd;
-+	uint32_t comp_mrd_offset;
-+	uint64_t reserved_8_15;
-+};
-+STATIC_ASSERT(sizeof(struct ffa_emad) == 16);
-+
-+/**
-+ * struct ffa_mtd - Memory transaction descriptor.
-+ * @sender_id:
-+ *         Sender endpoint id.
-+ * @memory_region_attributes:
-+ *         FFA_MEM_ATTR_* values or'ed together (&typedef ffa_mem_attr8_t).
-+ * @reserved_3:
-+ *         Reserved bytes 3. Must be 0.
-+ * @flags:
-+ *         FFA_MTD_FLAG_* values or'ed together (&typedef ffa_mtd_flag32_t).
-+ * @handle:
-+ *         Id of shared memory object. Most be 0 for MEM_SHARE.
-+ * @tag:   Client allocated tag. Must match original value.
-+ * @reserved_24_27:
-+ *         Reserved bytes 24-27. Must be 0.
-+ * @emad_count:
-+ *         Number of entries in @emad. Must be 1 in current implementation.
-+ *         FFA spec allows more entries.
-+ * @emad:
-+ *         Endpoint memory access descriptor array (see @struct ffa_emad).
-+ */
-+struct ffa_mtd {
-+	ffa_endpoint_id16_t sender_id;
-+	ffa_mem_attr8_t memory_region_attributes;
-+	uint8_t reserved_3;
-+	ffa_mtd_flag32_t flags;
-+	uint64_t handle;
-+	uint64_t tag;
-+	uint32_t reserved_24_27;
-+	uint32_t emad_count;
-+	struct ffa_emad emad[];
-+};
-+STATIC_ASSERT(sizeof(struct ffa_mtd) == 32);
-+
-+/**
-+ * struct ffa_mem_relinquish_descriptor - Relinquish request descriptor.
-+ * @handle:
-+ *         Id of shared memory object to relinquish.
-+ * @flags:
-+ *         If bit 0 is set clear memory after unmapping from borrower. Must be 0
-+ *         for share. Bit[1]: Time slicing. Not supported, must be 0. All other
-+ *         bits are reserved 0.
-+ * @endpoint_count:
-+ *         Number of entries in @endpoint_array.
-+ * @endpoint_array:
-+ *         Array of endpoint ids.
-+ */
-+struct ffa_mem_relinquish_descriptor {
-+	uint64_t handle;
-+	uint32_t flags;
-+	uint32_t endpoint_count;
-+	ffa_endpoint_id16_t endpoint_array[];
-+};
-+STATIC_ASSERT(sizeof(struct ffa_mem_relinquish_descriptor) == 16);
-+
-+/**
-+ * enum ffa_error - FF-A error code
-+ * @FFA_ERROR_NOT_SUPPORTED:
-+ *         Operation contained possibly valid parameters not supported by the
-+ *         current implementation. Does not match FF-A 1.0 EAC 1_0 definition.
-+ * @FFA_ERROR_INVALID_PARAMETERS:
-+ *         Invalid parameters. Conditions function specific.
-+ * @FFA_ERROR_NO_MEMORY:
-+ *         Not enough memory.
-+ * @FFA_ERROR_DENIED:
-+ *         Operation not allowed. Conditions function specific.
-+ *
-+ * FF-A 1.0 EAC 1_0 defines other error codes as well but the current
-+ * implementation does not use them.
-+ */
-+enum ffa_error {
-+	FFA_ERROR_NOT_SUPPORTED = -1,
-+	FFA_ERROR_INVALID_PARAMETERS = -2,
-+	FFA_ERROR_NO_MEMORY = -3,
-+	FFA_ERROR_DENIED = -6,
-+};
-+
-+/**
-+ * SMC_FC32_FFA_MIN - First 32 bit SMC opcode reserved for FFA
-+ */
-+#define SMC_FC32_FFA_MIN SMC_FASTCALL_NR_SHARED_MEMORY(0x60)
-+
-+/**
-+ * SMC_FC32_FFA_MAX - Last 32 bit SMC opcode reserved for FFA
-+ */
-+#define SMC_FC32_FFA_MAX SMC_FASTCALL_NR_SHARED_MEMORY(0x7F)
-+
-+/**
-+ * SMC_FC64_FFA_MIN - First 64 bit SMC opcode reserved for FFA
-+ */
-+#define SMC_FC64_FFA_MIN SMC_FASTCALL64_NR_SHARED_MEMORY(0x60)
-+
-+/**
-+ * SMC_FC64_FFA_MAX - Last 64 bit SMC opcode reserved for FFA
-+ */
-+#define SMC_FC64_FFA_MAX SMC_FASTCALL64_NR_SHARED_MEMORY(0x7F)
-+
-+/**
-+ * SMC_FC_FFA_ERROR - SMC error return opcode
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     VMID in [31:16], vCPU in [15:0]
-+ * * w2:     Error code (&enum ffa_error)
-+ */
-+#define SMC_FC_FFA_ERROR SMC_FASTCALL_NR_SHARED_MEMORY(0x60)
-+
-+/**
-+ * SMC_FC_FFA_SUCCESS - 32 bit SMC success return opcode
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     VMID in [31:16], vCPU in [15:0]
-+ * * w2-w7:  Function specific
-+ */
-+#define SMC_FC_FFA_SUCCESS SMC_FASTCALL_NR_SHARED_MEMORY(0x61)
-+
-+/**
-+ * SMC_FC64_FFA_SUCCESS - 64 bit SMC success return opcode
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:             VMID in [31:16], vCPU in [15:0]
-+ * * w2/x2-w7/x7:    Function specific
-+ */
-+#define SMC_FC64_FFA_SUCCESS SMC_FASTCALL64_NR_SHARED_MEMORY(0x61)
-+
-+/**
-+ * SMC_FC_FFA_VERSION - SMC opcode to return supported FF-A version
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Major version bit[30:16] and minor version in bit[15:0] supported
-+ *           by caller. Bit[31] must be 0.
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ * * w2:     Major version bit[30:16], minor version in bit[15:0], bit[31] must
-+ *           be 0.
-+ *
-+ * or
-+ *
-+ * * w0:     SMC_FC_FFA_ERROR
-+ * * w2:     FFA_ERROR_NOT_SUPPORTED if major version passed in is less than the
-+ *           minimum major version supported.
-+ */
-+#define SMC_FC_FFA_VERSION SMC_FASTCALL_NR_SHARED_MEMORY(0x63)
-+
-+/**
-+ * SMC_FC_FFA_FEATURES - SMC opcode to check optional feature support
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     FF-A function ID
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ * * w2:     Bit[0]: Supports custom buffers for memory transactions.
-+ *           Bit[1:0]: For RXTX_MAP min buffer size and alignment boundary.
-+ *           Other bits must be 0.
-+ * * w3:     For FFA_MEM_RETRIEVE_REQ, bit[7-0]: Number of times receiver can
-+ *           retrieve each memory region before relinquishing it specified as
-+ *           ((1U << (value + 1)) - 1 (or value = bits in reference count - 1).
-+ *           For all other bits and commands: must be 0.
-+ * or
-+ *
-+ * * w0:     SMC_FC_FFA_ERROR
-+ * * w2:     FFA_ERROR_NOT_SUPPORTED if function is not implemented, or
-+ *           FFA_ERROR_INVALID_PARAMETERS if function id is not valid.
-+ */
-+#define SMC_FC_FFA_FEATURES SMC_FASTCALL_NR_SHARED_MEMORY(0x64)
-+
-+/**
-+ * SMC_FC_FFA_RXTX_MAP - 32 bit SMC opcode to map message buffers
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     TX address
-+ * * w2:     RX address
-+ * * w3:     RX/TX page count in bit[5:0]
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ */
-+#define SMC_FC_FFA_RXTX_MAP SMC_FASTCALL_NR_SHARED_MEMORY(0x66)
-+
-+/**
-+ * SMC_FC64_FFA_RXTX_MAP - 64 bit SMC opcode to map message buffers
-+ *
-+ * Register arguments:
-+ *
-+ * * x1:     TX address
-+ * * x2:     RX address
-+ * * x3:     RX/TX page count in bit[5:0]
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ */
-+#define SMC_FC64_FFA_RXTX_MAP SMC_FASTCALL64_NR_SHARED_MEMORY(0x66)
-+#ifdef CONFIG_64BIT
-+#define SMC_FCZ_FFA_RXTX_MAP SMC_FC64_FFA_RXTX_MAP
-+#else
-+#define SMC_FCZ_FFA_RXTX_MAP SMC_FC_FFA_RXTX_MAP
-+#endif
-+
-+/**
-+ * SMC_FC_FFA_RXTX_UNMAP - SMC opcode to unmap message buffers
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     ID in [31:16]
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ */
-+#define SMC_FC_FFA_RXTX_UNMAP SMC_FASTCALL_NR_SHARED_MEMORY(0x67)
-+
-+/**
-+ * SMC_FC_FFA_ID_GET - SMC opcode to get endpoint id of caller
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ * * w2:     ID in bit[15:0], bit[31:16] must be 0.
-+ */
-+#define SMC_FC_FFA_ID_GET SMC_FASTCALL_NR_SHARED_MEMORY(0x69)
-+
-+/**
-+ * SMC_FC_FFA_MEM_DONATE - 32 bit SMC opcode to donate memory
-+ *
-+ * Not supported.
-+ */
-+#define SMC_FC_FFA_MEM_DONATE SMC_FASTCALL_NR_SHARED_MEMORY(0x71)
-+
-+/**
-+ * SMC_FC_FFA_MEM_LEND - 32 bit SMC opcode to lend memory
-+ *
-+ * Not currently supported.
-+ */
-+#define SMC_FC_FFA_MEM_LEND SMC_FASTCALL_NR_SHARED_MEMORY(0x72)
-+
-+/**
-+ * SMC_FC_FFA_MEM_SHARE - 32 bit SMC opcode to share memory
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Total length
-+ * * w2:     Fragment length
-+ * * w3:     Address
-+ * * w4:     Page count
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ * * w2/w3:  Handle
-+ *
-+ * or
-+ *
-+ * * w0:     &SMC_FC_FFA_MEM_FRAG_RX
-+ * * w1-:    See &SMC_FC_FFA_MEM_FRAG_RX
-+ *
-+ * or
-+ *
-+ * * w0:     SMC_FC_FFA_ERROR
-+ * * w2:     Error code (&enum ffa_error)
-+ */
-+#define SMC_FC_FFA_MEM_SHARE SMC_FASTCALL_NR_SHARED_MEMORY(0x73)
-+
-+/**
-+ * SMC_FC64_FFA_MEM_SHARE - 64 bit SMC opcode to share memory
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Total length
-+ * * w2:     Fragment length
-+ * * x3:     Address
-+ * * w4:     Page count
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ * * w2/w3:  Handle
-+ *
-+ * or
-+ *
-+ * * w0:     &SMC_FC_FFA_MEM_FRAG_RX
-+ * * w1-:    See &SMC_FC_FFA_MEM_FRAG_RX
-+ *
-+ * or
-+ *
-+ * * w0:     SMC_FC_FFA_ERROR
-+ * * w2:     Error code (&enum ffa_error)
-+ */
-+#define SMC_FC64_FFA_MEM_SHARE SMC_FASTCALL64_NR_SHARED_MEMORY(0x73)
-+
-+/**
-+ * SMC_FC_FFA_MEM_RETRIEVE_REQ - 32 bit SMC opcode to retrieve shared memory
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Total length
-+ * * w2:     Fragment length
-+ * * w3:     Address
-+ * * w4:     Page count
-+ *
-+ * Return:
-+ * * w0:             &SMC_FC_FFA_MEM_RETRIEVE_RESP
-+ * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_RETRIEVE_RESP
-+ */
-+#define SMC_FC_FFA_MEM_RETRIEVE_REQ SMC_FASTCALL_NR_SHARED_MEMORY(0x74)
-+
-+/**
-+ * SMC_FC64_FFA_MEM_RETRIEVE_REQ - 64 bit SMC opcode to retrieve shared memory
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Total length
-+ * * w2:     Fragment length
-+ * * x3:     Address
-+ * * w4:     Page count
-+ *
-+ * Return:
-+ * * w0:             &SMC_FC_FFA_MEM_RETRIEVE_RESP
-+ * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_RETRIEVE_RESP
-+ */
-+#define SMC_FC64_FFA_MEM_RETRIEVE_REQ SMC_FASTCALL64_NR_SHARED_MEMORY(0x74)
-+
-+/**
-+ * SMC_FC_FFA_MEM_RETRIEVE_RESP - Retrieve 32 bit SMC return opcode
-+ *
-+ * Register arguments:
-+ *
-+ * * w1:     Total length
-+ * * w2:     Fragment length
-+ */
-+#define SMC_FC_FFA_MEM_RETRIEVE_RESP SMC_FASTCALL_NR_SHARED_MEMORY(0x75)
-+
-+/**
-+ * SMC_FC_FFA_MEM_RELINQUISH - SMC opcode to relinquish shared memory
-+ *
-+ * Input in &struct ffa_mem_relinquish_descriptor format in message buffer.
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ */
-+#define SMC_FC_FFA_MEM_RELINQUISH SMC_FASTCALL_NR_SHARED_MEMORY(0x76)
-+
-+/**
-+ * SMC_FC_FFA_MEM_RECLAIM - SMC opcode to reclaim shared memory
-+ *
-+ * Register arguments:
-+ *
-+ * * w1/w2:  Handle
-+ * * w3:     Flags
-+ *
-+ * Return:
-+ * * w0:     &SMC_FC_FFA_SUCCESS
-+ */
-+#define SMC_FC_FFA_MEM_RECLAIM SMC_FASTCALL_NR_SHARED_MEMORY(0x77)
-+
-+/**
-+ * SMC_FC_FFA_MEM_FRAG_RX - SMC opcode to request next fragment.
-+ *
-+ * Register arguments:
-+ *
-+ * * w1/w2:  Cookie
-+ * * w3:     Fragment offset.
-+ * * w4:     Endpoint id ID in [31:16], if client is hypervisor.
-+ *
-+ * Return:
-+ * * w0:             &SMC_FC_FFA_MEM_FRAG_TX
-+ * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_FRAG_TX
-+ */
-+#define SMC_FC_FFA_MEM_FRAG_RX SMC_FASTCALL_NR_SHARED_MEMORY(0x7A)
-+
-+/**
-+ * SMC_FC_FFA_MEM_FRAG_TX - SMC opcode to transmit next fragment
-+ *
-+ * Register arguments:
-+ *
-+ * * w1/w2:  Cookie
-+ * * w3:     Fragment length.
-+ * * w4:     Sender endpoint id ID in [31:16], if client is hypervisor.
-+ *
-+ * Return:
-+ * * w0:             &SMC_FC_FFA_MEM_FRAG_RX or &SMC_FC_FFA_SUCCESS.
-+ * * w1/x1-w5/x5:    See opcode in w0.
-+ */
-+#define SMC_FC_FFA_MEM_FRAG_TX SMC_FASTCALL_NR_SHARED_MEMORY(0x7B)
-+
-+#endif /* __LINUX_TRUSTY_ARM_FFA_H */
-diff --git a/include/linux/trusty/sm_err.h b/include/linux/trusty/sm_err.h
-new file mode 100644
-index 000000000000..f6504448c6c3
---- /dev/null
-+++ b/include/linux/trusty/sm_err.h
-@@ -0,0 +1,28 @@
-+/* SPDX-License-Identifier: MIT */
-+/*
-+ * Copyright (c) 2013 Google Inc. All rights reserved
-+ *
-+ * Trusty and TF-A also have a copy of this header.
-+ * Please keep the copies in sync.
-+ */
-+#ifndef __LINUX_TRUSTY_SM_ERR_H
-+#define __LINUX_TRUSTY_SM_ERR_H
-+
-+/* Errors from the secure monitor */
-+#define SM_ERR_UNDEFINED_SMC		0xFFFFFFFF /* Unknown SMC (defined by ARM DEN 0028A(0.9.0) */
-+#define SM_ERR_INVALID_PARAMETERS	-2
-+#define SM_ERR_INTERRUPTED		-3	/* Got interrupted. Call back with restart SMC */
-+#define SM_ERR_UNEXPECTED_RESTART	-4	/* Got an restart SMC when we didn't expect it */
-+#define SM_ERR_BUSY			-5	/* Temporarily busy. Call back with original args */
-+#define SM_ERR_INTERLEAVED_SMC		-6	/* Got a trusted_service SMC when a restart SMC is required */
-+#define SM_ERR_INTERNAL_FAILURE		-7	/* Unknown error */
-+#define SM_ERR_NOT_SUPPORTED		-8
-+#define SM_ERR_NOT_ALLOWED		-9	/* SMC call not allowed */
-+#define SM_ERR_END_OF_INPUT		-10
-+#define SM_ERR_PANIC			-11	/* Secure OS crashed */
-+#define SM_ERR_FIQ_INTERRUPTED		-12	/* Got interrupted by FIQ. Call back with SMC_SC_RESTART_FIQ on same CPU */
-+#define SM_ERR_CPU_IDLE			-13	/* SMC call waiting for another CPU */
-+#define SM_ERR_NOP_INTERRUPTED		-14	/* Got interrupted. Call back with new SMC_SC_NOP */
-+#define SM_ERR_NOP_DONE			-15	/* Cpu idle after SMC_SC_NOP (not an error) */
-+
-+#endif
-diff --git a/include/linux/trusty/smcall.h b/include/linux/trusty/smcall.h
-new file mode 100644
-index 000000000000..aea3f6068593
---- /dev/null
-+++ b/include/linux/trusty/smcall.h
-@@ -0,0 +1,124 @@
-+/* SPDX-License-Identifier: MIT */
-+/*
-+ * Copyright (c) 2013-2014 Google Inc. All rights reserved
-+ *
-+ * Trusty and TF-A also have a copy of this header.
-+ * Please keep the copies in sync.
-+ */
-+#ifndef __LINUX_TRUSTY_SMCALL_H
-+#define __LINUX_TRUSTY_SMCALL_H
-+
-+#define SMC_NUM_ENTITIES	64
-+#define SMC_NUM_ARGS		4
-+#define SMC_NUM_PARAMS		(SMC_NUM_ARGS - 1)
-+
-+#define SMC_IS_FASTCALL(smc_nr)	((smc_nr) & 0x80000000)
-+#define SMC_IS_SMC64(smc_nr)	((smc_nr) & 0x40000000)
-+#define SMC_ENTITY(smc_nr)	(((smc_nr) & 0x3F000000) >> 24)
-+#define SMC_FUNCTION(smc_nr)	((smc_nr) & 0x0000FFFF)
-+
-+#define SMC_NR(entity, fn, fastcall, smc64) ((((fastcall) & 0x1U) << 31) | \
-+					     (((smc64) & 0x1U) << 30) | \
-+					     (((entity) & 0x3FU) << 24) | \
-+					     ((fn) & 0xFFFFU) \
-+					    )
-+
-+#define SMC_FASTCALL_NR(entity, fn)	SMC_NR((entity), (fn), 1, 0)
-+#define SMC_STDCALL_NR(entity, fn)	SMC_NR((entity), (fn), 0, 0)
-+#define SMC_FASTCALL64_NR(entity, fn)	SMC_NR((entity), (fn), 1, 1)
-+#define SMC_STDCALL64_NR(entity, fn)	SMC_NR((entity), (fn), 0, 1)
-+
-+#define	SMC_ENTITY_ARCH			0	/* ARM Architecture calls */
-+#define	SMC_ENTITY_CPU			1	/* CPU Service calls */
-+#define	SMC_ENTITY_SIP			2	/* SIP Service calls */
-+#define	SMC_ENTITY_OEM			3	/* OEM Service calls */
-+#define	SMC_ENTITY_STD			4	/* Standard Service calls */
-+#define	SMC_ENTITY_RESERVED		5	/* Reserved for future use */
-+#define	SMC_ENTITY_TRUSTED_APP		48	/* Trusted Application calls */
-+#define	SMC_ENTITY_TRUSTED_OS		50	/* Trusted OS calls */
-+#define	SMC_ENTITY_LOGGING		51	/* Used for secure -> nonsecure logging */
-+#define	SMC_ENTITY_TEST			52	/* Used for secure -> nonsecure tests */
-+#define	SMC_ENTITY_SECURE_MONITOR	60	/* Trusted OS calls internal to secure monitor */
-+
-+/* FC = Fast call, SC = Standard call */
-+#define SMC_SC_RESTART_LAST	SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
-+#define SMC_SC_LOCKED_NOP	SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 1)
-+
-+/**
-+ * SMC_SC_RESTART_FIQ - Re-enter trusty after it was interrupted by an fiq
-+ *
-+ * No arguments, no return value.
-+ *
-+ * Re-enter trusty after returning to ns to process an fiq. Must be called iff
-+ * trusty returns SM_ERR_FIQ_INTERRUPTED.
-+ *
-+ * Enable by selecting api version TRUSTY_API_VERSION_RESTART_FIQ (1) or later.
-+ */
-+#define SMC_SC_RESTART_FIQ	SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 2)
-+
-+/**
-+ * SMC_SC_NOP - Enter trusty to run pending work.
-+ *
-+ * No arguments.
-+ *
-+ * Returns SM_ERR_NOP_INTERRUPTED or SM_ERR_NOP_DONE.
-+ * If SM_ERR_NOP_INTERRUPTED is returned, the call must be repeated.
-+ *
-+ * Enable by selecting api version TRUSTY_API_VERSION_SMP (2) or later.
-+ */
-+#define SMC_SC_NOP		SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 3)
-+
-+/*
-+ * Return from secure os to non-secure os with return value in r1
-+ */
-+#define SMC_SC_NS_RETURN	SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
-+
-+#define SMC_FC_RESERVED		SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
-+#define SMC_FC_FIQ_EXIT		SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 1)
-+#define SMC_FC_REQUEST_FIQ	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 2)
-+
-+#define TRUSTY_IRQ_TYPE_NORMAL		(0)
-+#define TRUSTY_IRQ_TYPE_PER_CPU		(1)
-+#define TRUSTY_IRQ_TYPE_DOORBELL	(2)
-+#define SMC_FC_GET_NEXT_IRQ	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 3)
-+
-+#define SMC_FC_CPU_SUSPEND	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 7)
-+#define SMC_FC_CPU_RESUME	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 8)
-+
-+#define SMC_FC_AARCH_SWITCH	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 9)
-+#define SMC_FC_GET_VERSION_STR	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 10)
-+
-+/**
-+ * SMC_FC_API_VERSION - Find and select supported API version.
-+ *
-+ * @r1: Version supported by client.
-+ *
-+ * Returns version supported by trusty.
-+ *
-+ * If multiple versions are supported, the client should start by calling
-+ * SMC_FC_API_VERSION with the largest version it supports. Trusty will then
-+ * return a version it supports. If the client does not support the version
-+ * returned by trusty and the version returned is less than the version
-+ * requested, repeat the call with the largest supported version less than the
-+ * last returned version.
-+ *
-+ * This call must be made before any calls that are affected by the api version.
-+ */
-+#define TRUSTY_API_VERSION_RESTART_FIQ	(1)
-+#define TRUSTY_API_VERSION_SMP		(2)
-+#define TRUSTY_API_VERSION_SMP_NOP	(3)
-+#define TRUSTY_API_VERSION_PHYS_MEM_OBJ	(4)
-+#define TRUSTY_API_VERSION_MEM_OBJ	(5)
-+#define TRUSTY_API_VERSION_CURRENT	(5)
-+#define SMC_FC_API_VERSION	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 11)
-+
-+/* TRUSTED_OS entity calls */
-+#define SMC_SC_VIRTIO_GET_DESCR	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 20)
-+#define SMC_SC_VIRTIO_START	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 21)
-+#define SMC_SC_VIRTIO_STOP	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 22)
-+
-+#define SMC_SC_VDEV_RESET	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 23)
-+#define SMC_SC_VDEV_KICK_VQ	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 24)
-+#define SMC_NC_VDEV_KICK_VQ	SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 25)
-+
-+#endif /* __LINUX_TRUSTY_SMCALL_H */
-diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h
-new file mode 100644
-index 000000000000..efbb36999a8b
---- /dev/null
-+++ b/include/linux/trusty/trusty.h
-@@ -0,0 +1,131 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2013 Google, Inc.
-+ */
-+#ifndef __LINUX_TRUSTY_TRUSTY_H
-+#define __LINUX_TRUSTY_TRUSTY_H
-+
-+#include <linux/kernel.h>
-+#include <linux/trusty/sm_err.h>
-+#include <linux/types.h>
-+#include <linux/device.h>
-+#include <linux/pagemap.h>
-+
-+
-+#if IS_ENABLED(CONFIG_TRUSTY)
-+s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2);
-+s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2);
-+#ifdef CONFIG_64BIT
-+s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2);
-+#endif
-+#else
-+static inline s32 trusty_std_call32(struct device *dev, u32 smcnr,
-+				    u32 a0, u32 a1, u32 a2)
-+{
-+	return SM_ERR_UNDEFINED_SMC;
-+}
-+static inline s32 trusty_fast_call32(struct device *dev, u32 smcnr,
-+				     u32 a0, u32 a1, u32 a2)
-+{
-+	return SM_ERR_UNDEFINED_SMC;
-+}
-+#ifdef CONFIG_64BIT
-+static inline s64 trusty_fast_call64(struct device *dev,
-+				     u64 smcnr, u64 a0, u64 a1, u64 a2)
-+{
-+	return SM_ERR_UNDEFINED_SMC;
-+}
-+#endif
-+#endif
-+
-+struct notifier_block;
-+enum {
-+	TRUSTY_CALL_PREPARE,
-+	TRUSTY_CALL_RETURNED,
-+};
-+int trusty_call_notifier_register(struct device *dev,
-+				  struct notifier_block *n);
-+int trusty_call_notifier_unregister(struct device *dev,
-+				    struct notifier_block *n);
-+const char *trusty_version_str_get(struct device *dev);
-+u32 trusty_get_api_version(struct device *dev);
-+bool trusty_get_panic_status(struct device *dev);
-+
-+struct ns_mem_page_info {
-+	u64 paddr;
-+	u8 ffa_mem_attr;
-+	u8 ffa_mem_perm;
-+	u64 compat_attr;
-+};
-+
-+int trusty_encode_page_info(struct ns_mem_page_info *inf,
-+			    struct page *page, pgprot_t pgprot);
-+
-+struct scatterlist;
-+typedef u64 trusty_shared_mem_id_t;
-+int trusty_share_memory(struct device *dev, trusty_shared_mem_id_t *id,
-+			struct scatterlist *sglist, unsigned int nents,
-+			pgprot_t pgprot);
-+int trusty_share_memory_compat(struct device *dev, trusty_shared_mem_id_t *id,
-+			       struct scatterlist *sglist, unsigned int nents,
-+			       pgprot_t pgprot);
-+int trusty_transfer_memory(struct device *dev, u64 *id,
-+			   struct scatterlist *sglist, unsigned int nents,
-+			   pgprot_t pgprot, u64 tag, bool lend);
-+int trusty_reclaim_memory(struct device *dev, trusty_shared_mem_id_t id,
-+			  struct scatterlist *sglist, unsigned int nents);
-+
-+struct dma_buf;
-+#ifdef CONFIG_TRUSTY_DMA_BUF_FFA_TAG
-+u64 trusty_dma_buf_get_ffa_tag(struct dma_buf *dma_buf);
-+#else
-+static inline u64 trusty_dma_buf_get_ffa_tag(struct dma_buf *dma_buf)
-+{
-+	return 0;
-+}
-+#endif
-+
-+/* Invalid handle value is defined by FF-A spec */
-+#ifdef CONFIG_TRUSTY_DMA_BUF_SHARED_MEM_ID
-+/**
-+ * trusty_dma_buf_get_shared_mem_id() - Get memory ID corresponding to a dma_buf
-+ * @dma_buf: DMA buffer
-+ * @id:      Pointer to output trusty_shared_mem_id_t
-+ *
-+ * Sets @id to trusty_shared_mem_id_t corresponding to the given @dma_buf.
-+ * @dma_buf "owns" the ID, i.e. is responsible for allocating/releasing it.
-+ * @dma_buf with an allocated @id must be in secure memory and should only be
-+ * sent to Trusty using TRUSTY_SEND_SECURE.
-+ *
-+ * Return:
-+ * * 0        - success
-+ * * -ENODATA - @dma_buf does not own a trusty_shared_mem_id_t
-+ * * ...      - @dma_buf should not be lent or shared
-+ */
-+int trusty_dma_buf_get_shared_mem_id(struct dma_buf *dma_buf,
-+				     trusty_shared_mem_id_t *id);
-+#else
-+static inline int trusty_dma_buf_get_shared_mem_id(struct dma_buf *dma_buf,
-+						   trusty_shared_mem_id_t *id)
-+{
-+	return -ENODATA;
-+}
-+#endif
-+
-+struct trusty_nop {
-+	struct list_head node;
-+	u32 args[3];
-+};
-+
-+static inline void trusty_nop_init(struct trusty_nop *nop,
-+				   u32 arg0, u32 arg1, u32 arg2) {
-+	INIT_LIST_HEAD(&nop->node);
-+	nop->args[0] = arg0;
-+	nop->args[1] = arg1;
-+	nop->args[2] = arg2;
-+}
-+
-+void trusty_enqueue_nop(struct device *dev, struct trusty_nop *nop);
-+void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop);
-+
-+#endif
-diff --git a/include/linux/trusty/trusty_ipc.h b/include/linux/trusty/trusty_ipc.h
-new file mode 100644
-index 000000000000..9386392f3a64
---- /dev/null
-+++ b/include/linux/trusty/trusty_ipc.h
-@@ -0,0 +1,89 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2015 Google, Inc.
-+ */
-+#ifndef __LINUX_TRUSTY_TRUSTY_IPC_H
-+#define __LINUX_TRUSTY_TRUSTY_IPC_H
-+
-+#include <linux/list.h>
-+#include <linux/scatterlist.h>
-+#include <linux/trusty/trusty.h>
-+#include <linux/types.h>
-+
-+struct tipc_chan;
-+
-+struct tipc_msg_buf {
-+	void *buf_va;
-+	struct scatterlist sg;
-+	trusty_shared_mem_id_t buf_id;
-+	size_t buf_sz;
-+	size_t wpos;
-+	size_t rpos;
-+	size_t shm_cnt;
-+	struct list_head node;
-+};
-+
-+enum tipc_chan_event {
-+	TIPC_CHANNEL_CONNECTED = 1,
-+	TIPC_CHANNEL_DISCONNECTED,
-+	TIPC_CHANNEL_SHUTDOWN,
-+};
-+
-+struct tipc_chan_ops {
-+	void (*handle_event)(void *cb_arg, int event);
-+	struct tipc_msg_buf *(*handle_msg)(void *cb_arg,
-+					   struct tipc_msg_buf *mb);
-+	void (*handle_release)(void *cb_arg);
-+};
-+
-+struct tipc_chan *tipc_create_channel(struct device *dev,
-+				      const struct tipc_chan_ops *ops,
-+				      void *cb_arg);
-+
-+int tipc_chan_connect(struct tipc_chan *chan, const char *port);
-+
-+int tipc_chan_queue_msg(struct tipc_chan *chan, struct tipc_msg_buf *mb);
-+
-+int tipc_chan_shutdown(struct tipc_chan *chan);
-+
-+void tipc_chan_destroy(struct tipc_chan *chan);
-+
-+struct tipc_msg_buf *tipc_chan_get_rxbuf(struct tipc_chan *chan);
-+
-+void tipc_chan_put_rxbuf(struct tipc_chan *chan, struct tipc_msg_buf *mb);
-+
-+struct tipc_msg_buf *
-+tipc_chan_get_txbuf_timeout(struct tipc_chan *chan, long timeout);
-+
-+void tipc_chan_put_txbuf(struct tipc_chan *chan, struct tipc_msg_buf *mb);
-+
-+static inline size_t mb_avail_space(struct tipc_msg_buf *mb)
-+{
-+	return mb->buf_sz - mb->wpos;
-+}
-+
-+static inline size_t mb_avail_data(struct tipc_msg_buf *mb)
-+{
-+	return mb->wpos - mb->rpos;
-+}
-+
-+static inline void *mb_put_data(struct tipc_msg_buf *mb, size_t len)
-+{
-+	void *pos = (u8 *)mb->buf_va + mb->wpos;
-+
-+	BUG_ON(mb->wpos + len > mb->buf_sz);
-+	mb->wpos += len;
-+	return pos;
-+}
-+
-+static inline void *mb_get_data(struct tipc_msg_buf *mb, size_t len)
-+{
-+	void *pos = (u8 *)mb->buf_va + mb->rpos;
-+
-+	BUG_ON(mb->rpos + len > mb->wpos);
-+	mb->rpos += len;
-+	return pos;
-+}
-+
-+#endif /* __LINUX_TRUSTY_TRUSTY_IPC_H */
-+
-diff --git a/include/uapi/linux/trusty/ipc.h b/include/uapi/linux/trusty/ipc.h
-new file mode 100644
-index 000000000000..af91035484f1
---- /dev/null
-+++ b/include/uapi/linux/trusty/ipc.h
-@@ -0,0 +1,65 @@
-+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-+
-+#ifndef _UAPI_LINUX_TRUSTY_IPC_H_
-+#define _UAPI_LINUX_TRUSTY_IPC_H_
-+
-+#include <linux/ioctl.h>
-+#include <linux/types.h>
-+#include <linux/uio.h>
-+
-+/**
-+ * enum transfer_kind - How to send an fd to Trusty
-+ * @TRUSTY_SHARE:       Memory will be accessible by Linux and Trusty. On ARM it
-+ *                      will be mapped as nonsecure. Suitable for shared memory.
-+ *                      The paired fd must be a "dma_buf".
-+ * @TRUSTY_LEND:        Memory will be accessible only to Trusty. On ARM it will
-+ *                      be transitioned to "Secure" memory if Trusty is in
-+ *                      TrustZone. This transfer kind is suitable for donating
-+ *                      video buffers or other similar resources. The paired fd
-+ *                      may need to come from a platform-specific allocator for
-+ *                      memory that may be transitioned to "Secure".
-+ * @TRUSTY_SEND_SECURE: Send memory that is already "Secure". Memory will be
-+ *                      accessible only to Trusty. The paired fd may need to
-+ *                      come from a platform-specific allocator that returns
-+ *                      "Secure" buffers.
-+ *
-+ * Describes how the user would like the resource in question to be sent to
-+ * Trusty. Options may be valid only for certain kinds of fds.
-+ */
-+enum transfer_kind {
-+	TRUSTY_SHARE = 0,
-+	TRUSTY_LEND = 1,
-+	TRUSTY_SEND_SECURE = 2,
-+};
-+
-+/**
-+ * struct trusty_shm - Describes a transfer of memory to Trusty
-+ * @fd:       The fd to transfer
-+ * @transfer: How to transfer it - see &enum transfer_kind
-+ */
-+struct trusty_shm {
-+	__s32 fd;
-+	__u32 transfer;
-+};
-+
-+/**
-+ * struct tipc_send_msg_req - Request struct for @TIPC_IOC_SEND_MSG
-+ * @iov:     Pointer to an array of &struct iovec describing data to be sent
-+ * @shm:     Pointer to an array of &struct trusty_shm describing any file
-+ *           descriptors to be transferred.
-+ * @iov_cnt: Number of elements in the @iov array
-+ * @shm_cnt: Number of elements in the @shm array
-+ */
-+struct tipc_send_msg_req {
-+	__u64 iov;
-+	__u64 shm;
-+	__u64 iov_cnt;
-+	__u64 shm_cnt;
-+};
-+
-+#define TIPC_IOC_MAGIC			'r'
-+#define TIPC_IOC_CONNECT		_IOW(TIPC_IOC_MAGIC, 0x80, char *)
-+#define TIPC_IOC_SEND_MSG		_IOW(TIPC_IOC_MAGIC, 0x81, \
-+					     struct tipc_send_msg_req)
-+
-+#endif
-diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
-index 80d76b75bccd..909905cd7618 100644
---- a/include/uapi/linux/virtio_ids.h
-+++ b/include/uapi/linux/virtio_ids.h
-@@ -42,6 +42,7 @@
- #define VIRTIO_ID_RPROC_SERIAL		11 /* virtio remoteproc serial link */
- #define VIRTIO_ID_CAIF			12 /* Virtio caif */
- #define VIRTIO_ID_MEMORY_BALLOON	13 /* virtio memory balloon */
-+#define VIRTIO_ID_TRUSTY_IPC		13 /* virtio trusty ipc */
- #define VIRTIO_ID_GPU			16 /* virtio GPU */
- #define VIRTIO_ID_CLOCK			17 /* virtio clock/timer */
- #define VIRTIO_ID_INPUT			18 /* virtio input */
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0028-ANDROID-trusty-Remove-FFA-specific-initilization.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0028-ANDROID-trusty-Remove-FFA-specific-initilization.patch
deleted file mode 100644
index 83512f4..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0028-ANDROID-trusty-Remove-FFA-specific-initilization.patch
+++ /dev/null
@@ -1,1077 +0,0 @@
-From 1ecad11415cff1f4a1f098ddb224293fcc8df4a1 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 13:41:26 +0000
-Subject: [PATCH 28/40] ANDROID: trusty: Remove FFA specific initilization
-
-Remove FFA specific initialization and its arm_ffa.h file from Trusty
-driver. These changes are done so that Trusty can use ARM FFA driver
-and its related header files.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Iaad473659de94930cdf78cd7201f016d59cee8d7
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-mem.c    |  37 ---
- drivers/trusty/trusty.c        | 286 +---------------
- include/linux/trusty/arm_ffa.h | 590 ---------------------------------
- include/linux/trusty/trusty.h  |   3 -
- 4 files changed, 3 insertions(+), 913 deletions(-)
- delete mode 100644 include/linux/trusty/arm_ffa.h
-
-diff --git a/drivers/trusty/trusty-mem.c b/drivers/trusty/trusty-mem.c
-index 8a360298e501..7775ff76c38c 100644
---- a/drivers/trusty/trusty-mem.c
-+++ b/drivers/trusty/trusty-mem.c
-@@ -5,7 +5,6 @@
- 
- #include <linux/types.h>
- #include <linux/printk.h>
--#include <linux/trusty/arm_ffa.h>
- #include <linux/trusty/trusty.h>
- #include <linux/trusty/smcall.h>
- 
-@@ -75,8 +74,6 @@ int trusty_encode_page_info(struct ns_mem_page_info *inf,
- {
- 	int mem_attr;
- 	u64 pte;
--	u8 ffa_mem_attr;
--	u8 ffa_mem_perm = 0;
- 
- 	if (!inf || !page)
- 		return -EINVAL;
-@@ -89,30 +86,6 @@ int trusty_encode_page_info(struct ns_mem_page_info *inf,
- 	if (mem_attr < 0)
- 		return mem_attr;
- 
--	switch (mem_attr) {
--	case MEM_ATTR_STRONGLY_ORDERED:
--		ffa_mem_attr = FFA_MEM_ATTR_DEVICE_NGNRNE;
--		break;
--
--	case MEM_ATTR_DEVICE:
--		ffa_mem_attr = FFA_MEM_ATTR_DEVICE_NGNRE;
--		break;
--
--	case MEM_ATTR_NORMAL_NON_CACHEABLE:
--		ffa_mem_attr = FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED;
--		break;
--
--	case MEM_ATTR_NORMAL_WRITE_BACK_READ_ALLOCATE:
--	case MEM_ATTR_NORMAL_WRITE_BACK_WRITE_ALLOCATE:
--		ffa_mem_attr = FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB;
--		break;
--
--	default:
--		return -EINVAL;
--	}
--
--	inf->paddr = pte;
--
- 	/* add other attributes */
- #if defined(CONFIG_ARM64) || defined(CONFIG_ARM_LPAE)
- 	pte |= pgprot_val(pgprot);
-@@ -123,16 +96,6 @@ int trusty_encode_page_info(struct ns_mem_page_info *inf,
- 		pte |= ATTR_INNER_SHAREABLE; /* inner sharable */
- #endif
- 
--	if (!(pte & ATTR_RDONLY))
--		ffa_mem_perm |= FFA_MEM_PERM_RW;
--	else
--		ffa_mem_perm |= FFA_MEM_PERM_RO;
--
--	if ((pte & ATTR_INNER_SHAREABLE) == ATTR_INNER_SHAREABLE)
--		ffa_mem_attr |= FFA_MEM_ATTR_INNER_SHAREABLE;
--
--	inf->ffa_mem_attr = ffa_mem_attr;
--	inf->ffa_mem_perm = ffa_mem_perm;
- 	inf->compat_attr = (pte & 0x0000FFFFFFFFFFFFull) |
- 			   ((u64)mem_attr << 48);
- 	return 0;
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 265eab52aea0..2dec75398f69 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -11,7 +11,6 @@
- #include <linux/slab.h>
- #include <linux/stat.h>
- #include <linux/string.h>
--#include <linux/trusty/arm_ffa.h>
- #include <linux/trusty/smcall.h>
- #include <linux/trusty/sm_err.h>
- #include <linux/trusty/trusty.h>
-@@ -42,11 +41,6 @@ struct trusty_state {
- 	struct list_head nop_queue;
- 	spinlock_t nop_lock; /* protects nop_queue */
- 	struct device_dma_parameters dma_parms;
--	void *ffa_tx;
--	void *ffa_rx;
--	u16 ffa_local_id;
--	u16 ffa_remote_id;
--	struct mutex share_memory_msg_lock; /* protects share_memory_msg */
- };
- 
- static inline unsigned long smc(unsigned long r0, unsigned long r1,
-@@ -246,19 +240,6 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
- 	struct ns_mem_page_info pg_inf;
- 	struct scatterlist *sg;
- 	size_t count;
--	size_t i;
--	size_t len;
--	u64 ffa_handle = 0;
--	size_t total_len;
--	size_t endpoint_count = 1;
--	struct ffa_mtd *mtd = s->ffa_tx;
--	size_t comp_mrd_offset = offsetof(struct ffa_mtd, emad[endpoint_count]);
--	struct ffa_comp_mrd *comp_mrd = s->ffa_tx + comp_mrd_offset;
--	struct ffa_cons_mrd *cons_mrd = comp_mrd->address_range_array;
--	size_t cons_mrd_offset = (void *)cons_mrd - s->ffa_tx;
--	struct smc_ret8 smc_ret;
--	u32 cookie_low;
--	u32 cookie_high;
- 
- 	if (WARN_ON(dev->driver != &trusty_driver.driver))
- 		return -EINVAL;
-@@ -284,126 +265,11 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
- 	if (ret) {
- 		dev_err(s->dev, "%s: trusty_encode_page_info failed\n",
- 			__func__);
--		goto err_encode_page_info;
--	}
--
--	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
--		*id = pg_inf.compat_attr;
--		return 0;
--	}
--
--	len = 0;
--	for_each_sg(sglist, sg, nents, i)
--		len += sg_dma_len(sg);
--
--	mutex_lock(&s->share_memory_msg_lock);
--
--	mtd->sender_id = s->ffa_local_id;
--	mtd->memory_region_attributes = pg_inf.ffa_mem_attr;
--	mtd->reserved_3 = 0;
--	mtd->flags = 0;
--	mtd->handle = 0;
--	mtd->tag = tag;
--	mtd->reserved_24_27 = 0;
--	mtd->emad_count = endpoint_count;
--	for (i = 0; i < endpoint_count; i++) {
--		struct ffa_emad *emad = &mtd->emad[i];
--		/* TODO: support stream ids */
--		emad->mapd.endpoint_id = s->ffa_remote_id;
--		emad->mapd.memory_access_permissions = pg_inf.ffa_mem_perm;
--		emad->mapd.flags = 0;
--		emad->comp_mrd_offset = comp_mrd_offset;
--		emad->reserved_8_15 = 0;
--	}
--	comp_mrd->total_page_count = len / PAGE_SIZE;
--	comp_mrd->address_range_count = nents;
--	comp_mrd->reserved_8_15 = 0;
--
--	total_len = cons_mrd_offset + nents * sizeof(*cons_mrd);
--	sg = sglist;
--	while (count) {
--		size_t lcount =
--			min_t(size_t, count, (PAGE_SIZE - cons_mrd_offset) /
--			      sizeof(*cons_mrd));
--		size_t fragment_len = lcount * sizeof(*cons_mrd) +
--				      cons_mrd_offset;
--
--		for (i = 0; i < lcount; i++) {
--			cons_mrd[i].address = sg_dma_address(sg);
--			cons_mrd[i].page_count = sg_dma_len(sg) / PAGE_SIZE;
--			cons_mrd[i].reserved_12_15 = 0;
--			sg = sg_next(sg);
--		}
--		count -= lcount;
--		if (cons_mrd_offset) {
--			u32 smc = lend ? SMC_FC_FFA_MEM_LEND :
--					 SMC_FC_FFA_MEM_SHARE;
--			/* First fragment */
--			smc_ret = trusty_smc8(smc, total_len,
--					      fragment_len, 0, 0, 0, 0, 0);
--		} else {
--			smc_ret = trusty_smc8(SMC_FC_FFA_MEM_FRAG_TX,
--					      cookie_low, cookie_high,
--					      fragment_len, 0, 0, 0, 0);
--		}
--		if (smc_ret.r0 == SMC_FC_FFA_MEM_FRAG_RX) {
--			cookie_low = smc_ret.r1;
--			cookie_high = smc_ret.r2;
--			dev_dbg(s->dev, "cookie %x %x", cookie_low,
--				cookie_high);
--			if (!count) {
--				/*
--				 * We have sent all our descriptors. Expected
--				 * SMC_FC_FFA_SUCCESS, not a request to send
--				 * another fragment.
--				 */
--				dev_err(s->dev, "%s: fragment_len %zd/%zd, unexpected SMC_FC_FFA_MEM_FRAG_RX\n",
--					__func__, fragment_len, total_len);
--				ret = -EIO;
--				break;
--			}
--		} else if (smc_ret.r0 == SMC_FC_FFA_SUCCESS) {
--			ffa_handle = smc_ret.r2 | (u64)smc_ret.r3 << 32;
--			dev_dbg(s->dev, "%s: fragment_len %zu/%zu, got handle 0x%llx\n",
--				__func__, fragment_len, total_len,
--				ffa_handle);
--			if (count) {
--				/*
--				 * We have not sent all our descriptors.
--				 * Expected SMC_FC_FFA_MEM_FRAG_RX not
--				 * SMC_FC_FFA_SUCCESS.
--				 */
--				dev_err(s->dev, "%s: fragment_len %zu/%zu, unexpected SMC_FC_FFA_SUCCESS, count %zu != 0\n",
--					__func__, fragment_len, total_len,
--					count);
--				ret = -EIO;
--				break;
--			}
--		} else {
--			dev_err(s->dev, "%s: fragment_len %zu/%zu, SMC_FC_FFA_MEM_SHARE failed 0x%lx 0x%lx 0x%lx",
--				__func__, fragment_len, total_len,
--				smc_ret.r0, smc_ret.r1, smc_ret.r2);
--			ret = -EIO;
--			break;
--		}
--
--		cons_mrd = s->ffa_tx;
--		cons_mrd_offset = 0;
--	}
--
--	mutex_unlock(&s->share_memory_msg_lock);
--
--	if (!ret) {
--		*id = ffa_handle;
--		dev_dbg(s->dev, "%s: done\n", __func__);
--		return 0;
-+		return ret;
- 	}
- 
--	dev_err(s->dev, "%s: failed %d", __func__, ret);
--
--err_encode_page_info:
--	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
--	return ret;
-+	*id = pg_inf.compat_attr;
-+	return 0;
- }
- EXPORT_SYMBOL(trusty_transfer_memory);
- 
-@@ -433,8 +299,6 @@ int trusty_reclaim_memory(struct device *dev, u64 id,
- 			  struct scatterlist *sglist, unsigned int nents)
- {
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
--	int ret = 0;
--	struct smc_ret8 smc_ret;
- 
- 	if (WARN_ON(dev->driver != &trusty_driver.driver))
- 		return -EINVAL;
-@@ -454,28 +318,6 @@ int trusty_reclaim_memory(struct device *dev, u64 id,
- 		return 0;
- 	}
- 
--	mutex_lock(&s->share_memory_msg_lock);
--
--	smc_ret = trusty_smc8(SMC_FC_FFA_MEM_RECLAIM, (u32)id, id >> 32, 0, 0,
--			      0, 0, 0);
--	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
--		dev_err(s->dev, "%s: SMC_FC_FFA_MEM_RECLAIM failed 0x%lx 0x%lx 0x%lx",
--			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
--		if (smc_ret.r0 == SMC_FC_FFA_ERROR &&
--		    smc_ret.r2 == FFA_ERROR_DENIED)
--			ret = -EBUSY;
--		else
--			ret = -EIO;
--	}
--
--	mutex_unlock(&s->share_memory_msg_lock);
--
--	if (ret != 0)
--		return ret;
--
--	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
--
--	dev_dbg(s->dev, "%s: done\n", __func__);
- 	return 0;
- }
- EXPORT_SYMBOL(trusty_reclaim_memory);
-@@ -527,118 +369,6 @@ const char *trusty_version_str_get(struct device *dev)
- }
- EXPORT_SYMBOL(trusty_version_str_get);
- 
--static int trusty_init_msg_buf(struct trusty_state *s, struct device *dev)
--{
--	phys_addr_t tx_paddr;
--	phys_addr_t rx_paddr;
--	int ret;
--	struct smc_ret8 smc_ret;
--
--	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ)
--		return 0;
--
--	/* Get supported FF-A version and check if it is compatible */
--	smc_ret = trusty_smc8(SMC_FC_FFA_VERSION, FFA_CURRENT_VERSION, 0, 0,
--			      0, 0, 0, 0);
--	if (FFA_VERSION_TO_MAJOR(smc_ret.r0) != FFA_CURRENT_VERSION_MAJOR) {
--		dev_err(s->dev,
--			"%s: Unsupported FF-A version 0x%lx, expected 0x%x\n",
--			__func__, smc_ret.r0, FFA_CURRENT_VERSION);
--		ret = -EIO;
--		goto err_version;
--	}
--
--	/* Check that SMC_FC_FFA_MEM_SHARE is implemented */
--	smc_ret = trusty_smc8(SMC_FC_FFA_FEATURES, SMC_FC_FFA_MEM_SHARE, 0, 0,
--			      0, 0, 0, 0);
--	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
--		dev_err(s->dev,
--			"%s: SMC_FC_FFA_FEATURES(SMC_FC_FFA_MEM_SHARE) failed 0x%lx 0x%lx 0x%lx\n",
--			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
--		ret = -EIO;
--		goto err_features;
--	}
--
--	/*
--	 * Set FF-A endpoint IDs.
--	 *
--	 * Hardcode 0x8000 for the secure os.
--	 * TODO: Use FF-A call or device tree to configure this dynamically
--	 */
--	smc_ret = trusty_smc8(SMC_FC_FFA_ID_GET, 0, 0, 0, 0, 0, 0, 0);
--	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
--		dev_err(s->dev,
--			"%s: SMC_FC_FFA_ID_GET failed 0x%lx 0x%lx 0x%lx\n",
--			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
--		ret = -EIO;
--		goto err_id_get;
--	}
--
--	s->ffa_local_id = smc_ret.r2;
--	s->ffa_remote_id = 0x8000;
--
--	s->ffa_tx = kmalloc(PAGE_SIZE, GFP_KERNEL);
--	if (!s->ffa_tx) {
--		ret = -ENOMEM;
--		goto err_alloc_tx;
--	}
--	tx_paddr = virt_to_phys(s->ffa_tx);
--	if (WARN_ON(tx_paddr & (PAGE_SIZE - 1))) {
--		ret = -EINVAL;
--		goto err_unaligned_tx_buf;
--	}
--
--	s->ffa_rx = kmalloc(PAGE_SIZE, GFP_KERNEL);
--	if (!s->ffa_rx) {
--		ret = -ENOMEM;
--		goto err_alloc_rx;
--	}
--	rx_paddr = virt_to_phys(s->ffa_rx);
--	if (WARN_ON(rx_paddr & (PAGE_SIZE - 1))) {
--		ret = -EINVAL;
--		goto err_unaligned_rx_buf;
--	}
--
--	smc_ret = trusty_smc8(SMC_FCZ_FFA_RXTX_MAP, tx_paddr, rx_paddr, 1, 0,
--			      0, 0, 0);
--	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
--		dev_err(s->dev, "%s: SMC_FCZ_FFA_RXTX_MAP failed 0x%lx 0x%lx 0x%lx\n",
--			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
--		ret = -EIO;
--		goto err_rxtx_map;
--	}
--
--	return 0;
--
--err_rxtx_map:
--err_unaligned_rx_buf:
--	kfree(s->ffa_rx);
--	s->ffa_rx = NULL;
--err_alloc_rx:
--err_unaligned_tx_buf:
--	kfree(s->ffa_tx);
--	s->ffa_tx = NULL;
--err_alloc_tx:
--err_id_get:
--err_features:
--err_version:
--	return ret;
--}
--
--static void trusty_free_msg_buf(struct trusty_state *s, struct device *dev)
--{
--	struct smc_ret8 smc_ret;
--
--	smc_ret = trusty_smc8(SMC_FC_FFA_RXTX_UNMAP, 0, 0, 0, 0, 0, 0, 0);
--	if (smc_ret.r0 != SMC_FC_FFA_SUCCESS) {
--		dev_err(s->dev, "%s: SMC_FC_FFA_RXTX_UNMAP failed 0x%lx 0x%lx 0x%lx\n",
--			__func__, smc_ret.r0, smc_ret.r1, smc_ret.r2);
--	} else {
--		kfree(s->ffa_rx);
--		kfree(s->ffa_tx);
--	}
--}
--
- static void trusty_init_version(struct trusty_state *s, struct device *dev)
- {
- 	int ret;
-@@ -842,7 +572,6 @@ static int trusty_probe(struct platform_device *pdev)
- 	spin_lock_init(&s->nop_lock);
- 	INIT_LIST_HEAD(&s->nop_queue);
- 	mutex_init(&s->smc_lock);
--	mutex_init(&s->share_memory_msg_lock);
- 	ATOMIC_INIT_NOTIFIER_HEAD(&s->notifier);
- 	init_completion(&s->cpu_idle_completion);
- 
-@@ -862,10 +591,6 @@ static int trusty_probe(struct platform_device *pdev)
- 	if (ret < 0)
- 		goto err_api_version;
- 
--	ret = trusty_init_msg_buf(s, &pdev->dev);
--	if (ret < 0)
--		goto err_init_msg_buf;
--
- 	s->nop_wq = alloc_workqueue("trusty-nop-wq", WQ_CPU_INTENSIVE, 0);
- 	if (!s->nop_wq) {
- 		ret = -ENODEV;
-@@ -910,13 +635,10 @@ static int trusty_probe(struct platform_device *pdev)
- err_alloc_works:
- 	destroy_workqueue(s->nop_wq);
- err_create_nop_wq:
--	trusty_free_msg_buf(s, &pdev->dev);
--err_init_msg_buf:
- err_api_version:
- 	s->dev->dma_parms = NULL;
- 	kfree(s->version_str);
- 	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
--	mutex_destroy(&s->share_memory_msg_lock);
- 	mutex_destroy(&s->smc_lock);
- 	kfree(s);
- err_allocate_state:
-@@ -938,9 +660,7 @@ static int trusty_remove(struct platform_device *pdev)
- 	free_percpu(s->nop_works);
- 	destroy_workqueue(s->nop_wq);
- 
--	mutex_destroy(&s->share_memory_msg_lock);
- 	mutex_destroy(&s->smc_lock);
--	trusty_free_msg_buf(s, &pdev->dev);
- 	s->dev->dma_parms = NULL;
- 	kfree(s->version_str);
- 	kfree(s);
-diff --git a/include/linux/trusty/arm_ffa.h b/include/linux/trusty/arm_ffa.h
-deleted file mode 100644
-index ab7b2afb794c..000000000000
---- a/include/linux/trusty/arm_ffa.h
-+++ /dev/null
-@@ -1,590 +0,0 @@
--/* SPDX-License-Identifier: MIT */
--/*
-- * Copyright (C) 2020 Google, Inc.
-- *
-- * Trusty and TF-A also have a copy of this header.
-- * Please keep the copies in sync.
-- */
--#ifndef __LINUX_TRUSTY_ARM_FFA_H
--#define __LINUX_TRUSTY_ARM_FFA_H
--
--/*
-- * Subset of Arm PSA Firmware Framework for Arm v8-A 1.0 EAC 1_0
-- * (https://developer.arm.com/docs/den0077/a) needed for shared memory.
-- */
--
--#include "smcall.h"
--
--#ifndef STATIC_ASSERT
--#define STATIC_ASSERT(e) _Static_assert(e, #e)
--#endif
--
--#define FFA_CURRENT_VERSION_MAJOR (1U)
--#define FFA_CURRENT_VERSION_MINOR (0U)
--
--#define FFA_VERSION_TO_MAJOR(version) ((version) >> 16)
--#define FFA_VERSION_TO_MINOR(version) ((version) & (0xffff))
--#define FFA_VERSION(major, minor) (((major) << 16) | (minor))
--#define FFA_CURRENT_VERSION \
--	FFA_VERSION(FFA_CURRENT_VERSION_MAJOR, FFA_CURRENT_VERSION_MINOR)
--
--#define SMC_ENTITY_SHARED_MEMORY 4
--
--#define SMC_FASTCALL_NR_SHARED_MEMORY(nr) \
--	SMC_FASTCALL_NR(SMC_ENTITY_SHARED_MEMORY, nr)
--#define SMC_FASTCALL64_NR_SHARED_MEMORY(nr) \
--	SMC_FASTCALL64_NR(SMC_ENTITY_SHARED_MEMORY, nr)
--
--/**
-- * typedef ffa_endpoint_id16_t - Endpoint ID
-- *
-- * Current implementation only supports VMIDs. FFA spec also support stream
-- * endpoint ids.
-- */
--typedef uint16_t ffa_endpoint_id16_t;
--
--/**
-- * struct ffa_cons_mrd - Constituent memory region descriptor
-- * @address:
-- *         Start address of contiguous memory region. Must be 4K page aligned.
-- * @page_count:
-- *         Number of 4K pages in region.
-- * @reserved_12_15:
-- *         Reserve bytes 12-15 to pad struct size to 16 bytes.
-- */
--struct ffa_cons_mrd {
--	uint64_t address;
--	uint32_t page_count;
--	uint32_t reserved_12_15;
--};
--STATIC_ASSERT(sizeof(struct ffa_cons_mrd) == 16);
--
--/**
-- * struct ffa_comp_mrd - Composite memory region descriptor
-- * @total_page_count:
-- *         Number of 4k pages in memory region. Must match sum of
-- *         @address_range_array[].page_count.
-- * @address_range_count:
-- *         Number of entries in @address_range_array.
-- * @reserved_8_15:
-- *         Reserve bytes 8-15 to pad struct size to 16 byte alignment and
-- *         make @address_range_array 16 byte aligned.
-- * @address_range_array:
-- *         Array of &struct ffa_cons_mrd entries.
-- */
--struct ffa_comp_mrd {
--	uint32_t total_page_count;
--	uint32_t address_range_count;
--	uint64_t reserved_8_15;
--	struct ffa_cons_mrd address_range_array[];
--};
--STATIC_ASSERT(sizeof(struct ffa_comp_mrd) == 16);
--
--/**
-- * typedef ffa_mem_attr8_t - Memory region attributes
-- *
-- * * @FFA_MEM_ATTR_DEVICE_NGNRNE:
-- *     Device-nGnRnE.
-- * * @FFA_MEM_ATTR_DEVICE_NGNRE:
-- *     Device-nGnRE.
-- * * @FFA_MEM_ATTR_DEVICE_NGRE:
-- *     Device-nGRE.
-- * * @FFA_MEM_ATTR_DEVICE_GRE:
-- *     Device-GRE.
-- * * @FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED
-- *     Normal memory. Non-cacheable.
-- * * @FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB
-- *     Normal memory. Write-back cached.
-- * * @FFA_MEM_ATTR_NON_SHAREABLE
-- *     Non-shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-- * * @FFA_MEM_ATTR_OUTER_SHAREABLE
-- *     Outer Shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-- * * @FFA_MEM_ATTR_INNER_SHAREABLE
-- *     Inner Shareable. Combine with FFA_MEM_ATTR_NORMAL_MEMORY_*.
-- */
--typedef uint8_t ffa_mem_attr8_t;
--#define FFA_MEM_ATTR_DEVICE_NGNRNE ((1U << 4) | (0x0U << 2))
--#define FFA_MEM_ATTR_DEVICE_NGNRE ((1U << 4) | (0x1U << 2))
--#define FFA_MEM_ATTR_DEVICE_NGRE ((1U << 4) | (0x2U << 2))
--#define FFA_MEM_ATTR_DEVICE_GRE ((1U << 4) | (0x3U << 2))
--#define FFA_MEM_ATTR_NORMAL_MEMORY_UNCACHED ((2U << 4) | (0x1U << 2))
--#define FFA_MEM_ATTR_NORMAL_MEMORY_CACHED_WB ((2U << 4) | (0x3U << 2))
--#define FFA_MEM_ATTR_NON_SHAREABLE (0x0U << 0)
--#define FFA_MEM_ATTR_OUTER_SHAREABLE (0x2U << 0)
--#define FFA_MEM_ATTR_INNER_SHAREABLE (0x3U << 0)
--
--/**
-- * typedef ffa_mem_perm8_t - Memory access permissions
-- *
-- * * @FFA_MEM_ATTR_RO
-- *     Request or specify read-only mapping.
-- * * @FFA_MEM_ATTR_RW
-- *     Request or allow read-write mapping.
-- * * @FFA_MEM_PERM_NX
-- *     Deny executable mapping.
-- * * @FFA_MEM_PERM_X
-- *     Request executable mapping.
-- */
--typedef uint8_t ffa_mem_perm8_t;
--#define FFA_MEM_PERM_RO (1U << 0)
--#define FFA_MEM_PERM_RW (1U << 1)
--#define FFA_MEM_PERM_NX (1U << 2)
--#define FFA_MEM_PERM_X (1U << 3)
--
--/**
-- * typedef ffa_mem_flag8_t - Endpoint memory flags
-- *
-- * * @FFA_MEM_FLAG_OTHER
-- *     Other borrower. Memory region must not be or was not retrieved on behalf
-- *     of this endpoint.
-- */
--typedef uint8_t ffa_mem_flag8_t;
--#define FFA_MEM_FLAG_OTHER (1U << 0)
--
--/**
-- * typedef ffa_mtd_flag32_t - Memory transaction descriptor flags
-- *
-- * * @FFA_MTD_FLAG_ZERO_MEMORY
-- *     Zero memory after unmapping from sender (must be 0 for share).
-- * * @FFA_MTD_FLAG_TIME_SLICING
-- *     Not supported by this implementation.
-- * * @FFA_MTD_FLAG_ZERO_MEMORY_AFTER_RELINQUISH
-- *     Zero memory after unmapping from borrowers (must be 0 for share).
-- * * @FFA_MTD_FLAG_TYPE_MASK
-- *     Bit-mask to extract memory management transaction type from flags.
-- * * @FFA_MTD_FLAG_TYPE_SHARE_MEMORY
-- *     Share memory transaction flag.
-- *     Used by @SMC_FC_FFA_MEM_RETRIEVE_RESP to indicate that memory came from
-- *     @SMC_FC_FFA_MEM_SHARE and by @SMC_FC_FFA_MEM_RETRIEVE_REQ to specify that
-- *     it must have.
-- * * @FFA_MTD_FLAG_ADDRESS_RANGE_ALIGNMENT_HINT_MASK
-- *     Not supported by this implementation.
-- */
--typedef uint32_t ffa_mtd_flag32_t;
--#define FFA_MTD_FLAG_ZERO_MEMORY (1U << 0)
--#define FFA_MTD_FLAG_TIME_SLICING (1U << 1)
--#define FFA_MTD_FLAG_ZERO_MEMORY_AFTER_RELINQUISH (1U << 2)
--#define FFA_MTD_FLAG_TYPE_MASK (3U << 3)
--#define FFA_MTD_FLAG_TYPE_SHARE_MEMORY (1U << 3)
--#define FFA_MTD_FLAG_ADDRESS_RANGE_ALIGNMENT_HINT_MASK (0x1FU << 5)
--
--/**
-- * struct ffa_mapd - Memory access permissions descriptor
-- * @endpoint_id:
-- *         Endpoint id that @memory_access_permissions and @flags apply to.
-- *         (&typedef ffa_endpoint_id16_t).
-- * @memory_access_permissions:
-- *         FFA_MEM_PERM_* values or'ed together (&typedef ffa_mem_perm8_t).
-- * @flags:
-- *         FFA_MEM_FLAG_* values or'ed together (&typedef ffa_mem_flag8_t).
-- */
--struct ffa_mapd {
--	ffa_endpoint_id16_t endpoint_id;
--	ffa_mem_perm8_t memory_access_permissions;
--	ffa_mem_flag8_t flags;
--};
--STATIC_ASSERT(sizeof(struct ffa_mapd) == 4);
--
--/**
-- * struct ffa_emad - Endpoint memory access descriptor.
-- * @mapd:  &struct ffa_mapd.
-- * @comp_mrd_offset:
-- *         Offset of &struct ffa_comp_mrd form start of &struct ffa_mtd.
-- * @reserved_8_15:
-- *         Reserved bytes 8-15. Must be 0.
-- */
--struct ffa_emad {
--	struct ffa_mapd mapd;
--	uint32_t comp_mrd_offset;
--	uint64_t reserved_8_15;
--};
--STATIC_ASSERT(sizeof(struct ffa_emad) == 16);
--
--/**
-- * struct ffa_mtd - Memory transaction descriptor.
-- * @sender_id:
-- *         Sender endpoint id.
-- * @memory_region_attributes:
-- *         FFA_MEM_ATTR_* values or'ed together (&typedef ffa_mem_attr8_t).
-- * @reserved_3:
-- *         Reserved bytes 3. Must be 0.
-- * @flags:
-- *         FFA_MTD_FLAG_* values or'ed together (&typedef ffa_mtd_flag32_t).
-- * @handle:
-- *         Id of shared memory object. Most be 0 for MEM_SHARE.
-- * @tag:   Client allocated tag. Must match original value.
-- * @reserved_24_27:
-- *         Reserved bytes 24-27. Must be 0.
-- * @emad_count:
-- *         Number of entries in @emad. Must be 1 in current implementation.
-- *         FFA spec allows more entries.
-- * @emad:
-- *         Endpoint memory access descriptor array (see @struct ffa_emad).
-- */
--struct ffa_mtd {
--	ffa_endpoint_id16_t sender_id;
--	ffa_mem_attr8_t memory_region_attributes;
--	uint8_t reserved_3;
--	ffa_mtd_flag32_t flags;
--	uint64_t handle;
--	uint64_t tag;
--	uint32_t reserved_24_27;
--	uint32_t emad_count;
--	struct ffa_emad emad[];
--};
--STATIC_ASSERT(sizeof(struct ffa_mtd) == 32);
--
--/**
-- * struct ffa_mem_relinquish_descriptor - Relinquish request descriptor.
-- * @handle:
-- *         Id of shared memory object to relinquish.
-- * @flags:
-- *         If bit 0 is set clear memory after unmapping from borrower. Must be 0
-- *         for share. Bit[1]: Time slicing. Not supported, must be 0. All other
-- *         bits are reserved 0.
-- * @endpoint_count:
-- *         Number of entries in @endpoint_array.
-- * @endpoint_array:
-- *         Array of endpoint ids.
-- */
--struct ffa_mem_relinquish_descriptor {
--	uint64_t handle;
--	uint32_t flags;
--	uint32_t endpoint_count;
--	ffa_endpoint_id16_t endpoint_array[];
--};
--STATIC_ASSERT(sizeof(struct ffa_mem_relinquish_descriptor) == 16);
--
--/**
-- * enum ffa_error - FF-A error code
-- * @FFA_ERROR_NOT_SUPPORTED:
-- *         Operation contained possibly valid parameters not supported by the
-- *         current implementation. Does not match FF-A 1.0 EAC 1_0 definition.
-- * @FFA_ERROR_INVALID_PARAMETERS:
-- *         Invalid parameters. Conditions function specific.
-- * @FFA_ERROR_NO_MEMORY:
-- *         Not enough memory.
-- * @FFA_ERROR_DENIED:
-- *         Operation not allowed. Conditions function specific.
-- *
-- * FF-A 1.0 EAC 1_0 defines other error codes as well but the current
-- * implementation does not use them.
-- */
--enum ffa_error {
--	FFA_ERROR_NOT_SUPPORTED = -1,
--	FFA_ERROR_INVALID_PARAMETERS = -2,
--	FFA_ERROR_NO_MEMORY = -3,
--	FFA_ERROR_DENIED = -6,
--};
--
--/**
-- * SMC_FC32_FFA_MIN - First 32 bit SMC opcode reserved for FFA
-- */
--#define SMC_FC32_FFA_MIN SMC_FASTCALL_NR_SHARED_MEMORY(0x60)
--
--/**
-- * SMC_FC32_FFA_MAX - Last 32 bit SMC opcode reserved for FFA
-- */
--#define SMC_FC32_FFA_MAX SMC_FASTCALL_NR_SHARED_MEMORY(0x7F)
--
--/**
-- * SMC_FC64_FFA_MIN - First 64 bit SMC opcode reserved for FFA
-- */
--#define SMC_FC64_FFA_MIN SMC_FASTCALL64_NR_SHARED_MEMORY(0x60)
--
--/**
-- * SMC_FC64_FFA_MAX - Last 64 bit SMC opcode reserved for FFA
-- */
--#define SMC_FC64_FFA_MAX SMC_FASTCALL64_NR_SHARED_MEMORY(0x7F)
--
--/**
-- * SMC_FC_FFA_ERROR - SMC error return opcode
-- *
-- * Register arguments:
-- *
-- * * w1:     VMID in [31:16], vCPU in [15:0]
-- * * w2:     Error code (&enum ffa_error)
-- */
--#define SMC_FC_FFA_ERROR SMC_FASTCALL_NR_SHARED_MEMORY(0x60)
--
--/**
-- * SMC_FC_FFA_SUCCESS - 32 bit SMC success return opcode
-- *
-- * Register arguments:
-- *
-- * * w1:     VMID in [31:16], vCPU in [15:0]
-- * * w2-w7:  Function specific
-- */
--#define SMC_FC_FFA_SUCCESS SMC_FASTCALL_NR_SHARED_MEMORY(0x61)
--
--/**
-- * SMC_FC64_FFA_SUCCESS - 64 bit SMC success return opcode
-- *
-- * Register arguments:
-- *
-- * * w1:             VMID in [31:16], vCPU in [15:0]
-- * * w2/x2-w7/x7:    Function specific
-- */
--#define SMC_FC64_FFA_SUCCESS SMC_FASTCALL64_NR_SHARED_MEMORY(0x61)
--
--/**
-- * SMC_FC_FFA_VERSION - SMC opcode to return supported FF-A version
-- *
-- * Register arguments:
-- *
-- * * w1:     Major version bit[30:16] and minor version in bit[15:0] supported
-- *           by caller. Bit[31] must be 0.
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- * * w2:     Major version bit[30:16], minor version in bit[15:0], bit[31] must
-- *           be 0.
-- *
-- * or
-- *
-- * * w0:     SMC_FC_FFA_ERROR
-- * * w2:     FFA_ERROR_NOT_SUPPORTED if major version passed in is less than the
-- *           minimum major version supported.
-- */
--#define SMC_FC_FFA_VERSION SMC_FASTCALL_NR_SHARED_MEMORY(0x63)
--
--/**
-- * SMC_FC_FFA_FEATURES - SMC opcode to check optional feature support
-- *
-- * Register arguments:
-- *
-- * * w1:     FF-A function ID
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- * * w2:     Bit[0]: Supports custom buffers for memory transactions.
-- *           Bit[1:0]: For RXTX_MAP min buffer size and alignment boundary.
-- *           Other bits must be 0.
-- * * w3:     For FFA_MEM_RETRIEVE_REQ, bit[7-0]: Number of times receiver can
-- *           retrieve each memory region before relinquishing it specified as
-- *           ((1U << (value + 1)) - 1 (or value = bits in reference count - 1).
-- *           For all other bits and commands: must be 0.
-- * or
-- *
-- * * w0:     SMC_FC_FFA_ERROR
-- * * w2:     FFA_ERROR_NOT_SUPPORTED if function is not implemented, or
-- *           FFA_ERROR_INVALID_PARAMETERS if function id is not valid.
-- */
--#define SMC_FC_FFA_FEATURES SMC_FASTCALL_NR_SHARED_MEMORY(0x64)
--
--/**
-- * SMC_FC_FFA_RXTX_MAP - 32 bit SMC opcode to map message buffers
-- *
-- * Register arguments:
-- *
-- * * w1:     TX address
-- * * w2:     RX address
-- * * w3:     RX/TX page count in bit[5:0]
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- */
--#define SMC_FC_FFA_RXTX_MAP SMC_FASTCALL_NR_SHARED_MEMORY(0x66)
--
--/**
-- * SMC_FC64_FFA_RXTX_MAP - 64 bit SMC opcode to map message buffers
-- *
-- * Register arguments:
-- *
-- * * x1:     TX address
-- * * x2:     RX address
-- * * x3:     RX/TX page count in bit[5:0]
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- */
--#define SMC_FC64_FFA_RXTX_MAP SMC_FASTCALL64_NR_SHARED_MEMORY(0x66)
--#ifdef CONFIG_64BIT
--#define SMC_FCZ_FFA_RXTX_MAP SMC_FC64_FFA_RXTX_MAP
--#else
--#define SMC_FCZ_FFA_RXTX_MAP SMC_FC_FFA_RXTX_MAP
--#endif
--
--/**
-- * SMC_FC_FFA_RXTX_UNMAP - SMC opcode to unmap message buffers
-- *
-- * Register arguments:
-- *
-- * * w1:     ID in [31:16]
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- */
--#define SMC_FC_FFA_RXTX_UNMAP SMC_FASTCALL_NR_SHARED_MEMORY(0x67)
--
--/**
-- * SMC_FC_FFA_ID_GET - SMC opcode to get endpoint id of caller
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- * * w2:     ID in bit[15:0], bit[31:16] must be 0.
-- */
--#define SMC_FC_FFA_ID_GET SMC_FASTCALL_NR_SHARED_MEMORY(0x69)
--
--/**
-- * SMC_FC_FFA_MEM_DONATE - 32 bit SMC opcode to donate memory
-- *
-- * Not supported.
-- */
--#define SMC_FC_FFA_MEM_DONATE SMC_FASTCALL_NR_SHARED_MEMORY(0x71)
--
--/**
-- * SMC_FC_FFA_MEM_LEND - 32 bit SMC opcode to lend memory
-- *
-- * Not currently supported.
-- */
--#define SMC_FC_FFA_MEM_LEND SMC_FASTCALL_NR_SHARED_MEMORY(0x72)
--
--/**
-- * SMC_FC_FFA_MEM_SHARE - 32 bit SMC opcode to share memory
-- *
-- * Register arguments:
-- *
-- * * w1:     Total length
-- * * w2:     Fragment length
-- * * w3:     Address
-- * * w4:     Page count
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- * * w2/w3:  Handle
-- *
-- * or
-- *
-- * * w0:     &SMC_FC_FFA_MEM_FRAG_RX
-- * * w1-:    See &SMC_FC_FFA_MEM_FRAG_RX
-- *
-- * or
-- *
-- * * w0:     SMC_FC_FFA_ERROR
-- * * w2:     Error code (&enum ffa_error)
-- */
--#define SMC_FC_FFA_MEM_SHARE SMC_FASTCALL_NR_SHARED_MEMORY(0x73)
--
--/**
-- * SMC_FC64_FFA_MEM_SHARE - 64 bit SMC opcode to share memory
-- *
-- * Register arguments:
-- *
-- * * w1:     Total length
-- * * w2:     Fragment length
-- * * x3:     Address
-- * * w4:     Page count
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- * * w2/w3:  Handle
-- *
-- * or
-- *
-- * * w0:     &SMC_FC_FFA_MEM_FRAG_RX
-- * * w1-:    See &SMC_FC_FFA_MEM_FRAG_RX
-- *
-- * or
-- *
-- * * w0:     SMC_FC_FFA_ERROR
-- * * w2:     Error code (&enum ffa_error)
-- */
--#define SMC_FC64_FFA_MEM_SHARE SMC_FASTCALL64_NR_SHARED_MEMORY(0x73)
--
--/**
-- * SMC_FC_FFA_MEM_RETRIEVE_REQ - 32 bit SMC opcode to retrieve shared memory
-- *
-- * Register arguments:
-- *
-- * * w1:     Total length
-- * * w2:     Fragment length
-- * * w3:     Address
-- * * w4:     Page count
-- *
-- * Return:
-- * * w0:             &SMC_FC_FFA_MEM_RETRIEVE_RESP
-- * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_RETRIEVE_RESP
-- */
--#define SMC_FC_FFA_MEM_RETRIEVE_REQ SMC_FASTCALL_NR_SHARED_MEMORY(0x74)
--
--/**
-- * SMC_FC64_FFA_MEM_RETRIEVE_REQ - 64 bit SMC opcode to retrieve shared memory
-- *
-- * Register arguments:
-- *
-- * * w1:     Total length
-- * * w2:     Fragment length
-- * * x3:     Address
-- * * w4:     Page count
-- *
-- * Return:
-- * * w0:             &SMC_FC_FFA_MEM_RETRIEVE_RESP
-- * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_RETRIEVE_RESP
-- */
--#define SMC_FC64_FFA_MEM_RETRIEVE_REQ SMC_FASTCALL64_NR_SHARED_MEMORY(0x74)
--
--/**
-- * SMC_FC_FFA_MEM_RETRIEVE_RESP - Retrieve 32 bit SMC return opcode
-- *
-- * Register arguments:
-- *
-- * * w1:     Total length
-- * * w2:     Fragment length
-- */
--#define SMC_FC_FFA_MEM_RETRIEVE_RESP SMC_FASTCALL_NR_SHARED_MEMORY(0x75)
--
--/**
-- * SMC_FC_FFA_MEM_RELINQUISH - SMC opcode to relinquish shared memory
-- *
-- * Input in &struct ffa_mem_relinquish_descriptor format in message buffer.
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- */
--#define SMC_FC_FFA_MEM_RELINQUISH SMC_FASTCALL_NR_SHARED_MEMORY(0x76)
--
--/**
-- * SMC_FC_FFA_MEM_RECLAIM - SMC opcode to reclaim shared memory
-- *
-- * Register arguments:
-- *
-- * * w1/w2:  Handle
-- * * w3:     Flags
-- *
-- * Return:
-- * * w0:     &SMC_FC_FFA_SUCCESS
-- */
--#define SMC_FC_FFA_MEM_RECLAIM SMC_FASTCALL_NR_SHARED_MEMORY(0x77)
--
--/**
-- * SMC_FC_FFA_MEM_FRAG_RX - SMC opcode to request next fragment.
-- *
-- * Register arguments:
-- *
-- * * w1/w2:  Cookie
-- * * w3:     Fragment offset.
-- * * w4:     Endpoint id ID in [31:16], if client is hypervisor.
-- *
-- * Return:
-- * * w0:             &SMC_FC_FFA_MEM_FRAG_TX
-- * * w1/x1-w5/x5:    See &SMC_FC_FFA_MEM_FRAG_TX
-- */
--#define SMC_FC_FFA_MEM_FRAG_RX SMC_FASTCALL_NR_SHARED_MEMORY(0x7A)
--
--/**
-- * SMC_FC_FFA_MEM_FRAG_TX - SMC opcode to transmit next fragment
-- *
-- * Register arguments:
-- *
-- * * w1/w2:  Cookie
-- * * w3:     Fragment length.
-- * * w4:     Sender endpoint id ID in [31:16], if client is hypervisor.
-- *
-- * Return:
-- * * w0:             &SMC_FC_FFA_MEM_FRAG_RX or &SMC_FC_FFA_SUCCESS.
-- * * w1/x1-w5/x5:    See opcode in w0.
-- */
--#define SMC_FC_FFA_MEM_FRAG_TX SMC_FASTCALL_NR_SHARED_MEMORY(0x7B)
--
--#endif /* __LINUX_TRUSTY_ARM_FFA_H */
-diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h
-index efbb36999a8b..272d96c1c696 100644
---- a/include/linux/trusty/trusty.h
-+++ b/include/linux/trusty/trusty.h
-@@ -52,9 +52,6 @@ u32 trusty_get_api_version(struct device *dev);
- bool trusty_get_panic_status(struct device *dev);
- 
- struct ns_mem_page_info {
--	u64 paddr;
--	u8 ffa_mem_attr;
--	u8 ffa_mem_perm;
- 	u64 compat_attr;
- };
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0029-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0029-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch
deleted file mode 100644
index 8f061f7..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0029-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From 162daf58abe2d00b9279fce143595b6ff546f803 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Tue, 18 Jan 2022 18:27:09 +0000
-Subject: [PATCH 29/40] ANDROID: trusty: Rename transfer memory function to
- lend memory
-
-Renaming trusty_transfer_memory to trusty_lend_memory allows Trusty
-to export memory operation like share, lend, reclaim and use common
-code for memory share and lend operations.
-
-Define TRUSTY_DEFAULT_MEM_OBJ_TAG as 0 and use that in existing calls.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ie165a609cc4398bb916967595d0b748d54d75faf
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-ipc.c    | 14 ++++++++----
- drivers/trusty/trusty-test.c   |  3 ++-
- drivers/trusty/trusty-virtio.c |  3 ++-
- drivers/trusty/trusty.c        | 41 ++++++++++++++++++++++------------
- include/linux/trusty/trusty.h  | 11 ++++-----
- 5 files changed, 47 insertions(+), 25 deletions(-)
-
-diff --git a/drivers/trusty/trusty-ipc.c b/drivers/trusty/trusty-ipc.c
-index 82d6ddeb41f4..0a27af2063a7 100644
---- a/drivers/trusty/trusty-ipc.c
-+++ b/drivers/trusty/trusty-ipc.c
-@@ -1233,10 +1233,16 @@ static int dn_share_fd(struct tipc_dn_chan *dn, int fd,
- 		goto cleanup_handle;
- 	}
- 
--	ret = trusty_transfer_memory(tipc_shared_handle_dev(shared_handle),
--				     &mem_id, shared_handle->sgt->sgl,
--				     shared_handle->sgt->orig_nents, prot, tag,
--				     lend);
-+	if (lend)
-+		ret = trusty_lend_memory(tipc_shared_handle_dev(shared_handle),
-+					 &mem_id, shared_handle->sgt->sgl,
-+					 shared_handle->sgt->orig_nents, prot,
-+					 tag);
-+	else
-+		ret = trusty_share_memory(tipc_shared_handle_dev(shared_handle),
-+					  &mem_id, shared_handle->sgt->sgl,
-+					  shared_handle->sgt->orig_nents, prot,
-+					  tag);
- 
- 	if (ret < 0) {
- 		dev_dbg(dev, "Transferring memory failed: %d\n", ret);
-diff --git a/drivers/trusty/trusty-test.c b/drivers/trusty/trusty-test.c
-index 844868981fa5..c25fc0f2fcf0 100644
---- a/drivers/trusty/trusty-test.c
-+++ b/drivers/trusty/trusty-test.c
-@@ -138,7 +138,8 @@ static int trusty_test_share_objs(struct trusty_test_state *s,
- 		t1 = ktime_get();
- 		tmpret = trusty_share_memory(s->trusty_dev, &obj->mem_id,
- 					     obj->sgt.sgl, obj->sgt.nents,
--					     PAGE_KERNEL);
-+					     PAGE_KERNEL,
-+					     TRUSTY_DEFAULT_MEM_OBJ_TAG);
- 		t2 = ktime_get();
- 		if (tmpret) {
- 			ret = tmpret;
-diff --git a/drivers/trusty/trusty-virtio.c b/drivers/trusty/trusty-virtio.c
-index fea59cd2e218..365e7c04bcf4 100644
---- a/drivers/trusty/trusty-virtio.c
-+++ b/drivers/trusty/trusty-virtio.c
-@@ -626,7 +626,8 @@ static int trusty_virtio_add_devices(struct trusty_ctx *tctx)
- 
- 	sg_init_one(&tctx->shared_sg, descr_va, descr_buf_sz);
- 	ret = trusty_share_memory(tctx->dev->parent, &descr_id,
--				  &tctx->shared_sg, 1, PAGE_KERNEL);
-+				  &tctx->shared_sg, 1, PAGE_KERNEL,
-+				  TRUSTY_DEFAULT_MEM_OBJ_TAG);
- 	if (ret) {
- 		dev_err(tctx->dev, "trusty_share_memory failed: %d\n", ret);
- 		goto err_share_memory;
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 2dec75398f69..6bd30bc1bbc9 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -222,18 +222,9 @@ s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
- }
- EXPORT_SYMBOL(trusty_std_call32);
- 
--int trusty_share_memory(struct device *dev, u64 *id,
--			struct scatterlist *sglist, unsigned int nents,
--			pgprot_t pgprot)
--{
--	return trusty_transfer_memory(dev, id, sglist, nents, pgprot, 0,
--				      false);
--}
--EXPORT_SYMBOL(trusty_share_memory);
--
--int trusty_transfer_memory(struct device *dev, u64 *id,
--			   struct scatterlist *sglist, unsigned int nents,
--			   pgprot_t pgprot, u64 tag, bool lend)
-+static int __trusty_share_memory(struct device *dev, u64 *id,
-+				 struct scatterlist *sglist, unsigned int nents,
-+				 pgprot_t pgprot, u64 tag, bool mem_share)
- {
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
- 	int ret;
-@@ -253,6 +244,12 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
- 		return -EOPNOTSUPP;
- 	}
- 
-+	if (mem_share == false && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		dev_err(s->dev, "%s: old trusty version does not support lending memory objects\n",
-+			__func__);
-+		return -EOPNOTSUPP;
-+	}
-+
- 	count = dma_map_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
- 	if (count != nents) {
- 		dev_err(s->dev, "failed to dma map sg_table\n");
-@@ -271,7 +268,22 @@ int trusty_transfer_memory(struct device *dev, u64 *id,
- 	*id = pg_inf.compat_attr;
- 	return 0;
- }
--EXPORT_SYMBOL(trusty_transfer_memory);
-+
-+int trusty_share_memory(struct device *dev, u64 *id,
-+			struct scatterlist *sglist, unsigned int nents,
-+			pgprot_t pgprot, u64 tag)
-+{
-+	return __trusty_share_memory(dev, id, sglist, nents, pgprot, tag, true);
-+}
-+EXPORT_SYMBOL(trusty_share_memory);
-+
-+int trusty_lend_memory(struct device *dev, u64 *id,
-+		       struct scatterlist *sglist, unsigned int nents,
-+		       pgprot_t pgprot, u64 tag)
-+{
-+	return __trusty_share_memory(dev, id, sglist, nents, pgprot, tag, false);
-+}
-+EXPORT_SYMBOL(trusty_lend_memory);
- 
- /*
-  * trusty_share_memory_compat - trusty_share_memory wrapper for old apis
-@@ -287,7 +299,8 @@ int trusty_share_memory_compat(struct device *dev, u64 *id,
- 	int ret;
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
- 
--	ret = trusty_share_memory(dev, id, sglist, nents, pgprot);
-+	ret = trusty_share_memory(dev, id, sglist, nents, pgprot,
-+				  TRUSTY_DEFAULT_MEM_OBJ_TAG);
- 	if (!ret && s->api_version < TRUSTY_API_VERSION_PHYS_MEM_OBJ)
- 		*id &= 0x0000FFFFFFFFF000ull;
- 
-diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h
-index 272d96c1c696..27f635f2d12d 100644
---- a/include/linux/trusty/trusty.h
-+++ b/include/linux/trusty/trusty.h
-@@ -11,6 +11,7 @@
- #include <linux/device.h>
- #include <linux/pagemap.h>
- 
-+#define TRUSTY_DEFAULT_MEM_OBJ_TAG	(0)
- 
- #if IS_ENABLED(CONFIG_TRUSTY)
- s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2);
-@@ -62,13 +63,13 @@ struct scatterlist;
- typedef u64 trusty_shared_mem_id_t;
- int trusty_share_memory(struct device *dev, trusty_shared_mem_id_t *id,
- 			struct scatterlist *sglist, unsigned int nents,
--			pgprot_t pgprot);
-+			pgprot_t pgprot, u64 tag);
- int trusty_share_memory_compat(struct device *dev, trusty_shared_mem_id_t *id,
- 			       struct scatterlist *sglist, unsigned int nents,
- 			       pgprot_t pgprot);
--int trusty_transfer_memory(struct device *dev, u64 *id,
--			   struct scatterlist *sglist, unsigned int nents,
--			   pgprot_t pgprot, u64 tag, bool lend);
-+int trusty_lend_memory(struct device *dev, u64 *id,
-+		       struct scatterlist *sglist, unsigned int nents,
-+		       pgprot_t pgprot, u64 tag);
- int trusty_reclaim_memory(struct device *dev, trusty_shared_mem_id_t id,
- 			  struct scatterlist *sglist, unsigned int nents);
- 
-@@ -78,7 +79,7 @@ u64 trusty_dma_buf_get_ffa_tag(struct dma_buf *dma_buf);
- #else
- static inline u64 trusty_dma_buf_get_ffa_tag(struct dma_buf *dma_buf)
- {
--	return 0;
-+	return TRUSTY_DEFAULT_MEM_OBJ_TAG;
- }
- #endif
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0030-ANDROID-trusty-Separate-out-SMC-based-transport.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0030-ANDROID-trusty-Separate-out-SMC-based-transport.patch
deleted file mode 100644
index 9854be1..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0030-ANDROID-trusty-Separate-out-SMC-based-transport.patch
+++ /dev/null
@@ -1,496 +0,0 @@
-From 41cab33091954ec655e7fe567c345f5a44fea122 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 14:02:39 +0000
-Subject: [PATCH 30/40] ANDROID: trusty: Separate out SMC based transport
-
-This commit refactors SMC based transport operation like
-smc_fastcalls, smc memory operations in a separate file.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Iebee505b7172f6247186e3bf1e0b50740b2e4dfa
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/Makefile         |   1 +
- drivers/trusty/trusty-private.h |  61 ++++++++++++++
- drivers/trusty/trusty-smc.c     | 136 ++++++++++++++++++++++++++++++
- drivers/trusty/trusty.c         | 144 +++++++++-----------------------
- 4 files changed, 237 insertions(+), 105 deletions(-)
- create mode 100644 drivers/trusty/trusty-private.h
- create mode 100644 drivers/trusty/trusty-smc.c
-
-diff --git a/drivers/trusty/Makefile b/drivers/trusty/Makefile
-index 2cf1cfccf97b..fbb53ee93003 100644
---- a/drivers/trusty/Makefile
-+++ b/drivers/trusty/Makefile
-@@ -5,6 +5,7 @@
- 
- obj-$(CONFIG_TRUSTY)		+= trusty-core.o
- trusty-core-objs		+= trusty.o trusty-mem.o
-+trusty-core-objs		+= trusty-smc.o
- trusty-core-$(CONFIG_ARM)	+= trusty-smc-arm.o
- trusty-core-$(CONFIG_ARM64)	+= trusty-smc-arm64.o
- obj-$(CONFIG_TRUSTY_IRQ)	+= trusty-irq.o
-diff --git a/drivers/trusty/trusty-private.h b/drivers/trusty/trusty-private.h
-new file mode 100644
-index 000000000000..4d73c6ae35d4
---- /dev/null
-+++ b/drivers/trusty/trusty-private.h
-@@ -0,0 +1,61 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2022 ARM Ltd.
-+ */
-+
-+#ifndef _TRUSTY_PRIVATE_H
-+#define _TRUSTY_PRIVATE_H
-+
-+#include <linux/types.h>
-+
-+struct trusty_work {
-+	struct trusty_state *ts;
-+	struct work_struct work;
-+};
-+
-+struct trusty_msg_ops {
-+	u32 (*send_direct_msg)(struct device *dev, unsigned long fid,
-+			       unsigned long a0, unsigned long a1,
-+			       unsigned long a2);
-+};
-+
-+struct trusty_mem_ops {
-+	int (*trusty_share_memory)(struct device *dev, u64 *id,
-+				   struct scatterlist *sglist,
-+				   unsigned int nents, pgprot_t pgprot, u64 tag);
-+	int (*trusty_lend_memory)(struct device *dev, u64 *id,
-+				  struct scatterlist *sglist,
-+				  unsigned int nents, pgprot_t pgprot, u64 tag);
-+	int (*trusty_reclaim_memory)(struct device *dev, u64 id,
-+				     struct scatterlist *sglist,
-+				     unsigned int nents);
-+};
-+
-+struct trusty_state {
-+	struct mutex smc_lock;
-+	struct atomic_notifier_head notifier;
-+	struct completion cpu_idle_completion;
-+	char *version_str;
-+	u32 api_version;
-+	bool trusty_panicked;
-+	struct device *dev;
-+	struct workqueue_struct *nop_wq;
-+	struct trusty_work __percpu *nop_works;
-+	struct list_head nop_queue;
-+	spinlock_t nop_lock; /* protects nop_queue */
-+	struct device_dma_parameters dma_parms;
-+	const struct trusty_msg_ops *msg_ops;
-+	const struct trusty_mem_ops *mem_ops;
-+};
-+
-+int trusty_init_api_version(struct trusty_state *s, struct device *dev,
-+			    u32 (*send_direct_msg)(struct device *dev,
-+						   unsigned long fid,
-+						   unsigned long a0,
-+						   unsigned long a1,
-+						   unsigned long a2));
-+
-+int trusty_smc_transport_setup(struct device *dev);
-+void trusty_smc_transport_cleanup(struct device *dev);
-+
-+#endif /* _TRUSTY_PRIVATE_H */
-diff --git a/drivers/trusty/trusty-smc.c b/drivers/trusty/trusty-smc.c
-new file mode 100644
-index 000000000000..8fa841e0e253
---- /dev/null
-+++ b/drivers/trusty/trusty-smc.c
-@@ -0,0 +1,136 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright (C) 2013 Google, Inc.
-+ */
-+
-+#include <linux/platform_device.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/trusty/trusty.h>
-+
-+#include <linux/scatterlist.h>
-+#include <linux/dma-mapping.h>
-+
-+#include "trusty-smc.h"
-+#include "trusty-private.h"
-+
-+static u32 trusty_smc_send_direct_msg(struct device *dev, unsigned long fid,
-+				      unsigned long a0, unsigned long a1,
-+				      unsigned long a2)
-+{
-+	return trusty_smc8(fid, a0, a1, a2, 0, 0, 0, 0).r0;
-+}
-+
-+static int trusty_smc_share_memory(struct device *dev, u64 *id,
-+				   struct scatterlist *sglist,
-+				   unsigned int nents, pgprot_t pgprot, u64 tag)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	int ret;
-+	struct ns_mem_page_info pg_inf;
-+	struct scatterlist *sg;
-+	size_t count;
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	if (nents != 1) {
-+		dev_err(s->dev, "%s: old trusty version does not support "
-+			"non-contiguous memory objects\n", __func__);
-+		return -EOPNOTSUPP;
-+	}
-+
-+	count = dma_map_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+	if (count != nents) {
-+		dev_err(s->dev, "failed to dma map sg_table\n");
-+		return -EINVAL;
-+	}
-+
-+	sg = sglist;
-+	ret = trusty_encode_page_info(&pg_inf, phys_to_page(sg_dma_address(sg)),
-+				      pgprot);
-+	if (ret) {
-+		dev_err(s->dev, "%s: trusty_encode_page_info failed\n",
-+			__func__);
-+		dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+		return ret;
-+	}
-+
-+	*id = pg_inf.compat_attr;
-+	return 0;
-+}
-+
-+static int trusty_smc_lend_memory(struct device *dev, u64 *id,
-+				  struct scatterlist *sglist,
-+				  unsigned int nents, pgprot_t pgprot, u64 tag)
-+{
-+	return -EOPNOTSUPP;
-+}
-+
-+static int trusty_smc_reclaim_memory(struct device *dev, u64 id,
-+				     struct scatterlist *sglist,
-+				     unsigned int nents)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	if (WARN_ON(s->api_version >= TRUSTY_API_VERSION_MEM_OBJ))
-+		return -EINVAL;
-+
-+	if (nents != 1) {
-+		dev_err(s->dev, "%s: not supported\n", __func__);
-+		return -EOPNOTSUPP;
-+	}
-+
-+	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+
-+	dev_dbg(s->dev, "%s: done\n", __func__);
-+	return 0;
-+}
-+
-+static const struct trusty_msg_ops trusty_smc_msg_ops = {
-+	.send_direct_msg = &trusty_smc_send_direct_msg,
-+};
-+
-+static const struct trusty_mem_ops trusty_smc_mem_ops = {
-+	.trusty_share_memory = &trusty_smc_share_memory,
-+	.trusty_lend_memory = &trusty_smc_lend_memory,
-+	.trusty_reclaim_memory = &trusty_smc_reclaim_memory,
-+};
-+
-+int trusty_smc_transport_setup(struct device *dev)
-+{
-+	int rc;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	rc = trusty_init_api_version(s, dev, &trusty_smc_send_direct_msg);
-+	if (rc != 0) {
-+		return rc;
-+	}
-+
-+	/*
-+	 * Initialize Trusty msg calls with Trusty SMC ABI
-+	 */
-+	s->msg_ops = &trusty_smc_msg_ops;
-+
-+	/*
-+	 * Initialize Trusty memory operations with Trusty SMC ABI only when
-+	 * Trusty API version is below TRUSTY_API_VERSION_MEM_OBJ.
-+	 */
-+	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ)
-+		s->mem_ops = &trusty_smc_mem_ops;
-+
-+	return 0;
-+}
-+
-+void trusty_smc_transport_cleanup(struct device *dev)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (s->msg_ops == &trusty_smc_msg_ops)
-+		s->msg_ops = NULL;
-+
-+	if (s->mem_ops == &trusty_smc_mem_ops)
-+		s->mem_ops = NULL;
-+}
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 6bd30bc1bbc9..0486827a45ca 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -18,37 +18,10 @@
- #include <linux/scatterlist.h>
- #include <linux/dma-mapping.h>
- 
--#include "trusty-smc.h"
-+#include "trusty-private.h"
- 
--struct trusty_state;
- static struct platform_driver trusty_driver;
- 
--struct trusty_work {
--	struct trusty_state *ts;
--	struct work_struct work;
--};
--
--struct trusty_state {
--	struct mutex smc_lock;
--	struct atomic_notifier_head notifier;
--	struct completion cpu_idle_completion;
--	char *version_str;
--	u32 api_version;
--	bool trusty_panicked;
--	struct device *dev;
--	struct workqueue_struct *nop_wq;
--	struct trusty_work __percpu *nop_works;
--	struct list_head nop_queue;
--	spinlock_t nop_lock; /* protects nop_queue */
--	struct device_dma_parameters dma_parms;
--};
--
--static inline unsigned long smc(unsigned long r0, unsigned long r1,
--				unsigned long r2, unsigned long r3)
--{
--	return trusty_smc8(r0, r1, r2, r3, 0, 0, 0, 0).r0;
--}
--
- s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
- {
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-@@ -60,7 +33,7 @@ s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
- 	if (WARN_ON(SMC_IS_SMC64(smcnr)))
- 		return SM_ERR_INVALID_PARAMETERS;
- 
--	return smc(smcnr, a0, a1, a2);
-+	return s->msg_ops->send_direct_msg(dev, smcnr, a0, a1, a2);
- }
- EXPORT_SYMBOL(trusty_fast_call32);
- 
-@@ -76,7 +49,7 @@ s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2)
- 	if (WARN_ON(!SMC_IS_SMC64(smcnr)))
- 		return SM_ERR_INVALID_PARAMETERS;
- 
--	return smc(smcnr, a0, a1, a2);
-+	return s->msg_ops->send_direct_msg(dev, smcnr, a0, a1, a2);
- }
- EXPORT_SYMBOL(trusty_fast_call64);
- #endif
-@@ -88,13 +61,16 @@ static unsigned long trusty_std_call_inner(struct device *dev,
- {
- 	unsigned long ret;
- 	int retry = 5;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
- 
- 	dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx)\n",
- 		__func__, smcnr, a0, a1, a2);
- 	while (true) {
--		ret = smc(smcnr, a0, a1, a2);
-+		ret = s->msg_ops->send_direct_msg(dev, smcnr, a0, a1, a2);
- 		while ((s32)ret == SM_ERR_FIQ_INTERRUPTED)
--			ret = smc(SMC_SC_RESTART_FIQ, 0, 0, 0);
-+			ret = s->msg_ops->send_direct_msg(dev,
-+							  SMC_SC_RESTART_FIQ,
-+							  0, 0, 0);
- 		if ((int)ret != SM_ERR_BUSY || !retry)
- 			break;
- 
-@@ -222,58 +198,17 @@ s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
- }
- EXPORT_SYMBOL(trusty_std_call32);
- 
--static int __trusty_share_memory(struct device *dev, u64 *id,
--				 struct scatterlist *sglist, unsigned int nents,
--				 pgprot_t pgprot, u64 tag, bool mem_share)
-+int trusty_share_memory(struct device *dev, u64 *id,
-+			struct scatterlist *sglist, unsigned int nents,
-+			pgprot_t pgprot, u64 tag)
- {
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
--	int ret;
--	struct ns_mem_page_info pg_inf;
--	struct scatterlist *sg;
--	size_t count;
- 
- 	if (WARN_ON(dev->driver != &trusty_driver.driver))
- 		return -EINVAL;
- 
--	if (WARN_ON(nents < 1))
--		return -EINVAL;
--
--	if (nents != 1 && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
--		dev_err(s->dev, "%s: old trusty version does not support non-contiguous memory objects\n",
--			__func__);
--		return -EOPNOTSUPP;
--	}
--
--	if (mem_share == false && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
--		dev_err(s->dev, "%s: old trusty version does not support lending memory objects\n",
--			__func__);
--		return -EOPNOTSUPP;
--	}
--
--	count = dma_map_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
--	if (count != nents) {
--		dev_err(s->dev, "failed to dma map sg_table\n");
--		return -EINVAL;
--	}
--
--	sg = sglist;
--	ret = trusty_encode_page_info(&pg_inf, phys_to_page(sg_dma_address(sg)),
--				      pgprot);
--	if (ret) {
--		dev_err(s->dev, "%s: trusty_encode_page_info failed\n",
--			__func__);
--		return ret;
--	}
--
--	*id = pg_inf.compat_attr;
--	return 0;
--}
--
--int trusty_share_memory(struct device *dev, u64 *id,
--			struct scatterlist *sglist, unsigned int nents,
--			pgprot_t pgprot, u64 tag)
--{
--	return __trusty_share_memory(dev, id, sglist, nents, pgprot, tag, true);
-+	return s->mem_ops->trusty_share_memory(dev, id, sglist, nents, pgprot,
-+					       tag);
- }
- EXPORT_SYMBOL(trusty_share_memory);
- 
-@@ -281,7 +216,13 @@ int trusty_lend_memory(struct device *dev, u64 *id,
- 		       struct scatterlist *sglist, unsigned int nents,
- 		       pgprot_t pgprot, u64 tag)
- {
--	return __trusty_share_memory(dev, id, sglist, nents, pgprot, tag, false);
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	if (WARN_ON(dev->driver != &trusty_driver.driver))
-+		return -EINVAL;
-+
-+	return s->mem_ops->trusty_lend_memory(dev, id, sglist, nents, pgprot,
-+					      tag);
- }
- EXPORT_SYMBOL(trusty_lend_memory);
- 
-@@ -316,22 +257,7 @@ int trusty_reclaim_memory(struct device *dev, u64 id,
- 	if (WARN_ON(dev->driver != &trusty_driver.driver))
- 		return -EINVAL;
- 
--	if (WARN_ON(nents < 1))
--		return -EINVAL;
--
--	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
--		if (nents != 1) {
--			dev_err(s->dev, "%s: not supported\n", __func__);
--			return -EOPNOTSUPP;
--		}
--
--		dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
--
--		dev_dbg(s->dev, "%s: done\n", __func__);
--		return 0;
--	}
--
--	return 0;
-+	return s->mem_ops->trusty_reclaim_memory(dev, id, sglist, nents);
- }
- EXPORT_SYMBOL(trusty_reclaim_memory);
- 
-@@ -382,7 +308,7 @@ const char *trusty_version_str_get(struct device *dev)
- }
- EXPORT_SYMBOL(trusty_version_str_get);
- 
--static void trusty_init_version(struct trusty_state *s, struct device *dev)
-+static void trusty_init_version_str(struct trusty_state *s, struct device *dev)
- {
- 	int ret;
- 	int i;
-@@ -430,12 +356,17 @@ bool trusty_get_panic_status(struct device *dev)
- }
- EXPORT_SYMBOL(trusty_get_panic_status);
- 
--static int trusty_init_api_version(struct trusty_state *s, struct device *dev)
-+int trusty_init_api_version(struct trusty_state *s, struct device *dev,
-+			    u32 (*send_direct_msg)(struct device *dev,
-+						   unsigned long fid,
-+						   unsigned long a0,
-+						   unsigned long a1,
-+						   unsigned long a2))
- {
- 	u32 api_version;
- 
--	api_version = trusty_fast_call32(dev, SMC_FC_API_VERSION,
--					 TRUSTY_API_VERSION_CURRENT, 0, 0);
-+	api_version = send_direct_msg(dev, SMC_FC_API_VERSION,
-+				      TRUSTY_API_VERSION_CURRENT, 0, 0);
- 	if (api_version == SM_ERR_UNDEFINED_SMC)
- 		api_version = 0;
- 
-@@ -598,11 +529,12 @@ static int trusty_probe(struct platform_device *pdev)
- 
- 	platform_set_drvdata(pdev, s);
- 
--	trusty_init_version(s, &pdev->dev);
-+	/* Initialize SMC transport */
-+	ret = trusty_smc_transport_setup(s->dev);
-+	if (ret != 0 || s->msg_ops == NULL || s->mem_ops == NULL)
-+		goto err_transport_setup;
- 
--	ret = trusty_init_api_version(s, &pdev->dev);
--	if (ret < 0)
--		goto err_api_version;
-+	trusty_init_version_str(s, &pdev->dev);
- 
- 	s->nop_wq = alloc_workqueue("trusty-nop-wq", WQ_CPU_INTENSIVE, 0);
- 	if (!s->nop_wq) {
-@@ -648,9 +580,10 @@ static int trusty_probe(struct platform_device *pdev)
- err_alloc_works:
- 	destroy_workqueue(s->nop_wq);
- err_create_nop_wq:
--err_api_version:
--	s->dev->dma_parms = NULL;
- 	kfree(s->version_str);
-+        trusty_smc_transport_cleanup(s->dev);
-+err_transport_setup:
-+	s->dev->dma_parms = NULL;
- 	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
- 	mutex_destroy(&s->smc_lock);
- 	kfree(s);
-@@ -673,6 +606,7 @@ static int trusty_remove(struct platform_device *pdev)
- 	free_percpu(s->nop_works);
- 	destroy_workqueue(s->nop_wq);
- 
-+	trusty_smc_transport_cleanup(s->dev);
- 	mutex_destroy(&s->smc_lock);
- 	s->dev->dma_parms = NULL;
- 	kfree(s->version_str);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0031-ANDROID-trusty-Modify-device-compatible-string.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0031-ANDROID-trusty-Modify-device-compatible-string.patch
deleted file mode 100644
index 7db4c84..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0031-ANDROID-trusty-Modify-device-compatible-string.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d022d0c3c6cadacf8a3a5fd2bb42c465834eef26 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 14:22:42 +0000
-Subject: [PATCH 31/40] ANDROID: trusty: Modify device compatible string
-
-Drop smc keyword from device tree node as Trusty can use SMC or FFA
-based transport.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Id99b52f32a2122434a22f1991c0b4cd52b0676ed
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- Documentation/devicetree/bindings/trusty/trusty-irq.txt | 2 +-
- Documentation/devicetree/bindings/trusty/trusty-smc.txt | 2 +-
- drivers/trusty/trusty.c                                 | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/trusty/trusty-irq.txt b/Documentation/devicetree/bindings/trusty/trusty-irq.txt
-index cbb545ad452b..ae02030be4e7 100644
---- a/Documentation/devicetree/bindings/trusty/trusty-irq.txt
-+++ b/Documentation/devicetree/bindings/trusty/trusty-irq.txt
-@@ -48,7 +48,7 @@ Example:
- 	};
- 	...
- 	trusty {
--		compatible = "android,trusty-smc-v1";
-+		compatible = "android,trusty-v1";
- 		ranges;
- 		#address-cells = <2>;
- 		#size-cells = <2>;
-diff --git a/Documentation/devicetree/bindings/trusty/trusty-smc.txt b/Documentation/devicetree/bindings/trusty/trusty-smc.txt
-index 1b39ad317c67..8d02a31ba814 100644
---- a/Documentation/devicetree/bindings/trusty/trusty-smc.txt
-+++ b/Documentation/devicetree/bindings/trusty/trusty-smc.txt
-@@ -3,4 +3,4 @@ Trusty smc interface
- Trusty is running in secure mode on the same (arm) cpu(s) as the current os.
- 
- Required properties:
--- compatible: "android,trusty-smc-v1"
-+- compatible: "android,trusty-v1"
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 0486827a45ca..757dd7b2c527 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -615,7 +615,7 @@ static int trusty_remove(struct platform_device *pdev)
- }
- 
- static const struct of_device_id trusty_of_match[] = {
--	{ .compatible = "android,trusty-smc-v1", },
-+	{ .compatible = "android,trusty-v1", },
- 	{},
- };
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0032-ANDROID-trusty-Add-transport-descriptor.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0032-ANDROID-trusty-Add-transport-descriptor.patch
deleted file mode 100644
index 340e12d..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0032-ANDROID-trusty-Add-transport-descriptor.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From e7fe12a5a7e3eac7a7d549ef9a7d88e9baba1832 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 17:52:33 +0000
-Subject: [PATCH 32/40] ANDROID: trusty: Add transport descriptor
-
-Use transport descriptor to hold transport specific operations. This
-helps to add new transport to Trusty core.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ibbde50de0302f6d259a7d572f0910067ce712b37
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-private.h | 20 +++++++++-
- drivers/trusty/trusty-smc.c     |  6 +++
- drivers/trusty/trusty.c         | 71 ++++++++++++++++++++++++++++++---
- 3 files changed, 90 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/trusty/trusty-private.h b/drivers/trusty/trusty-private.h
-index 4d73c6ae35d4..74b88bb8f83b 100644
---- a/drivers/trusty/trusty-private.h
-+++ b/drivers/trusty/trusty-private.h
-@@ -14,12 +14,14 @@ struct trusty_work {
- };
- 
- struct trusty_msg_ops {
-+	const struct trusty_transport_desc *desc;
- 	u32 (*send_direct_msg)(struct device *dev, unsigned long fid,
- 			       unsigned long a0, unsigned long a1,
- 			       unsigned long a2);
- };
- 
- struct trusty_mem_ops {
-+	const struct trusty_transport_desc *desc;
- 	int (*trusty_share_memory)(struct device *dev, u64 *id,
- 				   struct scatterlist *sglist,
- 				   unsigned int nents, pgprot_t pgprot, u64 tag);
-@@ -46,6 +48,19 @@ struct trusty_state {
- 	struct device_dma_parameters dma_parms;
- 	const struct trusty_msg_ops *msg_ops;
- 	const struct trusty_mem_ops *mem_ops;
-+	struct trusty_ffa_state *ffa;
-+};
-+
-+struct trusty_ffa_state {
-+	struct device *dev; /* ffa device */
-+	const struct ffa_dev_ops *ops;
-+	struct mutex share_memory_msg_lock; /* protects share_memory_msg */
-+};
-+
-+struct trusty_transport_desc {
-+	const char *name;
-+	int (*setup)(struct device *dev);
-+	void (*cleanup)(struct device *dev);
- };
- 
- int trusty_init_api_version(struct trusty_state *s, struct device *dev,
-@@ -55,7 +70,8 @@ int trusty_init_api_version(struct trusty_state *s, struct device *dev,
- 						   unsigned long a1,
- 						   unsigned long a2));
- 
--int trusty_smc_transport_setup(struct device *dev);
--void trusty_smc_transport_cleanup(struct device *dev);
-+typedef const struct trusty_transport_desc *trusty_transports_t;
-+
-+extern const struct trusty_transport_desc trusty_smc_transport;
- 
- #endif /* _TRUSTY_PRIVATE_H */
-diff --git a/drivers/trusty/trusty-smc.c b/drivers/trusty/trusty-smc.c
-index 8fa841e0e253..62d1d7060744 100644
---- a/drivers/trusty/trusty-smc.c
-+++ b/drivers/trusty/trusty-smc.c
-@@ -134,3 +134,9 @@ void trusty_smc_transport_cleanup(struct device *dev)
- 	if (s->mem_ops == &trusty_smc_mem_ops)
- 		s->mem_ops = NULL;
- }
-+
-+const struct trusty_transport_desc trusty_smc_transport = {
-+	.name = "smc",
-+	.setup = trusty_smc_transport_setup,
-+	.cleanup = trusty_smc_transport_cleanup,
-+};
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 757dd7b2c527..ec0fccfaa24c 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -493,6 +493,46 @@ void trusty_dequeue_nop(struct device *dev, struct trusty_nop *nop)
- }
- EXPORT_SYMBOL(trusty_dequeue_nop);
- 
-+static int
-+trusty_transports_setup(const trusty_transports_t *transports,
-+			struct device *dev)
-+{
-+	const struct trusty_transport_desc *transport;
-+	int ret;
-+	int transports_ret = -ENODEV;
-+
-+	if (!transports)
-+		return -EINVAL;
-+
-+	for (; (transport = *transports); transports++) {
-+		if (!transport->setup)
-+			return -EINVAL;
-+
-+		ret = transport->setup(dev);
-+		transports_ret &= ret;
-+	}
-+
-+	/* One transport needs to complete setup without error. */
-+	if (transports_ret < 0)
-+		return -ENODEV;
-+
-+	return 0;
-+}
-+
-+static void
-+trusty_transports_cleanup(const trusty_transports_t *transports,
-+			  struct device *dev)
-+{
-+	const struct trusty_transport_desc *transport;
-+
-+	for (; (transport = *transports); transports++) {
-+		if (!transport->cleanup)
-+			continue;
-+
-+		transport->cleanup(dev);
-+	}
-+}
-+
- static int trusty_probe(struct platform_device *pdev)
- {
- 	int ret;
-@@ -500,6 +540,7 @@ static int trusty_probe(struct platform_device *pdev)
- 	work_func_t work_func;
- 	struct trusty_state *s;
- 	struct device_node *node = pdev->dev.of_node;
-+	const trusty_transports_t *descs;
- 
- 	if (!node) {
- 		dev_err(&pdev->dev, "of_node required\n");
-@@ -529,8 +570,12 @@ static int trusty_probe(struct platform_device *pdev)
- 
- 	platform_set_drvdata(pdev, s);
- 
--	/* Initialize SMC transport */
--	ret = trusty_smc_transport_setup(s->dev);
-+	/*
-+	 * Initialize Trusty transport. Trusty msg and mem ops has to be
-+	 * initialized as part of transport setup.
-+	 */
-+	descs = of_device_get_match_data(&pdev->dev);
-+	ret = trusty_transports_setup(descs, s->dev);
- 	if (ret != 0 || s->msg_ops == NULL || s->mem_ops == NULL)
- 		goto err_transport_setup;
- 
-@@ -581,7 +626,7 @@ static int trusty_probe(struct platform_device *pdev)
- 	destroy_workqueue(s->nop_wq);
- err_create_nop_wq:
- 	kfree(s->version_str);
--        trusty_smc_transport_cleanup(s->dev);
-+	trusty_transports_cleanup(descs, s->dev);
- err_transport_setup:
- 	s->dev->dma_parms = NULL;
- 	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
-@@ -595,6 +640,7 @@ static int trusty_remove(struct platform_device *pdev)
- {
- 	unsigned int cpu;
- 	struct trusty_state *s = platform_get_drvdata(pdev);
-+	const trusty_transports_t *descs;
- 
- 	device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
- 
-@@ -606,7 +652,10 @@ static int trusty_remove(struct platform_device *pdev)
- 	free_percpu(s->nop_works);
- 	destroy_workqueue(s->nop_wq);
- 
--	trusty_smc_transport_cleanup(s->dev);
-+	/* call transport cleanup */
-+	descs = of_device_get_match_data(&pdev->dev);
-+	trusty_transports_cleanup(descs, s->dev);
-+
- 	mutex_destroy(&s->smc_lock);
- 	s->dev->dma_parms = NULL;
- 	kfree(s->version_str);
-@@ -614,8 +663,20 @@ static int trusty_remove(struct platform_device *pdev)
- 	return 0;
- }
- 
-+/*
-+ * Trusty probe will try all compiled in transports and will use the transport
-+ * supported by the Trusty kernel.
-+ *
-+ * For Trusty API version < TRUSTY_API_VERSION_MEM_OBJ:
-+ *     trusty_smc_transport used for messaging.
-+ */
-+static const trusty_transports_t trusty_transports[] = {
-+	&trusty_smc_transport,
-+	NULL,
-+};
-+
- static const struct of_device_id trusty_of_match[] = {
--	{ .compatible = "android,trusty-v1", },
-+	{ .compatible = "android,trusty-v1", .data = trusty_transports },
- 	{},
- };
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0033-ANDROID-trusty-Add-trusty-ffa-driver.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0033-ANDROID-trusty-Add-trusty-ffa-driver.patch
deleted file mode 100644
index 4c70e34..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0033-ANDROID-trusty-Add-trusty-ffa-driver.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-From 34236d8df51d00d1167481760fda5abb56850765 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Fri, 14 Jan 2022 18:47:08 +0000
-Subject: [PATCH 33/40] ANDROID: trusty: Add trusty-ffa driver
-
-Initial changes related to FFA transport support
-  - Adds FFA transport descriptor
-  - Defines Trusty UUID
-  - Initializes FFA transport does probe, sets ffa_ops
-  - Defers Trusty probe if ARM FF-A driver is not initialized or
-    Trusty SP not found.
-  - Link FF-A device as the supplier for Trusty platform device.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: I78f72b85c20e4bad4c24cf0826e96f27dcf2ee1d
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/Makefile         |   1 +
- drivers/trusty/trusty-ffa.c     | 196 ++++++++++++++++++++++++++++++++
- drivers/trusty/trusty-ffa.h     |  28 +++++
- drivers/trusty/trusty-private.h |   1 +
- drivers/trusty/trusty.c         |   6 +
- 5 files changed, 232 insertions(+)
- create mode 100644 drivers/trusty/trusty-ffa.c
- create mode 100644 drivers/trusty/trusty-ffa.h
-
-diff --git a/drivers/trusty/Makefile b/drivers/trusty/Makefile
-index fbb53ee93003..797d61bf68ef 100644
---- a/drivers/trusty/Makefile
-+++ b/drivers/trusty/Makefile
-@@ -6,6 +6,7 @@
- obj-$(CONFIG_TRUSTY)		+= trusty-core.o
- trusty-core-objs		+= trusty.o trusty-mem.o
- trusty-core-objs		+= trusty-smc.o
-+trusty-core-objs		+= trusty-ffa.o
- trusty-core-$(CONFIG_ARM)	+= trusty-smc-arm.o
- trusty-core-$(CONFIG_ARM64)	+= trusty-smc-arm64.o
- obj-$(CONFIG_TRUSTY_IRQ)	+= trusty-irq.o
-diff --git a/drivers/trusty/trusty-ffa.c b/drivers/trusty/trusty-ffa.c
-new file mode 100644
-index 000000000000..c8c16a1fc700
---- /dev/null
-+++ b/drivers/trusty/trusty-ffa.c
-@@ -0,0 +1,196 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2022 ARM Ltd.
-+ */
-+
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/trusty/smcall.h>
-+#include <linux/arm_ffa.h>
-+#include <linux/trusty/trusty.h>
-+
-+#include <linux/scatterlist.h>
-+#include <linux/dma-mapping.h>
-+
-+#include "trusty-ffa.h"
-+#include "trusty-private.h"
-+
-+static const struct trusty_mem_ops trusty_ffa_mem_ops = {
-+	.desc = &trusty_ffa_transport,
-+};
-+
-+static const struct ffa_device_id trusty_ffa_device_id[] = {
-+	/*
-+	 * Trusty UID: RFC-4122 compliant UUID version 4
-+	 * 40ee25f0-a2bc-304c-8c4ca173c57d8af1
-+	 */
-+	{ UUID_INIT(0x40ee25f0, 0xa2bc, 0x304c,
-+		    0x8c, 0x4c, 0xa1, 0x73, 0xc5, 0x7d, 0x8a, 0xf1) },
-+	{}
-+};
-+
-+static int trusty_ffa_dev_match(struct device *dev, const void *uuid)
-+{
-+	struct ffa_device *ffa_dev;
-+
-+	ffa_dev = to_ffa_dev(dev);
-+	if (uuid_equal(&ffa_dev->uuid, uuid))
-+		return 1;
-+
-+	return 0;
-+}
-+
-+static struct ffa_device *trusty_ffa_dev_find(void)
-+{
-+	const void *data;
-+	struct device *dev;
-+
-+	/* currently only one trusty instance is probed */
-+	data = &trusty_ffa_device_id[0].uuid;
-+
-+	dev = bus_find_device(&ffa_bus_type, NULL, data, trusty_ffa_dev_match);
-+	if (dev) {
-+		/* drop reference count */
-+		put_device(dev);
-+		return to_ffa_dev(dev);
-+	}
-+
-+	return NULL;
-+}
-+
-+static int trusty_ffa_link_supplier(struct device *c_dev, struct device *s_dev)
-+{
-+	if (!c_dev || !s_dev)
-+		return -EINVAL;
-+
-+	if (!device_link_add(c_dev, s_dev, DL_FLAG_AUTOREMOVE_CONSUMER)) {
-+		return -ENODEV;
-+	}
-+
-+	return 0;
-+}
-+
-+/*
-+ * called from trusty probe
-+ */
-+static int trusty_ffa_transport_setup(struct device *dev)
-+{
-+	int rc;
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	struct trusty_ffa_state *ffa_state;
-+	struct ffa_device *ffa_dev;
-+
-+	/* ffa transport not required for lower api versions */
-+	if (s->api_version != 0 && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		return -EINVAL;
-+	}
-+
-+	ffa_dev = trusty_ffa_dev_find();
-+	if (!ffa_dev) {
-+		dev_dbg(dev, "FFA: Trusty device not found defer probe\n");
-+		return -EPROBE_DEFER;
-+	}
-+
-+	ffa_state = ffa_dev_get_drvdata(ffa_dev);
-+	if (!ffa_state)
-+		return -EINVAL;
-+
-+	rc = trusty_ffa_link_supplier(dev, &ffa_dev->dev);
-+	if (rc != 0)
-+		return rc;
-+
-+	/* FFA used only for memory sharing operations */
-+	if (s->api_version == TRUSTY_API_VERSION_MEM_OBJ) {
-+		s->ffa = ffa_state;
-+		s->mem_ops = &trusty_ffa_mem_ops;
-+		return 0;
-+	}
-+
-+	return -EINVAL;
-+}
-+
-+static void trusty_ffa_transport_cleanup(struct device *dev)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+
-+	/* ffa transport not setup for lower api versions */
-+	if (s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-+		return;
-+	}
-+
-+	s->ffa = NULL;
-+	s->mem_ops = NULL;
-+}
-+
-+static int trusty_ffa_probe(struct ffa_device *ffa_dev)
-+{
-+	const struct ffa_dev_ops *ffa_ops;
-+	struct trusty_ffa_state *s;
-+	u32 ffa_drv_version;
-+
-+	ffa_ops = ffa_dev_ops_get(ffa_dev);
-+	if (!ffa_ops) {
-+		dev_dbg(&ffa_dev->dev, "ffa_dev_ops_get: failed\n");
-+		return -ENOENT;
-+	}
-+
-+	/* check ffa driver version compatibility */
-+	ffa_drv_version = ffa_ops->api_version_get();
-+	if (TO_TRUSTY_FFA_MAJOR(ffa_drv_version) != TRUSTY_FFA_VERSION_MAJOR ||
-+	    TO_TRUSTY_FFA_MINOR(ffa_drv_version) < TRUSTY_FFA_VERSION_MINOR)
-+		return -EINVAL;
-+
-+	s = kzalloc(sizeof(*s), GFP_KERNEL);
-+	if (!s)
-+		return -ENOMEM;
-+
-+	s->dev = &ffa_dev->dev;
-+	s->ops = ffa_ops;
-+	mutex_init(&s->share_memory_msg_lock);
-+	ffa_dev_set_drvdata(ffa_dev, s);
-+
-+	ffa_ops->mode_32bit_set(ffa_dev);
-+
-+	return 0;
-+}
-+
-+static void trusty_ffa_remove(struct ffa_device *ffa_dev)
-+{
-+	struct trusty_ffa_state *s;
-+
-+	s = ffa_dev_get_drvdata(ffa_dev);
-+
-+	mutex_destroy(&s->share_memory_msg_lock);
-+	memset(s, 0, sizeof(struct trusty_ffa_state));
-+	kfree(s);
-+}
-+
-+static struct ffa_driver trusty_ffa_driver = {
-+	.name = "trusty-ffa",
-+	.probe = trusty_ffa_probe,
-+	.remove = trusty_ffa_remove,
-+	.id_table = trusty_ffa_device_id,
-+};
-+
-+static int __init trusty_ffa_transport_init(void)
-+{
-+	if (IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)) {
-+		return ffa_register(&trusty_ffa_driver);
-+	} else
-+		return -ENODEV;
-+}
-+
-+static void __exit trusty_ffa_transport_exit(void)
-+{
-+	if (IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT))
-+		ffa_unregister(&trusty_ffa_driver);
-+}
-+
-+const struct trusty_transport_desc trusty_ffa_transport = {
-+	.name = "ffa",
-+	.setup = trusty_ffa_transport_setup,
-+	.cleanup = trusty_ffa_transport_cleanup,
-+};
-+
-+module_init(trusty_ffa_transport_init);
-+module_exit(trusty_ffa_transport_exit);
-diff --git a/drivers/trusty/trusty-ffa.h b/drivers/trusty/trusty-ffa.h
-new file mode 100644
-index 000000000000..267ca2c5db29
---- /dev/null
-+++ b/drivers/trusty/trusty-ffa.h
-@@ -0,0 +1,28 @@
-+/* SPDX-License-Identifier: GPL-2.0-only */
-+/*
-+ * Copyright (C) 2022 ARM Ltd.
-+ */
-+
-+#ifndef __LINUX_TRUSTY_FFA_H
-+#define __LINUX_TRUSTY_FFA_H
-+
-+#include <linux/types.h>
-+#include <linux/uuid.h>
-+#include <linux/arm_ffa.h>
-+
-+#define TRUSTY_FFA_VERSION_MAJOR	(1U)
-+#define TRUSTY_FFA_VERSION_MINOR	(0U)
-+#define TRUSTY_FFA_VERSION_MAJOR_SHIFT	(16U)
-+#define TRUSTY_FFA_VERSION_MAJOR_MASK	(0x7fffU)
-+#define TRUSTY_FFA_VERSION_MINOR_SHIFT	(0U)
-+#define TRUSTY_FFA_VERSION_MINOR_MASK	(0U)
-+
-+#define TO_TRUSTY_FFA_MAJOR(v)					\
-+	  ((u16)((v >> TRUSTY_FFA_VERSION_MAJOR_SHIFT) &	\
-+		 TRUSTY_FFA_VERSION_MAJOR_MASK))
-+
-+#define TO_TRUSTY_FFA_MINOR(v)					\
-+	  ((u16)((v >> TRUSTY_FFA_VERSION_MINOR_SHIFT) &	\
-+		 TRUSTY_FFA_VERSION_MINOR_MASK))
-+
-+#endif /* __LINUX_TRUSTY_FFA_H */
-diff --git a/drivers/trusty/trusty-private.h b/drivers/trusty/trusty-private.h
-index 74b88bb8f83b..2496f397e5d2 100644
---- a/drivers/trusty/trusty-private.h
-+++ b/drivers/trusty/trusty-private.h
-@@ -73,5 +73,6 @@ int trusty_init_api_version(struct trusty_state *s, struct device *dev,
- typedef const struct trusty_transport_desc *trusty_transports_t;
- 
- extern const struct trusty_transport_desc trusty_smc_transport;
-+extern const struct trusty_transport_desc trusty_ffa_transport;
- 
- #endif /* _TRUSTY_PRIVATE_H */
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index ec0fccfaa24c..4686b0d34f61 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -509,6 +509,11 @@ trusty_transports_setup(const trusty_transports_t *transports,
- 			return -EINVAL;
- 
- 		ret = transport->setup(dev);
-+		if (ret == -EPROBE_DEFER) {
-+			dev_notice(dev, "transport %s: defer probe\n",
-+				   transport->name);
-+			return ret;
-+		}
- 		transports_ret &= ret;
- 	}
- 
-@@ -672,6 +677,7 @@ static int trusty_remove(struct platform_device *pdev)
-  */
- static const trusty_transports_t trusty_transports[] = {
- 	&trusty_smc_transport,
-+	&trusty_ffa_transport,
- 	NULL,
- };
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0034-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0034-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch
deleted file mode 100644
index 3654bff..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0034-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 996e6bae70ec2ce04061daab23f20e9c353c4227 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Tue, 18 Jan 2022 15:11:46 +0000
-Subject: [PATCH 34/40] ANDROID: trusty-ffa: Add support for FFA memory
- operations
-
-Initializes Trusty mem_ops with FFA memory operations for share,
-lend, reclaim.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Id3a1eb5ae8e4721cb983c624773d39bafe25a77d
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-ffa.c | 102 ++++++++++++++++++++++++++++++++++++
- drivers/trusty/trusty.c     |   5 ++
- 2 files changed, 107 insertions(+)
-
-diff --git a/drivers/trusty/trusty-ffa.c b/drivers/trusty/trusty-ffa.c
-index c8c16a1fc700..0655b3887b52 100644
---- a/drivers/trusty/trusty-ffa.c
-+++ b/drivers/trusty/trusty-ffa.c
-@@ -15,8 +15,110 @@
- #include "trusty-ffa.h"
- #include "trusty-private.h"
- 
-+static int __trusty_ffa_share_memory(struct device *dev, u64 *id,
-+				     struct scatterlist *sglist,
-+				     unsigned int nents, pgprot_t pgprot,
-+				     u64 tag, bool share)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	int ret;
-+	struct scatterlist *sg;
-+	size_t count;
-+	struct ffa_device *ffa_dev = to_ffa_dev(s->ffa->dev);
-+	const struct ffa_dev_ops *ffa_ops = s->ffa->ops;
-+	struct ffa_mem_region_attributes ffa_mem_attr;
-+	struct ffa_mem_ops_args ffa_mem_args;
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	count = dma_map_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+	if (count != nents) {
-+		dev_err(s->dev, "failed to dma map sg_table\n");
-+		return -EINVAL;
-+	}
-+
-+	sg = sglist;
-+
-+	mutex_lock(&s->ffa->share_memory_msg_lock);
-+
-+	ffa_mem_attr.receiver = ffa_dev->vm_id;
-+	ffa_mem_attr.attrs = FFA_MEM_RW;
-+
-+	ffa_mem_args.use_txbuf = 1;
-+	ffa_mem_args.tag = tag;
-+	ffa_mem_args.attrs = &ffa_mem_attr;
-+	ffa_mem_args.nattrs = 1;
-+	ffa_mem_args.sg = sg;
-+	ffa_mem_args.flags = 0;
-+
-+	if (share) {
-+		ret = ffa_ops->memory_share(ffa_dev, &ffa_mem_args);
-+	} else {
-+		ret = ffa_ops->memory_lend(ffa_dev, &ffa_mem_args);
-+	}
-+
-+	mutex_unlock(&s->ffa->share_memory_msg_lock);
-+
-+	if (!ret) {
-+		*id = ffa_mem_args.g_handle;
-+		dev_dbg(s->dev, "%s: done\n", __func__);
-+		return 0;
-+	}
-+
-+	dev_err(s->dev, "%s: failed %d", __func__, ret);
-+
-+	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+	return ret;
-+}
-+
-+static int trusty_ffa_share_memory(struct device *dev, u64 *id,
-+				   struct scatterlist *sglist,
-+				   unsigned int nents, pgprot_t pgprot, u64 tag)
-+{
-+	return __trusty_ffa_share_memory(dev, id, sglist, nents, pgprot, tag,
-+					 true);
-+}
-+
-+static int trusty_ffa_lend_memory(struct device *dev, u64 *id,
-+				  struct scatterlist *sglist,
-+				  unsigned int nents, pgprot_t pgprot, u64 tag)
-+{
-+	return __trusty_ffa_share_memory(dev, id, sglist, nents, pgprot, tag,
-+					 false);
-+}
-+
-+static int trusty_ffa_reclaim_memory(struct device *dev, u64 id,
-+				     struct scatterlist *sglist,
-+				     unsigned int nents)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	int ret = 0;
-+	const struct ffa_dev_ops *ffa_ops = s->ffa->ops;
-+
-+	if (WARN_ON(nents < 1))
-+		return -EINVAL;
-+
-+	mutex_lock(&s->ffa->share_memory_msg_lock);
-+
-+	ret = ffa_ops->memory_reclaim(id, 0);
-+
-+	mutex_unlock(&s->ffa->share_memory_msg_lock);
-+
-+	if (ret != 0)
-+		return ret;
-+
-+	dma_unmap_sg(dev, sglist, nents, DMA_BIDIRECTIONAL);
-+
-+	dev_dbg(s->dev, "%s: done\n", __func__);
-+	return 0;
-+}
-+
- static const struct trusty_mem_ops trusty_ffa_mem_ops = {
- 	.desc = &trusty_ffa_transport,
-+	.trusty_share_memory = &trusty_ffa_share_memory,
-+	.trusty_lend_memory = &trusty_ffa_lend_memory,
-+	.trusty_reclaim_memory = &trusty_ffa_reclaim_memory,
- };
- 
- static const struct ffa_device_id trusty_ffa_device_id[] = {
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 4686b0d34f61..f91c255c9897 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -674,6 +674,11 @@ static int trusty_remove(struct platform_device *pdev)
-  *
-  * For Trusty API version < TRUSTY_API_VERSION_MEM_OBJ:
-  *     trusty_smc_transport used for messaging.
-+ *
-+ * For Trusty API version == TRUSTY_API_VERSION_MEM_OBJ:
-+ *     trusty_smc_transport used for messaging.
-+ *     trusty_ffa_transport used for memory sharing.
-+ *
-  */
- static const trusty_transports_t trusty_transports[] = {
- 	&trusty_smc_transport,
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0035-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0035-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch
deleted file mode 100644
index eda8c64..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0035-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 8612a35bb376a3d104fe81f07c7109a252dcd9bf Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 3 Feb 2022 11:19:38 +0000
-Subject: [PATCH 35/40] ANDROID: trusty-ffa: Enable FFA transport for both
- memory and message ops
-
-Adds new API version TRUSTY_API_VERSION_FFA and sets this as current
-API version.
-
-If Trusty on the secure side supports receipt of FFA direct request,
-then trusty core uses FFA calls for messages and memory operations.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: I4a8b060f906a96935a7df10713026fb543e2b9a7
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-ffa.c   | 58 +++++++++++++++++++++++++++++++++++
- drivers/trusty/trusty.c       |  3 ++
- include/linux/trusty/smcall.h |  3 +-
- 3 files changed, 63 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/trusty/trusty-ffa.c b/drivers/trusty/trusty-ffa.c
-index 0655b3887b52..543f5a0d31cb 100644
---- a/drivers/trusty/trusty-ffa.c
-+++ b/drivers/trusty/trusty-ffa.c
-@@ -15,6 +15,36 @@
- #include "trusty-ffa.h"
- #include "trusty-private.h"
- 
-+/* partition property: Supports receipt of direct requests */
-+#define FFA_PARTITION_DIRECT_REQ_RECV	BIT(0)
-+
-+/* string representation of trusty UUID used for partition info get call */
-+static const char *trusty_uuid = "40ee25f0-a2bc-304c-8c4c-a173c57d8af1";
-+
-+static u32 trusty_ffa_send_direct_msg(struct device *dev, unsigned long fid,
-+				      unsigned long a0, unsigned long a1,
-+				      unsigned long a2)
-+{
-+	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
-+	struct ffa_send_direct_data ffa_msg;
-+	struct ffa_device *ffa_dev;
-+	int ret;
-+
-+	ffa_dev = to_ffa_dev(s->ffa->dev);
-+
-+	ffa_msg.data0 = fid;
-+	ffa_msg.data1 = a0;
-+	ffa_msg.data2 = a1;
-+	ffa_msg.data3 = a2;
-+	ffa_msg.data4 = 0;
-+
-+	ret = s->ffa->ops->sync_send_receive(ffa_dev, &ffa_msg);
-+	if (!ret)
-+		return ffa_msg.data0;
-+
-+	return ret;
-+}
-+
- static int __trusty_ffa_share_memory(struct device *dev, u64 *id,
- 				     struct scatterlist *sglist,
- 				     unsigned int nents, pgprot_t pgprot,
-@@ -114,6 +144,11 @@ static int trusty_ffa_reclaim_memory(struct device *dev, u64 id,
- 	return 0;
- }
- 
-+static const struct trusty_msg_ops trusty_ffa_msg_ops = {
-+	.desc = &trusty_ffa_transport,
-+	.send_direct_msg = &trusty_ffa_send_direct_msg,
-+};
-+
- static const struct trusty_mem_ops trusty_ffa_mem_ops = {
- 	.desc = &trusty_ffa_transport,
- 	.trusty_share_memory = &trusty_ffa_share_memory,
-@@ -181,6 +216,7 @@ static int trusty_ffa_transport_setup(struct device *dev)
- 	struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
- 	struct trusty_ffa_state *ffa_state;
- 	struct ffa_device *ffa_dev;
-+	struct ffa_partition_info pinfo = { 0 };
- 
- 	/* ffa transport not required for lower api versions */
- 	if (s->api_version != 0 && s->api_version < TRUSTY_API_VERSION_MEM_OBJ) {
-@@ -208,6 +244,28 @@ static int trusty_ffa_transport_setup(struct device *dev)
- 		return 0;
- 	}
- 
-+	/* check if Trusty partition can support receipt of direct requests. */
-+	rc = ffa_state->ops->partition_info_get(trusty_uuid, &pinfo);
-+	if (rc || !(pinfo.properties & FFA_PARTITION_DIRECT_REQ_RECV)) {
-+		dev_err(ffa_state->dev, "trusty_ffa_pinfo: ret: 0x%x, prop: 0x%x\n",
-+			rc, pinfo.properties);
-+		return -EINVAL;
-+	}
-+
-+	/* query and check Trusty API version */
-+	s->ffa = ffa_state;
-+	rc = trusty_init_api_version(s, dev, trusty_ffa_send_direct_msg);
-+	if (rc) {
-+		s->ffa = NULL;
-+		return -EINVAL;
-+	}
-+
-+	if (s->api_version == TRUSTY_API_VERSION_FFA) {
-+		s->msg_ops = &trusty_ffa_msg_ops;
-+		s->mem_ops = &trusty_ffa_mem_ops;
-+		return 0;
-+	}
-+
- 	return -EINVAL;
- }
- 
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index f91c255c9897..66273873f169 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -679,6 +679,9 @@ static int trusty_remove(struct platform_device *pdev)
-  *     trusty_smc_transport used for messaging.
-  *     trusty_ffa_transport used for memory sharing.
-  *
-+ * For Trusty API version > TRUSTY_API_VERSION_MEM_OBJ:
-+ *     trusty_ffa_transport used for messaging and memory sharing operations.
-+ *
-  */
- static const trusty_transports_t trusty_transports[] = {
- 	&trusty_smc_transport,
-diff --git a/include/linux/trusty/smcall.h b/include/linux/trusty/smcall.h
-index aea3f6068593..17b3d1c2c4f6 100644
---- a/include/linux/trusty/smcall.h
-+++ b/include/linux/trusty/smcall.h
-@@ -109,7 +109,8 @@
- #define TRUSTY_API_VERSION_SMP_NOP	(3)
- #define TRUSTY_API_VERSION_PHYS_MEM_OBJ	(4)
- #define TRUSTY_API_VERSION_MEM_OBJ	(5)
--#define TRUSTY_API_VERSION_CURRENT	(5)
-+#define TRUSTY_API_VERSION_FFA		(6)
-+#define TRUSTY_API_VERSION_CURRENT	(6)
- #define SMC_FC_API_VERSION	SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 11)
- 
- /* TRUSTED_OS entity calls */
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0036-ANDROID-trusty-Make-trusty-transports-configurable.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0036-ANDROID-trusty-Make-trusty-transports-configurable.patch
deleted file mode 100644
index 0f9e64b..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0036-ANDROID-trusty-Make-trusty-transports-configurable.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From f6ffd3bf7b561d603b350dc0274121886193fef0 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Wed, 16 Mar 2022 11:14:09 +0000
-Subject: [PATCH 36/40] ANDROID: trusty: Make trusty transports configurable
-
-With TRUSTY_SMC_TRANSPORT set to 'y', SMC based message passing and
-memory sharing support will be compiled in to trusty core.
-
-With TRUSTY_FFA_TRANSPORT set to 'y', FFA based message passing and
-memory sharing support will be compiled in to trusty core. This
-depends on ARM FF-A driver (ARM_FFA_TRANSPORT).
-
-Enabling any of the transport sets config TRUSTY_HAVE_TRANSPORT to 'y'.
-Not enabling any of the transport causes the build to break.
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Change-Id: Ib5bbf0d39202e6897700264d14371ae33101c1d1
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/Kconfig          | 30 ++++++++++++++++++++++++++++++
- drivers/trusty/Makefile         | 26 +++++++++++++++-----------
- drivers/trusty/trusty-private.h |  4 ++++
- drivers/trusty/trusty.c         |  7 +++++++
- 4 files changed, 56 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/trusty/Kconfig b/drivers/trusty/Kconfig
-index fcde7f097acf..260022e4595b 100644
---- a/drivers/trusty/Kconfig
-+++ b/drivers/trusty/Kconfig
-@@ -21,6 +21,36 @@ config TRUSTY
- 
- if TRUSTY
- 
-+config TRUSTY_HAVE_TRANSPORT
-+	bool
-+	help
-+	  If any of the Trusty transport is enabled then it sets this config
-+	  option. This variable is used to break the build when none of the
-+	  Trusty transports are enabled.
-+
-+config TRUSTY_SMC_TRANSPORT
-+	bool "Trusty transport based on SMC"
-+	select TRUSTY_HAVE_TRANSPORT
-+	default n
-+	help
-+	  Enable SMC based transport for Trusty. This transport is required for
-+	  Trusty API version <= TRUSTY_API_VERSION_MEM_OBJ.
-+
-+	  If you want to use legacy SMC based transport for sending Trusty
-+	  messages to secure world, answer Y.
-+
-+config TRUSTY_FFA_TRANSPORT
-+	bool "Trusty transport based on FFA"
-+	select TRUSTY_HAVE_TRANSPORT
-+	depends on ARM_FFA_TRANSPORT
-+	default y
-+	help
-+	  Enable ARM FF-A based transport for Trusty. This transport is required
-+	  for Trusty API version >= TRUSTY_API_VERSION_MEM_OBJ.
-+
-+	  If you want to use ARM FF-A based transport for sending Trusty messages
-+	  to secure world, answer Y.
-+
- config TRUSTY_IRQ
- 	tristate "Trusty IRQ support"
- 	default y
-diff --git a/drivers/trusty/Makefile b/drivers/trusty/Makefile
-index 797d61bf68ef..104a4d0ed35c 100644
---- a/drivers/trusty/Makefile
-+++ b/drivers/trusty/Makefile
-@@ -3,14 +3,18 @@
- # Makefile for trusty components
- #
- 
--obj-$(CONFIG_TRUSTY)		+= trusty-core.o
--trusty-core-objs		+= trusty.o trusty-mem.o
--trusty-core-objs		+= trusty-smc.o
--trusty-core-objs		+= trusty-ffa.o
--trusty-core-$(CONFIG_ARM)	+= trusty-smc-arm.o
--trusty-core-$(CONFIG_ARM64)	+= trusty-smc-arm64.o
--obj-$(CONFIG_TRUSTY_IRQ)	+= trusty-irq.o
--obj-$(CONFIG_TRUSTY_LOG)	+= trusty-log.o
--obj-$(CONFIG_TRUSTY_TEST)	+= trusty-test.o
--obj-$(CONFIG_TRUSTY_VIRTIO)	+= trusty-virtio.o
--obj-$(CONFIG_TRUSTY_VIRTIO_IPC)	+= trusty-ipc.o
-+obj-$(CONFIG_TRUSTY)				+= trusty-core.o
-+trusty-core-objs				+= trusty.o
-+trusty-arm-smc-$(CONFIG_ARM)			+= trusty-smc-arm.o
-+trusty-arm-smc64-$(CONFIG_ARM64)		+= trusty-smc-arm64.o
-+trusty-transport-$(CONFIG_TRUSTY_SMC_TRANSPORT) += trusty-smc.o
-+trusty-transport-$(CONFIG_TRUSTY_SMC_TRANSPORT) += trusty-mem.o
-+trusty-transport-$(CONFIG_TRUSTY_SMC_TRANSPORT) += $(trusty-arm-smc-y)
-+trusty-transport-$(CONFIG_TRUSTY_SMC_TRANSPORT) += $(trusty-arm-smc64-y)
-+trusty-transport-$(CONFIG_TRUSTY_FFA_TRANSPORT) += trusty-ffa.o
-+trusty-core-objs				+= $(trusty-transport-y)
-+obj-$(CONFIG_TRUSTY_IRQ)			+= trusty-irq.o
-+obj-$(CONFIG_TRUSTY_LOG)			+= trusty-log.o
-+obj-$(CONFIG_TRUSTY_TEST)			+= trusty-test.o
-+obj-$(CONFIG_TRUSTY_VIRTIO)			+= trusty-virtio.o
-+obj-$(CONFIG_TRUSTY_VIRTIO_IPC)			+= trusty-ipc.o
-diff --git a/drivers/trusty/trusty-private.h b/drivers/trusty/trusty-private.h
-index 2496f397e5d2..386ca9ae5af3 100644
---- a/drivers/trusty/trusty-private.h
-+++ b/drivers/trusty/trusty-private.h
-@@ -72,7 +72,11 @@ int trusty_init_api_version(struct trusty_state *s, struct device *dev,
- 
- typedef const struct trusty_transport_desc *trusty_transports_t;
- 
-+#ifdef CONFIG_TRUSTY_SMC_TRANSPORT
- extern const struct trusty_transport_desc trusty_smc_transport;
-+#endif
-+#ifdef CONFIG_TRUSTY_FFA_TRANSPORT
- extern const struct trusty_transport_desc trusty_ffa_transport;
-+#endif
- 
- #endif /* _TRUSTY_PRIVATE_H */
-diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
-index 66273873f169..06698f3c67f9 100644
---- a/drivers/trusty/trusty.c
-+++ b/drivers/trusty/trusty.c
-@@ -684,8 +684,12 @@ static int trusty_remove(struct platform_device *pdev)
-  *
-  */
- static const trusty_transports_t trusty_transports[] = {
-+#ifdef CONFIG_TRUSTY_SMC_TRANSPORT
- 	&trusty_smc_transport,
-+#endif
-+#ifdef CONFIG_TRUSTY_FFA_TRANSPORT
- 	&trusty_ffa_transport,
-+#endif
- 	NULL,
- };
- 
-@@ -708,6 +712,9 @@ static struct platform_driver trusty_driver = {
- 
- static int __init trusty_driver_init(void)
- {
-+	BUILD_BUG_ON_MSG(!IS_ENABLED(CONFIG_TRUSTY_HAVE_TRANSPORT),
-+			 "Trusty transport not configured");
-+
- 	return platform_driver_register(&trusty_driver);
- }
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0037-ANDROID-trusty-log-include-panic_notifier.h.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0037-ANDROID-trusty-log-include-panic_notifier.h.patch
deleted file mode 100644
index 8d57267..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0037-ANDROID-trusty-log-include-panic_notifier.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 71a99394b657019d234b43d9abacf9f86a3c4e4f Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 19 May 2022 09:56:04 +0100
-Subject: [PATCH 37/40] ANDROID: trusty-log: include panic_notifier.h
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- drivers/trusty/trusty-log.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c
-index 7b279fe63766..1bd68278d0be 100644
---- a/drivers/trusty/trusty-log.c
-+++ b/drivers/trusty/trusty-log.c
-@@ -6,6 +6,7 @@
- #include <linux/trusty/smcall.h>
- #include <linux/trusty/trusty.h>
- #include <linux/notifier.h>
-+#include <linux/panic_notifier.h>
- #include <linux/scatterlist.h>
- #include <linux/slab.h>
- #include <linux/mm.h>
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0038-ANDROID-trusty-ipc-fix-VIRTIO_ID_TRUSTY_IPC-ID.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0038-ANDROID-trusty-ipc-fix-VIRTIO_ID_TRUSTY_IPC-ID.patch
deleted file mode 100644
index 502a984..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0038-ANDROID-trusty-ipc-fix-VIRTIO_ID_TRUSTY_IPC-ID.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From dfa152d399d7e6a285ab31bcc2172f61d5db907d Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 19 May 2022 09:59:06 +0100
-Subject: [PATCH 38/40] ANDROID: trusty-ipc: fix VIRTIO_ID_TRUSTY_IPC ID
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- include/uapi/linux/virtio_ids.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
-index 909905cd7618..06ccbf2db5fa 100644
---- a/include/uapi/linux/virtio_ids.h
-+++ b/include/uapi/linux/virtio_ids.h
-@@ -42,6 +42,10 @@
- #define VIRTIO_ID_RPROC_SERIAL		11 /* virtio remoteproc serial link */
- #define VIRTIO_ID_CAIF			12 /* Virtio caif */
- #define VIRTIO_ID_MEMORY_BALLOON	13 /* virtio memory balloon */
-+/*
-+ * todo: VIRTIO_ID_TRUSTY_IPC conflicts with VIRTIO_ID_MEMORY_BALLOON
-+ * replace with unused ID and update trusty kernel header tipc_virtio_dev.h
-+ */
- #define VIRTIO_ID_TRUSTY_IPC		13 /* virtio trusty ipc */
- #define VIRTIO_ID_GPU			16 /* virtio GPU */
- #define VIRTIO_ID_CLOCK			17 /* virtio clock/timer */
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0039-gki_config-add-tc-disable_mpam.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0039-gki_config-add-tc-disable_mpam.patch
deleted file mode 100644
index 28dd383..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0039-gki_config-add-tc-disable_mpam.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 6de0622bb6880b5a8e8422f6e6e847cc43231a89 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Wed, 18 May 2022 18:47:55 +0100
-Subject: [PATCH 39/40] gki_config: add tc/disable_mpam
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- arch/arm64/configs/gki_defconfig | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig
-index 31d836eef904..0536759d1baa 100644
---- a/arch/arm64/configs/gki_defconfig
-+++ b/arch/arm64/configs/gki_defconfig
-@@ -60,7 +60,6 @@ CONFIG_ARMV8_DEPRECATED=y
- CONFIG_SWP_EMULATION=y
- CONFIG_CP15_BARRIER_EMULATION=y
- CONFIG_SETEND_EMULATION=y
--CONFIG_ARM64_MPAM=y
- CONFIG_RANDOMIZE_BASE=y
- # CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
- CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure"
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0040-ANDROID-KVM-arm64-disable-FFA-driver-at-EL2.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0040-ANDROID-KVM-arm64-disable-FFA-driver-at-EL2.patch
deleted file mode 100644
index 2d6b675..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0040-ANDROID-KVM-arm64-disable-FFA-driver-at-EL2.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2cdf0de8f42c4825f52618b9bbd2ec2084749de0 Mon Sep 17 00:00:00 2001
-From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Date: Thu, 19 May 2022 16:44:13 +0100
-Subject: [PATCH 40/40] ANDROID: KVM: arm64: disable FFA driver at EL2
-
-Do not handle FFA calls
-
-Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
-Upstream-Status: Pending [Not submitted to upstream yet]
-Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
----
- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 3 +++
- arch/arm64/kvm/hyp/nvhe/setup.c    | 4 +++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
-index 49345929af0d..463cf27712c3 100644
---- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c
-+++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
-@@ -1134,8 +1134,11 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
- 	bool handled;
- 
- 	handled = kvm_host_psci_handler(host_ctxt);
-+	/* do not handle ffa calls as EL2 FFA driver is not yet complete */
-+#if 0
- 	if (!handled)
- 		handled = kvm_host_ffa_handler(host_ctxt);
-+#endif
- 	if (!handled)
- 		default_host_smc_handler(host_ctxt);
- 
-diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
-index 1a6f3eba5035..ce84030426d0 100644
---- a/arch/arm64/kvm/hyp/nvhe/setup.c
-+++ b/arch/arm64/kvm/hyp/nvhe/setup.c
-@@ -317,10 +317,12 @@ void __noreturn __pkvm_init_finalise(void)
- 	if (ret)
- 		goto out;
- 
-+	/* skip ffa init at EL2, use EL1 driver instead */
-+#if 0
- 	ret = hyp_ffa_init(ffa_proxy_pages);
- 	if (ret)
- 		goto out;
--
-+#endif
- 	hyp_shadow_table_init(shadow_table_base);
- out:
- 	/*
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0041-etherdevice-Adjust-ether_addr-prototypes-to-silence-.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0041-etherdevice-Adjust-ether_addr-prototypes-to-silence-.patch
deleted file mode 100644
index b6da77d..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0041-etherdevice-Adjust-ether_addr-prototypes-to-silence-.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 37948a54f3e49fc2fef157f89d5bb52cefcfe68e Mon Sep 17 00:00:00 2001
-From: Kees Cook <keescook@chromium.org>
-Date: Sat, 12 Feb 2022 09:14:49 -0800
-Subject: [PATCH] etherdevice: Adjust ether_addr* prototypes to silence
- -Wstringop-overead
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-With GCC 12, -Wstringop-overread was warning about an implicit cast from
-char[6] to char[8]. However, the extra 2 bytes are always thrown away,
-alignment doesn't matter, and the risk of hitting the edge of unallocated
-memory has been accepted, so this prototype can just be converted to a
-regular char *. Silences:
-
-net/core/dev.c: In function ‘bpf_prog_run_generic_xdp’: net/core/dev.c:4618:21: warning: ‘ether_addr_equal_64bits’ reading 8 bytes from a region of size 6 [-Wstringop-overread]
- 4618 |         orig_host = ether_addr_equal_64bits(eth->h_dest, > skb->dev->dev_addr);
-      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-net/core/dev.c:4618:21: note: referencing argument 1 of type ‘const u8[8]’ {aka ‘const unsigned char[8]’}
-net/core/dev.c:4618:21: note: referencing argument 2 of type ‘const u8[8]’ {aka ‘const unsigned char[8]’}
-In file included from net/core/dev.c:91: include/linux/etherdevice.h:375:20: note: in a call to function ‘ether_addr_equal_64bits’
-  375 | static inline bool ether_addr_equal_64bits(const u8 addr1[6+2],
-      |                    ^~~~~~~~~~~~~~~~~~~~~~~
-
-Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Link: https://lore.kernel.org/netdev/20220212090811.uuzk6d76agw2vv73@pengutronix.de
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: netdev@vger.kernel.org
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-
-Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2618a0dae09ef37728dab89ff60418cbe25ae6bd]
-Change-Id: I41ed4ace65094964eacddf0c56f9fc779f7d4e0c
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
----
- include/linux/etherdevice.h | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
-index c58d50451485..7f28fa702bb7 100644
---- a/include/linux/etherdevice.h
-+++ b/include/linux/etherdevice.h
-@@ -127,7 +127,7 @@ static inline bool is_multicast_ether_addr(const u8 *addr)
- #endif
- }
- 
--static inline bool is_multicast_ether_addr_64bits(const u8 addr[6+2])
-+static inline bool is_multicast_ether_addr_64bits(const u8 *addr)
- {
- #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64
- #ifdef __BIG_ENDIAN
-@@ -364,8 +364,7 @@ static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
-  * Please note that alignment of addr1 & addr2 are only guaranteed to be 16 bits.
-  */
- 
--static inline bool ether_addr_equal_64bits(const u8 addr1[6+2],
--					   const u8 addr2[6+2])
-+static inline bool ether_addr_equal_64bits(const u8 *addr1, const u8 *addr2)
- {
- #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64
- 	u64 fold = (*(const u64 *)addr1) ^ (*(const u64 *)addr2);
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0042-mm-page_alloc-fix-building-error-on-Werror-array-com.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0042-mm-page_alloc-fix-building-error-on-Werror-array-com.patch
deleted file mode 100644
index 1267a82..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/0042-mm-page_alloc-fix-building-error-on-Werror-array-com.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 74979dd6327bbaa96ecb8525f8ea6025715d5ba7 Mon Sep 17 00:00:00 2001
-From: Xiongwei Song <sxwjean@gmail.com>
-Date: Fri, 14 Jan 2022 14:07:24 -0800
-Subject: [PATCH] mm: page_alloc: fix building error on -Werror=array-compare
-
-Arthur Marsh reported we would hit the error below when building kernel
-with gcc-12:
-
-  CC      mm/page_alloc.o
-  mm/page_alloc.c: In function `mem_init_print_info':
-  mm/page_alloc.c:8173:27: error: comparison between two arrays [-Werror=array-compare]
-   8173 |                 if (start <= pos && pos < end && size > adj) \
-        |
-
-In C++20, the comparision between arrays should be warned.
-
-Link: https://lkml.kernel.org/r/20211125130928.32465-1-sxwjean@me.com
-Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
-Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
-Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca831f29f8f25c97182e726429b38c0802200c8f]
-Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
-Change-Id: I11931013f1fd42f0f2a75375cdfb129cb3a9d5aa
----
- mm/page_alloc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index 185fbddecc83..3affeeb194d4 100644
---- a/mm/page_alloc.c
-+++ b/mm/page_alloc.c
-@@ -8282,7 +8282,7 @@ void __init mem_init_print_info(void)
- 	 */
- #define adj_init_size(start, end, size, pos, adj) \
- 	do { \
--		if (start <= pos && pos < end && size > adj) \
-+		if (&start[0] <= &pos[0] && &pos[0] < &end[0] && size > adj) \
- 			size -= adj; \
- 	} while (0)
- 
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/gki_defconfig b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/gki_defconfig
deleted file mode 100644
index 31d836e..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/gki_defconfig
+++ /dev/null
@@ -1,693 +0,0 @@
-CONFIG_UAPI_HEADER_TEST=y
-CONFIG_AUDIT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BPF_SYSCALL=y
-CONFIG_BPF_JIT=y
-CONFIG_BPF_JIT_ALWAYS_ON=y
-CONFIG_PREEMPT=y
-CONFIG_IRQ_TIME_ACCOUNTING=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_XACCT=y
-CONFIG_TASK_IO_ACCOUNTING=y
-CONFIG_PSI=y
-CONFIG_RCU_EXPERT=y
-CONFIG_RCU_FAST_NO_HZ=y
-CONFIG_RCU_NOCB_CPU=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_IKHEADERS=y
-CONFIG_UCLAMP_TASK=y
-CONFIG_UCLAMP_BUCKETS_COUNT=20
-CONFIG_CGROUPS=y
-CONFIG_MEMCG=y
-CONFIG_BLK_CGROUP=y
-CONFIG_CGROUP_SCHED=y
-CONFIG_UCLAMP_TASK_GROUP=y
-CONFIG_CGROUP_FREEZER=y
-CONFIG_CPUSETS=y
-CONFIG_CGROUP_CPUACCT=y
-CONFIG_CGROUP_BPF=y
-CONFIG_NAMESPACES=y
-# CONFIG_PID_NS is not set
-CONFIG_RT_SOFTINT_OPTIMIZATION=y
-# CONFIG_RD_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
-# CONFIG_RD_XZ is not set
-# CONFIG_RD_LZO is not set
-CONFIG_BOOT_CONFIG=y
-# CONFIG_SYSFS_SYSCALL is not set
-# CONFIG_FHANDLE is not set
-CONFIG_KALLSYMS_ALL=y
-CONFIG_USERFAULTFD=y
-# CONFIG_RSEQ is not set
-CONFIG_EMBEDDED=y
-# CONFIG_COMPAT_BRK is not set
-# CONFIG_SLAB_MERGE_DEFAULT is not set
-CONFIG_SLAB_FREELIST_RANDOM=y
-CONFIG_SLAB_FREELIST_HARDENED=y
-CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
-CONFIG_PROFILING=y
-CONFIG_ARCH_SUNXI=y
-CONFIG_ARCH_HISI=y
-CONFIG_ARCH_QCOM=y
-CONFIG_SCHED_MC=y
-CONFIG_NR_CPUS=32
-CONFIG_PARAVIRT_TIME_ACCOUNTING=y
-CONFIG_ARM64_SW_TTBR0_PAN=y
-CONFIG_COMPAT=y
-CONFIG_ARMV8_DEPRECATED=y
-CONFIG_SWP_EMULATION=y
-CONFIG_CP15_BARRIER_EMULATION=y
-CONFIG_SETEND_EMULATION=y
-CONFIG_ARM64_MPAM=y
-CONFIG_RANDOMIZE_BASE=y
-# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
-CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure"
-CONFIG_CMDLINE_EXTEND=y
-# CONFIG_DMI is not set
-CONFIG_PM_WAKELOCKS=y
-CONFIG_PM_WAKELOCKS_LIMIT=0
-# CONFIG_PM_WAKELOCKS_GC is not set
-CONFIG_ENERGY_MODEL=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_IDLE_GOV_TEO=y
-CONFIG_ARM_CPUIDLE=y
-CONFIG_ARM_PSCI_CPUIDLE=y
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_FREQ_TIMES=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-CONFIG_ARM_SCPI_CPUFREQ=y
-CONFIG_ARM_SCMI_CPUFREQ=y
-CONFIG_VIRTUALIZATION=y
-CONFIG_KVM=y
-CONFIG_KVM_S2MPU=y
-CONFIG_CRYPTO_SHA2_ARM64_CE=y
-CONFIG_CRYPTO_SHA512_ARM64_CE=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
-CONFIG_KPROBES=y
-CONFIG_JUMP_LABEL=y
-CONFIG_SHADOW_CALL_STACK=y
-CONFIG_LTO_CLANG_FULL=y
-CONFIG_CFI_CLANG=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SCMVERSION=y
-CONFIG_MODULE_SIG=y
-CONFIG_MODULE_SIG_PROTECT=y
-CONFIG_BLK_INLINE_ENCRYPTION=y
-CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
-CONFIG_IOSCHED_BFQ=y
-CONFIG_BFQ_GROUP_IOSCHED=y
-CONFIG_GKI_HACKS_TO_FIX=y
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_BINFMT_MISC=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTREMOVE=y
-CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
-CONFIG_TRANSPARENT_HUGEPAGE=y
-CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
-CONFIG_CLEANCACHE=y
-CONFIG_CMA=y
-CONFIG_CMA_DEBUGFS=y
-CONFIG_CMA_AREAS=16
-# CONFIG_ZONE_DMA is not set
-CONFIG_ANON_VMA_NAME=y
-CONFIG_LRU_GEN=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_XFRM_USER=y
-CONFIG_XFRM_INTERFACE=y
-CONFIG_XFRM_MIGRATE=y
-CONFIG_XFRM_STATISTICS=y
-CONFIG_NET_KEY=y
-CONFIG_XDP_SOCKETS=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_NET_IPIP=y
-CONFIG_NET_IPGRE_DEMUX=y
-CONFIG_NET_IPGRE=y
-CONFIG_NET_IPVTI=y
-CONFIG_INET_ESP=y
-CONFIG_INET_UDP_DIAG=y
-CONFIG_INET_DIAG_DESTROY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_OPTIMISTIC_DAD=y
-CONFIG_INET6_ESP=y
-CONFIG_INET6_IPCOMP=y
-CONFIG_IPV6_MIP6=y
-CONFIG_IPV6_VTI=y
-CONFIG_IPV6_GRE=y
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_NETFILTER=y
-CONFIG_NF_CONNTRACK=y
-CONFIG_NF_CONNTRACK_SECMARK=y
-CONFIG_NF_CONNTRACK_EVENTS=y
-CONFIG_NF_CONNTRACK_AMANDA=y
-CONFIG_NF_CONNTRACK_FTP=y
-CONFIG_NF_CONNTRACK_H323=y
-CONFIG_NF_CONNTRACK_IRC=y
-CONFIG_NF_CONNTRACK_NETBIOS_NS=y
-CONFIG_NF_CONNTRACK_PPTP=y
-CONFIG_NF_CONNTRACK_SANE=y
-CONFIG_NF_CONNTRACK_TFTP=y
-CONFIG_NF_CT_NETLINK=y
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
-CONFIG_NETFILTER_XT_TARGET_DSCP=y
-CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
-CONFIG_NETFILTER_XT_TARGET_MARK=y
-CONFIG_NETFILTER_XT_TARGET_NFLOG=y
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
-CONFIG_NETFILTER_XT_TARGET_TEE=y
-CONFIG_NETFILTER_XT_TARGET_TPROXY=y
-CONFIG_NETFILTER_XT_TARGET_TRACE=y
-CONFIG_NETFILTER_XT_TARGET_SECMARK=y
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
-CONFIG_NETFILTER_XT_MATCH_BPF=y
-CONFIG_NETFILTER_XT_MATCH_COMMENT=y
-CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
-CONFIG_NETFILTER_XT_MATCH_DSCP=y
-CONFIG_NETFILTER_XT_MATCH_ESP=y
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
-CONFIG_NETFILTER_XT_MATCH_HELPER=y
-CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
-CONFIG_NETFILTER_XT_MATCH_LENGTH=y
-CONFIG_NETFILTER_XT_MATCH_LIMIT=y
-CONFIG_NETFILTER_XT_MATCH_MAC=y
-CONFIG_NETFILTER_XT_MATCH_MARK=y
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
-CONFIG_NETFILTER_XT_MATCH_OWNER=y
-CONFIG_NETFILTER_XT_MATCH_POLICY=y
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
-CONFIG_NETFILTER_XT_MATCH_QUOTA=y
-CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
-CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y
-CONFIG_NETFILTER_XT_MATCH_SOCKET=y
-CONFIG_NETFILTER_XT_MATCH_STATE=y
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
-CONFIG_NETFILTER_XT_MATCH_STRING=y
-CONFIG_NETFILTER_XT_MATCH_TIME=y
-CONFIG_NETFILTER_XT_MATCH_U32=y
-CONFIG_IP_NF_IPTABLES=y
-CONFIG_IP_NF_MATCH_ECN=y
-CONFIG_IP_NF_MATCH_TTL=y
-CONFIG_IP_NF_FILTER=y
-CONFIG_IP_NF_TARGET_REJECT=y
-CONFIG_IP_NF_NAT=y
-CONFIG_IP_NF_TARGET_MASQUERADE=y
-CONFIG_IP_NF_TARGET_NETMAP=y
-CONFIG_IP_NF_TARGET_REDIRECT=y
-CONFIG_IP_NF_MANGLE=y
-CONFIG_IP_NF_RAW=y
-CONFIG_IP_NF_SECURITY=y
-CONFIG_IP_NF_ARPTABLES=y
-CONFIG_IP_NF_ARPFILTER=y
-CONFIG_IP_NF_ARP_MANGLE=y
-CONFIG_IP6_NF_IPTABLES=y
-CONFIG_IP6_NF_MATCH_RPFILTER=y
-CONFIG_IP6_NF_FILTER=y
-CONFIG_IP6_NF_TARGET_REJECT=y
-CONFIG_IP6_NF_MANGLE=y
-CONFIG_IP6_NF_RAW=y
-CONFIG_TIPC=y
-CONFIG_L2TP=y
-CONFIG_BRIDGE=y
-CONFIG_VLAN_8021Q=y
-CONFIG_6LOWPAN=y
-CONFIG_IEEE802154=y
-CONFIG_IEEE802154_6LOWPAN=y
-CONFIG_MAC802154=y
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_HTB=y
-CONFIG_NET_SCH_PRIO=y
-CONFIG_NET_SCH_MULTIQ=y
-CONFIG_NET_SCH_SFQ=y
-CONFIG_NET_SCH_TBF=y
-CONFIG_NET_SCH_NETEM=y
-CONFIG_NET_SCH_CODEL=y
-CONFIG_NET_SCH_FQ_CODEL=y
-CONFIG_NET_SCH_FQ=y
-CONFIG_NET_SCH_INGRESS=y
-CONFIG_NET_CLS_BASIC=y
-CONFIG_NET_CLS_TCINDEX=y
-CONFIG_NET_CLS_FW=y
-CONFIG_NET_CLS_U32=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_FLOW=y
-CONFIG_NET_CLS_BPF=y
-CONFIG_NET_CLS_MATCHALL=y
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_CMP=y
-CONFIG_NET_EMATCH_NBYTE=y
-CONFIG_NET_EMATCH_U32=y
-CONFIG_NET_EMATCH_META=y
-CONFIG_NET_EMATCH_TEXT=y
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=y
-CONFIG_NET_ACT_GACT=y
-CONFIG_NET_ACT_MIRRED=y
-CONFIG_NET_ACT_SKBEDIT=y
-CONFIG_NET_ACT_BPF=y
-CONFIG_VSOCKETS=y
-CONFIG_CGROUP_NET_PRIO=y
-CONFIG_CAN=y
-CONFIG_BT=y
-CONFIG_BT_RFCOMM=y
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_HIDP=y
-CONFIG_BT_HCIBTSDIO=y
-CONFIG_BT_HCIUART=y
-CONFIG_BT_HCIUART_LL=y
-CONFIG_BT_HCIUART_BCM=y
-CONFIG_BT_HCIUART_QCA=y
-CONFIG_CFG80211=y
-CONFIG_NL80211_TESTMODE=y
-# CONFIG_CFG80211_DEFAULT_PS is not set
-# CONFIG_CFG80211_CRDA_SUPPORT is not set
-CONFIG_MAC80211=y
-CONFIG_RFKILL=y
-CONFIG_NFC=y
-CONFIG_PCI=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIEAER=y
-CONFIG_PCI_IOV=y
-CONFIG_PCI_HOST_GENERIC=y
-CONFIG_PCIE_DW_PLAT_EP=y
-CONFIG_PCIE_QCOM=y
-CONFIG_PCIE_KIRIN=y
-CONFIG_PCI_ENDPOINT=y
-CONFIG_FW_LOADER_USER_HELPER=y
-# CONFIG_FW_CACHE is not set
-# CONFIG_SUN50I_DE2_BUS is not set
-# CONFIG_SUNXI_RSB is not set
-CONFIG_ARM_SCMI_PROTOCOL=y
-# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
-CONFIG_ARM_SCPI_PROTOCOL=y
-# CONFIG_ARM_SCPI_POWER_DOMAIN is not set
-# CONFIG_EFI_ARMSTUB_DTB_LOADER is not set
-CONFIG_GNSS=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_SRAM=y
-CONFIG_UID_SYS_STATS=y
-CONFIG_SCSI=y
-# CONFIG_SCSI_PROC_FS is not set
-CONFIG_BLK_DEV_SD=y
-CONFIG_SCSI_UFSHCD=y
-CONFIG_SCSI_UFSHCD_PCI=y
-CONFIG_SCSI_UFSHCD_PLATFORM=y
-CONFIG_SCSI_UFS_DWC_TC_PLATFORM=y
-CONFIG_SCSI_UFS_HISI=y
-CONFIG_SCSI_UFS_BSG=y
-CONFIG_SCSI_UFS_CRYPTO=y
-CONFIG_MD=y
-CONFIG_BLK_DEV_DM=y
-CONFIG_DM_CRYPT=y
-CONFIG_DM_DEFAULT_KEY=y
-CONFIG_DM_SNAPSHOT=y
-CONFIG_DM_UEVENT=y
-CONFIG_DM_VERITY=y
-CONFIG_DM_VERITY_FEC=y
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=y
-CONFIG_WIREGUARD=y
-CONFIG_IFB=y
-CONFIG_MACSEC=y
-CONFIG_TUN=y
-CONFIG_VETH=y
-CONFIG_PPP=y
-CONFIG_PPP_BSDCOMP=y
-CONFIG_PPP_DEFLATE=y
-CONFIG_PPP_MPPE=y
-CONFIG_PPTP=y
-CONFIG_PPPOL2TP=y
-CONFIG_USB_RTL8150=y
-CONFIG_USB_RTL8152=y
-CONFIG_USB_USBNET=y
-CONFIG_USB_NET_CDC_EEM=y
-# CONFIG_USB_NET_NET1080 is not set
-# CONFIG_USB_NET_CDC_SUBSET is not set
-# CONFIG_USB_NET_ZAURUS is not set
-CONFIG_USB_NET_AQC111=y
-# CONFIG_WLAN_VENDOR_ADMTEK is not set
-# CONFIG_WLAN_VENDOR_ATH is not set
-# CONFIG_WLAN_VENDOR_ATMEL is not set
-# CONFIG_WLAN_VENDOR_BROADCOM is not set
-# CONFIG_WLAN_VENDOR_CISCO is not set
-# CONFIG_WLAN_VENDOR_INTEL is not set
-# CONFIG_WLAN_VENDOR_INTERSIL is not set
-# CONFIG_WLAN_VENDOR_MARVELL is not set
-# CONFIG_WLAN_VENDOR_MEDIATEK is not set
-# CONFIG_WLAN_VENDOR_RALINK is not set
-# CONFIG_WLAN_VENDOR_REALTEK is not set
-# CONFIG_WLAN_VENDOR_RSI is not set
-# CONFIG_WLAN_VENDOR_ST is not set
-# CONFIG_WLAN_VENDOR_TI is not set
-# CONFIG_WLAN_VENDOR_ZYDAS is not set
-# CONFIG_WLAN_VENDOR_QUANTENNA is not set
-CONFIG_INPUT_EVDEV=y
-CONFIG_KEYBOARD_GPIO=y
-# CONFIG_MOUSE_PS2 is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_XPAD=y
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=y
-# CONFIG_VT is not set
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_8250=y
-# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_EXAR is not set
-CONFIG_SERIAL_8250_RUNTIME_UARTS=0
-CONFIG_SERIAL_8250_DW=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_SERIAL_SAMSUNG=y
-CONFIG_SERIAL_SAMSUNG_CONSOLE=y
-CONFIG_SERIAL_QCOM_GENI=y
-# CONFIG_SERIAL_QCOM_GENI_CONSOLE_DEFAULT_ENABLED is not set
-CONFIG_SERIAL_QCOM_GENI_CONSOLE=y
-CONFIG_SERIAL_SPRD=y
-CONFIG_SERIAL_SPRD_CONSOLE=y
-CONFIG_HVC_DCC=y
-CONFIG_SERIAL_DEV_BUS=y
-CONFIG_HW_RANDOM=y
-# CONFIG_DEVMEM is not set
-# CONFIG_DEVPORT is not set
-CONFIG_RANDOM_TRUST_CPU=y
-# CONFIG_I2C_COMPAT is not set
-# CONFIG_I2C_HELPER_AUTO is not set
-CONFIG_I3C=y
-CONFIG_SPI=y
-CONFIG_SPI_MEM=y
-CONFIG_SPMI=y
-# CONFIG_SPMI_MSM_PMIC_ARB is not set
-# CONFIG_PINCTRL_SUN8I_H3_R is not set
-# CONFIG_PINCTRL_SUN50I_A64 is not set
-# CONFIG_PINCTRL_SUN50I_A64_R is not set
-# CONFIG_PINCTRL_SUN50I_H5 is not set
-# CONFIG_PINCTRL_SUN50I_H6 is not set
-# CONFIG_PINCTRL_SUN50I_H6_R is not set
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_POWER_RESET_HISI=y
-CONFIG_POWER_RESET_SYSCON=y
-# CONFIG_HWMON is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_NETLINK=y
-CONFIG_THERMAL_STATISTICS=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=100
-CONFIG_THERMAL_WRITABLE_TRIPS=y
-CONFIG_THERMAL_GOV_USER_SPACE=y
-CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
-CONFIG_CPU_THERMAL=y
-CONFIG_DEVFREQ_THERMAL=y
-CONFIG_THERMAL_EMULATION=y
-CONFIG_WATCHDOG=y
-CONFIG_WATCHDOG_CORE=y
-CONFIG_MFD_ACT8945A=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_RC_CORE=y
-# CONFIG_RC_MAP is not set
-CONFIG_LIRC=y
-CONFIG_BPF_LIRC_MODE2=y
-CONFIG_RC_DECODERS=y
-CONFIG_RC_DEVICES=y
-CONFIG_MEDIA_CEC_RC=y
-# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
-# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
-# CONFIG_MEDIA_RADIO_SUPPORT is not set
-# CONFIG_MEDIA_SDR_SUPPORT is not set
-# CONFIG_MEDIA_TEST_SUPPORT is not set
-CONFIG_VIDEO_V4L2_SUBDEV_API=y
-CONFIG_MEDIA_USB_SUPPORT=y
-CONFIG_USB_VIDEO_CLASS=y
-CONFIG_USB_GSPCA=y
-CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_V4L_MEM2MEM_DRIVERS=y
-# CONFIG_VGA_ARB is not set
-CONFIG_DRM=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HRTIMER=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-# CONFIG_SND_VERBOSE_PROCFS is not set
-# CONFIG_SND_DRIVERS is not set
-CONFIG_SND_USB_AUDIO=y
-CONFIG_SND_SOC=y
-CONFIG_HID_BATTERY_STRENGTH=y
-CONFIG_HIDRAW=y
-CONFIG_UHID=y
-CONFIG_HID_APPLE=y
-CONFIG_HID_PRODIKEYS=y
-CONFIG_HID_ELECOM=y
-CONFIG_HID_UCLOGIC=y
-CONFIG_HID_LOGITECH=y
-CONFIG_HID_LOGITECH_DJ=y
-CONFIG_HID_MAGICMOUSE=y
-CONFIG_HID_MICROSOFT=y
-CONFIG_HID_MULTITOUCH=y
-CONFIG_HID_NINTENDO=y
-CONFIG_HID_PICOLCD=y
-CONFIG_HID_PLANTRONICS=y
-CONFIG_HID_PLAYSTATION=y
-CONFIG_PLAYSTATION_FF=y
-CONFIG_HID_ROCCAT=y
-CONFIG_HID_SONY=y
-CONFIG_SONY_FF=y
-CONFIG_HID_STEAM=y
-CONFIG_HID_WACOM=y
-CONFIG_HID_WIIMOTE=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-CONFIG_USB_OTG=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_HCD_PLATFORM=y
-CONFIG_USB_ACM=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_UAS=y
-CONFIG_USB_DWC3=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_CONFIGFS=y
-CONFIG_USB_CONFIGFS_UEVENT=y
-CONFIG_USB_CONFIGFS_SERIAL=y
-CONFIG_USB_CONFIGFS_ACM=y
-CONFIG_USB_CONFIGFS_NCM=y
-CONFIG_USB_CONFIGFS_ECM=y
-CONFIG_USB_CONFIGFS_EEM=y
-CONFIG_USB_CONFIGFS_MASS_STORAGE=y
-CONFIG_USB_CONFIGFS_F_FS=y
-CONFIG_USB_CONFIGFS_F_ACC=y
-CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
-CONFIG_USB_CONFIGFS_F_UAC2=y
-CONFIG_USB_CONFIGFS_F_MIDI=y
-CONFIG_USB_CONFIGFS_F_HID=y
-CONFIG_TYPEC=y
-CONFIG_TYPEC_TCPM=y
-CONFIG_TYPEC_TCPCI=y
-CONFIG_TYPEC_UCSI=y
-CONFIG_MMC=y
-# CONFIG_PWRSEQ_EMMC is not set
-# CONFIG_PWRSEQ_SIMPLE is not set
-CONFIG_MMC_CRYPTO=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_LEDS_CLASS_FLASH=y
-CONFIG_LEDS_TRIGGER_TIMER=y
-CONFIG_LEDS_TRIGGER_TRANSIENT=y
-CONFIG_EDAC=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_PL030=y
-CONFIG_RTC_DRV_PL031=y
-CONFIG_DMABUF_HEAPS=y
-CONFIG_DMABUF_SYSFS_STATS=y
-CONFIG_DMABUF_HEAPS_DEFERRED_FREE=y
-CONFIG_DMABUF_HEAPS_PAGE_POOL=y
-CONFIG_UIO=y
-CONFIG_VHOST_VSOCK=y
-CONFIG_STAGING=y
-CONFIG_ASHMEM=y
-CONFIG_DEBUG_KINFO=y
-CONFIG_COMMON_CLK_SCPI=y
-# CONFIG_CLK_SUNXI is not set
-# CONFIG_SUNXI_CCU is not set
-CONFIG_HWSPINLOCK=y
-# CONFIG_SUN50I_ERRATUM_UNKNOWN1 is not set
-CONFIG_MAILBOX=y
-CONFIG_REMOTEPROC=y
-CONFIG_REMOTEPROC_CDEV=y
-CONFIG_RPMSG_CHAR=y
-CONFIG_QCOM_GENI_SE=y
-CONFIG_DEVFREQ_GOV_PERFORMANCE=y
-CONFIG_DEVFREQ_GOV_POWERSAVE=y
-CONFIG_DEVFREQ_GOV_USERSPACE=y
-CONFIG_DEVFREQ_GOV_PASSIVE=y
-CONFIG_PM_DEVFREQ_EVENT=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_TRIGGER=y
-CONFIG_PWM=y
-CONFIG_GENERIC_PHY=y
-CONFIG_POWERCAP=y
-CONFIG_ANDROID=y
-CONFIG_ANDROID_BINDER_IPC=y
-CONFIG_ANDROID_BINDERFS=y
-CONFIG_ANDROID_DEBUG_SYMBOLS=y
-CONFIG_ANDROID_VENDOR_HOOKS=y
-CONFIG_LIBNVDIMM=y
-# CONFIG_ND_BLK is not set
-CONFIG_INTERCONNECT=y
-CONFIG_EXT4_FS=y
-CONFIG_EXT4_FS_POSIX_ACL=y
-CONFIG_EXT4_FS_SECURITY=y
-CONFIG_F2FS_FS=y
-CONFIG_F2FS_FS_SECURITY=y
-CONFIG_F2FS_FS_COMPRESSION=y
-CONFIG_FS_ENCRYPTION=y
-CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
-CONFIG_FS_VERITY=y
-CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
-# CONFIG_DNOTIFY is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V2=y
-CONFIG_FUSE_FS=y
-CONFIG_VIRTIO_FS=y
-CONFIG_OVERLAY_FS=y
-CONFIG_INCREMENTAL_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_EXFAT_FS=y
-CONFIG_TMPFS=y
-# CONFIG_EFIVAR_FS is not set
-CONFIG_PSTORE=y
-CONFIG_PSTORE_CONSOLE=y
-CONFIG_PSTORE_PMSG=y
-CONFIG_PSTORE_RAM=y
-CONFIG_EROFS_FS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=y
-CONFIG_NLS_CODEPAGE_775=y
-CONFIG_NLS_CODEPAGE_850=y
-CONFIG_NLS_CODEPAGE_852=y
-CONFIG_NLS_CODEPAGE_855=y
-CONFIG_NLS_CODEPAGE_857=y
-CONFIG_NLS_CODEPAGE_860=y
-CONFIG_NLS_CODEPAGE_861=y
-CONFIG_NLS_CODEPAGE_862=y
-CONFIG_NLS_CODEPAGE_863=y
-CONFIG_NLS_CODEPAGE_864=y
-CONFIG_NLS_CODEPAGE_865=y
-CONFIG_NLS_CODEPAGE_866=y
-CONFIG_NLS_CODEPAGE_869=y
-CONFIG_NLS_CODEPAGE_936=y
-CONFIG_NLS_CODEPAGE_950=y
-CONFIG_NLS_CODEPAGE_932=y
-CONFIG_NLS_CODEPAGE_949=y
-CONFIG_NLS_CODEPAGE_874=y
-CONFIG_NLS_ISO8859_8=y
-CONFIG_NLS_CODEPAGE_1250=y
-CONFIG_NLS_CODEPAGE_1251=y
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_ISO8859_2=y
-CONFIG_NLS_ISO8859_3=y
-CONFIG_NLS_ISO8859_4=y
-CONFIG_NLS_ISO8859_5=y
-CONFIG_NLS_ISO8859_6=y
-CONFIG_NLS_ISO8859_7=y
-CONFIG_NLS_ISO8859_9=y
-CONFIG_NLS_ISO8859_13=y
-CONFIG_NLS_ISO8859_14=y
-CONFIG_NLS_ISO8859_15=y
-CONFIG_NLS_KOI8_R=y
-CONFIG_NLS_KOI8_U=y
-CONFIG_NLS_MAC_ROMAN=y
-CONFIG_NLS_MAC_CELTIC=y
-CONFIG_NLS_MAC_CENTEURO=y
-CONFIG_NLS_MAC_CROATIAN=y
-CONFIG_NLS_MAC_CYRILLIC=y
-CONFIG_NLS_MAC_GAELIC=y
-CONFIG_NLS_MAC_GREEK=y
-CONFIG_NLS_MAC_ICELAND=y
-CONFIG_NLS_MAC_INUIT=y
-CONFIG_NLS_MAC_ROMANIAN=y
-CONFIG_NLS_MAC_TURKISH=y
-CONFIG_NLS_UTF8=y
-CONFIG_UNICODE=y
-CONFIG_SECURITY=y
-CONFIG_SECURITYFS=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_HARDENED_USERCOPY=y
-# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
-CONFIG_STATIC_USERMODEHELPER=y
-CONFIG_STATIC_USERMODEHELPER_PATH=""
-CONFIG_SECURITY_SELINUX=y
-CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
-CONFIG_CRYPTO_CHACHA20POLY1305=y
-CONFIG_CRYPTO_ADIANTUM=y
-CONFIG_CRYPTO_XCBC=y
-CONFIG_CRYPTO_BLAKE2B=y
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_LZ4=y
-CONFIG_CRYPTO_ZSTD=y
-CONFIG_CRYPTO_ANSI_CPRNG=y
-CONFIG_XZ_DEC=y
-CONFIG_DMA_CMA=y
-CONFIG_STACK_HASH_ORDER=12
-CONFIG_PRINTK_TIME=y
-CONFIG_PRINTK_CALLER=y
-CONFIG_DYNAMIC_DEBUG_CORE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_INFO_DWARF4=y
-CONFIG_DEBUG_INFO_BTF=y
-CONFIG_MODULE_ALLOW_BTF_MISMATCH=y
-CONFIG_HEADERS_INSTALL=y
-# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_UBSAN=y
-CONFIG_UBSAN_TRAP=y
-CONFIG_UBSAN_LOCAL_BOUNDS=y
-# CONFIG_UBSAN_SHIFT is not set
-# CONFIG_UBSAN_BOOL is not set
-# CONFIG_UBSAN_ENUM is not set
-CONFIG_PAGE_OWNER=y
-CONFIG_DEBUG_STACK_USAGE=y
-CONFIG_DEBUG_MEMORY_INIT=y
-CONFIG_KASAN=y
-CONFIG_KASAN_HW_TAGS=y
-CONFIG_KFENCE=y
-CONFIG_KFENCE_SAMPLE_INTERVAL=500
-CONFIG_KFENCE_NUM_OBJECTS=63
-CONFIG_PANIC_ON_OOPS=y
-CONFIG_PANIC_TIMEOUT=-1
-CONFIG_SOFTLOCKUP_DETECTOR=y
-CONFIG_WQ_WATCHDOG=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_PREEMPT is not set
-CONFIG_BUG_ON_DATA_CORRUPTION=y
-CONFIG_TRACE_MMIO_ACCESS=y
-CONFIG_HIST_TRIGGERS=y
-CONFIG_PID_IN_CONTEXTIDR=y
-# CONFIG_RUNTIME_TESTING_MENU is not set
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/init_disassemble_info-signature-changes-causes-compile-failures.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/init_disassemble_info-signature-changes-causes-compile-failures.patch
deleted file mode 100644
index aa33bb7..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-5.15/tc/init_disassemble_info-signature-changes-causes-compile-failures.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001
-From: Andres Freund <andres@anarazel.de>
-Date: Wed, 22 Jun 2022 11:19:18 -0700
-Subject: [PATCH] init_disassemble_info() signature changes causes compile
- failures
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Hi,
-
-binutils changed the signature of init_disassemble_info(), which now causes
-perf and bpftool to fail to compile (e.g. on debian unstable).
-
-Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
-
-util/annotate.c: In function ‘symbol__disassemble_bpf’:
-util/annotate.c:1765:9: error: too few arguments to function ‘init_disassemble_info’
- 1765 |         init_disassemble_info(&info, s,
-      |         ^~~~~~~~~~~~~~~~~~~~~
-In file included from util/annotate.c:1718:
-/usr/include/dis-asm.h:472:13: note: declared here
-  472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
-      |             ^~~~~~~~~~~~~~~~~~~~~
-
-with equivalent failures in
-
-tools/bpf/bpf_jit_disasm.c
-tools/bpf/bpftool/jit_disasm.c
-
-The fix is easy enough, add a wrapper around fprintf() that conforms to the
-new signature.
-
-However I assume the necessary feature test and wrapper should only be added
-once? I don't know the kernel stuff well enough to choose the right structure
-here.
-
-Attached is my local fix for perf. Obviously would need work to be a real
-solution.
-
-Greetings,
-
-Andres Freund
----
-
-binutils 2.39 changed the signature of init_disassemble_info(),
-which now causes perf and bpftool to fail to compile.
-
-Relevant binutils commit: [1]
-
-There is a proper fix in development upstream[2].
-This is a work-around for older kernels.
-
-[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
-[2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/
-
-Upstream-Status: Pending
-Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
-
-
- tools/perf/util/annotate.c | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
-index 6c8575e182ed..466a3a68f5cd 100644
---- a/tools/perf/util/annotate.c
-+++ b/tools/perf/util/annotate.c
-@@ -1677,6 +1677,18 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
- #include <bfd.h>
- #include <dis-asm.h>
- 
-+static int fprintf_styled(void *, enum disassembler_style, const char* fmt, ...)
-+{
-+  va_list args;
-+  int r;
-+
-+  va_start(args, fmt);
-+  r = vprintf(fmt, args);
-+  va_end(args);
-+
-+  return r;
-+}
-+
- static int symbol__disassemble_bpf(struct symbol *sym,
- 				   struct annotate_args *args)
- {
-@@ -1719,7 +1731,8 @@ static int symbol__disassemble_bpf(struct symbol *sym,
- 		goto out;
- 	}
- 	init_disassemble_info(&info, s,
--			      (fprintf_ftype) fprintf);
-+			      (fprintf_ftype) fprintf,
-+			      fprintf_styled);
- 
- 	info.arch = bfd_get_arch(bfdf);
- 	info.mach = bfd_get_mach(bfdf);
--- 
-2.30.2
-
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-clang.inc b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-clang.inc
deleted file mode 100644
index c5b7463..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack-clang.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# Clang-specific configuration of kernel build
-
-# We need to add this dependency as the kernel configuration depends on the compiler
-do_kernel_configme[depends] += "androidclang-native:do_populate_sysroot"
-
-DEPENDS:append = " androidclang-native"
-
-KERNEL_CC = "${CCACHE}clang ${HOST_CC_KERNEL_ARCH}"
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_%.bbappend b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_%.bbappend
deleted file mode 100644
index 301041b..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-LINUX_ARM64_ACK_TOOLCHAIN_REQUIRE = "${@oe.utils.ifelse(d.getVar('LINUX_ACK_TOOLCHAIN_CLANG'), 'linux-arm64-ack-clang.inc', '')}"
-
-require ${LINUX_ARM64_ACK_TOOLCHAIN_REQUIRE}
diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_5.15.bbappend b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_5.15.bbappend
deleted file mode 100644
index e2f9145..0000000
--- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-arm64-ack_5.15.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-# Machine specific configurations
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${BP}:"
-
-require linux-arm-platforms.inc
diff --git a/meta-arm/meta-arm/lib/fvp/runner.py b/meta-arm/meta-arm/lib/fvp/runner.py
index c52cdc1..7ca3673 100644
--- a/meta-arm/meta-arm/lib/fvp/runner.py
+++ b/meta-arm/meta-arm/lib/fvp/runner.py
@@ -6,7 +6,7 @@
 import sys
 
 from .terminal import terminals
-
+from .conffile import load
 
 def cli_from_config(config, terminal_choice):
     cli = []
@@ -83,23 +83,32 @@
         self._fvp_process = None
         self._telnets = []
         self._pexpects = []
+        self._config = None
 
-    def start(self, config, extra_args=[], terminal_choice="none", stdout=subprocess.PIPE):
-        cli = cli_from_config(config, terminal_choice)
+    def start(self, fvpconf, extra_args=[], terminal_choice="none", stdout=subprocess.PIPE):
+        self._logger.debug(f"Loading {fvpconf}")
+        self._config = load(fvpconf)
+
+        cli = cli_from_config(self._config, terminal_choice)
         cli += extra_args
 
         # Pass through environment variables needed for GUI applications, such
         # as xterm, to work.
-        env = config['env']
-        for name in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY'):
+        env = self._config['env']
+        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY', 'XAUTHORITY'):
             if name in os.environ:
                 env[name] = os.environ[name]
 
+        # Allow filepath to be relative to fvp configuration file
+        cwd = os.path.dirname(fvpconf)
+        self._logger.debug(f"FVP call will be executed in working directory: {cwd}")
+
         self._logger.debug(f"Constructed FVP call: {shlex_join(cli)}")
         self._fvp_process = subprocess.Popen(
             cli,
             stdin=subprocess.DEVNULL, stdout=stdout, stderr=subprocess.STDOUT,
-            env=env)
+            env=env,
+            cwd=cwd)
 
     def stop(self):
         if self._fvp_process:
@@ -140,6 +149,9 @@
     def wait(self, timeout):
         self._fvp_process.wait(timeout)
 
+    def getConfig(self):
+        return self._config
+
     @property
     def stdout(self):
         return self._fvp_process.stdout
diff --git a/meta-arm/meta-arm/lib/fvp/terminal.py b/meta-arm/meta-arm/lib/fvp/terminal.py
index 6f40815..243d4fb 100644
--- a/meta-arm/meta-arm/lib/fvp/terminal.py
+++ b/meta-arm/meta-arm/lib/fvp/terminal.py
@@ -53,7 +53,7 @@
 terminals = Terminals()
 # TODO: option to switch between telnet and netcat
 connect_command = "telnet localhost %port"
-terminals.add_terminal(2, "tmux", f"tmux new-window -n \"%title\" \"{connect_command}\""),
-terminals.add_terminal(2, "gnome-terminal", f"gnome-terminal --window --title \"%title\" --command \"{connect_command}\""),
-terminals.add_terminal(1, "xterm", f"xterm -title \"%title\" -e {connect_command}"),
+terminals.add_terminal(2, "tmux", f"tmux new-window -n \"%title\" \"{connect_command}\"")
+terminals.add_terminal(2, "gnome-terminal", f"gnome-terminal --window --title \"%title\" --command \"{connect_command}\"")
+terminals.add_terminal(1, "xterm", f"xterm -title \"%title\" -e {connect_command}")
 terminals.add_terminal(0, "none", None)
diff --git a/meta-arm/meta-arm/lib/oeqa/controllers/fvp.py b/meta-arm/meta-arm/lib/oeqa/controllers/fvp.py
index e8a094f..3848407 100644
--- a/meta-arm/meta-arm/lib/oeqa/controllers/fvp.py
+++ b/meta-arm/meta-arm/lib/oeqa/controllers/fvp.py
@@ -3,7 +3,7 @@
 import os
 
 from oeqa.core.target.ssh import OESSHTarget
-from fvp import conffile, runner
+from fvp import runner
 
 
 class OEFVPSSHTarget(OESSHTarget):
@@ -19,7 +19,6 @@
         basename = pathlib.Path(rootfs)
         basename = basename.name.replace("".join(basename.suffixes), "")
         self.fvpconf = image_dir / (basename + ".fvpconf")
-        self.config = conffile.load(self.fvpconf)
         self.bootlog = bootlog
 
         if not self.fvpconf.exists():
@@ -31,7 +30,7 @@
     def start(self, **kwargs):
         self.fvp_log = self._create_logfile("fvp")
         self.fvp = runner.FVPRunner(self.logger)
-        self.fvp.start(self.config, stdout=self.fvp_log)
+        self.fvp.start(self.fvpconf, stdout=self.fvp_log)
         self.logger.debug(f"Started FVP PID {self.fvp.pid()}")
         self._after_start()
 
@@ -72,8 +71,9 @@
     def _after_start(self):
         with open(self.fvp_log.name, 'rb') as logfile:
             parser = runner.ConsolePortParser(logfile)
-            self.logger.debug(f"Awaiting console on terminal {self.config['consoles']['default']}")
-            port = parser.parse_port(self.config['consoles']['default'])
+            config = self.fvp.getConfig()
+            self.logger.debug(f"Awaiting console on terminal {config['consoles']['default']}")
+            port = parser.parse_port(config['consoles']['default'])
             console = self.fvp.create_pexpect(port)
             try:
                 console.expect("login\\:", timeout=self.boot_timeout)
@@ -105,7 +105,8 @@
     def _after_start(self):
         with open(self.fvp_log.name, 'rb') as logfile:
             parser = runner.ConsolePortParser(logfile)
-            for name, console in self.config["consoles"].items():
+            config = self.fvp.getConfig()
+            for name, console in config["consoles"].items():
                 logfile = self._create_logfile(name)
                 self.logger.info(f'Creating terminal {name} on {console}')
                 port = parser.parse_port(console)
diff --git a/meta-arm/meta-arm/lib/oeqa/selftest/cases/runfvp.py b/meta-arm/meta-arm/lib/oeqa/selftest/cases/runfvp.py
index 5cc8660..d60aa3c 100644
--- a/meta-arm/meta-arm/lib/oeqa/selftest/cases/runfvp.py
+++ b/meta-arm/meta-arm/lib/oeqa/selftest/cases/runfvp.py
@@ -1,5 +1,6 @@
 import asyncio
 import os
+import json
 import pathlib
 import subprocess
 import tempfile
@@ -83,20 +84,26 @@
     def create_mock(self):
         return unittest.mock.patch("subprocess.Popen")
 
+    @unittest.mock.patch.dict(os.environ, {"PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"})
     def test_start(self):
         from fvp import runner
         with self.create_mock() as m:
             fvp = runner.FVPRunner(self.logger)
-            fvp.start({
-                "fvp-bindir": "/usr/bin",
-                "exe": "FVP_Binary",
-                "parameters": {'foo': 'bar'},
-                "data": ['data1'],
-                "applications": {'a1': 'file'},
-                "terminals": {},
-                "args": ['--extra-arg'],
-                "env": {"FOO": "BAR"}
-            })
+            config = {"fvp-bindir": "/usr/bin",
+                    "exe": "FVP_Binary",
+                    "parameters": {'foo': 'bar'},
+                    "data": ['data1'],
+                    "applications": {'a1': 'file'},
+                    "terminals": {},
+                    "args": ['--extra-arg'],
+                    "env": {"FOO": "BAR"}
+                     }
+
+            with tempfile.NamedTemporaryFile('w') as fvpconf:
+                json.dump(config, fvpconf)
+                fvpconf.flush()
+                cwd_mock = os.path.dirname(fvpconf.name)
+                fvp.start(fvpconf.name)
 
             m.assert_called_once_with(['/usr/bin/FVP_Binary',
                 '--parameter', 'foo=bar',
@@ -106,26 +113,33 @@
                 stdin=unittest.mock.ANY,
                 stdout=unittest.mock.ANY,
                 stderr=unittest.mock.ANY,
-                env={"FOO":"BAR"})
+                env={"FOO":"BAR", "PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"},
+                cwd=cwd_mock)
 
-    @unittest.mock.patch.dict(os.environ, {"DISPLAY": ":42", "WAYLAND_DISPLAY": "wayland-42"})
+    @unittest.mock.patch.dict(os.environ, {"DISPLAY": ":42", "WAYLAND_DISPLAY": "wayland-42", "PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"})
     def test_env_passthrough(self):
         from fvp import runner
         with self.create_mock() as m:
             fvp = runner.FVPRunner(self.logger)
-            fvp.start({
-                "fvp-bindir": "/usr/bin",
-                "exe": "FVP_Binary",
-                "parameters": {},
-                "data": [],
-                "applications": {},
-                "terminals": {},
-                "args": [],
-                "env": {"FOO": "BAR"}
-            })
+            config = {"fvp-bindir": "/usr/bin",
+                      "exe": "FVP_Binary",
+                      "parameters": {},
+                      "data": [],
+                      "applications": {},
+                      "terminals": {},
+                      "args": [],
+                      "env": {"FOO": "BAR"}
+                     }
+
+            with tempfile.NamedTemporaryFile('w') as fvpconf:
+                json.dump(config, fvpconf)
+                fvpconf.flush()
+                cwd_mock = os.path.dirname(fvpconf.name)
+                fvp.start(fvpconf.name)
 
             m.assert_called_once_with(['/usr/bin/FVP_Binary'],
                 stdin=unittest.mock.ANY,
                 stdout=unittest.mock.ANY,
                 stderr=unittest.mock.ANY,
-                env={"DISPLAY":":42", "FOO": "BAR", "WAYLAND_DISPLAY": "wayland-42"})
+                env={"DISPLAY":":42", "FOO": "BAR", "WAYLAND_DISPLAY": "wayland-42", "PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"},
+                cwd=cwd_mock)
diff --git a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack.inc b/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack.inc
deleted file mode 100644
index 6266c80..0000000
--- a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-# SPDX-License-Identifier: Apache-2.0
-#
-# Copyright (c) 2021 Arm Limited
-#
-
-DESCRIPTION = "Linux Android Common Kernel"
-SECTION = "kernel"
-LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-COMPATIBLE_MACHINE ?= "invalid"
-
-ARCH = "arm64"
-
-S = "${WORKDIR}/git"
-
-LINUX_VERSION ?= "${PV}"
-KERNEL_VERSION_SANITY_SKIP = "1"
-KBRANCH = ""
diff --git a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-lib-build_OID_registry-fix-reproducibility-issues.patch b/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-lib-build_OID_registry-fix-reproducibility-issues.patch
deleted file mode 100644
index d2a56a6..0000000
--- a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-lib-build_OID_registry-fix-reproducibility-issues.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From af8dffeef974b488fd0f12723080a72b1b5f5822 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@gmail.com>
-Date: Sun, 10 Jul 2022 22:56:53 -0400
-Subject: [PATCH 1/2] lib/build_OID_registry: fix reproducibility issues
-
-The script build_OID_registry captures the full path of itself
-in the generated data. This causes reproduciblity issues as the
-path is captured and packaged.
-
-We use the basename of the script instead, and that allows us
-to be reprodicible, with slightly less information captured in
-the output data (but the generating script can still easily
-be found).
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
----
- lib/build_OID_registry | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/build_OID_registry b/lib/build_OID_registry
-index d7fc32ea8ac2..f6de0a7f7457 100755
---- a/lib/build_OID_registry
-+++ b/lib/build_OID_registry
-@@ -8,6 +8,7 @@
- #
- 
- use strict;
-+use File::Basename;
- 
- my @names = ();
- my @oids = ();
-@@ -35,7 +36,7 @@ close IN_FILE || die;
- #
- open C_FILE, ">$ARGV[1]" or die;
- print C_FILE "/*\n";
--print C_FILE " * Automatically generated by ", $0, ".  Do not edit\n";
-+print C_FILE " * Automatically generated by ", basename $0, ".  Do not edit\n";
- print C_FILE " */\n";
- 
- #
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch b/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch
deleted file mode 100644
index 637d90a..0000000
--- a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Take a patch from linux-yocto to fix buildpaths in perf's python module.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From b8cd0e429bf75b673c438a8277d4bc74327df992 Mon Sep 17 00:00:00 2001
-From: Tom Zanussi <tom.zanussi@intel.com>
-Date: Tue, 3 Jul 2012 13:07:23 -0500
-Subject: [PATCH] perf: change --root to --prefix for python install
-
-Otherwise we get the sysroot path appended to the build path, not what
-we want.
-
-Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
----
- tools/perf/Makefile.perf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
-index 8f738e11356d..ee945d8e3996 100644
---- a/tools/perf/Makefile.perf
-+++ b/tools/perf/Makefile.perf
-@@ -1022,7 +1022,7 @@ install-bin: install-tools install-tests install-traceevent-plugins
- install: install-bin try-install-man
- 
- install-python_ext:
--	$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
-+	$(PYTHON_WORD) util/setup.py --quiet install --prefix='$(DESTDIR_SQ)/usr'
- 
- # 'make install-doc' should call 'make -C Documentation install'
- $(INSTALL_DOC_TARGETS):
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0002-vt-conmakehash-improve-reproducibility.patch b/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0002-vt-conmakehash-improve-reproducibility.patch
deleted file mode 100644
index 5bb40ec..0000000
--- a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack/0002-vt-conmakehash-improve-reproducibility.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 94b28f266f72c244051a2ec30ff4526a44b2ce85 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@gmail.com>
-Date: Sun, 10 Jul 2022 21:37:07 -0400
-Subject: [PATCH 2/2] vt/conmakehash: improve reproducibility
-
-The file generated by conmakehash capture the application
-path used to generate the file. While that can be informative,
-it varies based on where the kernel was built, as the full
-path is captured.
-
-We tweak the application to use a second input as the "capture
-name", and then modify the Makefile to pass the basename of
-the source, making it reproducible.
-
-This could be improved by using some sort of path mapping,
-or the application manipualing argv[1] itself, but for now
-this solves the reprodicibility issue.
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
----
- drivers/tty/vt/Makefile      | 2 +-
- drivers/tty/vt/conmakehash.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile
-index fe30ce512819..cb51c21b58f9 100644
---- a/drivers/tty/vt/Makefile
-+++ b/drivers/tty/vt/Makefile
-@@ -15,7 +15,7 @@ clean-files := consolemap_deftbl.c defkeymap.c
- hostprogs += conmakehash
- 
- quiet_cmd_conmk = CONMK   $@
--      cmd_conmk = $(obj)/conmakehash $< > $@
-+      cmd_conmk = $(obj)/conmakehash $< $(shell basename $<) > $@
- 
- $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash
- 	$(call cmd,conmk)
-diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c
-index cddd789fe46e..d62510b280e9 100644
---- a/drivers/tty/vt/conmakehash.c
-+++ b/drivers/tty/vt/conmakehash.c
-@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
- #include <linux/types.h>\n\
- \n\
- u8 dfont_unicount[%d] = \n\
--{\n\t", argv[1], fontlen);
-+{\n\t", argv[2], fontlen);
- 
-   for ( i = 0 ; i < fontlen ; i++ )
-     {
--- 
-2.34.1
-
diff --git a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb b/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb
deleted file mode 100644
index 804c068..0000000
--- a/meta-arm/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-# SPDX-License-Identifier: Apache-2.0
-#
-# Copyright (c) 2022 Arm Limited
-#
-require linux-arm64-ack.inc
-
-SRC_URI = " \
-    git://android.googlesource.com/kernel/common.git;protocol=https;branch=android13-5.15-lts \
-    file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
-    file://0002-vt-conmakehash-improve-reproducibility.patch \
-    file://0001-perf-change-root-to-prefix-for-python-install.patch \
-    "
-
-# tag: ASB-2022-05-05_13-5.15-93-ge8b3f31d7a60
-SRCREV = "e8b3f31d7a60648343ecbd45ab58dbcfc425b22c"
diff --git a/meta-arm/scripts/runfvp b/meta-arm/scripts/runfvp
index 939352b..c2e536c 100755
--- a/meta-arm/scripts/runfvp
+++ b/meta-arm/scripts/runfvp
@@ -14,7 +14,7 @@
 libdir = pathlib.Path(__file__).parents[1] / "meta-arm" / "lib"
 sys.path.insert(0, str(libdir))
 
-from fvp import terminal, runner, conffile
+from fvp import terminal, runner
 
 def parse_args(arguments):
     import argparse
@@ -49,14 +49,15 @@
     logger.debug(f"FVP arguments: {fvp_args}")
     return args, fvp_args
 
-def start_fvp(args, config, extra_args):
+def start_fvp(args, fvpconf, extra_args):
     fvp = runner.FVPRunner(logger)
     try:
-        fvp.start(config, extra_args, args.terminals)
+        fvp.start(fvpconf, extra_args, args.terminals)
 
         if args.console:
-            expected_terminal = config["consoles"]["default"]
-            if not expected_terminal:
+            config = fvp.getConfig()
+            expected_terminal = config["consoles"].get("default")
+            if expected_terminal is None:
                 logger.error("--console used but FVP_CONSOLE not set in machine configuration")
                 return 1
             port_stdout, log_stdout = itertools.tee(fvp.stdout, 2)
@@ -87,9 +88,7 @@
         config_file = args.config
     else:
         config_file = conffile.find(args.config)
-    logger.debug(f"Loading {config_file}")
-    config = conffile.load(config_file)
-    start_fvp(args, config, extra_args)
+    start_fvp(args, config_file, extra_args)
 
 
 if __name__ == "__main__":
diff --git a/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.0.bb b/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.1.bb
similarity index 91%
rename from meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.0.bb
rename to meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.1.bb
index 8cc5932..3767ec4 100644
--- a/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.0.bb
+++ b/meta-openembedded/meta-filesystems/recipes-utils/exfatprogs/exfatprogs_1.2.1.bb
@@ -12,7 +12,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
-SRC_URI[sha256sum] = "56d9a49465deafc367d428afc71c8098705a30ee19a3cdf3c5320650b8880742"
+SRC_URI[sha256sum] = "a6f3b1fb4bd37835c8f8cb421aac4eb75b880a51342b29850c4063973162227b"
 
 UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
 UPSTREAM_CHECK_REGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch b/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
deleted file mode 100644
index aa243bd..0000000
--- a/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f110e34d7a4929cdea647b98fa177cf1bccf8b1e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 21 Dec 2022 18:21:42 -0800
-Subject: [PATCH] f2fs_io: Fix out of tree builds
-
-Relative path does not work when searching for include files
-when srcdir != builddir
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-f2fs-devel/20221222022830.976309-1-raj.khem@gmail.com/T/#t]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- tools/f2fs_io/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/f2fs_io/Makefile.am b/tools/f2fs_io/Makefile.am
-index 6c17db1..bc4f9d0 100644
---- a/tools/f2fs_io/Makefile.am
-+++ b/tools/f2fs_io/Makefile.am
-@@ -1,7 +1,7 @@
- ## Makefile.am
- 
- if LINUX
--AM_CPPFLAGS = -I../../include
-+AM_CPPFLAGS = -I$(top_srcdir)/include
- AM_CFLAGS = -Wall
- sbin_PROGRAMS = f2fs_io
- f2fs_io_SOURCES = f2fs_io.c
diff --git a/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb b/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.16.0.bb
similarity index 83%
rename from meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb
rename to meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.16.0.bb
index 5da059f..997fa12 100644
--- a/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb
+++ b/meta-openembedded/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.16.0.bb
@@ -7,9 +7,8 @@
 # to provide libuuid
 DEPENDS = "util-linux"
 
-SRCREV = "64f2596142800c215cb40a658ebd5793ed37c936"
+SRCREV = "06c027abc6153c4a97cba5317844e8dcaaee3cf7"
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git;branch=master \
-           file://0001-f2fs_io-Fix-out-of-tree-builds.patch \
            file://0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch \
            "
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-Util.Cache.Lru-Workaround-missing-generic-type-argum.patch b/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-Util.Cache.Lru-Workaround-missing-generic-type-argum.patch
deleted file mode 100644
index 22af4f5..0000000
--- a/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0001-Util.Cache.Lru-Workaround-missing-generic-type-argum.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 166198735e9f4fbe91557df1351b3481bcf79e78 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz@ubuntu.com>
-Date: Sun, 30 Jan 2022 19:54:11 +0100
-Subject: [PATCH 1/2] Util.Cache.Lru: Workaround missing generic type argument
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/geary/-/commit/0f75e7a84a39492d0748cec2ba6028e08cae3644]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/client/util/util-cache.vala | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/client/util/util-cache.vala b/src/client/util/util-cache.vala
-index f054e32e..ecc275e8 100644
---- a/src/client/util/util-cache.vala
-+++ b/src/client/util/util-cache.vala
-@@ -12,7 +12,7 @@ public class Util.Cache.Lru<T> : Geary.BaseObject {
-     private class CacheEntry<T> {
- 
- 
--        public static int lru_compare(CacheEntry<T> a, CacheEntry<T> b) {
-+        public static int lru_compare(CacheEntry a, CacheEntry b) {
-             if (a.key == b.key) {
-                 return 0;
-             }
--- 
-2.35.1
-
diff --git a/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0002-Fix-accessibility-issues-with-initializer-of-constan.patch b/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0002-Fix-accessibility-issues-with-initializer-of-constan.patch
deleted file mode 100644
index 76315f3..0000000
--- a/meta-openembedded/meta-gnome/recipes-connectivity/geary/geary/0002-Fix-accessibility-issues-with-initializer-of-constan.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 64b56e75a54a9fa3f37c7686be97a5c8818413a4 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz@ubuntu.com>
-Date: Tue, 30 Nov 2021 15:31:31 +0100
-Subject: [PATCH 2/2] Fix accessibility issues with initializer of constants
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/geary/-/commit/9bd4c82952a0a2c3308c5cc86c0b85650c1fb484]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/client/application/application-client.vala | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
-index 6ce19ce2..e6ba8533 100644
---- a/src/client/application/application-client.vala
-+++ b/src/client/application/application-client.vala
-@@ -8,16 +8,16 @@
- 
- // Defined by CMake build script.
- extern const string GETTEXT_PACKAGE;
--extern const string _APP_ID;
--extern const string _BUILD_ROOT_DIR;
--extern const string _GSETTINGS_DIR;
--extern const string _INSTALL_PREFIX;
--extern const string _NAME_SUFFIX;
-+public extern const string _APP_ID;
-+public extern const string _BUILD_ROOT_DIR;
-+public extern const string _GSETTINGS_DIR;
-+public extern const string _INSTALL_PREFIX;
-+public extern const string _NAME_SUFFIX;
- extern const string _PLUGINS_DIR;
- extern const string _PROFILE;
- extern const string _REVNO;
--extern const string _SOURCE_ROOT_DIR;
--extern const string _VERSION;
-+public extern const string _SOURCE_ROOT_DIR;
-+public extern const string _VERSION;
- extern const string _WEB_EXTENSIONS_DIR;
- 
- 
--- 
-2.35.1
-
diff --git a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch
new file mode 100644
index 0000000..618b4cc
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch
@@ -0,0 +1,30 @@
+From 5711ccfab40e304ced7f5be39a4083e3fcecff91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 22:22:41 -0700
+Subject: [PATCH] configure: Keep first line of compiler version string
+
+Full output of cc -v may contain additional information which could
+contain build path information, which is unnessasary
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/926]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c25415d..68707a0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -599,7 +599,7 @@ fi
+ for CC_VERSION_OPT in $CC_VERSION_OPTS; do
+   # We run $CC, and escape and format its output, in a single step,
+   # since some shells expand escape sequences in "echo" arguments.
+-  CC_VERSION="`$CC $CC_VERSION_OPT 2>&1 | sed -e 's/\\\\/\\\\\\\\\\\\\\\\/g;s/^/\\\\t/;s/$/\\\\n/' | tr -d '\n'`"
++  CC_VERSION="`$CC $CC_VERSION_OPT 2>&1 | head -1 | sed -e 's/\\\\/\\\\\\\\\\\\\\\\/g;s/^/\\\\t/;s/$/\\\\n/' | tr -d '\n'`"
+   if test $? -eq 0; then
+     break
+   fi
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch
new file mode 100644
index 0000000..cec0055
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch
@@ -0,0 +1,34 @@
+From c720df90dfe3a3e92e34bfb36a04cc792064a501 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 22:39:02 -0700
+Subject: [PATCH] libtool: Do not add build time library paths to
+ LD_LIBRARY_PATH
+
+This does not serve much purpose on cross builds as it will add build
+time paths which are only useful when trying to run these tools from
+build area but when they are cross built this is not possible to run
+them like this.
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 134902c..068d74a 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5748,7 +5748,7 @@ func_exec_program ()
+ 	if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ 	  $ECHO "\
+     # Add our own library path to $shlibpath_var
+-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
++    $shlibpath_var=\"$shlibpath_var\"
+ 
+     # Some systems cannot cope with colon-terminated $shlibpath_var
+     # The second colon is a workaround for a bug in BeOS R4 sed
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
index 76825d9..7343036 100644
--- a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
+++ b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
@@ -43,7 +43,9 @@
 
 SHPV = "${@gnome_verdir("${PV}")}"
 
-SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2"
+SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \
+           file://0001-configure-Keep-first-line-of-compiler-version-string.patch \
+           file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch"
 SRC_URI[sha256sum] = "84004642d351b398a4293cd7fd3592044a944f05bb52850ee6068f247c657aa3"
 
 EXTRA_OECONF = "--disable-python \
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/eog/eog/0001-Replace-filename-with-basename.patch b/meta-openembedded/meta-gnome/recipes-gnome/eog/eog/0001-Replace-filename-with-basename.patch
new file mode 100644
index 0000000..26d7578
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/eog/eog/0001-Replace-filename-with-basename.patch
@@ -0,0 +1,48 @@
+From d00edda1f57f904e1590828bea3cedb53d789c48 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 20:33:59 -0700
+Subject: [PATCH] Replace filename with basename
+
+This avoids emitting absolute paths into generated sourcecode, it
+improves reproducibility. See [1]
+
+[1] https://developer-old.gnome.org/gobject/stable/glib-mkenums.html
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/eog/-/merge_requests/154]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/eog-enum-types.c.template | 4 ++--
+ src/eog-enum-types.h.template | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/eog-enum-types.c.template b/src/eog-enum-types.c.template
+index 0249baf..1013dcf 100644
+--- a/src/eog-enum-types.c.template
++++ b/src/eog-enum-types.c.template
+@@ -4,8 +4,8 @@
+ /*** END file-header ***/
+ 
+ /*** BEGIN file-production ***/
+-/* enumerations from "@filename@" */
+-#include "@filename@"
++/* enumerations from "@basename@" */
++#include "@basename@"
+ 
+ /*** END file-production ***/
+ 
+diff --git a/src/eog-enum-types.h.template b/src/eog-enum-types.h.template
+index bc3c195..8f4e916 100644
+--- a/src/eog-enum-types.h.template
++++ b/src/eog-enum-types.h.template
+@@ -8,7 +8,7 @@ G_BEGIN_DECLS
+ /*** END file-header ***/
+ 
+ /*** BEGIN file-production ***/
+-/* Enumerations from "@filename@" */
++/* Enumerations from "@basename@" */
+ 
+ /*** END file-production ***/
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_44.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_44.1.bb
index fad7de6..0b7cfca 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_44.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/eog/eog_44.1.bb
@@ -19,8 +19,10 @@
 
 inherit gnomebase pkgconfig gsettings gobject-introspection gettext mime-xdg features_check gtk-icon-cache
 
-REQUIRED_DISTRO_FEATURES = "opengl"
+# FIXME: whilst eog uses libpeas <2, g-i is needed. This can be removed when libpeas2 is used.
+REQUIRED_DISTRO_FEATURES = "opengl gobject-introspection-data"
 
+SRC_URI += "file://0001-Replace-filename-with-basename.patch"
 SRC_URI[archive.sha256sum] = "e2c963f232fe5a1091dcc18bec25a730e91b02af6e466601efa55e500cd74cab"
 
 GTKDOC_MESON_OPTION = "gtk_doc"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_44.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_44.1.bb
index a2a6f9a..a844324 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_44.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/evince/evince_44.1.bb
@@ -47,8 +47,8 @@
 PACKAGES =+ "${PN}-nautilus-extension"
 
 do_install:prepend() {
-    sed -i -e 's|${B}/||g' ${B}/libview/ev-view-type-builtins.c
-    sed -i -e 's|${B}/||g' ${B}/libdocument/ev-document-type-builtins.c
+    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/libview/ev-view-type-builtins.c
+    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/libdocument/ev-document-type-builtins.c
 }
 
 FILES:${PN} += "${datadir}/dbus-1 \
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_43.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_44.1.bb
similarity index 92%
rename from meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_43.2.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_44.1.bb
index 830f3ec..a64c241 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_43.2.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_44.1.bb
@@ -37,9 +37,10 @@
 REQUIRED_DISTRO_FEATURES += "opengl polkit pulseaudio systemd x11"
 
 SRC_URI += "file://0001-Add-meson-option-to-pass-sysroot.patch"
-SRC_URI[archive.sha256sum] = "d7f256aba80a92c727b329fd01c8602da4b78f0fddaec93fcd91096964700563"
+SRC_URI[archive.sha256sum] = "7abd365018e28679def60a5ecd3049db0fb85de6da49a96dadd21fba8db002e7"
 
 PACKAGECONFIG ??= "ibus ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
+PACKAGECONFIG[cups] = ",,cups,cups"
 PACKAGECONFIG[ibus] = "-Dibus=true, -Dibus=false, ibus"
 PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false, wayland"
 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb
index eae9d9d..03411c8 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_44.0.bb
@@ -11,8 +11,6 @@
 inherit gnomebase itstool pkgconfig upstream-version-is-even gobject-introspection features_check gtk-doc
 
 REQUIRED_DISTRO_FEATURES = "x11 opengl"
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES += "gobject-introspection-data"
 
 GIR_MESON_OPTION = ""
 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_3.36.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_3.36.0.bb
index dbc6e96..fa16251 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_3.36.0.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-menus/gnome-menus_3.36.0.bb
@@ -4,11 +4,9 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
 
-DEPENDS = "python3 libxml2 popt gtk+3 gnome-common-native"
+DEPENDS = "glib-2.0"
 
-inherit features_check gnomebase gettext pkgconfig gobject-introspection upstream-version-is-even
-
-REQUIRED_DISTRO_FEATURES = "x11"
+inherit gnomebase gettext pkgconfig gobject-introspection upstream-version-is-even
 
 SRC_URI[archive.md5sum] = "a8fd71fcf31a87fc799d80396a526829"
 SRC_URI[archive.sha256sum] = "d9348f38bde956fc32753b28c1cde19c175bfdbf1f4d5b06003b3aa09153bb1f"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-photos/gnome-photos_44.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-photos/gnome-photos_44.0.bb
index cdf9780..066a50e 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-photos/gnome-photos_44.0.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-photos/gnome-photos_44.0.bb
@@ -31,7 +31,7 @@
 def gnome_verdir(v):
     return oe.utils.trim_version(v, 1)
 
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+REQUIRED_DISTRO_FEATURES = "x11 opengl gobject-introspection-data"
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[doc] = "-Dmanuals=true,-Dmanuals=false,libxslt-native docbook-xsl-stylesheets-native"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_44.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_44.1.bb
similarity index 100%
rename from meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_44.0.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell-extensions_44.1.bb
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_43.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_44.1.bb
similarity index 95%
rename from meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_43.2.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_44.1.bb
index d3bd357..f8f500a 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_43.2.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_44.1.bb
@@ -32,7 +32,7 @@
 # gobject-introspection is mandatory and cannot be configured
 REQUIRED_DISTRO_FEATURES += "gobject-introspection-data"
 
-SRC_URI[archive.sha256sum] = "e76fd4be9342410ee9fbdcdd6b2d81c6ff060e7c8cc5a0f1cae6a7aba25d1860"
+SRC_URI[archive.sha256sum] = "0bfbe4394d267625154d08d01467bdbd99e8157512fc8df45d5c02ddb7551ca6"
 SRC_URI += "file://0001-Introduce-options-gjs_path-to-optionally-set-path-to.patch"
 
 PACKAGECONFIG ??= "bluetooth nm ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-build-Fix-for-newer-meson.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-build-Fix-for-newer-meson.patch
deleted file mode 100644
index 12520b1..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-build-Fix-for-newer-meson.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From f88447850e162c8d514be367db574c6fa2fec2a5 Mon Sep 17 00:00:00 2001
-From: Christian Persch <chpe@src.gnome.org>
-Date: Fri, 14 Jan 2022 11:33:32 +0100
-Subject: [PATCH] build: Fix for newer meson
-
-Upstream-Status: Backport
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- data/meson.build | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/data/meson.build b/data/meson.build
-index 79d97e5..e0bcbb9 100644
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -18,7 +18,6 @@
- metainfodir = gt_datadir / 'metainfo'
- 
- i18n.merge_file(
--  gt_dns_name + '.metainfo.xml',
-   input: gt_dns_name + '.metainfo.xml.in',
-   output: '@BASENAME@',
-   po_dir: po_dir,
-@@ -27,7 +26,6 @@ i18n.merge_file(
- )
- 
- i18n.merge_file(
--  gt_dns_name + '.Nautilus.metainfo.xml',
-   input: gt_dns_name + '.Nautilus.metainfo.xml.in',
-   output: '@BASENAME@',
-   po_dir: po_dir,
-@@ -40,7 +38,6 @@ i18n.merge_file(
- desktopdatadir = gt_datadir / 'applications'
- 
- i18n.merge_file(
--  gt_dns_name + '.desktop',
-   input: gt_dns_name + '.desktop.in',
-   output: '@BASENAME@',
-   type: 'desktop',
-@@ -57,4 +54,4 @@ meson.add_install_script(
- 
- # Subdirs
- 
--subdir('icons')
-\ No newline at end of file
-+subdir('icons')
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.1.bb
similarity index 85%
rename from meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.0.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.1.bb
index 75e609d..13b440d 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.0.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.48.1.bb
@@ -20,9 +20,10 @@
     libpcre2 \
 "
 
-SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1"
-SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch"
-SRCREV = "a85ecc959344ee2e0d345f7dd081dc781d95d364"
+SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1 \
+           file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
+           "
+SRCREV = "1446ff0abc478bdd03c6665b718214d075729024"
 S = "${WORKDIR}/git"
 
 PACKAGECONFIG ?= ""
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo-plugins_0.3.16.bb b/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo-plugins_0.3.16.bb
index 00474ce..91cbe82 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo-plugins_0.3.16.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo-plugins_0.3.16.bb
@@ -7,7 +7,6 @@
     gperf-native \
     itstool-native \
     grilo \
-    tracker \
     lua \
     liboauth \
 "
@@ -19,4 +18,7 @@
 SRC_URI += "file://0001-Avoid-running-trackertestutils.patch"
 SRC_URI[archive.sha256sum] = "fe6f4dbe586c6b8ba2406394e202f22d009d642a96eb3a54f32f6a21d084cdcb"
 
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', 'tracker', '', d)}"
+PACKAGECONFIG[tracker] = "-Denable-tracker3=yes,-Denable-tracker3=no,tracker"
+
 FILES:${PN} += "${libdir}/grilo-0.3"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.15.bb b/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
similarity index 90%
rename from meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.15.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
index 526a859..e86f75f 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.15.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/grilo/grilo_0.3.16.bb
@@ -11,7 +11,7 @@
 
 inherit gnomebase gobject-introspection gtk-doc gettext vala
 
-SRC_URI[archive.sha256sum] = "f352acf73665669934270636fede66b52da6801fe20f638c4048ab2678577b2d"
+SRC_URI[archive.sha256sum] = "884580e8c5ece280df23aa63ff5234b7d48988a404df7d6bfccd1e77b473bd96"
 
 GIR_MESON_OPTION = "enable-introspection"
 GTKDOC_MESON_OPTION = "enable-gtk-doc"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_43.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_44.1.bb
similarity index 89%
rename from meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_43.1.bb
rename to meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_44.1.bb
index 9b764c6..1060e91 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_43.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_44.1.bb
@@ -25,7 +25,7 @@
 
 inherit gnomebase gsettings gobject-introspection gettext features_check
 
-SRC_URI[archive.sha256sum] = "f2f08b252783948a5ecc82f00e9e935a61ebbf8564844bdd92788ab44aa78264"
+SRC_URI[archive.sha256sum] = "973aeafab42f06f934a0994fc84878958cdb4d2766a4c867a5ccdc547dd57056"
 
 # x11 is still manadatory - see meson.build
 REQUIRED_DISTRO_FEATURES = "wayland x11 polkit"
@@ -60,7 +60,13 @@
 PACKAGECONFIG[profiler] = "-Dprofiler=true,-Dprofiler=false,sysprof"
 PACKAGECONFIG[startup-notification] = "-Dstartup_notification=true, -Dstartup_notification=false, startup-notification, startup-notification"
 
-MUTTER_API_NAME = "mutter-11"
+MUTTER_API_NAME = "mutter-12"
+
+do_install:prepend() {
+    sed -i -e 's|${B}/||g' ${B}/clutter/clutter/clutter-enum-types.c
+    sed -i -e 's|${B}/||g' ${B}/src/meta-private-enum-types.c
+    sed -i -e 's|${B}/||g' ${B}/src/meta/meta-enum-types.c
+}
 
 do_install:append() {
     # Add gir links in standard paths. That makes dependents life much easier
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Replace-filename-with-basename.patch b/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Replace-filename-with-basename.patch
new file mode 100644
index 0000000..dbf42a9
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Replace-filename-with-basename.patch
@@ -0,0 +1,46 @@
+From 4ec1f99f170033138036d6547dce9b7dcf541338 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 07:56:33 -0700
+Subject: [PATCH] Replace filename with basename
+
+This avoids emitting absolute paths into generated sourcecode, it
+improves reproducibility. See [1]
+
+[1] https://developer-old.gnome.org/gobject/stable/glib-mkenums.html
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1211]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/nautilus-enum-types.c.template | 2 +-
+ src/nautilus-enum-types.h.template | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/nautilus-enum-types.c.template b/src/nautilus-enum-types.c.template
+index 9d8ac83..a757949 100644
+--- a/src/nautilus-enum-types.c.template
++++ b/src/nautilus-enum-types.c.template
+@@ -4,7 +4,7 @@
+ /*** END file-header ***/
+ 
+ /*** BEGIN file-production ***/
+-/* Enumerations from "@filename@" */
++/* Enumerations from "@basename@" */
+ #include "@filename@"
+ 
+ /*** END file-production ***/
+diff --git a/src/nautilus-enum-types.h.template b/src/nautilus-enum-types.h.template
+index 399bbca..7eb6c54 100644
+--- a/src/nautilus-enum-types.h.template
++++ b/src/nautilus-enum-types.h.template
+@@ -8,7 +8,7 @@ G_BEGIN_DECLS
+ /*** END file-header ***/
+ 
+ /*** BEGIN file-production ***/
+-/* Enumerations from "@filename@" */
++/* Enumerations from "@basename@" */
+ 
+ /*** END file-production ***/
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_44.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_44.1.bb
index 9c60d15..65bef45 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_44.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/nautilus/nautilus_44.1.bb
@@ -26,9 +26,10 @@
 def gnome_verdir(v):
     return oe.utils.trim_version(v, 1)
 
+SRC_URI += "file://0001-Replace-filename-with-basename.patch"
 SRC_URI[archive.sha256sum] = "360802a595e3edbad962c8cea353b62baa8be407513b5162c89c933ca5387aa9"
 
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+REQUIRED_DISTRO_FEATURES = "x11 opengl gobject-introspection-data"
 
 EXTRA_OEMESON += " \
     -Dtests=none \
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker/0001-meson-Do-not-define-TOP_SRCDIR.patch b/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker/0001-meson-Do-not-define-TOP_SRCDIR.patch
new file mode 100644
index 0000000..5c6ab71
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker/0001-meson-Do-not-define-TOP_SRCDIR.patch
@@ -0,0 +1,24 @@
+From 3e262192ffebf5d6fec92d5b7ba08348a94df1ae Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 25 May 2023 20:54:47 -0700
+Subject: [PATCH] meson: Do not define TOP_SRCDIR
+
+This is passed from build env
+
+Upstream-Status: Inappropriate [Cross compile specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/meson.build
++++ b/meson.build
+@@ -353,7 +353,7 @@ subdir('utils')
+ 
+ test_c_args = tracker_c_args + [
+     '-DTOP_BUILDDIR="@0@"'.format(build_root),
+-    '-DTOP_SRCDIR="@0@"'.format(source_root),
++    '-DTOP_SRCDIR="@0@"'.format('/usr/src/debug/tracker'),
+ ]
+ 
+ tracker_uninstalled_cli_dir = join_paths(meson.current_build_dir(), 'src', 'tracker')
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
index 8489043..6dd8af23 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
@@ -22,6 +22,7 @@
 
 inherit gnomebase gsettings gobject-introspection vala gtk-doc manpages bash-completion features_check python3native
 
+SRC_URI += "file://0001-meson-Do-not-define-TOP_SRCDIR.patch"
 SRC_URI[archive.sha256sum] = "f972d50ac7bafdccf113b1eb99dcae35404685a99e55bfef16f3ac83b4de974d"
 
 # gobject-introspection is mandatory and cannot be configured
diff --git a/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.bb b/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.bb
index 7156081..141341e 100644
--- a/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.bb
+++ b/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.bb
@@ -38,4 +38,4 @@
 FILES:${PN}-dev += " \
     ${datadir}/gettext \
 "
-
+RDEPENDS:${PN} += "python3-core"
diff --git a/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.inc b/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.inc
index bb662f2..9579404 100644
--- a/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.inc
+++ b/meta-openembedded/meta-gnome/recipes-support/ibus/ibus.inc
@@ -31,6 +31,9 @@
     --disable-emoji-dict \
     --disable-python2 \
 "
+EXTRA_OECONF:append:class-target = "\
+    --with-python=${bindir}/python3 \
+"
 
 do_configure:prepend() {
     touch ${S}/ChangeLog
diff --git a/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb b/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb
index 7c09e39..bd2df5d 100644
--- a/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb
+++ b/meta-openembedded/meta-multimedia/recipes-dvb/oscam/oscam_svn.bb
@@ -8,7 +8,7 @@
 
 SRC_URI = "svn://www.streamboard.tv/svn/oscam;module=trunk;protocol=http \
            "
-SRCREV = "11491"
+SRCREV = "11718"
 PV = "1.10+${SRCPV}"
 
 S = "${WORKDIR}/trunk"
@@ -17,3 +17,6 @@
 
 EXTRA_OECMAKE = "-DDEFAULT_CS_CONFDIR=${sysconfdir} -DCMAKE_BUILD_TYPE=Debug"
 
+do_configure:append() {
+    sed -i -e '1 s|${TOPDIR}|<TOPDIR>|g' ${B}/config.c
+}
diff --git a/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
index b3e5e78..d64ee96 100644
--- a/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
+++ b/meta-openembedded/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
@@ -30,3 +30,7 @@
 
 EXTRA_OEMAKE = "CFLAGS_NO_WERROR=yes"
 CLEANBROKEN = "1"
+
+do_configure:append() {
+    sed -i -e "s|${WORKDIR}|<TOPDIR>|g" ${B}/build.linux/build.c
+}
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom/0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom/0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch
index 100507c..8a8350e 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom/0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom/0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch
@@ -1,6 +1,6 @@
-From c33e07f78982acfb0574a84fb523f8591e55c50e Mon Sep 17 00:00:00 2001
+From 35c1ed84a158354c37e329bad0e236b156836ac7 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 11 Sep 2022 19:46:28 -0700
+Date: Tue, 23 May 2023 14:59:26 -0700
 Subject: [PATCH] subpel_variance_neon: Provide prototypes for missing
  functions
 
@@ -11,18 +11,19 @@
 |          ^
 
 Upstream-Status: Pending
+
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- aom_dsp/arm/subpel_variance_neon.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
+ aom_dsp/arm/subpel_variance_neon.c | 76 ++++++++++++++++++++++++++++++
+ 1 file changed, 76 insertions(+)
 
 diff --git a/aom_dsp/arm/subpel_variance_neon.c b/aom_dsp/arm/subpel_variance_neon.c
-index 4ecf891cbeb..859168ea0c5 100644
+index a05886066c4..ea6bada224d 100644
 --- a/aom_dsp/arm/subpel_variance_neon.c
 +++ b/aom_dsp/arm/subpel_variance_neon.c
-@@ -20,6 +20,22 @@
- #include "aom_dsp/aom_filter.h"
+@@ -20,6 +20,82 @@
  #include "aom_dsp/variance.h"
+ #include "aom_dsp/arm/mem_neon.h"
  
 +extern unsigned int aom_variance8x8_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
@@ -32,17 +33,77 @@
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
++extern unsigned int aom_variance16x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance16x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
 +extern unsigned int aom_variance32x32_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
++extern unsigned int aom_variance32x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
 +extern unsigned int aom_variance64x64_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
- // Load 2 sets of 4 bytes when alignment is not guaranteed.
- static INLINE uint8x8_t load_unaligned_u8(const uint8_t *buf, int stride) {
-   uint32_t a;
++extern unsigned int aom_variance64x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
+ static void var_filter_block2d_bil_w4(const uint8_t *src_ptr, uint8_t *dst_ptr,
+                                       int src_stride, int pixel_step,
+                                       int dst_height, int filter_offset) {
 -- 
-2.37.3
+2.40.1
 
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb
deleted file mode 100644
index 9cd6f7a..0000000
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Alliance for Open Media - AV1 Codec Library"
-DESCRIPTION = "Alliance for Open Media AV1 codec library"
-
-LICENSE = "BSD-2-Clause & AOM-Patent-License-1.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6ea91368c1bbdf877159435572b931f5 \
-                    file://PATENTS;md5=e69ad12202bd20da3c76a5d3648cfa83 \
-                   "
-
-SRC_URI = "git://aomedia.googlesource.com/aom;protocol=https;branch=main \
-           file://0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch \
-          "
-
-SRCREV = "fd0c9275d36930a6eea6d3c35972e7cf9c512944"
-
-S = "${WORKDIR}/git"
-
-inherit cmake pkgconfig
-DEPENDS = " yasm-native"
-
-EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 \
-                  -DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl \
-                "
-
-CFLAGS:append:libc-musl = " -D_GNU_SOURCE"
-EXTRA_OECMAKE:append:arm = " ${@bb.utils.contains("TUNE_FEATURES","neon","-DENABLE_NEON=ON","-DENABLE_NEON=OFF",d)}"
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb
new file mode 100644
index 0000000..45dd487
--- /dev/null
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Alliance for Open Media - AV1 Codec Library"
+DESCRIPTION = "Alliance for Open Media AV1 codec library"
+
+LICENSE = "BSD-2-Clause & AOM-Patent-License-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6ea91368c1bbdf877159435572b931f5 \
+                    file://PATENTS;md5=a111d47497d3bb49e04eef71377eb8ba \
+                   "
+SRCREV = "7ade96172b95adc91a5d85bf80c90989cd543ee8"
+SRC_URI = "git://aomedia.googlesource.com/aom;protocol=https;branch=main \
+           file://0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+DEPENDS = " nasm-native"
+
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 \
+                 -DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl \
+                "
+CMAKE_VERBOSE = "VERBOSE=1"
+CFLAGS:append:libc-musl = " -D_GNU_SOURCE"
+EXTRA_OECMAKE:append:arm = " ${@bb.utils.contains("TUNE_FEATURES","neon","-DENABLE_NEON=ON","-DENABLE_NEON=OFF",d)}"
+
+do_generate_toolchain_file:append() {
+    echo "set(AOM_AS_FLAGS --debug-prefix-map ${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR})" >> ${WORKDIR}/toolchain.cmake
+}
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.1.0.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.2.0.bb
similarity index 89%
rename from meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.1.0.bb
rename to meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.2.0.bb
index 33dbef3..5d43921 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.1.0.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/dav1d/dav1d_1.2.0.bb
@@ -7,7 +7,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=c8055cfe7548dfdaa3a6dc45d8793669"
 
 SRC_URI = "git://code.videolan.org/videolan/dav1d.git;protocol=https;branch=master"
-SRCREV = "9593e625b75d498d1edea544da21ea764b98d507"
+SRCREV = "676a864a11af2c0522e1f992e770589543894686"
 
 S = "${WORKDIR}/git"
 
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth-native_git.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth-native_git.bb
deleted file mode 100644
index a95c4c4..0000000
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth-native_git.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ${BPN}.inc
-
-inherit native
-
-OECMAKE_SOURCEPATH = "${S}/src/gentables"
-
-do_install() {
-    install -d ${D}/${bindir}
-    install -m 755 ${B}/make_tables.exe ${D}/${bindir}/
-}
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc b/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc
deleted file mode 100644
index a4590d6..0000000
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "Fluidsynth is a software synthesizer"
-HOMEPAGE = "http://www.fluidsynth.org/"
-SECTION = "libs/multimedia"
-LICENSE = "LGPL-2.1-only"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
-
-SRC_URI = "git://github.com/FluidSynth/fluidsynth.git;branch=master;protocol=https"
-SRCREV = "8b00644751578ba67b709a827cbe5133d849d339"
-S = "${WORKDIR}/git"
-PV = "2.2.6"
-
-inherit cmake pkgconfig lib_package
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth/0001-Do-not-build-gentables-helper-we-have-to-use-native-.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth/0001-Do-not-build-gentables-helper-we-have-to-use-native-.patch
deleted file mode 100644
index cc73bdb..0000000
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth/0001-Do-not-build-gentables-helper-we-have-to-use-native-.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 81ea820b155e887b13ea5986c3407cf93b2737f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Wed, 2 Jan 2019 18:42:46 +0100
-Subject: [PATCH] Do not build gentables helper - we have to use native variant
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- src/CMakeLists.txt | 23 +----------------------
- 1 file changed, 1 insertion(+), 22 deletions(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 356bb734..58ff7635 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -399,25 +399,4 @@ else ( MACOSX_FRAMEWORK )
-    install ( FILES ${public_main_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR} )
- endif ( MACOSX_FRAMEWORK )
- 
--# ******* Auto Generated Lookup Tables ******
--
--include(ExternalProject)
--
--set (GENTAB_SDIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables)
--set (GENTAB_BDIR ${CMAKE_CURRENT_BINARY_DIR}/gentables)
--
--# Use external project to ensure that cmake uses the host compiler when building make_tables.exe
--# To fix cross-compiling fluidsynth from Win32 to ARM (using vcpkg), we need to pass the current generator
--# on to the external project, otherwise (for some unknown reason) the target compiler will be used rather
--# than the host compiler.
--ExternalProject_Add(gentables
--    DOWNLOAD_COMMAND ""
--    SOURCE_DIR ${GENTAB_SDIR}
--    BINARY_DIR ${GENTAB_BDIR}
--    CONFIGURE_COMMAND
--        "${CMAKE_COMMAND}" -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} -G "${CMAKE_GENERATOR}" -B "${GENTAB_BDIR}" "${GENTAB_SDIR}"
--    BUILD_COMMAND
--        "${CMAKE_COMMAND}" --build "${GENTAB_BDIR}"
--    INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/"
--)
--add_dependencies(libfluidsynth-OBJ gentables)
-+
--- 
-2.21.1
-
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_git.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_git.bb
index 984f37b..a1083af 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_git.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth_git.bb
@@ -1,23 +1,40 @@
-require ${BPN}.inc
+SUMMARY = "Fluidsynth is a software synthesizer"
+HOMEPAGE = "http://www.fluidsynth.org/"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
 
-DEPENDS = "${BPN}-native alsa-lib ncurses glib-2.0"
+SRC_URI = "git://github.com/FluidSynth/fluidsynth.git;branch=master;protocol=https"
+SRCREV = "4d8fe638e1a48660a4c843d493f69a86579e12f0"
+S = "${WORKDIR}/git"
+PV = "2.3.2"
+
+inherit cmake pkgconfig lib_package
+
+DEPENDS = "glib-2.0"
 
 SRC_URI += " \
-    file://0001-Do-not-build-gentables-helper-we-have-to-use-native-.patch \
     file://0002-fluid_synth_nwrite_float-Allow-zero-pointer-for-left.patch \
     file://0003-Use-ARM-NEON-accelaration-for-float-multithreaded-se.patch \
 "
 
 EXTRA_OECMAKE = "-Denable-floats=ON -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}"
 
-do_configure:append() {
-    make_tables.exe ${B}/
+do_install:append() {
+    sed -i -e 's|${STAGING_LIBDIR}|${libdir}|g' ${D}${libdir}/pkgconfig/fluidsynth.pc
+    sed -i -e 's|${STAGING_LIBDIR}|${libdir}|g' ${D}${libdir}/cmake/fluidsynth/FluidSynthTargets.cmake
 }
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)}"
-PACKAGECONFIG[sndfile] = "-Denable-libsndfile=ON,-Denable-libsndfile=OFF,libsndfile1"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio pipewire systemd alsa dbus', d)}"
+PACKAGECONFIG[alsa] = "-Denable-alsa=ON,-Denable-alsa=OFF,alsa-lib"
+PACKAGECONFIG[dbus] = "-Denable-dbus=ON,-Denable-dbus=OFF,dbus"
 PACKAGECONFIG[jack] = "-Denable-jack=ON,-Denable-jack=OFF,jack"
-PACKAGECONFIG[pulseaudio] = "-Denable-pulseaudio=ON,-Denable-pulseaudio=OFF,pulseaudio"
+PACKAGECONFIG[oss] = "-Denable-oss=ON,-Denable-oss=OFF"
+PACKAGECONFIG[pipewire] = "-Denable-pipewire=ON,-Denable-pipewire=OFF,pipewire"
 PACKAGECONFIG[portaudio] = "-Denable-portaudio=ON,-Denable-portaudio=OFF,portaudio-v19"
 PACKAGECONFIG[profiling] = "-Denable-profiling=ON,-Denable-profiling=OFF"
+PACKAGECONFIG[pulseaudio] = "-Denable-pulseaudio=ON,-Denable-pulseaudio=OFF,pulseaudio"
 PACKAGECONFIG[readline] = "-Denable-readline=ON,-Denable-readline=OFF,readline"
+PACKAGECONFIG[sdl] = "-Denable-sdl2=ON,-Denable-sdl2=OFF,libsdl2"
+PACKAGECONFIG[sndfile] = "-Denable-libsndfile=ON,-Denable-libsndfile=OFF,libsndfile1"
+PACKAGECONFIG[systemd] = "-Denable-systemd=ON,-Denable-systemd=OFF,systemd"
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-Fix-build-against-fmt-10.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-Fix-build-against-fmt-10.patch
new file mode 100644
index 0000000..2da98cf
--- /dev/null
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-Fix-build-against-fmt-10.patch
@@ -0,0 +1,168 @@
+From 2c08724e8a7e3a0ee8cdd91246a714a17f2ba5c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 17 May 2023 17:31:56 -0700
+Subject: [PATCH] Fix build against fmt 10+
+
+Fixes
+git/src/config/setup/config_setup_vector.cc:191:9:   required from here
+| /home/hains/openpli-dm920-python3/build/tmp/work/cortexa15hf-neon-vfpv4-oe-linux-gnueabi/gerbera/1.11.0-r0/
+recipe-sysroot/usr/include/fmt/core.h:1691:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
+|  1691 |       formattable,
+|       |       ^~~~~~~~~~~
+
+Source: https://github.com/Hains/openpli-dm920-python3/commit/688ae121bd3928925a8656bd4aaf3857d8e8a8ed
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/config/setup/config_setup_array.cc       | 6 +++---
+ src/config/setup/config_setup_autoscan.cc    | 2 +-
+ src/config/setup/config_setup_client.cc      | 2 +-
+ src/config/setup/config_setup_dictionary.cc  | 6 +++---
+ src/config/setup/config_setup_dynamic.cc     | 2 +-
+ src/config/setup/config_setup_transcoding.cc | 2 +-
+ src/config/setup/config_setup_tweak.cc       | 2 +-
+ src/config/setup/config_setup_vector.cc      | 4 ++--
+ 8 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/config/setup/config_setup_array.cc b/src/config/setup/config_setup_array.cc
+index 8f3cf1db..efc9b501 100644
+--- a/src/config/setup/config_setup_array.cc
++++ b/src/config/setup/config_setup_array.cc
+@@ -136,11 +136,11 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
+     std::vector<std::string> result;
+     if (initArray) {
+         if (!initArray(optValue, result, ConfigDefinition::mapConfigOption(nodeOption))) {
+-            throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
++            throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.value());
+         }
+     } else {
+         if (!createOptionFromNode(optValue, result)) {
+-            throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
++            throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.value());
+         }
+     }
+     if (result.empty()) {
+@@ -149,7 +149,7 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
+         result = defaultEntries;
+     }
+     if (notEmpty && result.empty()) {
+-        throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue);
++        throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue.value());
+     }
+     return result;
+ }
+diff --git a/src/config/setup/config_setup_autoscan.cc b/src/config/setup/config_setup_autoscan.cc
+index e882ca3e..d773419b 100644
+--- a/src/config/setup/config_setup_autoscan.cc
++++ b/src/config/setup/config_setup_autoscan.cc
+@@ -203,7 +203,7 @@ std::shared_ptr<ConfigOption> ConfigAutoscanSetup::newOption(const pugi::xml_nod
+ {
+     auto result = std::vector<AutoscanDirectory>();
+     if (!createOptionFromNode(optValue, result)) {
+-        throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue.value());
+     }
+     optionValue = std::make_shared<AutoscanListOption>(result);
+     return optionValue;
+diff --git a/src/config/setup/config_setup_client.cc b/src/config/setup/config_setup_client.cc
+index 30bb98cb..56be9c53 100644
+--- a/src/config/setup/config_setup_client.cc
++++ b/src/config/setup/config_setup_client.cc
+@@ -163,7 +163,7 @@ std::shared_ptr<ConfigOption> ConfigClientSetup::newOption(const pugi::xml_node&
+     auto result = std::make_shared<ClientConfigList>();
+ 
+     if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
+-        throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue.value());
+     }
+     optionValue = std::make_shared<ClientConfigListOption>(result);
+     return optionValue;
+diff --git a/src/config/setup/config_setup_dictionary.cc b/src/config/setup/config_setup_dictionary.cc
+index eb91c694..ea2aaa05 100644
+--- a/src/config/setup/config_setup_dictionary.cc
++++ b/src/config/setup/config_setup_dictionary.cc
+@@ -162,11 +162,11 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
+     std::map<std::string, std::string> result;
+     if (initDict) {
+         if (!initDict(optValue, result)) {
+-            throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
++            throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.value());
+         }
+     } else {
+         if (!createOptionFromNode(optValue, result) && required) {
+-            throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
++            throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.value());
+         }
+     }
+     if (result.empty()) {
+@@ -175,7 +175,7 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
+         result = defaultEntries;
+     }
+     if (notEmpty && result.empty()) {
+-        throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue);
++        throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue.value());
+     }
+     return result;
+ }
+diff --git a/src/config/setup/config_setup_dynamic.cc b/src/config/setup/config_setup_dynamic.cc
+index 6a43b820..93030b85 100644
+--- a/src/config/setup/config_setup_dynamic.cc
++++ b/src/config/setup/config_setup_dynamic.cc
+@@ -179,7 +179,7 @@ std::shared_ptr<ConfigOption> ConfigDynamicContentSetup::newOption(const pugi::x
+     auto result = std::make_shared<DynamicContentList>();
+ 
+     if (!createOptionFromNode(optValue, result)) {
+-        throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue.value());
+     }
+     optionValue = std::make_shared<DynamicContentListOption>(result);
+     return optionValue;
+diff --git a/src/config/setup/config_setup_transcoding.cc b/src/config/setup/config_setup_transcoding.cc
+index 4827f109..c353ce1f 100644
+--- a/src/config/setup/config_setup_transcoding.cc
++++ b/src/config/setup/config_setup_transcoding.cc
+@@ -492,7 +492,7 @@ std::shared_ptr<ConfigOption> ConfigTranscodingSetup::newOption(const pugi::xml_
+     auto result = std::make_shared<TranscodingProfileList>();
+ 
+     if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
+-        throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue.value());
+     }
+     optionValue = std::make_shared<TranscodingProfileListOption>(result);
+     return optionValue;
+diff --git a/src/config/setup/config_setup_tweak.cc b/src/config/setup/config_setup_tweak.cc
+index d7692c09..72c2beb2 100644
+--- a/src/config/setup/config_setup_tweak.cc
++++ b/src/config/setup/config_setup_tweak.cc
+@@ -242,7 +242,7 @@ std::shared_ptr<ConfigOption> ConfigDirectorySetup::newOption(const pugi::xml_no
+     auto result = std::make_shared<DirectoryConfigList>();
+ 
+     if (!createOptionFromNode(optValue, result)) {
+-        throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue.value());
+     }
+     optionValue = std::make_shared<DirectoryTweakOption>(result);
+     return optionValue;
+diff --git a/src/config/setup/config_setup_vector.cc b/src/config/setup/config_setup_vector.cc
+index c8ff853d..91f99ca4 100644
+--- a/src/config/setup/config_setup_vector.cc
++++ b/src/config/setup/config_setup_vector.cc
+@@ -180,7 +180,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
+ {
+     std::vector<std::vector<std::pair<std::string, std::string>>> result;
+     if (!createOptionFromNode(optValue, result) && required) {
+-        throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue);
++        throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue.value());
+     }
+     if (result.empty()) {
+         log_debug("{} assigning {} default values", xpath, defaultEntries.size());
+@@ -188,7 +188,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
+         result = defaultEntries;
+     }
+     if (notEmpty && result.empty()) {
+-        throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue);
++        throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue.value());
+     }
+     return result;
+ }
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_1.11.0.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_1.11.0.bb
index 9f2f1b0..2a6d328 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_1.11.0.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/gerbera/gerbera_1.11.0.bb
@@ -5,7 +5,8 @@
 
 SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master \
            file://0001-Fix-build-with-fmt-9.0.patch \
-          "
+           file://0001-Fix-build-against-fmt-10.patch \
+           "
 
 SRCREV = "d73d8c1346213d784753c02ea771970500e0df2a"
 
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb
index 14a20b4..6ad376f 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb
@@ -26,9 +26,10 @@
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
 
+LIBCAMERA_PIPELINES ??= "auto"
+
 EXTRA_OEMESON = " \
-    -Dpipelines=uvcvideo,simple,vimc \
-    -Dipas=vimc \
+    -Dpipelines=${LIBCAMERA_PIPELINES} \
     -Dv4l2=true \
     -Dcam=enabled \
     -Dlc-compliance=disabled \
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/libsquish/libsquish/0001-makefile-Add-LIBDIR.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/libsquish/libsquish/0001-makefile-Add-LIBDIR.patch
deleted file mode 100644
index c6eb7ac..0000000
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/libsquish/libsquish/0001-makefile-Add-LIBDIR.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 4fd08c0446ca02917014b63f9080c4205958a130 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 20 Mar 2022 01:15:32 -0700
-Subject: [PATCH] makefile: Add LIBDIR
-
-Avoid hardcoding /lib
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 1c01f89..2b1df5b 100644
---- a/Makefile
-+++ b/Makefile
-@@ -11,12 +11,12 @@ all : $(LIB) squish.pc
- 
- install : $(LIB) squish.pc
- 	install squish.h $(INSTALL_DIR)/include 
--	install libsquish.a $(INSTALL_DIR)/lib
--	install squish.pc $(INSTALL_DIR)/lib/pkgconfig
-+	install libsquish.a $(INSTALL_DIR)/$(LIBDIR)
-+	install squish.pc $(INSTALL_DIR)/$(LIBDIR)/pkgconfig
- 
- uninstall:
- 	$(RM) $(INSTALL_DIR)/include/squish.h
--	$(RM) $(INSTALL_DIR)/lib/libsquish.a
-+	$(RM) $(INSTALL_DIR)/$(LIBDIR)/libsquish.a
- 
- $(LIB) : $(OBJ)
- 	$(AR) cr $@ $?
--- 
-2.35.1
-
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch
new file mode 100644
index 0000000..37aa448
--- /dev/null
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch
@@ -0,0 +1,28 @@
+From f2fbfeeb9c4ff7aa9ba4b95604ee0fb14ecec763 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 17 May 2023 17:54:09 -0700
+Subject: [PATCH] SndfileDecoderPlugin: Fix type mismatch for std::span
+
+Fixes
+../git/src/decoder/plugins/SndfileDecoderPlugin.cxx:231:25: error: non-constant-expression cannot be narrowed from type 'sf_count_t' (aka 'long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
+                                         std::span{buffer, num_frames * frame_size},
+                                                           ^~~~~~~~~~~~~~~~~~~~~~~
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/decoder/plugins/SndfileDecoderPlugin.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/decoder/plugins/SndfileDecoderPlugin.cxx b/src/decoder/plugins/SndfileDecoderPlugin.cxx
+index ad3908847..a3cb87ca9 100644
+--- a/src/decoder/plugins/SndfileDecoderPlugin.cxx
++++ b/src/decoder/plugins/SndfileDecoderPlugin.cxx
+@@ -228,7 +228,7 @@ sndfile_stream_decode(DecoderClient &client, InputStream &is)
+ 			break;
+ 
+ 		cmd = client.SubmitAudio(is,
+-					 std::span{buffer, num_frames * frame_size},
++					 std::span{buffer, static_cast<std::size_t>(num_frames * frame_size)},
+ 					 0);
+ 		if (cmd == DecoderCommand::SEEK) {
+ 			sf_count_t c = client.GetSeekFrame();
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch
new file mode 100644
index 0000000..ebbea2b
--- /dev/null
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch
@@ -0,0 +1,71 @@
+Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/181b96dd2d71bc8f2668776719d344466f258b5d]
+
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
+
+From 181b96dd2d71bc8f2668776719d344466f258b5d Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann@gmail.com>
+Date: Mon, 15 May 2023 20:52:21 +0200
+Subject: [PATCH] command/player, SongPrint: use AudioFormatFormatter()
+
+libfmt version 10 apparently doesn't know how to format a
+`StringBuffer`, failing the MPD build.  Since we have a formatter
+specialization for `AudioFormat`, let's use that - it's better and
+easier to use.
+
+Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807
+---
+ src/SongPrint.cxx              | 5 +++--
+ src/command/PlayerCommands.cxx | 3 ++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx
+index 98d544cc38..835669d276 100644
+--- a/src/SongPrint.cxx
++++ b/src/SongPrint.cxx
+@@ -8,6 +8,7 @@
+ #include "TagPrint.hxx"
+ #include "client/Response.hxx"
+ #include "fs/Traits.hxx"
++#include "lib/fmt/AudioFormatFormatter.hxx"
+ #include "time/ChronoUtil.hxx"
+ #include "util/StringBuffer.hxx"
+ #include "util/UriUtil.hxx"
+@@ -77,7 +78,7 @@ song_print_info(Response &r, const LightSong &song, bool base) noexcept
+ 		time_print(r, "Last-Modified", song.mtime);
+ 
+ 	if (song.audio_format.IsDefined())
+-		r.Fmt(FMT_STRING("Format: {}\n"), ToString(song.audio_format));
++		r.Fmt(FMT_STRING("Format: {}\n"), song.audio_format);
+ 
+ 	tag_print_values(r, song.tag);
+ 
+@@ -100,7 +101,7 @@ song_print_info(Response &r, const DetachedSong &song, bool base) noexcept
+ 		time_print(r, "Last-Modified", song.GetLastModified());
+ 
+ 	if (const auto &f = song.GetAudioFormat(); f.IsDefined())
+-		r.Fmt(FMT_STRING("Format: {}\n"), ToString(f));
++		r.Fmt(FMT_STRING("Format: {}\n"), f);
+ 
+ 	tag_print_values(r, song.GetTag());
+ 
+diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
+index 5108b9d3c4..0b5a917020 100644
+--- a/src/command/PlayerCommands.cxx
++++ b/src/command/PlayerCommands.cxx
+@@ -13,6 +13,7 @@
+ #include "Partition.hxx"
+ #include "Instance.hxx"
+ #include "IdleFlags.hxx"
++#include "lib/fmt/AudioFormatFormatter.hxx"
+ #include "util/StringBuffer.hxx"
+ #include "util/ScopeExit.hxx"
+ #include "util/Exception.hxx"
+@@ -170,7 +171,7 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r)
+ 
+ 		if (player_status.audio_format.IsDefined())
+ 			r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"),
+-			      ToString(player_status.audio_format));
++			      player_status.audio_format);
+ 	}
+ 
+ #ifdef ENABLE_DATABASE
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch
new file mode 100644
index 0000000..0c9d979
--- /dev/null
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Backport
+[https://github.com/MusicPlayerDaemon/MPD/commit/f869593ac8913e52c711e974257bd6dc0d5dbf26]
+
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
+
+From f869593ac8913e52c711e974257bd6dc0d5dbf26 Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann@gmail.com>
+Date: Mon, 15 May 2023 20:59:58 +0200
+Subject: [PATCH] TimePrint: minor fixup for libfmt 10
+
+libfmt version 10 has difficulties formatting a `StringBuffer`, and we
+need to help it by explicitly invoking the `c_str()` method.
+---
+ src/TimePrint.cxx | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx
+index 5bf05f6238..d47f3178bb 100644
+--- a/src/TimePrint.cxx
++++ b/src/TimePrint.cxx
+@@ -20,5 +20,5 @@ time_print(Response &r, const char *name,
+ 		return;
+ 	}
+ 
+-	r.Fmt(FMT_STRING("{}: {}\n"), name, s);
++	r.Fmt(FMT_STRING("{}: {}\n"), name, s.c_str());
+ }
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb
index 1393844..0c309de 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb
@@ -18,10 +18,13 @@
     fmt \
 "
 
-SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=v0.23.x;protocol=https \
+SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \
            file://mpd.conf.in \
+           file://minor-fixup-for-libfmt10.patch \
+           file://fix-build-error-when-fmt-updated.patch \
+           file://0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch \
            "
-SRCREV = "d91da9679801224847c30147f5914785b6f8f240"
+SRCREV = "b1422fbda40a1831d397fb161e7a555443c2a072"
 S = "${WORKDIR}/git"
 
 EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}"
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.70.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.71.bb
similarity index 99%
rename from meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.70.bb
rename to meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.71.bb
index 56595e7..7f117e1 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.70.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.71.bb
@@ -13,7 +13,7 @@
 
 DEPENDS = "dbus ncurses"
 
-SRCREV = "9f7d60c1e84cc0481afc3f6ccf76e127567943a8"
+SRCREV = "bd225b14bbda1a6e2dc7a52780eaf728920e0ff2"
 SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https"
 
 S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.18.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.18.bb
index dd6ecea..92f0554 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.18.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.18.bb
@@ -101,6 +101,7 @@
     for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do
         mkdir -p "${B}/modules/gui/qt/$qtpath"
     done
+    sed -i -e 's|${WORKDIR}||g' ${B}/config.h
 }
 
 # This recipe packages vlc as a library as well, so qt4 dependencies
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb
index d786afe..250af58 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb
@@ -17,6 +17,10 @@
 
 inherit lib_package pkgconfig cmake
 
+do_generate_toolchain_file:append() {
+    echo "set(CMAKE_ASM_NASM_FLAGS --debug-prefix-map ${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR})" >> ${WORKDIR}/toolchain.cmake
+}
+
 EXTRA_OECMAKE:append:x86 = " -DENABLE_ASSEMBLY=OFF"
 EXTRA_OECMAKE:append:aarch64 = " -DENABLE_PIC=ON"
 
diff --git a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.2.0.bb b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.2.0.bb
index 987cc64..8efbd39 100644
--- a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.2.0.bb
+++ b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/firewalld/firewalld_1.2.0.bb
@@ -15,7 +15,9 @@
 # glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4
 DEPENDS = "intltool-native glib-2.0-native nftables"
 
-inherit gettext autotools-brokensep bash-completion pkgconfig python3native python3-dir gsettings systemd update-rc.d ptest
+inherit gettext autotools-brokensep bash-completion pkgconfig python3native python3-dir gsettings systemd update-rc.d ptest features_check
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd"
diff --git a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb
index e70edef..b636ad0 100644
--- a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb
+++ b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-printing/system-config-printer/system-config-printer_1.5.18.bb
@@ -9,18 +9,27 @@
 
 inherit autotools gettext pkgconfig python3native features_check
 
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data gobject-introspection"
 
-DEPENDS = "cups glib-2.0 libusb xmlto-native intltool-native desktop-file-utils-native"
+DEPENDS = "cups glib-2.0 libusb xmlto-native desktop-file-utils-native autoconf-archive-native"
 
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[systemd] = ",,systemd"
+PACKAGECONFIG[systemd] = ",--without-systemdsystemunitdir,systemd"
 
 do_configure:prepend() {
     # This file is not provided if fetching from git but required for configure
     touch ${S}/ChangeLog
 }
 
+do_install:append() {
+    for f in __init__.cpython-311.pyc cupshelpers.cpython-311.pyc \
+        config.cpython-311.pyc ppds.cpython-311.pyc \
+        installdriver.cpython-311.pyc openprinting.cpython-311.pyc \
+        xmldriverprefs.cpython-311.pyc; do
+        rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/cupshelpers/__pycache__/$f
+    done
+}
+
 FILES:${PN} += "${libdir} ${datadir}"
 
 RDEPENDS:${PN} = " \
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb b/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
index eb42e62..dc7f2b6 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
@@ -4,7 +4,9 @@
 
 DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
 
-inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd
+inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection"
 
 SRC_URI = " \
     git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb b/meta-openembedded/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb
index 2fd86bc..d36646c 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb
@@ -60,3 +60,6 @@
 }
 
 PARALLEL_MAKE = ""
+
+# dhcp-relay contains a bundled "bind", thus their dev packages conflict each other
+RCONFLICTS:${PN}-dev = "bind-dev"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.42.6.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.42.6.bb
index 31687a3..3196b0c 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.42.6.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.42.6.bb
@@ -8,6 +8,7 @@
 "
 
 DEPENDS = " \
+    python3-pygobject-native \
     coreutils-native \
     intltool-native \
     libxslt-native \
@@ -73,7 +74,7 @@
 PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit ppp', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
 "
 
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
index 035d494..b478692 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -28,7 +28,7 @@
 
 # ignore strip to avoid yocto errors in stripping
 do_compile () {
-    oe_runmake PLATFORM=ARM 'STRIP=echo' all
+    oe_runmake PLATFORM=ARM 'STRIP=echo' CCFLAGS="${CFLAGS}" all
 }
 
 do_install () {
diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch
new file mode 100644
index 0000000..59d7b1e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch
@@ -0,0 +1,60 @@
+From e1b93db6a13d955c6bab6358a7fa27fecb59479f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 11 May 2023 17:24:46 -0700
+Subject: [PATCH] ippool: Port to ppp 2.5 APIs
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pppd/ippool.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/pppd/ippool.c b/pppd/ippool.c
+index 88cb901..d4b5c97 100644
+--- a/pppd/ippool.c
++++ b/pppd/ippool.c
+@@ -6,7 +6,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include "pppd.h"
+-#include "pathnames.h"
++#include "options.h"
+ #include "fsm.h" /* Needed for lcp.h to include cleanly */
+ #include "lcp.h"
+ #include "ccp.h"
+@@ -23,7 +23,7 @@
+ 
+ #include "ippool_rpc.h"
+ 
+-const char pppd_version[] = VERSION;
++const char pppd_version[] = PPPD_VERSION;
+ 
+ static char *ippool_pool_name = NULL;
+ static char *ippool_pool_name2 = NULL;
+@@ -205,13 +205,13 @@ void plugin_init(void)
+ {
+ #if defined(__linux__)
+ 	extern int new_style_driver;	/* From sys-linux.c */
+-	if (!ppp_available() && !new_style_driver)
++	if (!ppp_check_kernel_support() && !new_style_driver)
+ 		fatal("Kernel doesn't support ppp_generic - "
+ 		    "needed for Ippool");
+ #else
+ 	fatal("No IP pool support on this OS");
+ #endif
+-	add_options(ippool_options);
++	ppp_add_options(ippool_options);
+ 
+ 	memset(&ippool_addr, 0, sizeof(ippool_addr));
+ 
+@@ -219,6 +219,6 @@ void plugin_init(void)
+ 	ip_down_hook = ippool_release_ip;
+ 
+ 	/* brute force, just in case ip_down_hook doesn't get called */
+-	add_notifier(&exitnotify, ippool_cleanup, 0);
++	ppp_add_notify(NF_EXIT, ippool_cleanup, 0);
+ }
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
index 281ae5f..f168e4c 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
+++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/ippool.service
@@ -5,8 +5,8 @@
 
 [Service]
 Type=simple
-# Start ippoold in the foreground!
-ExecStart=@SBINDIR@/ippoold -f
+# Start ippoold in the foreground! and enable RPC
+ExecStart=@SBINDIR@/ippoold -R -f
 # Normal output will go to syslog, so suppress stdout.
 StandardOutput=null
 # ExecStop is not needed. systemd will send SIGTERM
diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
index 26b0381..36ea289 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
+++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -30,6 +30,7 @@
            file://0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch \
            file://0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch \
            file://0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch \
+           file://0001-ippool-Port-to-ppp-2.5-APIs.patch \
            "
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
@@ -49,8 +50,6 @@
 CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc"
 
 SYSTEMD_SERVICE:${PN} = "ippool.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
 
 do_compile:prepend() {
     # fix the CFLAGS= and CPPFLAGS= in main Makefile, to have the extra CFLAGS in env
diff --git a/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.16.bb b/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.17.bb
similarity index 96%
rename from meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.16.bb
rename to meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.17.bb
index 7992705..aa29f41 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.16.bb
+++ b/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.17.bb
@@ -12,7 +12,7 @@
     file://run-ptest \
     "
 
-SRC_URI[sha256sum] = "e3b391650c7ba67cea2fe84d67fdb4d7fc8aa1ec5cf86eb8bb984711df8465a9"
+SRC_URI[sha256sum] = "9343177f145d2bca66ef03d59528079d3f1663c624b1e2b9d08268efdc6127ce"
 
 inherit autotools update-rc.d useradd systemd pkgconfig bash-completion github-releases ptest
 
diff --git a/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.1.bb b/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.1.bb
index e929534..a83dad3 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.1.bb
+++ b/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.1.bb
@@ -10,7 +10,7 @@
 inherit features_check systemd
 
 RDEPENDS:${PN} = "python3-pygobject python3-dbus"
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES = "systemd gobject-introspection-data"
 
 SRCREV = "30e278e50749a60a930ceaa0971207c6436b8a0c"
 SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher;protocol=https;nobranch=1"
diff --git a/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.1.bb b/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.2.bb
similarity index 90%
rename from meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.1.bb
rename to meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.2.bb
index 71bd937..03db5fc 100644
--- a/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.1.bb
+++ b/meta-openembedded/meta-networking/recipes-protocols/babeld/babeld_1.12.2.bb
@@ -13,12 +13,14 @@
 LIC_FILES_CHKSUM = "file://LICENCE;md5=411a48ac3c2e9e0911b8dd9aed26f754"
 
 SRC_URI = "gitsm://github.com/jech/babeld.git;protocol=https;branch=master"
-SRCREV = "916d3d9aa65683ddf8b96f7f0b466b24cb9d7087"
+SRCREV = "a9fba0e19ebde96cdc4edd35c5363f9e8139ab35"
 
 UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
 
+EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'"
+
 do_compile () {
 	oe_runmake babeld
 }
diff --git a/meta-openembedded/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb b/meta-openembedded/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
index 883bb2e..c7653bb 100644
--- a/meta-openembedded/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
+++ b/meta-openembedded/meta-networking/recipes-protocols/opcua/open62541_1.3.3.bb
@@ -31,9 +31,10 @@
     -DUA_LOGLEVEL=600 \
 "
 
-PACKAGECONFIG ?= "encryption pubsub pubsub-eth"
+PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth"
 PACKAGECONFIG[amalgamation] = "-DUA_ENABLE_AMALGAMATION=ON, -DUA_ENABLE_AMALGAMATION=OFF"
-PACKAGECONFIG[encryption] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls"
+PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl"
+PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls"
 PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF"
 PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF"
 PACKAGECONFIG[werror] = "-DUA_FORCE_WERROR=ON, -DUA_FORCE_WERROR=OFF"
diff --git a/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0001-curlpp-config.in-Remove-references-to-absolute-build.patch b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0001-curlpp-config.in-Remove-references-to-absolute-build.patch
new file mode 100644
index 0000000..539e9ce
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp/0001-curlpp-config.in-Remove-references-to-absolute-build.patch
@@ -0,0 +1,40 @@
+From d6eee2d52f31e034f9d84d38a749d86a63d5b769 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 20:37:47 -0700
+Subject: [PATCH] curlpp-config.in: Remove references to absolute buildpaths
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ extras/curlpp-config.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/extras/curlpp-config.in b/extras/curlpp-config.in
+index b0bd964..1416b94 100644
+--- a/extras/curlpp-config.in
++++ b/extras/curlpp-config.in
+@@ -43,7 +43,7 @@ while test $# -gt 0; do
+ 
+     case "$1" in
+     --cc)
+-	echo @CC@
++	curl-config --cc
+ 	;;
+ 
+     --prefix)
+@@ -73,10 +73,10 @@ while test $# -gt 0; do
+        	;;
+ 
+     --libs)
+-       	echo -L@libdir@ @LDFLAGS@ @LIBS@ `curl-config --libs` -lcurlpp
++       	echo `curl-config --libs` -lcurlpp
+        	;;
+     --static-libs)
+-       	echo @libdir_static@/libcurlpp.@libext@ @LDFLAGS@ @LIBS@ `curl-config --static-libs`
++       	echo $prefix/@libdir_static@/libcurlpp.@libext@ `curl-config --static-libs`
+         ;;
+ 
+     *)
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
index e36a86f..131f187 100644
--- a/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
+++ b/meta-openembedded/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
@@ -7,7 +7,8 @@
 DEPENDS = "curl"
 DEPENDS:class-native = "curl-native"
 
-SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https"
+SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https \
+           file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch"
 
 SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
 
diff --git a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.14.bb b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.20.bb
similarity index 81%
rename from meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.14.bb
rename to meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.20.bb
index d8c4831..effde16 100644
--- a/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.14.bb
+++ b/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot_2.3.20.bb
@@ -12,9 +12,7 @@
            file://0001-not-check-pandoc.patch \
            file://0001-m4-Check-for-libunwind-instead-of-libunwind-generic.patch \
            "
-
-SRC_URI[md5sum] = "2f03532cec3280ae45a101a7a55ccef5"
-SRC_URI[sha256sum] = "c8b3d7f3af1e558a3ff0f970309d4013a4d3ce136f8c02a53a3b05f345b9a34a"
+SRC_URI[sha256sum] = "caa832eb968148abdf35ee9d0f534b779fa732c0ce4a913d9ab8c3469b218552"
 
 DEPENDS = "openssl xz zlib bzip2 libcap icu libtirpc bison-native"
 CFLAGS += "-I${STAGING_INCDIR}/tirpc"
@@ -22,9 +20,10 @@
 
 inherit autotools pkgconfig systemd useradd gettext
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam systemd', d)}"
 
 PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd,"
 PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap,"
 PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
 
@@ -42,23 +41,21 @@
 
 # hardcode epoll() to avoid running unsafe tests
 # BSD needs kqueue and uclibc poll()
-EXTRA_OECONF = " --with-ioloop=epoll \
-                 --with-systemdsystemunitdir=${systemd_unitdir}/system"
-
-# Uses hidden symbols
-# libssl_iostream_openssl.so: undefined reference to `ssl_iostream_handshake'
-LTO = ""
+EXTRA_OECONF = " --with-ioloop=epoll"
 
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE:${PN} = "dovecot.service dovecot.socket"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 do_install:append () {
+    rm -rf ${D}${libdir}/dovecot/dovecot-config
     install -d 755 ${D}/etc/dovecot
     touch 644 ${D}/etc/dovecot/dovecot.conf
-    install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
-    sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
-    sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+        install -m 0644 ${WORKDIR}/dovecot.service ${D}${systemd_unitdir}/system
+        sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/dovecot.service
+    fi
 }
 
 USERADD_PACKAGES = "${PN}"
diff --git a/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.23.bb b/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.37.bb
similarity index 85%
rename from meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.23.bb
rename to meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.37.bb
index 2665736..4560ef8 100644
--- a/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.23.bb
+++ b/meta-openembedded/meta-networking/recipes-support/fetchmail/fetchmail_6.4.37.bb
@@ -6,13 +6,13 @@
 RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC."
 SECTION = "mail"
 LICENSE = "GPL-2.0-only & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c3a05d9b9d3784c824c9b92a648e1353"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ee6b9f41d9324434dd11bd8a38f1b044"
 
 DEPENDS = "openssl"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz \
            "
-SRC_URI[sha256sum] = "5f7a5e13731431134a2ca535bbced7adc666d3aeb93169a0830945d91f492300"
+SRC_URI[sha256sum] = "4a182e5d893e9abe6ac37ae71e542651fce6d606234fc735c2aaae18657e69ea"
 
 inherit autotools gettext pkgconfig python3-dir python3native
 
diff --git a/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch b/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch
new file mode 100644
index 0000000..75377df
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch
@@ -0,0 +1,38 @@
+From 1ccbd8fdbd2e367a702e48c8703b2f010d067b23 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 18:16:24 -0700
+Subject: [PATCH] plugins: Avoid absolute buildpaths in binaries
+
+plugins seems to add CC to the plugins shared objects via compiler
+cmdline which ends up in real code. Therefore scrub buildpaths from CC
+and CFLAGS before passing them to plugin's build.
+
+Upstream-Status: Submitted [https://gitlab.com/nbdkit/nbdkit/-/merge_requests/30]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/cc/Makefile.am | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/cc/Makefile.am b/plugins/cc/Makefile.am
+index df8b5d15..80586a17 100644
+--- a/plugins/cc/Makefile.am
++++ b/plugins/cc/Makefile.am
+@@ -44,9 +44,12 @@ nbdkit_cc_plugin_la_SOURCES = \
+ 	$(top_srcdir)/include/nbdkit-plugin.h \
+ 	$(NULL)
+ 
++workdir := $(shell dirname $(abs_top_builddir))
++cc_no_sysroot := $(shell echo \"$(CC)\"|sed -e 's#$(workdir)#<WORKDIR>#g')
++cflags_no_sysroot := $(shell echo \"$(CFLAGS)\"|sed -e 's#$(workdir)#<WORKDIR>#g')
+ nbdkit_cc_plugin_la_CPPFLAGS = \
+-	-DCC="\"$(CC)\"" \
+-	-DCFLAGS="\"$(CFLAGS)\"" \
++	-DCC=\"$(cc_no_sysroot)\" \
++	-DCFLAGS=\"$(cflags_no_sysroot)\" \
+ 	-I$(top_srcdir)/include \
+ 	-I$(top_builddir)/include \
+ 	-I$(top_srcdir)/common/include \
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch b/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
deleted file mode 100644
index c7ec41e..0000000
--- a/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 28f07715ab4d670ce81e12776bbece043305bd83 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 11 Apr 2020 15:08:39 -0700
-Subject: [PATCH] server: Fix build when printf is a macro
-
-clang complains on x86 when building
-
-main.c:116:2: error: embedding a #include directive within macro arguments is not supported
- ^
-
-convert nesting include into a string assignment, to same effect but
-making it compatible with clang as well
-
-Upstream-Status: Submitted [https://github.com/libguestfs/nbdkit/pull/3]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- server/main.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/server/main.c b/server/main.c
-index 748122f..c0ac874 100644
---- a/server/main.c
-+++ b/server/main.c
-@@ -112,9 +112,10 @@ static void
- usage (void)
- {
-   /* --{short,long}-options remain undocumented */
--  printf (
-+  char const *opt_list =
- #include "synopsis.c"
--  );
-+	  ;
-+  printf ("%s\n", opt_list);
-   printf ("\n"
-           "Please read the nbdkit(1) manual page for full usage.\n");
- }
--- 
-2.26.0
-
diff --git a/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb b/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
index 32d4270..cdf2677 100644
--- a/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
+++ b/meta-openembedded/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
@@ -10,7 +10,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=26250adec854bc317493f6fb98efe049"
 
 SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \
-"
+           file://0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch"
 SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b"
 
 S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-networking/recipes-support/ntopng/files/CVE-2021-36082.patch b/meta-openembedded/meta-networking/recipes-support/ntopng/files/CVE-2021-36082.patch
deleted file mode 100644
index 8fdd62d..0000000
--- a/meta-openembedded/meta-networking/recipes-support/ntopng/files/CVE-2021-36082.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 1ec621c85b9411cc611652fd57a892cfef478af3 Mon Sep 17 00:00:00 2001
-From: Luca Deri <deri@ntop.org>
-Date: Sat, 15 May 2021 19:53:46 +0200
-Subject: [PATCH] Added further checks
-
-Upstream-Status: Backport [https://github.com/ntop/nDPI/commit/1ec621c85b9411cc611652fd57a892cfef478af3]
-CVE: CVE-2021-36082
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
-
----
- src/lib/protocols/netbios.c |  2 +-
- src/lib/protocols/tls.c     | 32 +++++++++++++++++---------------
- 2 files changed, 18 insertions(+), 16 deletions(-)
-
-diff --git a/src/lib/protocols/netbios.c b/src/lib/protocols/netbios.c
-index 1f3850cb..0d3b705f 100644
---- a/src/lib/protocols/netbios.c
-+++ b/src/lib/protocols/netbios.c
-@@ -42,7 +42,7 @@ int ndpi_netbios_name_interpret(char *in, size_t inlen, char *out, u_int out_len
-   int ret = 0, len, idx = inlen;
-   char *b;
- 
--  len = (*in++)/2;
-+  len = (*in++)/2, inlen--;
-   b  = out;
-   *out = 0;
- 
-diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
-index 5b572cae..c115ac08 100644
---- a/src/lib/protocols/tls.c
-+++ b/src/lib/protocols/tls.c
-@@ -994,21 +994,23 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
- 	i += 4 + extension_len, offset += 4 + extension_len;
-       }
- 
--      ja3_str_len = snprintf(ja3_str, sizeof(ja3_str), "%u,", ja3.tls_handshake_version);
-+      ja3_str_len = snprintf(ja3_str, JA3_STR_LEN, "%u,", ja3.tls_handshake_version);
- 
--      for(i=0; i<ja3.num_cipher; i++) {
--	rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u", (i > 0) ? "-" : "", ja3.cipher[i]);
-+      for(i=0; (i<ja3.num_cipher) && (JA3_STR_LEN > ja3_str_len); i++) {
-+	rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u", (i > 0) ? "-" : "", ja3.cipher[i]);
- 
- 	if(rc <= 0) break; else ja3_str_len += rc;
-       }
- 
--      rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, ",");
--      if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
-+      if(JA3_STR_LEN > ja3_str_len) {
-+          rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, ",");
-+          if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
-+      }
- 
-       /* ********** */
- 
--      for(i=0; i<ja3.num_tls_extension; i++) {
--	int rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u", (i > 0) ? "-" : "", ja3.tls_extension[i]);
-+      for(i=0; (i<ja3.num_tls_extension) && (JA3_STR_LEN-ja3_str_len); i++) {
-+	int rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u", (i > 0) ? "-" : "", ja3.tls_extension[i]);
- 
- 	if(rc <= 0) break; else ja3_str_len += rc;
-       }
-@@ -1443,41 +1445,41 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
- 	      int rc;
- 
- 	    compute_ja3c:
--	      ja3_str_len = snprintf(ja3_str, sizeof(ja3_str), "%u,", ja3.tls_handshake_version);
-+	      ja3_str_len = snprintf(ja3_str, JA3_STR_LEN, "%u,", ja3.tls_handshake_version);
- 
- 	      for(i=0; i<ja3.num_cipher; i++) {
--		rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u",
-+		rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u",
- 			      (i > 0) ? "-" : "", ja3.cipher[i]);
- 		if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc; else break;
- 	      }
- 
--	      rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, ",");
-+	      rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, ",");
- 	      if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
- 
- 	      /* ********** */
- 
- 	      for(i=0; i<ja3.num_tls_extension; i++) {
--		rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u",
-+		rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u",
- 			      (i > 0) ? "-" : "", ja3.tls_extension[i]);
- 		if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc; else break;
- 	      }
- 
--	      rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, ",");
-+	      rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, ",");
- 	      if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
- 
- 	      /* ********** */
- 
- 	      for(i=0; i<ja3.num_elliptic_curve; i++) {
--		rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u",
-+		rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u",
- 			      (i > 0) ? "-" : "", ja3.elliptic_curve[i]);
- 		if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc; else break;
- 	      }
- 
--	      rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, ",");
-+	      rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, ",");
- 	      if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
- 
- 	      for(i=0; i<ja3.num_elliptic_curve_point_format; i++) {
--		rc = snprintf(&ja3_str[ja3_str_len], sizeof(ja3_str)-ja3_str_len, "%s%u",
-+		rc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u",
- 			      (i > 0) ? "-" : "", ja3.elliptic_curve_point_format[i]);
- 		if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc; else break;
- 	      }
--- 
-2.17.1
-
diff --git a/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_45.0.bb b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_46.0.bb
similarity index 95%
rename from meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_45.0.bb
rename to meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_46.0.bb
index ed1f7c9..c4c4387 100644
--- a/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_45.0.bb
+++ b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_46.0.bb
@@ -6,7 +6,7 @@
 RDEPENDS:${PN} = "bash perl"
 
 SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https"
-SRCREV = "53ee89b4abb1463e7ae713103f552b2bef1307ce"
+SRCREV = "f2789cbd394c5839e8942d585a494ab72fd97e39"
 S = "${WORKDIR}/git"
 
 #Default Dual License https://github.com/linux-rdma/rdma-core/blob/master/COPYING.md
diff --git a/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.17.1.bb b/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.17.1.bb
index 24ac601..9855a55 100644
--- a/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.17.1.bb
+++ b/meta-openembedded/meta-networking/recipes-support/unbound/unbound_1.17.1.bb
@@ -29,6 +29,10 @@
 PACKAGECONFIG[dnscrypt] = "--enable-dnscrypt, --disable-dnscrypt, libsodium"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
 
+do_configure:append() {
+	sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h
+}
+
 do_install:append() {
 	install -d ${D}${systemd_unitdir}/system
 	install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system
diff --git a/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
index 81e0779..0c5f6be 100644
--- a/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
+++ b/meta-openembedded/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
@@ -26,6 +26,7 @@
     libxmlb \
     libyang \
     lmdb \
+    mcelog \
     minicoredumper \
     neon \
     nodejs \
@@ -38,6 +39,8 @@
     zeromq \
 "
 PTESTS_FAST_META_OE:remove:libc-musl = "minicoredumper"
+PTESTS_FAST_META_OE:remove:riscv64 = "nodejs"
+PTESTS_FAST_META_OE:remove:riscv32 = "nodejs"
 
 PTESTS_SLOW_META_OE = "\
     fftw \
@@ -54,7 +57,6 @@
     libjcat \
     libteam \
     libxml++ \
-    mcelog \
     oprofile \
     ostree \
     psqlodbc \
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
index fcb347a..3d47430 100644
--- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
+++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
@@ -40,7 +40,7 @@
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \
 "
-CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes"
+CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes SH_PATH=/bin/sh"
 
 #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"'
 
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.4.bb b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.5.bb
similarity index 94%
rename from meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.4.bb
rename to meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.5.bb
index 5821c2c..a512d29 100644
--- a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.4.bb
+++ b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.6.5.bb
@@ -5,7 +5,7 @@
                     file://COPYING;md5=bae3019b4c6dc4138c217864bd04331f \
                     "
 
-SRCREV = "a96805508864a46b8a7977aaf131c28742cddd11"
+SRCREV = "b5a275af5feac1ea15c19912715444f6e52e21f7"
 
 SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master"
 
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb
index dcce524..2400195 100644
--- a/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb
+++ b/meta-openembedded/meta-oe/recipes-connectivity/libirecovery/libirecovery_git.bb
@@ -8,9 +8,9 @@
 
 DEPENDS = "libimobiledevice-glue libusb1 readline"
 
-PV = "1.0.1+git${SRCPV}"
+PV = "1.1.0"
 
-SRCREV = "ab5b4d8d4c0e90c05d80f80c7e99a6516de9b5c6"
+SRCREV = "98c9f7055ec1f2e09fac69ef1413a8757113b838"
 SRC_URI = "git://github.com/libimobiledevice/libirecovery;protocol=https;branch=master"
 
 S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb b/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
index 67269b0..5e6069f 100644
--- a/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
+++ b/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
@@ -36,6 +36,14 @@
     -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
 "
 
+do_install:append() {
+    sed -i -e 's|${STAGING_LIBDIR}/libcrypto.so|crypto|g' ${D}${libdir}/cmake/libwebsockets/LibwebsocketsTargets.cmake
+    sed -i -e 's|${STAGING_LIBDIR}/libssl.so|ssl|g' ${D}${libdir}/cmake/libwebsockets/LibwebsocketsTargets.cmake
+    sed -i -e 's|${STAGING_LIBDIR}/libuv.so|uv|g' ${D}${libdir}/cmake/libwebsockets/LibwebsocketsTargets.cmake
+    sed -i -e 's|${STAGING_INCDIR}||g' ${D}${libdir}/cmake/libwebsockets/LibwebsocketsTargets.cmake \
+                                       ${D}${libdir}/cmake/libwebsockets/libwebsockets-config.cmake
+}
+
 PACKAGES =+ "${PN}-testapps ${PN}-evlib-event ${PN}-evlib-uv ${PN}-evlib-ev ${PN}-evlib-sd"
 
 FILES:${PN}-testapps += "${datadir}/libwebsockets-test-server/* ${bindir}/libwebsockets-test-*"
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch b/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch
deleted file mode 100644
index a31bfaa..0000000
--- a/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/makefile.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Disable building some things we don't need
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- Makefile |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 33bd2d0..84262bd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -115,7 +115,8 @@ LDFLAGS_AS = -shared -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -lpthread
- 
- all: build
- 	
--build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS}
-+build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET}
-+#${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS}
- 
- clean:
- 	rm -rf ${blddir}/*
--- 
diff --git a/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.3.1.bb b/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.4.0.bb
similarity index 81%
rename from meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.3.1.bb
rename to meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.4.0.bb
index 7af62b7..6294827 100644
--- a/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.3.1.bb
+++ b/meta-openembedded/meta-oe/recipes-core/dbus-cxx/dbus-cxx_2.4.0.bb
@@ -5,9 +5,8 @@
 LICENSE = "LGPL-3.0-or-later | BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=24594f493407a4cd401ce9794e0b9308"
 
-SRC_URI = "git://github.com/dbus-cxx/dbus-cxx.git;branch=master;protocol=https \
-           file://0001-Include-missing-cstdint.patch"
-SRCREV = "898f6ea8f7ffe454e81a9337002df555728d4199"
+SRC_URI = "git://github.com/dbus-cxx/dbus-cxx.git;branch=master;protocol=https"
+SRCREV = "ebac3df5beeb4337f65968ae5b265927abb792af"
 
 DEPENDS = "\
 	dbus \
diff --git a/meta-openembedded/meta-oe/recipes-core/dbus-cxx/files/0001-Include-missing-cstdint.patch b/meta-openembedded/meta-oe/recipes-core/dbus-cxx/files/0001-Include-missing-cstdint.patch
deleted file mode 100644
index 4ad69ea..0000000
--- a/meta-openembedded/meta-oe/recipes-core/dbus-cxx/files/0001-Include-missing-cstdint.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 56e2cce87445d514c9992ecc19d03bb2115c82d6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 25 Jan 2023 22:17:31 -0800
-Subject: [PATCH] Include missing <cstdint>
-
-gcc 13 moved some includes around and as a result <cstdint> is no longer transitively included [1]. Explicitly include it for uint{32,64}_t.
-
-[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
-
-Upstream-Status: Submitted [https://github.com/dbus-cxx/dbus-cxx/pull/111]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- dbus-cxx/enums.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/dbus-cxx/enums.h b/dbus-cxx/enums.h
-index 8253a4b..c793fad 100644
---- a/dbus-cxx/enums.h
-+++ b/dbus-cxx/enums.h
-@@ -5,6 +5,7 @@
-  *                                                                         *
-  *   This file is part of the dbus-cxx library.                            *
-  ***************************************************************************/
-+#include <cstdint>
- #include <ostream>
- 
- #ifndef DBUSCXX_ENUMS_H
--- 
-2.39.1
-
diff --git a/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch b/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch
deleted file mode 100644
index 42f2520..0000000
--- a/meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm/remove-examples.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 52360260c0d73a00082d867bc416225fbc2b657e Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 12 Jul 2011 11:46:37 +0200
-Subject: [PATCH] glibmm: add 2.28.2
-
----
- Makefile.am  | 7 +------
- configure.ac | 1 -
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 1b366b4..0ff58b5 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -23,12 +23,7 @@ src_subdirs = glib/src gio/src
- else
- src_subdirs =
- endif
--if ENABLE_DOCUMENTATION
--doc_subdirs = docs
--else
--doc_subdirs =
--endif
--SUBDIRS = tools $(src_subdirs) glib/glibmm gio/giomm tests examples $(doc_subdirs)
-+SUBDIRS = tools $(src_subdirs) glib/glibmm gio/giomm tests
- 
- glibmm_includedir = $(includedir)/$(GLIBMM_MODULE_NAME)
- glibmm_include_HEADERS = glib/glibmm.h
-diff --git a/configure.ac b/configure.ac
-index e706687..198e0d0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -166,7 +166,6 @@ AC_CONFIG_FILES([Makefile
-                  gio/src/Makefile
-                  gio/giomm/Makefile
-                  tests/Makefile
--                 examples/Makefile
-                  docs/Makefile
-                  docs/reference/Doxyfile
-                  MSVC_NMake/glibmm/glibmm.rc
diff --git a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 21d07a1..469e202 100644
--- a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -464,7 +464,7 @@
     gtk+ \
     gtkmm3 \
     gtkmm \
-    libpeas \
+    ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "libpeas", "", d)} \
     pyxdg \
     vte9 \
     gnome-theme-adwaita \
@@ -982,6 +982,7 @@
     poco-ptest \
     cmocka-ptest \
     minicoredumper-ptest \
+    hiredis-ptest \
 "
 RDEPENDS:packagegroup-meta-oe-ptest-packages:append:x86 = " mcelog-ptest"
 RDEPENDS:packagegroup-meta-oe-ptest-packages:append:x86-64 = " mcelog-ptest"
diff --git a/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-systemd-switch-to-KillMode-mixed.patch b/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-systemd-switch-to-KillMode-mixed.patch
deleted file mode 100644
index eb1c8db..0000000
--- a/meta-openembedded/meta-oe/recipes-core/plymouth/files/0001-systemd-switch-to-KillMode-mixed.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9d0f8b2e7bc2d1d2b0900fcdf119bb9a2cc4f474 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode@redhat.com>
-Date: Tue, 25 Aug 2020 10:49:11 -0400
-Subject: [PATCH] systemd: switch to KillMode=mixed
-
-KillMode=none is deprecated, so we need to stop using it.
-
-For now, use `KillMode=mixed` and `IgnoreOnIsolate=true` instead.
-
-In the future, we should change plymouth to be able to exit and
-start again without restarting the active animation, but that's
-going to require some effort.
-
-https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/123
-
-Upstream-Status: Backport [https://gitlab.freedesktop.org/plymouth/plymouth/-/commit/9d0f8b2e7bc2d1d2b0900fcdf119bb9a2cc4f474]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- systemd-units/plymouth-start.service.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/systemd-units/plymouth-start.service.in b/systemd-units/plymouth-start.service.in
-index 3d00cc6..830a62d 100644
---- a/systemd-units/plymouth-start.service.in
-+++ b/systemd-units/plymouth-start.service.in
-@@ -6,11 +6,12 @@ After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.
- Before=systemd-ask-password-plymouth.service
- ConditionKernelCommandLine=!plymouth.enable=0
- ConditionVirtualization=!container
-+IgnoreOnIsolate=true
- 
- [Service]
- ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session
- ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
- Type=forking
- RemainAfterExit=yes
--KillMode=none
-+KillMode=mixed
- SendSIGKILL=no
--- 
-2.17.1
-
diff --git a/meta-openembedded/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch b/meta-openembedded/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch
deleted file mode 100644
index 00a1a5c..0000000
--- a/meta-openembedded/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Define SOCI_LIBDIR only if its not passed via environemnt. In OE we
-want to set it per our choice since we use 'lib' for 64bit unless we
-are using multilib
-
--Khem
-
-Index: soci-3.2.2/CMakeLists.txt
-===================================================================
---- soci-3.2.2.orig/CMakeLists.txt
-+++ soci-3.2.2/CMakeLists.txt
-@@ -69,11 +69,12 @@ include(SociDependencies)
- ###############################################################################
- # Installation
- ###############################################################################
--
--if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
--  set(SOCI_LIBDIR "lib")
--else()
--  set(SOCI_LIBDIR "lib64")
-+if(NOT DEFINED SOCI_LIBDIR)
-+  if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
-+    set(SOCI_LIBDIR "lib")
-+  else()
-+    set(SOCI_LIBDIR "lib")
-+  endif()
- endif()
- 
- set(BINDIR "bin" CACHE PATH "The directory to install binaries into.")
diff --git a/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch b/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch
new file mode 100644
index 0000000..989df8e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb/0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch
@@ -0,0 +1,34 @@
+From be56e955a32e5e9da0be32008afb8a8ee60e9b56 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 19:31:23 -0700
+Subject: [PATCH] cgdb: Do not search for cgdb.txt in build dir
+
+If we do cross builds it encodes the build time workdir here and it wont
+be useful to look into this dir since cross-built cgdb may not run on
+build host and build workdir will not exist on target
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cgdb/interface.cpp | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/cgdb/interface.cpp b/cgdb/interface.cpp
+index dc58137..d3aab5e 100644
+--- a/cgdb/interface.cpp
++++ b/cgdb/interface.cpp
+@@ -1568,11 +1568,6 @@ void if_display_help(void)
+ 
+     fs_util_get_path(PKGDATADIR, "cgdb.txt", cgdb_help_file);
+ 
+-    /* File doesn't exist. Try to find cgdb.txt in the build dir in case
+-     * the user is running a built cgdb binary directly. */
+-    if (!fs_verify_file_exists(cgdb_help_file))
+-        fs_util_get_path(TOPBUILDDIR, "doc/cgdb.txt", cgdb_help_file);
+-
+     ret_val = source_set_exec_line(src_viewer, cgdb_help_file, 1, 0);
+ 
+     if (ret_val == 0)
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb b/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb
index c5a0030..922dfc7 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/cgdb/cgdb_0.8.0.bb
@@ -9,7 +9,8 @@
 
 inherit autotools texinfo
 
-SRC_URI = "http://cgdb.me/files/${BP}.tar.gz"
+SRC_URI = "http://cgdb.me/files/${BP}.tar.gz \
+           file://0001-cgdb-Do-not-search-for-cgdb.txt-in-build-dir.patch"
 SRC_URI[sha256sum] = "0d38b524d377257b106bad6d856d8ae3304140e1ee24085343e6ddf1b65811f1"
 
 CACHED_CONFIGUREVARS = "ac_cv_file__dev_ptmx=yes ac_cv_rl_version=6.2 ac_cv_file__proc_self_status=yes"
diff --git a/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230507.0.bb b/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230521.0.bb
similarity index 95%
rename from meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230507.0.bb
rename to meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230521.0.bb
index b8df3b0..8949380 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230507.0.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/ctags/ctags_6.0.20230521.0.bb
@@ -14,7 +14,7 @@
 
 inherit autotools-brokensep pkgconfig manpages
 
-SRCREV = "6b06565cd3b9c351835aea80a07efd55a9b2d77a"
+SRCREV = "dfabddcc12549abefa92e5ff628be25ddb112eca"
 SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https"
 
 S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb b/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb
index 6c11120..28b1279 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/glade/glade_3.22.2.bb
@@ -6,6 +6,7 @@
                     file://COPYING.LGPL;md5=252890d9eee26aab7b432e8b8a616475"
 DEPENDS = "gtk+3 glib-2.0 libxml2 intltool-native \
            gnome-common-native \
+           autoconf-archive-native \
 "
 
 inherit features_check autotools pkgconfig gnomebase gobject-introspection mime-xdg
diff --git a/meta-openembedded/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.0.bb b/meta-openembedded/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.0.bb
new file mode 100644
index 0000000..3d1c4f1
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/mbpoll/mbpoll_1.5.0.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Command line utility to communicate with ModBus slave (RTU or TCP)"
+DESCRIPTION = "mbpoll can: read discrete inputs; read and write binary outputs \
+(coil); read input registers; read and write output registers (holding register). \
+The reading and writing registers may be in decimal, hexadecimal or floating single \
+precision."
+LICENSE = "GPL-3.0-only"
+HOMEPAGE = "https://github.com/epsilonrt/mbpoll"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
+DEPENDS = "libmodbus (>=3.1.4)"
+
+SRC_URI = "git://github.com/epsilonrt/mbpoll;protocol=https;branch=master"
+SRCREV = "ed00121bfa04afdef2d037aac4f574ad7b410601"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig cmake
diff --git a/meta-openembedded/meta-oe/recipes-devtools/pahole/pahole_1.24.bb b/meta-openembedded/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
index f44b0ce..2bb73c3 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
@@ -4,7 +4,6 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
 DEPENDS = "elfutils zlib libbpf"
-DEPENDS:append:class-native = " linux-libc-headers"
 
 # Depends on MACHINE_ARCH libbpf
 PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.6.bb b/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.6.bb
index 7e2ea78..dad9554 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.6.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php_8.2.6.bb
@@ -129,6 +129,7 @@
 CFLAGS += " -DHAVE_LIBDL "
 LDFLAGS += " -ldl "
 LDFLAGS:append:libc-musl = " -lucontext "
+LDFLAGS:append:riscv64 = " -latomic"
 
 EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
 
diff --git a/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.bb b/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.1.bb
similarity index 93%
rename from meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.bb
rename to meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.1.bb
index 5247552..b8e7f50 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/valijson/valijson_1.0.1.bb
@@ -4,7 +4,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5c4583a434195e4f3b418e17c8ca2daf"
 
 SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https"
-SRCREV = "78ac8a737df56b5334354efe104ea8f99e2a2f00"
+SRCREV = "f7399c1a244982632671906d17f3ea77f3ccfc67"
 
 S = "${WORKDIR}/git"
 
diff --git a/meta-openembedded/meta-oe/recipes-extended/beep/files/linux-input.patch b/meta-openembedded/meta-oe/recipes-extended/beep/files/linux-input.patch
deleted file mode 100644
index 1b38ba7..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/beep/files/linux-input.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-# the diff between Alessandro Zummo's copy of beep.c and the original
-# one...
-
---- beep-1.2.2/beep.c.orig	2006-01-29 12:13:36.994560551 -0800
-+++ beep-1.2.2/beep.c	2006-01-29 12:35:02.950558713 -0800
-@@ -26,6 +26,7 @@
- #include <sys/ioctl.h>
- #include <sys/types.h>
- #include <linux/kd.h>
-+#include <linux/input.h>
- 
- /* I don't know where this number comes from, I admit that freely.  A 
-    wonderful human named Raine M. Ekman used it in a program that played
-@@ -86,18 +87,28 @@ typedef struct beep_parms_t {
-   struct beep_parms_t *next;  /* in case -n/--new is used. */
- } beep_parms_t;
- 
-+enum { BEEP_TYPE_CONSOLE, BEEP_TYPE_EVDEV };
-+
- /* Momma taught me never to use globals, but we need something the signal 
-    handlers can get at.*/
- int console_fd = -1;
-+int console_type = BEEP_TYPE_CONSOLE;
-+char *console_device = NULL;
-+
-+void do_beep(int freq);
- 
- /* If we get interrupted, it would be nice to not leave the speaker beeping in
-    perpetuity. */
- void handle_signal(int signum) {
-+  
-+  if(console_device)
-+    free(console_device);
-+    
-   switch(signum) {
-   case SIGINT:
-     if(console_fd >= 0) {
-       /* Kill the sound, quit gracefully */
--      ioctl(console_fd, KIOCSOUND, 0);
-+      do_beep(0);
-       close(console_fd);
-       exit(signum);
-     } else {
-@@ -110,7 +121,7 @@ void handle_signal(int signum) {
- /* print usage and exit */
- void usage_bail(const char *executable_name) {
-   printf("Usage:\n%s [-f freq] [-l length] [-r reps] [-d delay] "
--	 "[-D delay] [-s] [-c]\n",
-+	 "[-D delay] [-s] [-c] [-e device]\n",
- 	 executable_name);
-   printf("%s [Options...] [-n] [--new] [Options...] ... \n", executable_name);
-   printf("%s [-h] [--help]\n", executable_name);
-@@ -141,11 +152,12 @@ void usage_bail(const char *executable_n
- void parse_command_line(int argc, char **argv, beep_parms_t *result) {
-   int c;
- 
--  struct option opt_list[4] = {{"help", 0, NULL, 'h'},
-+  struct option opt_list[] = {{"help", 0, NULL, 'h'},
- 			       {"version", 0, NULL, 'V'},
- 			       {"new", 0, NULL, 'n'},
-+			       {"device", 1, NULL, 'e'},
- 			       {0,0,0,0}};
--  while((c = getopt_long(argc, argv, "f:l:r:d:D:schvVn", opt_list, NULL))
-+  while((c = getopt_long(argc, argv, "f:l:r:d:D:schvVne:", opt_list, NULL))
- 	!= EOF) {
-     int argval = -1;    /* handle parsed numbers for various arguments */
-     float argfreq = -1; 
-@@ -207,6 +219,9 @@ void parse_command_line(int argc, char *
-       result->next->next       = NULL;
-       result = result->next; /* yes, I meant to do that. */
-       break;
-+    case 'e' : /* also --device */
-+      console_device = strdup(optarg);
-+      break;
-     case 'h' : /* notice that this is also --help */
-     default :
-       usage_bail(argv[0]);
-@@ -214,26 +229,61 @@ void parse_command_line(int argc, char *
-   }
- }  
- 
-+void do_beep(int freq)
-+{
-+  if (console_type == BEEP_TYPE_CONSOLE)
-+  {
-+    if(ioctl(console_fd, KIOCSOUND, freq != 0
-+      ? (int)(CLOCK_TICK_RATE/freq)
-+      : freq) < 0) {
-+      printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
-+      perror("ioctl");
-+    }
-+  }
-+  else
-+  {
-+     /* BEEP_TYPE_EVDEV */
-+     struct input_event e;
-+ 
-+     e.type = EV_SND;
-+     e.code = SND_TONE;
-+     e.value = freq;
-+  
-+     write(console_fd, &e, sizeof(struct input_event));
-+  }
-+}
-+
- void play_beep(beep_parms_t parms) {
-   int i; /* loop counter */
- 
-   /* try to snag the console */
--  if((console_fd = open("/dev/console", O_WRONLY)) == -1) {
--    fprintf(stderr, "Could not open /dev/console for writing.\n");
-+
-+  if(console_device)
-+    console_fd = open(console_device, O_WRONLY);
-+  else
-+    if((console_fd = open("/dev/input/event0", O_WRONLY)) == -1)
-+      if((console_fd = open("/dev/tty0", O_WRONLY)) == -1)
-+        console_fd = open("/dev/vc/0", O_WRONLY);
-+      
-+  if(console_fd == -1) {
-+    fprintf(stderr, "Could not open %s for writing\n",
-+      console_device != NULL ? console_device : "/dev/tty0 or /dev/vc/0");
-     printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
-     perror("open");
-     exit(1);
-   }
-   
-+  if (ioctl(console_fd, EVIOCGSND(0)) != -1)
-+    console_type = BEEP_TYPE_EVDEV;
-+  else
-+    console_type = BEEP_TYPE_CONSOLE;
-+  
-   /* Beep */
-   for (i = 0; i < parms.reps; i++) {                    /* start beep */
--    if(ioctl(console_fd, KIOCSOUND, (int)(CLOCK_TICK_RATE/parms.freq)) < 0) {
--      printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
--      perror("ioctl");
--    }
-+    do_beep(parms.freq);
-     /* Look ma, I'm not ansi C compatible! */
-     usleep(1000*parms.length);                          /* wait...    */
--    ioctl(console_fd, KIOCSOUND, 0);                    /* stop beep  */
-+    do_beep(0);
-     if(parms.end_delay || (i+1 < parms.reps))
-        usleep(1000*parms.delay);                        /* wait...    */
-   }                                                     /* repeat.    */
-@@ -295,5 +345,8 @@ int main(int argc, char **argv) {
-     parms = next;
-   }
- 
-+  if(console_device)
-+    free(console_device);
-+    
-   return EXIT_SUCCESS;
- }
diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis/run-ptest b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis/run-ptest
new file mode 100644
index 0000000..59b747d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+TEST_SSL=0 TEST_ASYNC=0 ./test.sh
diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb
deleted file mode 100644
index 3a8c948..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Minimalistic C client library for Redis"
-HOMEPAGE = "http://github.com/redis/hiredis"
-SECTION = "libs"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
-DEPENDS = "redis openssl"
-
-SRC_URI = "git://github.com/redis/hiredis;protocol=https;branch=master"
-SRCREV = "b731283245f3183af527237166261ad0768ba7d4"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE += "-DENABLE_SSL=ON"
-
-FILES:${PN}-dev += "${datadir}/hiredis_ssl"
diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.1.0.bb b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.1.0.bb
new file mode 100644
index 0000000..b3814af
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.1.0.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Minimalistic C client library for Redis"
+HOMEPAGE = "http://github.com/redis/hiredis"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
+
+SRC_URI = " \
+    git://github.com/redis/hiredis;protocol=https;branch=master \
+    file://run-ptest \
+    "
+SRCREV = "c14775b4e48334e0262c9f168887578f4a368b5d"
+
+S = "${WORKDIR}/git"
+
+inherit cmake ptest
+
+# 'testssl' is not enabled by default as redis recipe does not build with ssl support
+# option 'testssl' requires 'ssl'
+PACKAGECONFIG ??= "ssl ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'test testasync', '', d)}"
+PACKAGECONFIG[ssl] = "-DENABLE_SSL=ON, -DENABLE_SSL=OFF, openssl"
+PACKAGECONFIG[test] = "-DDISABLE_TESTS=OFF, -DDISABLE_TESTS=ON"
+PACKAGECONFIG[testssl] = "-DENABLE_SSL_TESTS=ON, -DENABLE_SSL_TESTS=OFF, openssl"
+PACKAGECONFIG[testasync] = "-DENABLE_ASYNC_TESTS=ON, -DENABLE_ASYNC_TESTS=OFF, libevent"
+
+do_install_ptest() {
+    install ${S}/test.sh ${D}${PTEST_PATH}/
+    install ${B}/hiredis-test ${D}${PTEST_PATH}/
+    if ${@bb.utils.contains('PACKAGECONFIG','testssl','true','false',d)}; then
+        sed -i 's/TEST_SSL=0/TEST_SSL=1/g' ${D}${PTEST_PATH}/run-ptest
+    fi
+    if ${@bb.utils.contains('PACKAGECONFIG','testasync','true','false',d)}; then
+        sed -i 's/TEST_ASYNC=0/TEST_ASYNC=1/g' ${D}${PTEST_PATH}/run-ptest
+    fi
+}
+
+FILES:${PN}-dev += "${datadir}/hiredis_ssl ${prefix}/build"
+
+RDEPENDS:${PN} = "redis"
+RDEPENDS:${PN}-ptest = "${@bb.utils.contains('PACKAGECONFIG', 'testssl', 'openssl-bin', '', d)}"
diff --git a/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch b/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
index 6aa1de0..f2cd2be 100644
--- a/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
+++ b/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
@@ -1,33 +1,69 @@
-Upstream-Status: Inappropriate [configuration]
+Don't hardcode paths to libusb, instead use pkg-config.
 
---- a/configure.in
-+++ b/configure.in
-@@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test "
-       AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
-    else
-       AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
-+      LIBUSBINCLUDEROOT?="/usr/include/"
-+      AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder])
-       AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
-    fi
- fi
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index b77327f..29e838a 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib
- libhpmud_la_LDFLAGS += -lusb
+@@ -107,12 +107,11 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/
+ 
+ if LIBUSB01_BUILD
+ libhpmud_la_SOURCES += io/hpmud/musb_libusb01.c 
+-libhpmud_la_LDFLAGS += -lusb
  else
  libhpmud_la_SOURCES += io/hpmud/musb.c 
 -libhpmud_la_CFLAGS  += -I/usr/include/libusb-1.0
-+libhpmud_la_CFLAGS  += -I$(LIBUSBINCLUDEROOT)/libusb-1.0
- libhpmud_la_LDFLAGS += -lusb-1.0
+-libhpmud_la_LDFLAGS += -lusb-1.0
+ endif
++libhpmud_la_CFLAGS  += $(USB_CFLAGS)
++libhpmud_la_LDFLAGS += $(USB_LIBS)
+ 
+ 
+ if NETWORK_BUILD
+@@ -356,7 +355,7 @@ hpmudextdir = $(pyexecdir)
+ hpmudext_LTLIBRARIES = hpmudext.la
+ hpmudext_la_LDFLAGS = -module -avoid-version
+ hpmudext_la_SOURCES = io/mudext/hpmudext.c
+-hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
++hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) $(USB_CFLAGS)
+ hpmudext_la_LIBADD = libhpmud.la
+ 
+ if NETWORK_BUILD
+@@ -364,9 +363,6 @@ hpmudext_la_LIBADD += libhpdiscovery.la
+ hpmudext_la_CFLAGS += -Iprotocol/discovery
  endif
  
-@@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove
- endif
- 
- if !LIBUSB01_BUILD
+-if !LIBUSB01_BUILD
 -hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 
-+hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0 
- endif
+-endif
  endif #!HPLIP_CLASS_DRIVER
  # ui (qt3)
+ if GUI_BUILD
+diff --git a/configure.in b/configure.in
+index b1c690c..4a65c97 100644
+--- a/configure.in
++++ b/configure.in
+@@ -36,6 +36,7 @@ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
++PKG_PROG_PKG_CONFIG
+ 
+ # Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile.
+ AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)])
+@@ -620,11 +621,9 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu
+    AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
+    AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
+    if test "$libusb01_build" = "yes"; then
+-      AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
+-      AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
++      PKG_CHECK_MODULES([USB], [libusb])
+    else
+-      AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
+-      AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
++      PKG_CHECK_MODULES([USB], [libusb-1.0])
+    fi
+ fi
+ 
diff --git a/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
index ca68348..ed9f28e 100644
--- a/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
@@ -19,7 +19,7 @@
            file://0001-Drop-using-register-storage-classifier.patch"
 SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624"
 
-DEPENDS += "cups python3 libusb"
+DEPENDS += "cups python3 libusb1"
 
 inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd
 
@@ -29,7 +29,6 @@
 CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}"
 
 EXTRA_OECONF += "\
-        LIBUSBINCLUDEROOT=${STAGING_INCDIR} \
         --enable-cups-drv-install \
         --enable-cups-ppd-install \
         --disable-network-build \
@@ -75,12 +74,6 @@
 "
 RDEPENDS:${PN}-filter += "perl ghostscript"
 
-# need to snag the debug file or OE will fail on backend package
-FILES:${PN}-dbg += "\
-        ${libexecdir}/cups/backend/.debug \
-        ${PYTHON_SITEPACKAGES_DIR}/.debug \
-        ${libexecdir}/cups/filter/.debug "
-
 FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf"
 FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
 FILES:${PN}-ppd = "${datadir}/ppd"
diff --git a/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.28.bb b/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.28.bb
index 44b4e7d..2e7412e 100644
--- a/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.28.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.28.bb
@@ -8,7 +8,9 @@
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
 
-inherit autotools gobject-introspection pkgconfig
+inherit autotools gobject-introspection pkgconfig lib_package
+
+DEPENDS = "autoconf-archive-native glib-2.0 kmod udev"
 
 SRC_URI = "git://github.com/storaged-project/libblockdev;branch=2.x-branch;protocol=https \
 "
@@ -17,24 +19,25 @@
 
 FILES:${PN} += "${libdir}/python2.7/dist-packages ${libdir}/python3.*/site-packages"
 
-PACKAGECONFIG ??= "python3 lvm dm kmod parted fs escrow btrfs crypto mdraid kbd mpath nvdimm"
+PACKAGECONFIG ??= "python3 lvm dm kmod parted fs escrow btrfs crypto mdraid kbd mpath nvdimm tools"
 PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
 PACKAGECONFIG[python2] = "--with-python2, --without-python2,,python"
 PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools, lvm2"
 PACKAGECONFIG[lvm-dbus] = "--with-lvm_dbus, --without-lvm_dbus, multipath-tools, lvm2"
 PACKAGECONFIG[dm] = "--with-dm, --without-dm, multipath-tools, lvm2"
 PACKAGECONFIG[dmraid] = "--with-dmraid, --without-dmraid"
-PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
+PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd,libbytesize"
 PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
 PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
 PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
 PACKAGECONFIG[nvdimm] = "--with-nvdimm, --without-nvdimm, ndctl util-linux"
-PACKAGECONFIG[vdo] = "--with-vdo, --without-vdo"
+PACKAGECONFIG[vdo] = "--with-vdo, --without-vdo,libbytesize"
 PACKAGECONFIG[escrow] = "--with-escrow, --without-escrow, nss volume-key"
 PACKAGECONFIG[btrfs] = "--with-btrfs,--without-btrfs,libbytesize btrfs-tools"
 PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,cryptsetup nss volume-key"
 PACKAGECONFIG[mdraid] = "--with-mdraid,--without-mdraid,libbytesize"
 PACKAGECONFIG[kbd] = "--with-kbd,--without-kbd,libbytesize"
 PACKAGECONFIG[mpath] = "--with-mpath,--without-mpath, multipath-tools, lvm2"
+PACKAGECONFIG[tools] = "--with-tools,--without-tools,libbytesize libdevmapper"
 
 export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"
diff --git a/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb b/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
index 2d93936..3912e0a 100644
--- a/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb
@@ -24,7 +24,7 @@
 file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 EXTRA_OECONF = "--enable-debug --disable-static --disable-rebuilds --enable-compile-warnings=minimum"
-DEPENDS += "gtk+ glib-2.0 glib-2.0-native ruby-native intltool-native gnome-common-native"
+DEPENDS += "gtk+ glib-2.0 glib-2.0-native ruby-native intltool-native gnome-common-native autoconf-archive-native"
 
 inherit features_check autotools pkgconfig gettext
 
diff --git a/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.19.bb b/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.19.bb
index d7ba6e1..834687b 100644
--- a/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.19.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.19.bb
@@ -12,7 +12,7 @@
 SRC_URI[sha256sum] = "2c5704b01c8f474f82921780e4592a927b2bf6a6d7616354a6c5d7cd5664857e"
 
 do_compile() {
-    oe_runmake CFLAGS=' -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+    oe_runmake CFLAGS=' -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables ${DEBUG_PREFIX_MAP}'
 }
 
 do_install() {
diff --git a/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index b76f120..9ae72d2 100644
--- a/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -61,6 +61,8 @@
     -DGCC_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \
     -DGCC_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \
     -DDISABLE_PYTHON_SCRIPTING=ON \
+    -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \
+    -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines --file-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
     "
 EXTRA_OECMAKE:append:toolchain-clang = " -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib"
 LDFLAGS:append:toolchain-clang = " -fuse-ld=lld"
@@ -88,6 +90,10 @@
     sed -i -e 's/-DHAVE_POSIX_STRERROR_R=0/-DHAVE_POSIX_STRERROR_R=1/' ${S}/CMakeLists.txt
 }
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}|<WORKDIR>|g' ${S}/libminifi/include/agent/agent_version.h
+}
+
 CFLAGS:append:libc-glibc = " -D_GNU_SOURCE"
 CXXFLAGS:append:libc-glibc = " -D_GNU_SOURCE"
 
diff --git a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.2.bb b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
similarity index 98%
rename from meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.2.bb
rename to meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
index 7eeb774..3129dc1 100644
--- a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.2.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
@@ -23,7 +23,7 @@
     ${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \
     file://run-ptest \
 "
-SRC_URI[sha256sum] = "ceb0788755a0bff5738d44543552fbf883cf71df481baa3ca7288da7a402bb85"
+SRC_URI[sha256sum] = "9c575a094da2c307769f0aee15de95470c3b5550cbff211fbbc4f6fc75f333b1"
 
 S = "${WORKDIR}/libostree-${PV}"
 
diff --git a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch
new file mode 100644
index 0000000..627b929
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch
@@ -0,0 +1,45 @@
+From 608d0f1caf43628c8260a994c277a040f1e616e0 Mon Sep 17 00:00:00 2001
+From: Peter Bergin <peter.bergin@windriver.com>
+Date: Tue, 23 May 2023 13:19:55 +0200
+Subject: [PATCH] CMakeLists.txt: fix substitution for static libs
+
+During configuration the liibrary names are substitued for
+the static build. When building with tls support the first
+substitution will match both cases and trash the name for hiredis_ssl.
+
+Input string: 'hiredis::hiredis;hiredis::hiredis_ssl;'
+Output string: 'hiredis::hiredis_static;hiredis::hiredis_static_ssl;'
+Wanted string: 'hiredis::hiredis_static;hiredis::hiredis_ssl_static;'
+
+Fix string replacement by also including the ';' token to better match.
+
+Upstream-Status: Submitted [https://github.com/sewenew/redis-plus-plus/issues/486]
+
+Signed-off-by: Peter Bergin <peter.bergin@windriver.com>
+---
+ CMakeLists.txt | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 69794d9..08c265d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -160,13 +160,12 @@ if(REDIS_PLUS_PLUS_BUILD_STATIC)
+     set(REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS})
+ 
+     if (TARGET hiredis::hiredis_static)
+-      string(REPLACE "hiredis::hiredis" "hiredis::hiredis_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC
++      string(REPLACE "hiredis::hiredis;" "hiredis::hiredis_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC
+         "${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}")
+     endif()
+-
+     if (TARGET hiredis::hiredis_ssl_static)
+       # If SSL is not enabled, this line will have no effect
+-      string(REPLACE "hiredis::hiredis_ssl" "hiredis::hiredis_ssl_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC
++      string(REPLACE "hiredis::hiredis_ssl;" "hiredis::hiredis_ssl_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC
+         "${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}")
+     endif()
+ 
+-- 
+2.34.1
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-include-cstdint.patch b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-include-cstdint.patch
deleted file mode 100644
index bfe2412..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/files/0001-include-cstdint.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e74bb5a7ef87e697571181280e6108b89104c02d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 25 Jan 2023 20:40:56 -0800
-Subject: [PATCH] include <cstdint>
-
-gcc 13 libstdc++ moved some includes around and as a result <cstdint>
-is no longer transitively included [1]. Explicitly include it for uintXX_t.
-
-Fixes
-
-../git/src/sw/redis++/utils.h:187:1: error: 'uint16_t' does not name a type
-  187 | uint16_t crc16(const char *buf, int len);
-      | ^~~~~~~~
-
-[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
-
-Upstream-Status: Submitted [https://github.com/sewenew/redis-plus-plus/pull/449]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/sw/redis++/utils.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/sw/redis++/utils.h b/src/sw/redis++/utils.h
-index f77f796..ff38f2d 100644
---- a/src/sw/redis++/utils.h
-+++ b/src/sw/redis++/utils.h
-@@ -17,6 +17,7 @@
- #ifndef SEWENEW_REDISPLUSPLUS_UTILS_H
- #define SEWENEW_REDISPLUSPLUS_UTILS_H
- 
-+#include <cstdint>
- #include <cstring>
- #include <string>
- #include <type_traits>
--- 
-2.39.1
-
diff --git a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.7.bb b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.7.bb
deleted file mode 100644
index 8e906a4..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.7.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "C++ client for Redis based on hiredis"
-HOMEPAGE = "https://github.com/sewenew/redis-plus-plus"
-SECTION = "libs"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
-
-SRC_URI = "git://github.com/sewenew/redis-plus-plus;branch=master;protocol=https \
-           file://0001-include-cstdint.patch"
-SRCREV = "f3b19a8a1f609d1a1b79002802e5cf8c336dc262"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE += "-DREDIS_PLUS_PLUS_USE_TLS=ON"
-
-DEPENDS += "hiredis openssl"
-
-RDEPENDS:${PN} += "hiredis"
-
-FILES_SOLIBSDEV = ""
-FILES:${PN} += " ${libdir}/libredis++.so*"
-
-INSANE_SKIP:${PN} += "dev-so"
diff --git a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.8.bb b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.8.bb
new file mode 100644
index 0000000..bea1f0b
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.8.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "C++ client for Redis based on hiredis"
+HOMEPAGE = "https://github.com/sewenew/redis-plus-plus"
+SECTION = "libs"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+DEPENDS += "hiredis"
+
+SRC_URI = "git://github.com/sewenew/redis-plus-plus;branch=master;protocol=https \
+           file://0001-CMakeLists.txt-fix-substitution-for-static-libs.patch"
+SRCREV = "4368319fb668204f345da05b9dd79762506c67b6"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+# if ssl is enabled for redis-plus-plus it must also be enabled for hiredis
+PACKAGECONFIG ??= "ssl"
+PACKAGECONFIG[ssl] = "-DREDIS_PLUS_PLUS_USE_TLS=ON, -DREDIS_PLUS_PLUS_USE_TLS=OFF, openssl"
+PACKAGECONFIG[test] = "-DREDIS_PLUS_PLUS_BUILD_TEST=ON, -DREDIS_PLUS_PLUS_BUILD_TEST=OFF"
+
+do_install:append() {
+    # To remove absolute path in .cmake found by QA warning [buildpaths]
+    sed -i -e 's|${STAGING_LIBDIR}/libcrypto.so|crypto|g' ${D}${datadir}/cmake/redis++/redis++-targets.cmake
+    sed -i -e 's|${STAGING_LIBDIR}/libssl.so|ssl|g' ${D}${datadir}/cmake/redis++/redis++-targets.cmake
+}
diff --git a/meta-openembedded/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb b/meta-openembedded/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb
index fe2ebe4..9b25745 100644
--- a/meta-openembedded/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb
@@ -14,6 +14,7 @@
 LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://LICENSE_GPL;md5=393a5ca445f6965873eca0259a17f833"
 
+EXTRA_OEMAKE = "CFLAGS='${CFLAGS}'"
 do_compile:prepend() {
     oe_runmake clean
 }
diff --git a/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch
new file mode 100644
index 0000000..348d7ce
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch
@@ -0,0 +1,34 @@
+From c4f85268da6c30b0aec3d9a0e951b2088887cff4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 18:35:37 -0700
+Subject: [PATCH] cow.c: Replace stat64 with stat
+
+LFS64 is deprecated in latest musl and this fails to build
+therefore switch to using stat API which is same as stat64 these days
+
+Upstream-Status: Inappropriate [No upstream]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ moo/cow.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/moo/cow.c
++++ b/moo/cow.c
+@@ -161,7 +161,7 @@ int write_cow_header(char *cow_file, int
+ 		     int sectorsize, int alignment, long long *size)
+ {
+         struct cow_header_v3 *header;
+-	struct stat64 buf;
++	struct stat buf;
+ 	int err;
+ 
+ 	err = cow_seek_file(fd, 0);
+@@ -192,7 +192,7 @@ int write_cow_header(char *cow_file, int
+ 		      backing_file))
+ 		goto out_free;
+ 
+-	err = stat64(header->backing_file, &buf);
++	err = stat(header->backing_file, &buf);
+ 	if(err < 0){
+ 		cow_printf("Stat of backing file '%s' failed, errno = %d\n",
+ 			   header->backing_file, errno);
diff --git a/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch
new file mode 100644
index 0000000..1962e84
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch
@@ -0,0 +1,122 @@
+From ac72fffe639d564f59ec1e1eafde83980acef1b5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 23 May 2023 14:40:31 -0700
+Subject: [PATCH] makefiles: Append to CFLAGS instead of re-assign
+
+This helps in inserting yocto provided CFLAGS from build environment
+
+Upstream-Status: Inappropriate [No upstream]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ jailtest/Makefile    | 2 +-
+ mconsole/Makefile    | 2 +-
+ moo/Makefile         | 2 +-
+ port-helper/Makefile | 2 +-
+ tunctl/Makefile      | 2 +-
+ uml_net/Makefile     | 2 +-
+ uml_router/Makefile  | 2 +-
+ watchdog/Makefile    | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/jailtest/Makefile b/jailtest/Makefile
+index 610ca1a..025fca9 100644
+--- a/jailtest/Makefile
++++ b/jailtest/Makefile
+@@ -1,6 +1,6 @@
+ OBJS = jailtest.o
+ BIN = jailtest
+-CFLAGS = -g -Wall
++CFLAGS += -g -Wall
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/mconsole/Makefile b/mconsole/Makefile
+index 9818d8a..74a2560 100644
+--- a/mconsole/Makefile
++++ b/mconsole/Makefile
+@@ -1,6 +1,6 @@
+ BIN = uml_mconsole
+ OBJS = $(BIN).o
+-CFLAGS = -g -Wall
++CFLAGS += -g -Wall
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/moo/Makefile b/moo/Makefile
+index 6cdb591..60d300d 100644
+--- a/moo/Makefile
++++ b/moo/Makefile
+@@ -3,7 +3,7 @@ BIN = uml_moo uml_mkcow
+ uml_moo_OBJS = uml_moo.o cow.o
+ uml_mkcow_OBJS = uml_mkcow.o cow.o
+ 
+-CFLAGS = -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
++CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/port-helper/Makefile b/port-helper/Makefile
+index 8e33bdf..8b695f3 100644
+--- a/port-helper/Makefile
++++ b/port-helper/Makefile
+@@ -1,6 +1,6 @@
+ OBJS = port-helper.o
+ BIN = port-helper
+-CFLAGS = -g -Wall
++CFLAGS += -g -Wall
+ 
+ LIB_DIR ?= /usr/lib/uml
+ 
+diff --git a/tunctl/Makefile b/tunctl/Makefile
+index 743bfea..a39ad2b 100644
+--- a/tunctl/Makefile
++++ b/tunctl/Makefile
+@@ -1,6 +1,6 @@
+ OBJS = tunctl.o
+ BIN = tunctl
+-CFLAGS = -g -Wall
++CFLAGS += -g -Wall
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/uml_net/Makefile b/uml_net/Makefile
+index 36efec6..2e1ad0e 100644
+--- a/uml_net/Makefile
++++ b/uml_net/Makefile
+@@ -1,7 +1,7 @@
+ TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP)
+ 
+ BIN = uml_net
+-CFLAGS = -g -Wall $(TUNTAP)
++CFLAGS += -g -Wall $(TUNTAP)
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/uml_router/Makefile b/uml_router/Makefile
+index b7b5401..e399ea5 100644
+--- a/uml_router/Makefile
++++ b/uml_router/Makefile
+@@ -2,7 +2,7 @@ TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP)
+ 
+ OBJS = hash.o port.o uml_switch.o 
+ BIN = uml_switch
+-CFLAGS = -g -Wall $(TUNTAP)
++CFLAGS += -g -Wall $(TUNTAP)
+ 
+ BIN_DIR ?= /usr/bin
+ 
+diff --git a/watchdog/Makefile b/watchdog/Makefile
+index c26fd9f..5178cc6 100644
+--- a/watchdog/Makefile
++++ b/watchdog/Makefile
+@@ -1,6 +1,6 @@
+ BIN = uml_watchdog
+ OBJS = $(BIN).o
+-CFLAGS = -g -Wall
++CFLAGS += -g -Wall
+ 
+ BIN_DIR ?= /usr/bin
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb
index 35ae5f7..54bc1b2 100644
--- a/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb
@@ -8,6 +8,8 @@
            file://unstrip.patch \
            file://0001-include-required-system-header-files-for-fd_set-and-.patch \
            file://0001-Add-missing-standard-headers-for-str-and-exit-APIs.patch \
+           file://0001-cow.c-Replace-stat64-with-stat.patch \
+           file://0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch \
            "
 SRC_URI[md5sum] = "2c1ccd9efacbfb39e42d482b89b2550a"
 SRC_URI[sha256sum] = "4f179b1db021ef15ac7e9b2eed57c525db127a754c574f591c367460cded9f41"
diff --git a/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb b/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
index 86a941f..ceebe5e 100644
--- a/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
+++ b/meta-openembedded/meta-oe/recipes-gnome/gnome-common/gnome-common_3.18.0.bb
@@ -16,7 +16,7 @@
 
 # Default to enable autoconf-archive to avoid conflicts
 PACKAGECONFIG ??= "autoconf-archive"
-PACKAGECONFIG[autoconf-archive] = "--with-autoconf-archive, --without-autoconf-archive, autoconf-archive"
+PACKAGECONFIG[autoconf-archive] = "--with-autoconf-archive, --without-autoconf-archive, autoconf-archive,autoconf-archive"
 
 FILES:${PN} += "${datadir}/aclocal"
 FILES:${PN}-dev = ""
diff --git a/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.6.bb b/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.7.bb
similarity index 88%
rename from meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.6.bb
rename to meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.7.bb
index 0b12118..8f412e4 100644
--- a/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.6.bb
+++ b/meta-openembedded/meta-oe/recipes-gnome/gnome-themes/adw-gtk3_4.7.bb
@@ -11,6 +11,6 @@
 SRC_URI = "git://github.com/lassekongo83/adw-gtk3.git;protocol=https;branch=main"
 
 S = "${WORKDIR}/git"
-SRCREV = "f26e86c8a7b40ac23f165efdb620f734c0f1db23"
+SRCREV = "f5e0807a4572ef6d9ca27042b41211efb41936d2"
 
 FILES:${PN} = "${datadir}/themes"
diff --git a/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas/0001-Remove-builddir-and-srcdir-paths-from-test-binaries.patch b/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas/0001-Remove-builddir-and-srcdir-paths-from-test-binaries.patch
new file mode 100644
index 0000000..6bb4877
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas/0001-Remove-builddir-and-srcdir-paths-from-test-binaries.patch
@@ -0,0 +1,82 @@
+From d798af685e9e1166400acbdab082c17b02dad85b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 18 May 2023 23:28:10 -0700
+Subject: [PATCH] Remove builddir and srcdir paths from test binaries
+
+Encoding buildtime paths is not needed since if these tests are to be
+run they will be run on target where builddir structure most certainly
+wont be available.
+
+Fixes
+WARNING: libpeas-1.36.0-r0 do_package_qa: QA Issue: File /usr/bin/peas-demo in package libpeas-demo contains reference to TMPDIR [buildpaths]
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ peas-demo/meson.build                 | 2 +-
+ tests/libpeas-gtk/testing/meson.build | 4 ++--
+ tests/libpeas/testing/meson.build     | 4 ++--
+ tests/testing-util/meson.build        | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/peas-demo/meson.build b/peas-demo/meson.build
+index a3ec53b..855ebf2 100644
+--- a/peas-demo/meson.build
++++ b/peas-demo/meson.build
+@@ -9,7 +9,7 @@ peas_demo_c = [
+ 
+ peas_demo_c_args = [
+   '-DHAVE_CONFIG_H',
+-  '-DPEAS_BUILDDIR="@0@"'.format(builddir),
++  '-DPEAS_BUILDDIR="/usr/src/debug/libpeas"',
+   '-DPEAS_PREFIX="@0@"'.format(prefix),
+   '-DPEAS_LIBDIR="@0@"'.format(libdir),
+ ]
+diff --git a/tests/libpeas-gtk/testing/meson.build b/tests/libpeas-gtk/testing/meson.build
+index 646f42d..fd9a692 100644
+--- a/tests/libpeas-gtk/testing/meson.build
++++ b/tests/libpeas-gtk/testing/meson.build
+@@ -19,8 +19,8 @@ libpeas_gtk_testing_deps = [
+ 
+ libpeas_gtk_testing_c_args = [
+   '-DHAVE_CONFIG_H',
+-  '-DBUILDDIR="@0@"'.format(builddir),
+-  '-DSRCDIR="@0@"'.format(srcdir),
++  '-DBUILDDIR="/usr/src/debug/libpeas"',
++  '-DSRCDIR="/usr/src/debug/libpeas"',
+ ]
+ 
+ libpeas_gtk_testing_lib = library(
+diff --git a/tests/libpeas/testing/meson.build b/tests/libpeas/testing/meson.build
+index 74ba7b1..084daa9 100644
+--- a/tests/libpeas/testing/meson.build
++++ b/tests/libpeas/testing/meson.build
+@@ -21,8 +21,8 @@ libpeas_testing_deps = [
+ 
+ libpeas_testing_c_args = [
+   '-DHAVE_CONFIG_H',
+-  '-DBUILDDIR="@0@"'.format(builddir),
+-  '-DSRCDIR="@0@"'.format(srcdir),
++  '-DBUILDDIR="/usr/src/debug/libpeas"',
++  '-DSRCDIR="/usr/src/debug/libpeas"',
+ ]
+ 
+ libpeas_testing_lib = library(
+diff --git a/tests/testing-util/meson.build b/tests/testing-util/meson.build
+index 1c40740..83ad059 100644
+--- a/tests/testing-util/meson.build
++++ b/tests/testing-util/meson.build
+@@ -17,8 +17,8 @@ libtesting_util_deps = [
+ 
+ libtesting_util_c_args = [
+   '-DHAVE_CONFIG_H',
+-  '-DBUILDDIR="@0@"'.format(builddir),
+-  '-DSRCDIR="@0@"'.format(srcdir),
++  '-DBUILDDIR="/usr/src/debug/libpeas"',
++  '-DSRCDIR="/usr/src/debug/libpeas"',
+   '-UG_DISABLE_ASSERT',
+   '-UG_DISABLE_CAST_CHECKS',
+ ]
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas_1.36.0.bb b/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas_1.36.0.bb
index 1282e93..a32ea9b 100644
--- a/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas_1.36.0.bb
+++ b/meta-openembedded/meta-oe/recipes-gnome/libpeas/libpeas_1.36.0.bb
@@ -11,7 +11,10 @@
 inherit gnomebase gobject-introspection gtk-doc gtk-icon-cache features_check
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+# FIXME: When upgrading to libpeas 2, g-i is no longer needed.
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
+SRC_URI += "file://0001-Remove-builddir-and-srcdir-paths-from-test-binaries.patch"
 SRC_URI[archive.sha256sum] = "297cb9c2cccd8e8617623d1a3e8415b4530b8e5a893e3527bbfd1edd13237b4c"
 
 PACKAGECONFIG[python3] = "-Dpython3=true,-Dpython3=false,python3-pygobject"
diff --git a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9.inc b/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9.inc
index 49b9740..2a16539 100644
--- a/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9.inc
+++ b/meta-openembedded/meta-oe/recipes-gnome/vte9/vte9.inc
@@ -1,7 +1,7 @@
 SUMMARY = "Virtual terminal emulator GTK+ widget library"
 BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
 LICENSE = "LGPL-2.0-only"
-DEPENDS = " glib-2.0 gtk+ intltool-native gnome-common-native ncurses"
+DEPENDS = "glib-2.0-native glib-2.0 gtk+ intltool-native gnome-common-native ncurses"
 RDEPENDS:libvte = "vte-termcap"
 
 # help gnomebase get the SRC_URI correct
diff --git a/meta-openembedded/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch b/meta-openembedded/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch
deleted file mode 100644
index 9963955..0000000
--- a/meta-openembedded/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: fbida-2.10/GNUmakefile
-===================================================================
---- fbida-2.10.orig/GNUmakefile
-+++ fbida-2.10/GNUmakefile
-@@ -51,7 +51,7 @@ HAVE_LIBSANE	:= $(call ac_lib,sane_init,
- HAVE_LIBCURL	:= $(call ac_lib,curl_easy_init,curl)
- HAVE_LIBLIRC	:= $(call ac_lib,lirc_init,lirc_client)
- HAVE_MOTIF	:= $(call ac_lib,XmStringGenerate,Xm,-L/usr/X11R6/$(LIB) -lXpm -lXt -lXext -lX11)
--JPEG_VER        := $(call ac_jpeg_ver)
-+JPEG_VER        := 62
- endef
- 
- # transposing
diff --git a/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch b/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
new file mode 100644
index 0000000..570bb3e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
@@ -0,0 +1,48 @@
+From 06be633b8f4e2241bd37d4faf62b49606ad778e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 25 May 2023 19:01:36 -0700
+Subject: [PATCH] configure: Filter out buildpaths from CC
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                 | 4 +++-
+ libgphoto2_port/configure.ac | 6 ++++--
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17216b1..39c8cc4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -261,7 +261,9 @@ GP_CONFIG_MSG([Compiler],[${CC}])
+ GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
+ GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
+ 
+-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
++CC_NO_SYSROOT=`echo $CC | sed -e \
++		's|--sysroot=.*\b||g'`
++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
+                    [The C compiler we are using])
+ 
+ 
+diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac
+index 1086b8e..59f3c34 100644
+--- a/libgphoto2_port/configure.ac
++++ b/libgphoto2_port/configure.ac
+@@ -103,8 +103,10 @@ GP_CONFIG_MSG([Compiler],[${CC}])
+ GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
+ GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
+ 
+-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
+-                   [The C compiler we're using])
++CC_NO_SYSROOT=`echo $CC | sed -e \
++		's|--sysroot=.*\b||g'`
++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
++                   [The C compiler we are using])
+ 
+ AM_CPPFLAGS=""
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb b/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
index 0f2800a..b1fb757 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
@@ -12,6 +12,7 @@
 SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
            file://40-libgphoto2.rules \
            file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
+           file://0001-configure-Filter-out-buildpaths-from-CC.patch \
 "
 SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
 
@@ -32,12 +33,6 @@
     cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
     cd ${S}/libgphoto2_port/
     autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-
-    # remove WORKDIR information from config to improve reproducibility
-    # libgphoto2_port recheck config will set the WORKDIR info again, so dont do that
-    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h
-    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/libgphoto2_port/config.status
-    sed -i '/config\.status/ s/\-\-recheck//' ${B}/libgphoto2_port/Makefile
     cd ${S}
 }
 
diff --git a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Use-native-mkdefs.patch b/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Use-native-mkdefs.patch
deleted file mode 100644
index 76ff08f..0000000
--- a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-Use-native-mkdefs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5e53b643615fd53f3ff960521bbe9d95641e5f68 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Sun, 20 Jan 2019 23:58:29 +0100
-Subject: [PATCH] Use native mkdefs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- lib/gvpr/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/lib/gvpr/Makefile.am
-+++ b/lib/gvpr/Makefile.am
-@@ -59,7 +59,7 @@ mkdefs$(EXEEXT):
- 	$(HOSTCC) $(srcdir)/mkdefs.c -o mkdefs$(EXEEXT)
- 
- gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs$(EXEEXT)
--	./mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
-+	mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
- 
- EXTRA_DIST = $(man_MANS) $(pdf_DATA) gprdata mkdefs.c gdefs.h trie.c gvprlib.vcxproj*
- 
diff --git a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-plugin-pango-Include-freetype-headers-explicitly.patch b/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-plugin-pango-Include-freetype-headers-explicitly.patch
deleted file mode 100644
index dd79510..0000000
--- a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz/0001-plugin-pango-Include-freetype-headers-explicitly.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 926d9285f3367ae1bdb9ce1dce95f7de73b3a980 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Aug 2019 12:42:19 -0700
-Subject: [PATCH] plugin/pango: Include freetype headers explicitly
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Do not depend on pango automatically adding these headers
-Fixes
-| gvtextlayout_pango.c:140:10: error: unknown type name ‘FT_Face’
-|          FT_Face face;
-|          ^~~~~~~
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- plugin/pango/gvtextlayout_pango.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/plugin/pango/gvtextlayout_pango.c
-+++ b/plugin/pango/gvtextlayout_pango.c
-@@ -15,6 +15,10 @@
- 
- #include <stdlib.h>
- #include <string.h>
-+
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
-+
- #include "gvplugin_render.h"
- #include "agxbuf.h"
- #include "utils.h"
diff --git a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb b/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
index 967b932..b630175 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
@@ -4,7 +4,6 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=9109f5fc16cf963fb3cdd32781b3ce04"
 
 DEPENDS = " \
-    intltool-native \
     bison-native \
     groff-native \
     libtool \
diff --git a/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb
index 1dfb199..33e7c94 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb
@@ -8,14 +8,54 @@
 SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
 SRCREV = "adf2c4490e17a1b9ec1902cc412a24b3b8235c8e"
 
-S = "${WORKDIR}/git"
-
-REQUIRED_DISTRO_FEATURES = "fbdev"
-
-inherit features_check
-
 EXTRA_OEMAKE = "DESTDIR=${D}"
 
-do_install() {
-	oe_runmake install
+PACKAGECONFIG ??= "drm"
+PACKAGECONFIG[drm] = ",,libdrm"
+PACKAGECONFIG[fbdev] = ",,"
+PACKAGECONFIG[sdl] = ",,virtual/libsdl2"
+LVGL_CONFIG_USE_DRM = "${@bb.utils.contains('PACKAGECONFIG', 'drm', '1', '0', d)}"
+LVGL_CONFIG_DRM_CARD ?= "/dev/dri/card0"
+LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}"
+LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)}"
+
+inherit cmake
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${baselib}"
+TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
+
+do_configure:prepend() {
+	sed -i -e "s|\(^#  define USE_FBDEV \).*|#  define USE_FBDEV ${LVGL_CONFIG_USE_FBDEV}|g" \
+		-e "s|\(^#  define USE_DRM \).*|#  define USE_DRM ${LVGL_CONFIG_USE_DRM}|g" \
+		-e "s|\(^#  define DRM_CARD \).*|#  define DRM_CARD \"${LVGL_CONFIG_DRM_CARD}\"|g" \
+		-e "s|\(^# define USE_SDL \).*|#  define USE_SDL ${LVGL_CONFIG_USE_SDL}|g" \
+		-e "s|\(^#  define USE_SDL_GPU \).*|#  define USE_SDL_GPU 1|g" \
+		-e "s|\(^#  define SDL_DOUBLE_BUFFERED \).*|#  define SDL_DOUBLE_BUFFERED 1|g" \
+	"${S}/lv_drv_conf.h"
+
+	if [ "${LVGL_CONFIG_USE_DRM}" -eq 1 ] ; then
+		# Add libdrm build dependency
+		sed -i '/^target_link_libraries/ s@lvgl::drivers@& drm@' "${S}/CMakeLists.txt"
+		# Switch from fbdev to drm usage
+		sed -i 's@fbdev@drm@g' "${S}/main.c"
+		# Pull resolution from DRM instead of hardcoding it
+		sed -i '/disp_drv.hor_res/ d' "${S}/main.c"
+		sed -i '/disp_drv.ver_res/ s@disp_drv.ver_res.*@drm_get_sizes(\&disp_drv.hor_res, \&disp_drv.ver_res, NULL);@' "${S}/main.c"
+	fi
+
+	if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then
+		# Add libsdl build dependency
+		sed -i '/^target_link_libraries/ s@lvgl::drivers@& SDL2@' "${S}/CMakeLists.txt"
+		# Switch from fbdev to sdl usage
+		sed -i 's@fbdev_flush@sdl_display_flush@g' "${S}/main.c"
+		sed -i 's@lv_drivers/display/fbdev.h@lv_drivers/sdl/sdl.h@g' "${S}/main.c"
+		sed -i 's@fbdev@sdl@g' "${S}/main.c"
+	fi
+}
+
+do_install:append() {
+	install -d ${D}${bindir}
+	install -m 0755 ${B}/lvgl_fb ${D}${bindir}/
 }
diff --git a/meta-openembedded/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch b/meta-openembedded/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
deleted file mode 100644
index f0056d6..0000000
--- a/meta-openembedded/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 47f175618a0b0817714ea557c9e93f22f327421e Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Tue, 31 Jul 2018 16:39:52 +0800
-Subject: [PATCH 1/4] tigervnc: remove includedir
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
-
-It fixes host contamination
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- unix/xserver/hw/vnc/Makefile.am | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
-index 470424b..ee18bf9 100644
---- a/unix/xserver/hw/vnc/Makefile.am
-+++ b/unix/xserver/hw/vnc/Makefile.am
-@@ -23,7 +23,7 @@ libvnccommon_la_SOURCES = $(HDRS) \
- 
- libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" -I$(TIGERVNC_SRCDIR)/unix/common \
- 	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
--	-I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} -I$(includedir) \
-+	-I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} \
- 	-I$(top_srcdir)/include
- 
- bin_PROGRAMS = Xvnc
-@@ -43,7 +43,7 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
- 	-UHAVE_CONFIG_H \
- 	-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
- 	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -I$(TIGERVNC_SRCDIR)/unix/common \
--	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
-+	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS}
- 
- Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
- 	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
-@@ -64,7 +64,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_
- 	-I$(top_srcdir)/hw/xfree86/os-support \
- 	-I$(top_srcdir)/hw/xfree86/os-support/bus \
- 	-I$(top_srcdir)/include \
--	${XSERVERLIBS_CFLAGS} -I$(includedir)
-+	${XSERVERLIBS_CFLAGS}
- 
- libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
- 
--- 
-2.7.4
-
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.3.bb b/meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.4.bb
similarity index 85%
rename from meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.3.bb
rename to meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.4.bb
index 18fa63e..9c522d6 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.3.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-app/setxkbmap_1.3.4.bb
@@ -16,4 +16,4 @@
 BBCLASSEXTEND = "native"
 
 SRC_URI_EXT = "xz"
-SRC_URI[sha256sum] = "b560c678da6930a0da267304fa3a41cc5df39a96a5e23d06f14984c87b6f587b"
+SRC_URI[sha256sum] = "be8d8554d40e981d1b93b5ff82497c9ad2259f59f675b38f1b5e84624c07fade"
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xrdb_1.2.1.bb b/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xrdb_1.2.1.bb
index a8c5b3d..20fdea1 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xrdb_1.2.1.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-app/xrdb_1.2.1.bb
@@ -6,3 +6,5 @@
 DEPENDS += "libxmu"
 
 SRC_URI[sha256sum] = "4f5d031c214ffb88a42ae7528492abde1178f5146351ceb3c05f3b8d5abee8b4"
+
+EXTRA_OECONF += "--with-cpp=${bindir}/cpp"
diff --git a/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb b/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb
index 67a821c..bbfab47 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb
@@ -7,7 +7,7 @@
 
 inherit bash-completion kernelsrc kernel-arch
 
-do_populate_lic[depends] += "virtual/kernel:do_patch"
+do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
 
 EXTRA_OEMAKE = "\
     V=1 \
diff --git a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/0001-Prevent-access-times-from-changing-resulting-gzip-md.patch b/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/0001-Prevent-access-times-from-changing-resulting-gzip-md.patch
deleted file mode 100644
index 78c05ef..0000000
--- a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/0001-Prevent-access-times-from-changing-resulting-gzip-md.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From da668e5bf1a721797361ab866d09913ee8e157c4 Mon Sep 17 00:00:00 2001
-From: Jeremy Puhlman <jpuhlman@mvista.com>
-Date: Sat, 22 Feb 2020 04:37:04 +0000
-Subject: [PATCH] Prevent access times from changing resulting gzip md5sum
-
-Upstream-Status: Pending
-https://github.com/ipmitool/ipmitool/pull/186
----
- doc/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index b792762..2c52ce6 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -59,5 +59,5 @@ install:
- 	${INSTALL_DATA_SH} iuser.8 	 ${manto}
- 	${INSTALL_DATA_SH} iseltime.8 	 ${manto}
- 	${INSTALL_DATA_SH} bmclanpet.mib ${datato}
--	cd ${manto}; gzip -f *.8
-+	cd ${manto}; gzip -nf *.8
- 	
--- 
-2.13.3
-
diff --git a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch b/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
index d47e086..2862793 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
+++ b/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch
@@ -6,11 +6,9 @@
 
 Signed-off-by: Armin Kuster <akuster@mvista.com>
 
-Index: ipmiutil-3.0.5/configure.ac
-===================================================================
---- ipmiutil-3.0.5.orig/configure.ac
-+++ ipmiutil-3.0.5/configure.ac
-@@ -149,7 +149,6 @@ CROSS_LFLAGS=""
+--- a/configure.ac
++++ b/configure.ac
+@@ -151,7 +151,6 @@ CROSS_LFLAGS=""
  CROSS_CFLAGS=""
  LIBSENSORS=""
  SAM2OBJ="isensor2.o ievents2.o"
@@ -18,7 +16,7 @@
  
  AC_ARG_ENABLE([useflags],
      [  --enable-useflags    include environment CFLAGS and LDFLAGS.],
-@@ -200,29 +199,42 @@ AC_ARG_ENABLE([gpl],
+@@ -211,29 +210,42 @@ AC_ARG_ENABLE([gpl],
  
  dnl Does this Linux have systemd enabled?  Otherwise use sysv init.
  AC_ARG_ENABLE([systemd],
@@ -83,7 +81,7 @@
  fi
  
  dnl start main logic
-@@ -528,7 +540,7 @@ AC_SUBST(INS_LIB)
+@@ -563,7 +575,7 @@ AC_SUBST(INS_LIB)
  AC_SUBST(SUBDIR_S)
  AC_SUBST(CROSS_CFLAGS)
  AC_SUBST(CROSS_LFLAGS)
@@ -92,10 +90,8 @@
  AC_SUBST(SHR_LINK)
  AC_SUBST(pkgconfigdir)
  
-Index: ipmiutil-3.0.5/scripts/Makefile.am
-===================================================================
---- ipmiutil-3.0.5.orig/scripts/Makefile.am
-+++ ipmiutil-3.0.5/scripts/Makefile.am
+--- a/scripts/Makefile.am
++++ b/scripts/Makefile.am
 @@ -17,7 +17,8 @@ cronto = ${DESTDIR}${etcdir}/cron.daily
  sbinto = ${DESTDIR}${sbindir}
  varto  = ${DESTDIR}/var/lib/ipmiutil
@@ -106,7 +102,7 @@
  sysvinit = ${datato}
  sbinfls = ialarms ihealth ifru igetevent ireset icmd isol ilan isensor isel iserial iwdt iconfig ipicmg ifirewall ifwum ihpm iuser
  
-@@ -47,10 +48,14 @@ install:
+@@ -47,10 +48,13 @@ install:
  	${INSTALL_SCRIPT_SH} ipmi_port.sh ${sysvinit}/ipmi_port
  	${INSTALL_SCRIPT_SH} ipmi_info    ${sysvinit}/ipmi_info
  	${INSTALL_SCRIPT_SH} checksel     ${datato}
@@ -114,7 +110,6 @@
 -	${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}
 -	${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}
 -	${INSTALL_DATA_SH} ipmi_port.service    ${sysdto}
-+	
 +	if [ ! -z "${systemddir}" ]; then \
 +		$(MKDIR) ${sysdto}; \
 +		${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}; \
@@ -122,6 +117,6 @@
 +		${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}; \
 +		${INSTALL_DATA_SH} ipmi_port.service    ${sysdto}; \
 +	fi
- 	${INSTALL_SCRIPT_SH} ipmiutil.env     ${datato}
+ 	${INSTALL_SCRIPT_SH} ipmiutil.env.template  ${datato}
+ 	${INSTALL_SCRIPT_SH} ipmiutil.env.template  ${datato}/ipmiutil.env
  	${INSTALL_SCRIPT_SH} ipmiutil.pre     ${datato}
- 	${INSTALL_SCRIPT_SH} ipmiutil.setup   ${datato}
diff --git a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.5.bb b/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb
similarity index 89%
rename from meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.5.bb
rename to meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb
index 64bcf5f..c85bfc1 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.5.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb
@@ -21,11 +21,9 @@
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/ipmiutil/ipmiutil-${PV}.tar.gz \
            file://fix_systemd_path.patch \
-           file://0001-Prevent-access-times-from-changing-resulting-gzip-md.patch \
            file://0001-ihpm-Include-stdlib.h-for-malloc-free-atoi-functions.patch \
           "
-SRC_URI[md5sum] = "292d6df25cad678bb27e5c8cdc6748f9"
-SRC_URI[sha256sum] = "58ccdbd5755d7dd72478756715af09e9c73330dfad2b91dbf03d2ac504b301a3"
+SRC_URI[sha256sum] = "5ae99bdd1296a8e25cea839784ec39ebca57b0e3701b2d440b8e02e22dc4bc95"
 
 inherit autotools-brokensep pkgconfig systemd
 
@@ -45,4 +43,5 @@
 CFLAGS += "-I${STAGING_INCDIR}"
 LDFLAGS += "-L${STAGING_LIBDIR}"
 
+EXTRA_OECONF += "--enable-useflags"
 COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
diff --git a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.0.bb b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.0.bb
index 7c3df5f..71ca10e 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.0.bb
+++ b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_1.2.0.bb
@@ -17,6 +17,7 @@
 S = "${WORKDIR}/git/src"
 
 EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
+EXTRA_OEMAKE:append:class-native = " UAPIDIR=${includedir}"
 
 inherit pkgconfig
 
@@ -28,4 +29,8 @@
 	oe_runmake install
 }
 
+do_install:append:class-native() {
+	oe_runmake install_uapi_headers
+}
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb b/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb
index cfb461a..0f50a6e 100644
--- a/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb
+++ b/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb
@@ -98,6 +98,10 @@
     ${PACKAGECONFIG_CONFARGS} \
 "
 
+do_configure:append() {
+    sed -i -e 's#${WORKDIR}#<WORKDIR>#g' ${B}/config.h
+}
+
 link_waf() {
     ln -s waf-2.0.25 ${S}/waf
 }
diff --git a/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.0.bb b/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.0.bb
index d05a309..6784b09 100644
--- a/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.0.bb
+++ b/meta-openembedded/meta-oe/recipes-navigation/geoclue/geoclue_2.7.0.bb
@@ -27,7 +27,7 @@
 PACKAGECONFIG[modem-gps] = "-Dmodem-gps-source=true,-Dmodem-gps-source=false,modemmanager"
 PACKAGECONFIG[cdma] = "-Dcdma-source=true,-Dcdma-source=false,modemmanager"
 PACKAGECONFIG[nmea] = "-Dnmea-source=true,-Dnmea-source=false,avahi,avahi-daemon"
-PACKAGECONFIG[lib] = "-Dlibgeoclue=true,-Dlibgeoclue=false,gobject-introspection"
+PACKAGECONFIG[lib] = "-Dlibgeoclue=true,-Dlibgeoclue=false"
 
 GTKDOC_MESON_OPTION = "gtk-doc"
 
diff --git a/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch b/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
deleted file mode 100644
index f172362..0000000
--- a/meta-openembedded/meta-oe/recipes-networking/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 188ad4497947259811ad32faeee95c20f9a44046 Mon Sep 17 00:00:00 2001
-From: "Roy.Li" <rongqing.li@windriver.com>
-Date: Fri, 19 Jul 2013 14:29:31 +0800
-Subject: [PATCH] Fix hardcoded libdir.
-
-Upstream-Status: Pending
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
----
- plugins/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/plugins/Makefile.am b/plugins/Makefile.am
-index 2b02a52..929f6a4 100644
---- a/plugins/Makefile.am
-+++ b/plugins/Makefile.am
-@@ -65,7 +65,7 @@ LIB_MYSQL = @LIB_MYSQL@
- 
- plugindir = @plugindir@
- 
--sasldir = $(prefix)/lib/sasl2
-+sasldir = $(libdir)/sasl2
- sasl_LTLIBRARIES = @SASL_MECHS@
- EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
- 	libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
diff --git a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb b/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb
deleted file mode 100644
index c6e00c3..0000000
--- a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint-native_git.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-# Recipe for building gutenprint-native
-#
-# Native part is for generating strings - xmli18n-tmp.h used by target recipe
-# We don't depend on cups as this is for generating the string header.
-#
-# Copyright (c) Ambu A/S - All rights reserved
-# SPDX-License-Identifier: MIT
-#
-# Author(s)
-#   clst@ambu.com (Claus Stovgaard)
-#
-
-require gutenprint.inc
-
-# We could consider switching to BBCLASSEXTEND native instead of inherit
-# Using devtool with this results in warning, as devtool append externalsrc to
-# inheritance, making native not being inherited last.
-inherit autotools-brokensep pkgconfig native
-
-SECTION = "libs"
-
-# binutils is for xz etc.
-# gettext-native for configuration
-# flex-native is used for compilation
-# byacc-native is for yacc command (compilation)
-DEPENDS += "binutils-native gettext-native flex-native byacc-native"
-
-EXTRA_OECONF = "--without-doc --without-cups"
-
-# gutenprint does not have a configure file in its root folder.
-# Rather it has a autogen.sh in its root folder. We just use it
-do_configure() {
-    ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh"
-    oe_runconf
-}
-
-# Currently we only uses the string header, even though we compile the complete
-# native version of the library. So we limit the install to the needed.
-do_install() {
-    install -d ${D}${datadir}/gutenprint/
-    install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/
-}
\ No newline at end of file
diff --git a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint.inc b/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint.inc
deleted file mode 100644
index 1f71258..0000000
--- a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-# common part for gutenprint-native / gutenprint
-#
-# As we are using the native part for generating string header to the target
-# version, it is important they use the same version.
-# So we set the SRC_URI and SRCREV here.
-#
-# Copyright (c) Ambu A/S - All rights reserved
-# SPDX-License-Identifier: MIT
-#
-# Author(s)
-#   clst@ambu.com (Claus Stovgaard)
-#
-
-DESCRIPTION = "Gutenprint printer drivers"
-HOMEPAGE = "http://gimp-print.sourceforge.net/"
-LICENSE = "GPL-2.0-or-later"
-
-SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master"
-SRCREV = "8e47dc44dd7738302ba9e8fbc1f918461fed0236"
-S = "${WORKDIR}/git"
-
-LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
\ No newline at end of file
diff --git a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb b/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb
index 7779793..f0dc6ad 100644
--- a/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb
+++ b/meta-openembedded/meta-oe/recipes-printing/gutenprint/gutenprint_git.bb
@@ -9,38 +9,66 @@
 #   clst@ambu.com (Claus Stovgaard)
 #
 
-require gutenprint.inc
+DESCRIPTION = "Gutenprint printer drivers"
+HOMEPAGE = "http://gimp-print.sourceforge.net/"
+LICENSE = "GPL-2.0-or-later"
 
-inherit autotools-brokensep pkgconfig
+SRC_URI = "git://git.code.sf.net/p/gimp-print/source;protocol=https;branch=master"
+SRCREV = "66b0a7bc3fd25659a3f295db0ebb39d04e413c01"
+PV = "5.3.3+git${SRCPV}"
 
-DEPENDS += "cups gutenprint-native"
+S = "${WORKDIR}/git"
 
-# cups-genppdupdate depend on perl
-# We also set the path to PERL as else the version in hosttools would be used
-# with full path
-RDEPENDS:${PN} = "perl "
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-EXTRA_OECONF = "--without-doc --disable-test --disable-nls PERL=/usr/bin/perl"
+inherit autotools gettext pkgconfig
 
-# gutenprint does not have a configure file in its root folder.
-# Rather it has a autogen.sh in its root folder. We just use it
-# together with adapting for cross compilation
-do_configure() {
+DEPENDS += "glib-2.0-native cups gutenprint-native"
+# autogen.sh needs autopoint
+DEPENDS:class-native = "glib-2.0-native gettext-native"
+
+EXTRA_OECONF = "--without-doc --disable-test PERL=/usr/bin/perl"
+EXTRA_OECONF:append:class-native = " --without-cups"
+
+do_configure:prepend:class-target() {
     # Disable the xmli18n-tmp.h rule
     # It depend on the local build extract-strings, we are not able to run this
     # So we are using the xmli18n-tmp.h created by gutenprint-native
     sed -i 's/all-local: xmli18n-tmp.h xml-stamp/all-local: xml-stamp/'  ${S}/src/xml/Makefile.am
     sed -i 's/dist-hook: xmli18n-tmp.h xml-stamp/dist-hook: xml-stamp/'  ${S}/src/xml/Makefile.am
-    cp ${RECIPE_SYSROOT_NATIVE}${datadir}/gutenprint/xmli18n-tmp.h ${S}/src/xml/
+    # Despite being a generated file, this needs to be in S.
+    cp ${STAGING_DATADIR_NATIVE}/gutenprint/xmli18n-tmp.h ${S}/src/xml/
+}
 
-    ${S}/autogen.sh || bbnote "${PN} failed to autogen.sh"
+do_configure() {
+    # Need to call autogen.sh as that creates m4/stp_release.m4
+    cd ${S}
+    NOCONFIGURE=1 ./autogen.sh
+    cd ${B}
     oe_runconf
 }
 
-# gutenprint install the calibrate.ppm and net.sf.gimp-print.usb-quirks in
-# /usr/share/cups
-FILES:${PN} += "${datadir}/cups/*"
+do_install:append() {
+    # This file contains build paths and isn't very useful, remove it
+    rm -f ${D}${libdir}/gutenprint/*/config.summary
+    # Match ownership to cups
+    chgrp lp ${D}${sysconfdir}/cups
+}
 
-# Install in /etc/cups when RPM needs DIRFILES to not conflict
-# https://stackoverflow.com/questions/44762430/why-do-i-get-etc-cups-conflicts-between-attempted-installs-in-yocto
-DIRFILES = "1"
\ No newline at end of file
+do_compile:class-native() {
+    oe_runmake -C ${B}/src/xml
+}
+
+do_install:class-native() {
+    install -d ${D}${datadir}/gutenprint/
+    install -m644 ${B}/src/xml/xmli18n-tmp.h ${D}${datadir}/gutenprint/
+}
+
+FILES:${PN} += "${datadir}/cups/*"
+RDEPENDS:${PN} = "perl"
+
+BBCLASSEXTEND = "native"
+
+# Pull in base-passwd for the lp user
+DEPENDS:append:class-target = " base-passwd"
+PACKAGE_WRITE_DEPS += "base-passwd"
diff --git a/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.0.bb b/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.1.bb
similarity index 91%
rename from meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.0.bb
rename to meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.1.bb
index bb19ff1..1440d72 100644
--- a/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.0.bb
+++ b/meta-openembedded/meta-oe/recipes-support/c-ares/c-ares_1.19.1.bb
@@ -6,7 +6,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=fb997454c8d62aa6a47f07a8cd48b006"
 
 SRC_URI = "git://github.com/c-ares/c-ares.git;branch=main;protocol=https"
-SRCREV = "fddf01938d3789e06cc1c3774e4cd0c7d2a89976"
+SRCREV = "6360e96b5cf8e5980c887ce58ef727e53d77243a"
 
 UPSTREAM_CHECK_GITTAGREGEX = "cares-(?P<pver>\d+_(\d_?)+)"
 
diff --git a/meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb b/meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.3.0.bb
similarity index 95%
rename from meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
rename to meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.3.0.bb
index 92466f6..a8fd88a 100644
--- a/meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
+++ b/meta-openembedded/meta-oe/recipes-support/dc/double-conversion_3.3.0.bb
@@ -12,7 +12,7 @@
         git://github.com/google/double-conversion.git;protocol=https;branch=master \
         file://run-ptest \
 "
-SRCREV = "af09fd65fcf24eee95dc62813ba9123414635428"
+SRCREV = "4f7a25d8ced8c7cf6eee6fd09d6788eaa23c9afe"
 
 inherit cmake ptest
 
diff --git a/meta-openembedded/meta-oe/recipes-support/farsight/libnice/0001-agent-meson-Replace-filename-with-basename.patch b/meta-openembedded/meta-oe/recipes-support/farsight/libnice/0001-agent-meson-Replace-filename-with-basename.patch
new file mode 100644
index 0000000..897de4a
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/farsight/libnice/0001-agent-meson-Replace-filename-with-basename.patch
@@ -0,0 +1,40 @@
+From 7c510cd20bb443064ab4a0d2c6d917e807b2671b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 19:45:28 -0700
+Subject: [PATCH] agent/meson: Replace filename with basename
+
+This avoids emitting absolute paths into generated sourcecode, it
+improves reproducibility. See [1]
+
+[1] https://developer-old.gnome.org/gobject/stable/glib-mkenums.html
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/258]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ agent/meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/agent/meson.build b/agent/meson.build
+index 2e5b272..44fcd6b 100644
+--- a/agent/meson.build
++++ b/agent/meson.build
+@@ -29,14 +29,14 @@ gnome = import('gnome')
+ 
+ agent_enum_types_c =  gnome.mkenums('agent-enum-types.c', sources : agent_headers,
+ 				    fhead: '#include <config.h>\n#include <glib-object.h>\n#include "agent.h"\n#include "pseudotcp.h"\n#include "agent-enum-types.h"',
+-				    fprod: '\n/* enumerations from "@filename@" */',
++				    fprod: '\n/* enumerations from "@basename@" */',
+ 				    vhead: 'GType\n@enum_name@_get_type (void)\n{\n  static GType type = 0;\n  if (!type) {\n    static const G@Type@Value values[] = {',
+ 				    vprod: '      { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ 				    vtail: '      { 0, NULL, NULL }\n    };\n    type = g_@type@_register_static ("@EnumName@", values);\n  }\n  return type;\n}\n\n')
+ 
+ agent_enum_types_h = gnome.mkenums('agent-enum-types.h', sources : agent_headers,
+ 				   fhead: '#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n',
+-				   fprod: '/* enumerations from "@filename@" */\n',
++				   fprod: '/* enumerations from "@basename@" */\n',
+ 				   vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n',
+ 					  ftail: 'G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */')
+ 
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-support/farsight/libnice_0.1.21.bb b/meta-openembedded/meta-oe/recipes-support/farsight/libnice_0.1.21.bb
index 210d4d8..f319b99 100644
--- a/meta-openembedded/meta-oe/recipes-support/farsight/libnice_0.1.21.bb
+++ b/meta-openembedded/meta-oe/recipes-support/farsight/libnice_0.1.21.bb
@@ -8,7 +8,8 @@
                     file://COPYING.MPL;md5=3c617710e51cdbe0fc00716f056dfb1a \
 "
 
-SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz"
+SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz \
+           file://0001-agent-meson-Replace-filename-with-basename.patch"
 SRC_URI[sha256sum] = "72e73a2acf20f59093e21d5601606e405873503eb35f346fa621de23e99b3b39"
 
 DEPENDS = "glib-2.0 gnutls"
diff --git a/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb b/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb
index 1fead4d..33e8279 100644
--- a/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb
+++ b/meta-openembedded/meta-oe/recipes-support/fftw/fftw_3.3.10.bb
@@ -55,7 +55,7 @@
 do_compile() {
     for lib in fftw fftwl fftwf; do
         cd ${WORKDIR}/build-$lib
-        sed -i -e 's|${TOOLCHAIN_OPTIONS}||g' config.h
+        test -n "${TOOLCHAIN_OPTIONS}" && sed -i -e 's|${TOOLCHAIN_OPTIONS}||g' config.h
         autotools_do_compile
     done
 }
diff --git a/meta-openembedded/meta-oe/recipes-support/fmt/fmt_9.1.0.bb b/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.0.0.bb
similarity index 77%
rename from meta-openembedded/meta-oe/recipes-support/fmt/fmt_9.1.0.bb
rename to meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.0.0.bb
index 3489615..a8e6e56 100644
--- a/meta-openembedded/meta-oe/recipes-support/fmt/fmt_9.1.0.bb
+++ b/meta-openembedded/meta-oe/recipes-support/fmt/fmt_10.0.0.bb
@@ -2,10 +2,10 @@
 DESCRIPTION = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
 HOMEPAGE = "https://fmt.dev"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=af88d758f75f3c5c48a967501f24384b"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=b9257785fc4f3803a4b71b76c1412729"
 
 SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https"
-SRCREV = "a33701196adfad74917046096bf5a2aa0ab0bb50"
+SRCREV = "a0b8a92e3d1532361c2f7feb63babc5c18d00ef2"
 
 S = "${WORKDIR}/git"
 
diff --git a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.10.0.bb b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.10.0.bb
index 0fc779a..4cb4526 100644
--- a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.10.0.bb
+++ b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.10.0.bb
@@ -54,6 +54,10 @@
 
 PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*"
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h
+}
+
 # we will need winpr-makecert to generate TLS certificates
 do_install:append () {
     install -d ${D}${bindir}
diff --git a/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb b/meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2018-12-18.bb
similarity index 100%
rename from meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb
rename to meta-openembedded/meta-oe/recipes-support/gnulib/gnulib_2018-12-18.bb
diff --git a/meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.13.1.bb b/meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.14.0.bb
similarity index 90%
rename from meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.13.1.bb
rename to meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.14.0.bb
index 2e62612..91e5b55 100644
--- a/meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.13.1.bb
+++ b/meta-openembedded/meta-oe/recipes-support/hidapi/hidapi_0.14.0.bb
@@ -12,5 +12,5 @@
 inherit autotools pkgconfig
 
 SRC_URI = "git://github.com/libusb/hidapi.git;protocol=https;branch=master"
-SRCREV = "4ebce6b5059b086d05ca7e091ce04a5fd08ac3ac"
+SRCREV = "d3013f0af3f4029d82872c1a9487ea461a56dee4"
 S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-support/inih/files/0001-include-install-header-files-without-prefix-dir-inih.patch b/meta-openembedded/meta-oe/recipes-support/inih/files/0001-include-install-header-files-without-prefix-dir-inih.patch
deleted file mode 100644
index fb7b85c..0000000
--- a/meta-openembedded/meta-oe/recipes-support/inih/files/0001-include-install-header-files-without-prefix-dir-inih.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-include: install header files without prefix dir inih
-
-The other flavor of inih which adapted by Fedora and Ubuntu installs
-header files to /usr/include directly. And xfsprogs 5.10.0 also checks
-ini.h without extra search path and fails. So install header files
-without prefix dir inih.
-
-Upstream-Status: Submitted [https://github.com/OSSystems/inih/pull/4]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- include/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
-index 7a46ee7..4a9033f 100644
---- a/include/CMakeLists.txt
-+++ b/include/CMakeLists.txt
-@@ -1 +1 @@
--install(FILES ini.h INIReader.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/inih)
-+install(FILES ini.h INIReader.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
--- 
-2.17.1
-
diff --git a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-ptest-modify-delays-in-toggle-tests.patch b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-ptest-modify-delays-in-toggle-tests.patch
new file mode 100644
index 0000000..11f2d5c
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-ptest-modify-delays-in-toggle-tests.patch
@@ -0,0 +1,60 @@
+From b73a79245ac0fa36b15bf3308e4ed008793ff15c Mon Sep 17 00:00:00 2001
+From: Joe Slater <joe.slater@windriver.com>
+Date: Fri, 19 May 2023 08:46:47 -0700
+Subject: [PATCH] ptest: modify delays in toggle test
+
+The test "gpioset: toggle (continuous)" uses fixed delays to test
+toggling values.  This is not reliable, so we switch to looking
+for transitions from one value to another.
+
+Upstream-Status: pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+---
+ tools/gpio-tools-test.bats | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- libgpiod-2.0.orig/tools/gpio-tools-test.bats
++++ libgpiod-2.0/tools/gpio-tools-test.bats
+@@ -141,6 +141,20 @@ gpiosim_check_value() {
+ 	[ "$VAL" = "$EXPECTED" ]
+ }
+ 
++gpiosim_wait_value() {
++	local OFFSET=$2
++	local EXPECTED=$3
++	local DEVNAME=${GPIOSIM_DEV_NAME[$1]}
++	local CHIPNAME=${GPIOSIM_CHIP_NAME[$1]}
++
++	for i in {1..10} ; do
++		VAL=$(<$GPIOSIM_SYSFS/$DEVNAME/$CHIPNAME/sim_gpio$OFFSET/value)
++		[ "$VAL" = "$EXPECTED" ] && return
++		sleep 0.1
++	done
++	return 1
++}
++
+ gpiosim_cleanup() {
+ 	for CHIP in ${!GPIOSIM_CHIP_NAME[@]}
+ 	do
+@@ -1567,15 +1581,15 @@ request_release_line() {
+ 	gpiosim_check_value sim0 4 0
+ 	gpiosim_check_value sim0 7 0
+ 
+-	sleep 1
+-
+-	gpiosim_check_value sim0 1 0
++	# sleeping fixed amounts can be unreliable, so we
++	# sync to the toggles
++	#
++	gpiosim_wait_value sim0 1 0
+ 	gpiosim_check_value sim0 4 1
+ 	gpiosim_check_value sim0 7 1
+ 
+-	sleep 1
+ 
+-	gpiosim_check_value sim0 1 1
++	gpiosim_wait_value sim0 1 1
+ 	gpiosim_check_value sim0 4 0
+ 	gpiosim_check_value sim0 7 0
+ }
diff --git a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
index 337554c..91c4d27 100644
--- a/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
+++ b/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
@@ -9,6 +9,8 @@
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
+SRC_URI += "file://0001-ptest-modify-delays-in-toggle-tests.patch"
+
 SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392"
 
 # Enable all project features for ptest
diff --git a/meta-openembedded/meta-oe/recipes-support/libiio/libiio/0001-CMake-Move-include-CheckCSourceCompiles-before-its-m.patch b/meta-openembedded/meta-oe/recipes-support/libiio/libiio/0001-CMake-Move-include-CheckCSourceCompiles-before-its-m.patch
deleted file mode 100644
index a2cfd47..0000000
--- a/meta-openembedded/meta-oe/recipes-support/libiio/libiio/0001-CMake-Move-include-CheckCSourceCompiles-before-its-m.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 758ba58c81273d9075a539216f8a322935c2e434 Mon Sep 17 00:00:00 2001
-From: Paul Cercueil <paul@crapouillou.net>
-Date: Fri, 12 Nov 2021 16:49:21 +0000
-Subject: [PATCH] CMake: Move include(CheckCSourceCompiles) before its macros
- are used
-
-Move include(CheckCSourceCompiles) before any of the
-check_c_source_compiles() macros is called.
-
-This fixes a CMake error when compiling with WITH_NETWORK_GET_BUFFER
-disabled.
-
-Upstream-Status: Accepted [https://github.com/analogdevicesinc/libiio/commit/758ba58c81273d9075a539216f8a322935c2e434]
-
-Signed-off-by: Paul Cercueil <paul@crapouillou.net>
----
- CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7437136c8210..05b4feff233b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -296,9 +296,10 @@ if(WITH_NETWORK_BACKEND)
- 	endif()
- 
- 	if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-+		include(CheckCSourceCompiles)
-+
- 		option(WITH_NETWORK_GET_BUFFER "Enable experimental zero-copy transfers" OFF)
- 		if (WITH_NETWORK_GET_BUFFER)
--			include(CheckCSourceCompiles)
- 			check_c_source_compiles("#define _GNU_SOURCE=1\n#include <fcntl.h>\nint main(void) { return O_TMPFILE; }"
- 				HAS_O_TMPFILE)
- 
--- 
-2.34.1
-
diff --git a/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
index c8ff0d3..ea51c19 100644
--- a/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -4,12 +4,10 @@
 LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
 
-SRCREV = "92d6a35f3d8d721cda7d6fe664b435311dd368b4"
-PV = "0.23"
+SRCREV = "c4498c27761d04d4ac631ec59c1613bfed079da5"
+PV = "0.24"
 
-SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master \
-           file://0001-CMake-Move-include-CheckCSourceCompiles-before-its-m.patch \
-"
+SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
@@ -20,7 +18,7 @@
     flex-native bison-native libaio \
 "
 
-inherit cmake python3native systemd setuptools3
+inherit cmake python3native systemd setuptools3 pkgconfig
 
 EXTRA_OECMAKE = " \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
diff --git a/meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.53.bb b/meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.54.bb
similarity index 88%
rename from meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.53.bb
rename to meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.54.bb
index 3458838..8385b63 100644
--- a/meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.53.bb
+++ b/meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.54.bb
@@ -18,8 +18,7 @@
 
 SRC_URI = "https://releases.pagure.org/${BPN}/${BP}.tar.xz"
 
-SRC_URI[md5sum] = "ee02da867389d290923cc138487176f9"
-SRC_URI[sha256sum] = "5eea2ef17b304977ba3ecb87afad4319fa0440f825e4f6fba6e8fa2ffeb88785"
+SRC_URI[sha256sum] = "9a4032202fc0d2b0858f41b167389a9cfe52ac24ec282e6479b90765319de113"
 
 inherit update-alternatives
 
diff --git a/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb b/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb
index d440a53..a228c3c 100644
--- a/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb
+++ b/meta-openembedded/meta-oe/recipes-support/mcelog/mce-inject_git.bb
@@ -21,4 +21,4 @@
 
 inherit autotools-brokensep
 
-EXTRA_OEMAKE = "destdir=${D}"
+EXTRA_OEMAKE = "destdir=${D} CFLAGS='${CFLAGS}'"
diff --git a/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb b/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb
index f4f1b37..fd302db 100644
--- a/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb
+++ b/meta-openembedded/meta-oe/recipes-support/mcelog/mce-test_git.bb
@@ -14,8 +14,8 @@
            file://makefile-remove-ldflags.patch \
            file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \
           "
-SRCREV = "7643baf6c3919b3d727e6ba6c2e545dc6a653307"
-PV = "20190917+git${SRCPV}"
+SRCREV = "025014dedca39d2b8a57a82e52286e72e157d73a"
+PV = "20222810+git${SRCPV}"
 
 RDEPENDS:${PN} = "mcelog mce-inject dialog bash"
 
@@ -23,6 +23,8 @@
 
 S ="${WORKDIR}/git"
 
+EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'"
+
 do_install:append(){
    install -d ${D}/opt/mce-test
    cp -rf ${S}/* ${D}/opt/mce-test/
diff --git a/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_191.bb b/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_194.bb
similarity index 85%
rename from meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_191.bb
rename to meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_194.bb
index e713433..9b5c554 100644
--- a/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_191.bb
+++ b/meta-openembedded/meta-oe/recipes-support/mcelog/mcelog_194.bb
@@ -11,18 +11,25 @@
     file://run-ptest \
 "
 
-SRCREV = "a3552acad43ac1f47d3acba1c79462bdece4ea17"
+SRCREV = "8f33fdc47160edce09d75e1316b4d88129ca60a0"
 
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep ptest
+inherit ptest
 
 COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux'
 
-do_install:append() {
+EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'"
+
+do_compile() {
+    oe_runmake
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
     install -d ${D}${sysconfdir}/cron.hourly
     install -m 0755 ${S}/mcelog.cron ${D}${sysconfdir}/cron.hourly/
     sed -i 's/bash/sh/' ${D}${sysconfdir}/cron.hourly/mcelog.cron
diff --git a/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-m4-Just-emit-the-first-line-of-compiler-version.patch b/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-m4-Just-emit-the-first-line-of-compiler-version.patch
new file mode 100644
index 0000000..9bd3d18
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/openct/openct/0001-m4-Just-emit-the-first-line-of-compiler-version.patch
@@ -0,0 +1,31 @@
+From 146b5116140d719e4e9ae19748c0b6dee7d82f96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 22:01:28 -0700
+Subject: [PATCH] m4: Just emit the first line of compiler version
+
+Avoids emitting buildpaths into comments
+Fixes
+WARNING: openct-0.6.20-r0 do_package_qa: QA Issue: File /usr/include/openct/types.h in package openct-dev contains reference to TMPDIR [buildpaths]
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ m4/ac_create_stdint_h.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/ac_create_stdint_h.m4 b/m4/ac_create_stdint_h.m4
+index 66de704..4b7223a 100644
+--- a/m4/ac_create_stdint_h.m4
++++ b/m4/ac_create_stdint_h.m4
+@@ -110,7 +110,7 @@ echo "#define" $_ac_stdint_h "1" >>$ac_stdint_h
+ echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint_h
+ echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint_h
+ if test "$GCC" = "yes" ; then
+-  echo "/* generated using a gnu compiler version" `$CC --version` "*/" \
++  echo "/* generated using a gnu compiler version" `$CC --version|head -1` "*/" \
+   >>$ac_stdint_h
+ else
+   echo "/* generated using $CC */" >>$ac_stdint_h
+-- 
+2.40.1
+
diff --git a/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb b/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
index a873da6..0d3ea41 100644
--- a/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
+++ b/meta-openembedded/meta-oe/recipes-support/openct/openct_0.6.20.bb
@@ -14,6 +14,7 @@
     https://downloads.sourceforge.net/project/opensc/${BPN}/${BPN}-${PV}.tar.gz \
     file://etc-openct.udev.in-disablePROGRAM.patch \
     file://etc-openct_usb.in-modify-UDEVINFO.patch \
+    file://0001-m4-Just-emit-the-first-line-of-compiler-version.patch \
     file://openct.init \
     file://openct.sysconfig \
     file://openct.service \
diff --git a/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
deleted file mode 100644
index 9e6a613..0000000
--- a/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9b4959b97d2e95d4b49cf6ca2a3fce3cdb484f2d Mon Sep 17 00:00:00 2001
-From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Date: Thu, 31 Mar 2016 00:20:15 +0200
-Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
-
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
-
----
- 3rdparty/ippicv/ippicv.cmake | 15 +--------------
- 1 file changed, 1 insertion(+), 14 deletions(-)
-
-diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
-index 257af6fcc6..f88460450f 100644
---- a/3rdparty/ippicv/ippicv.cmake
-+++ b/3rdparty/ippicv/ippicv.cmake
-@@ -34,18 +34,5 @@ function(download_ippicv root_var)
-   endif()
- 
-   set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
--  ocv_download(FILENAME ${OPENCV_ICV_NAME}
--               HASH ${OPENCV_ICV_HASH}
--               URL
--                 "${OPENCV_IPPICV_URL}"
--                 "$ENV{OPENCV_IPPICV_URL}"
--                 "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
--               DESTINATION_DIR "${THE_ROOT}"
--               ID IPPICV
--               STATUS res
--               UNPACK RELATIVE_URL)
--
--  if(res)
--    set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
--  endif()
-+  set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
- endfunction()
diff --git a/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.30.bb b/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.30.bb
index c22eaf1..0437fba 100644
--- a/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.30.bb
+++ b/meta-openembedded/meta-oe/recipes-support/remmina/remmina_1.4.30.bb
@@ -38,6 +38,10 @@
 # Switch on gtk support in avahi recipe if you want to enable avahi support
 PACKAGECONFIG[avahi] = "-DWITH_AVAHI=ON, -DWITH_AVAHI=OFF, avahi"
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}|<WORKDIR>|g' ${B}/generated/buildflags.h
+}
+
 RDEPENDS:${PN} = "bash"
 
 FILES:${PN}+= " \
diff --git a/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch b/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch
new file mode 100644
index 0000000..c767db9
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Backport
+[https://github.com/gabime/spdlog/commit/0ca574ae168820da0268b3ec7607ca7b33024d05]
+
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
+
+From 0ca574ae168820da0268b3ec7607ca7b33024d05 Mon Sep 17 00:00:00 2001
+From: H1X4 <10332146+H1X4Dev@users.noreply.github.com>
+Date: Fri, 31 Mar 2023 20:39:32 +0300
+Subject: [PATCH] fix build for master fmt (non-bundled) (#2694)
+
+* fix build for master fmt (non-bundled)
+
+* update fmt_runtime_string macro
+
+* fix build of updated macro
+---
+ include/spdlog/common.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/spdlog/common.h b/include/spdlog/common.h
+index e69201a81..5f671c5c6 100644
+--- a/include/spdlog/common.h
++++ b/include/spdlog/common.h
+@@ -173,12 +173,19 @@ using format_string_t = fmt::format_string<Args...>;
+ template<class T>
+ using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
+ 
++template <typename Char>
++#if FMT_VERSION >= 90101
++using fmt_runtime_string = fmt::runtime_format_string<Char>;
++#else
++using fmt_runtime_string = fmt::basic_runtime<Char>;
++#endif
++
+ // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here,
+ // in addition, fmt::basic_runtime<Char> is only convertible to basic_format_string<Char> but not basic_string_view<Char>
+ template<class T, class Char = char>
+ struct is_convertible_to_basic_format_string
+     : std::integral_constant<bool,
+-          std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value>
++          std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt_runtime_string<Char>>::value>
+ {};
+ 
+ #    if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
diff --git a/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb b/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb
index ec985fb..2800be4 100644
--- a/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb
+++ b/meta-openembedded/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb
@@ -6,6 +6,7 @@
 SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36"
 SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \
            file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
+           file://fix-build-for-master-fmt.patch \
            "
 
 DEPENDS += "fmt"
diff --git a/meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.0.bb b/meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.1.bb
similarity index 92%
rename from meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.0.bb
rename to meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.1.bb
index 07ab283..9bf3809 100644
--- a/meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.0.bb
+++ b/meta-openembedded/meta-oe/recipes-support/zchunk/zchunk_1.3.1.bb
@@ -6,7 +6,7 @@
 
 SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main"
 
-SRCREV = "1d8f14484b4e0b507487abe6c294fb2059b7b72f"
+SRCREV = "b462b1587f7d3aa782689430e83e96c737748f33"
 S = "${WORKDIR}/git"
 
 DEPENDS = "zstd"
diff --git a/meta-openembedded/meta-oe/recipes-test/bats/bats_1.9.0.bb b/meta-openembedded/meta-oe/recipes-test/bats/bats_1.9.0.bb
index a642d7c..015bc42 100644
--- a/meta-openembedded/meta-oe/recipes-test/bats/bats_1.9.0.bb
+++ b/meta-openembedded/meta-oe/recipes-test/bats/bats_1.9.0.bb
@@ -15,10 +15,12 @@
 
 S = "${WORKDIR}/git"
 
+# Numerous scripts assume ${baselib} == lib, which is not true.
+#
 do_configure:prepend() {
-	sed -i 's:\$BATS_ROOT/lib:\$BATS_ROOT/${baselib}:g' ${S}/libexec/bats-core/bats
-	sed -i 's:\$BATS_ROOT/lib:\$BATS_ROOT/${baselib}:g' ${S}/libexec/bats-core/bats-exec-file
-	sed -i 's:\$BATS_ROOT/lib:\$BATS_ROOT/${baselib}:g' ${S}/libexec/bats-core/bats-exec-test
+	for f in ${S}/libexec/bats-core/* ${S}/lib/bats-core/* ; do
+		sed -i 's:\$BATS_ROOT/lib/:\$BATS_ROOT/${baselib}/:g' $f
+	done
 }
 
 do_install() {
diff --git a/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc
index acb853c..9dc5927 100644
--- a/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-openembedded/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -27,6 +27,7 @@
     python3-polyline \
     python3-precise-runner \
     python3-prettytable \
+    python3-pylint \
     python3-ptyprocess \
     python3-pyasn1-modules \
     python3-pyroute2 \
diff --git a/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index 4965e69..982e413 100644
--- a/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -314,8 +314,6 @@
     python3-pycodestyle \
     python3-pyconnman \
     python3-pycurl \
-    python3-pydbus \
-    python3-pydbus-manager \
     python3-pydicti \
     python3-pyephem \
     python3-pyexpect \
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-daemon/0001-Workaround-for-issue-2-1.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-daemon/0001-Workaround-for-issue-2-1.patch
deleted file mode 100644
index dbb8407..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-daemon/0001-Workaround-for-issue-2-1.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0981eee9f0198c2045dc0eaa78a005d06fc7bfe4 Mon Sep 17 00:00:00 2001
-From: Carlos Eduardo Moreira dos Santos <cems@cemshost.com.br>
-Date: Tue, 28 Mar 2017 18:23:44 -0300
-Subject: [PATCH] Workaround for issue 2 [1]
-
-[1] https://pagure.io/python-daemon/issue/2
----
- version.py | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/version.py b/version.py
-index d58422a377ee..293e2d64c2b7 100644
---- a/version.py
-+++ b/version.py
-@@ -648,9 +648,10 @@ class ChangelogAwareDistribution(distutils.dist.Distribution, object):
- 
-     @lru_cache(maxsize=128)
-     def get_version_info(self):
--        changelog_path = get_changelog_path(self)
--        version_info = generate_version_info_from_changelog(changelog_path)
--        return version_info
-+        return {
-+            'version': '2.1.2',
-+            'maintainer': 'Ben Finney'
-+        }
- 
-     def get_version(self):
-         version_info = self.get_version_info()
--- 
-2.7.4
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
deleted file mode 100644
index 2575306..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 07d4f095a9e22ae676a8d68073101131e65012dc Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 15 Nov 2011 13:16:54 +0100
-Subject: [PATCH] python imaging setup.py: force paths for zlib, freetype and jpeg and don't add host paths
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- setup.py |   14 +++-----------
- 1 files changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 5d4d53a..b1a22ec 100644
---- a/setup.py
-+++ b/setup.py
-@@ -34,10 +34,10 @@ def libinclude(root):
- # TIFF_ROOT = libinclude("/opt/tiff")
- 
- TCL_ROOT = None
--JPEG_ROOT = None
--ZLIB_ROOT = None
-+JPEG_ROOT = os.environ['STAGING_LIBDIR']
-+ZLIB_ROOT = os.environ['STAGING_LIBDIR']
- TIFF_ROOT = None
--FREETYPE_ROOT = None
-+FREETYPE_ROOT =  os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
- LCMS_ROOT = None
- 
- # FIXME: add mechanism to explicitly *disable* the use of a library
-@@ -147,7 +147,6 @@ class pil_build_ext(build_ext):
-             add_directory(library_dirs, "/opt/local/lib")
-             add_directory(include_dirs, "/opt/local/include")
- 
--        add_directory(library_dirs, "/usr/local/lib")
-         # FIXME: check /opt/stuff directories here?
- 
-         prefix = sysconfig.get_config_var("prefix")
-@@ -207,13 +206,6 @@ class pil_build_ext(build_ext):
-             if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
-                 add_directory(include_dirs, tcl_dir)
- 
--        # standard locations
--        add_directory(library_dirs, "/usr/local/lib")
--        add_directory(include_dirs, "/usr/local/include")
--
--        add_directory(library_dirs, "/usr/lib")
--        add_directory(include_dirs, "/usr/include")
--
-         #
-         # insert new dirs *before* default libs, to avoid conflicts
-         # between Python PYD stub libs and real libraries
--- 
-1.7.2.5
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
deleted file mode 100644
index 4960ed4..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-At least lcms wasn't deterministicly detected from sysroot.
-
-This will allow to export LCMS_ENABLED=False when lcms isn't in PACKAGECONFIG.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr Imaging-1.1.7.orig/setup.py Imaging-1.1.7/setup.py
---- Imaging-1.1.7.orig/setup.py	2013-07-22 10:17:02.081457075 +0200
-+++ Imaging-1.1.7/setup.py	2013-07-22 13:10:09.029707492 +0200
-@@ -39,6 +39,12 @@
- TIFF_ROOT = None
- FREETYPE_ROOT =  os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
- LCMS_ROOT = None
-+TCL_ENABLED = os.getenv('TCL_ENABLED', "True")
-+JPEG_ENABLED = os.getenv('JPEG_ENABLED', "True")
-+ZLIB_ENABLED = os.getenv('ZLIB_ENABLED', "True")
-+TIFF_ENABLED = os.getenv('TIFF_ENABLED', "True")
-+FREETYPE_ENABLED = os.getenv('FREETYPE_ENABLED', "True")
-+LCMS_ENABLED = os.getenv('LCMS_ENABLED', "True")
- 
- # FIXME: add mechanism to explicitly *disable* the use of a library
- 
-@@ -220,22 +226,22 @@
-             zlib = jpeg = tiff = freetype = tcl = tk = lcms = None
-         feature = feature()
- 
--        if find_include_file(self, "zlib.h"):
-+        if ZLIB_ENABLED == 'True' and find_include_file(self, "zlib.h"):
-             if find_library_file(self, "z"):
-                 feature.zlib = "z"
-             elif sys.platform == "win32" and find_library_file(self, "zlib"):
-                 feature.zlib = "zlib" # alternative name
- 
--        if find_include_file(self, "jpeglib.h"):
-+        if JPEG_ENABLED == 'True' and find_include_file(self, "jpeglib.h"):
-             if find_library_file(self, "jpeg"):
-                 feature.jpeg = "jpeg"
-             elif sys.platform == "win32" and find_library_file(self, "libjpeg"):
-                 feature.jpeg = "libjpeg" # alternative name
- 
--        if find_library_file(self, "tiff"):
-+        if TIFF_ENABLED == 'True' and find_library_file(self, "tiff"):
-             feature.tiff = "tiff"
- 
--        if find_library_file(self, "freetype"):
-+        if FREETYPE_ENABLED == 'True' and find_library_file(self, "freetype"):
-             # look for freetype2 include files
-             freetype_version = 0
-             for dir in self.compiler.include_dirs:
-@@ -256,11 +262,11 @@
-                 if dir:
-                     add_directory(self.compiler.include_dirs, dir, 0)
- 
--        if find_include_file(self, "lcms.h"):
-+        if LCMS_ENABLED == 'True' and find_include_file(self, "lcms.h"):
-             if find_library_file(self, "lcms"):
-                 feature.lcms = "lcms"
- 
--        if _tkinter and find_include_file(self, "tk.h"):
-+        if TCL_ENABLED == 'True' and _tkinter and find_include_file(self, "tk.h"):
-             # the library names may vary somewhat (e.g. tcl84 or tcl8.4)
-             version = TCL_VERSION[0] + TCL_VERSION[2]
-             if find_library_file(self, "tcl" + version):
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/fix-freetype-includes.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
deleted file mode 100644
index 9ecc63a..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c6040f618d8f2706a7b46d1cdf37d1a587f9701f Mon Sep 17 00:00:00 2001
-From: Andrew Stromnov <stromnov@gmail.com>
-Date: Thu, 28 Nov 2013 16:58:43 +0400
-Subject: [PATCH] fix compiling with FreeType 2.5.1
-
----
- _imagingft.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/_imagingft.c b/_imagingft.c
-index 47d50bd..f19555b 100644
---- a/_imagingft.c
-+++ b/_imagingft.c
-@@ -59,7 +59,11 @@ struct {
-     const char* message;
- } ft_errors[] =
- 
-+#if defined(USE_FREETYPE_2_1)
-+#include FT_ERRORS_H
-+#else
- #include <freetype/fterrors.h>
-+#endif
- 
- /* -------------------------------------------------------------------- */
- /* font objects */
--- 
-1.8.5.1
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/python-imaging-CVE-2016-2533.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/python-imaging-CVE-2016-2533.patch
deleted file mode 100644
index b01136f..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/python-imaging-CVE-2016-2533.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-python-imaging: CVE-2016-2533
-
-the patch comes from:
-https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2533
-https://github.com/python-pillow/Pillow/commit/ae453aa18b66af54e7ff716f4ccb33adca60afd4#diff-8ff6909c159597e22288ad818938fd6b
-
-PCD decoder overruns the shuffle buffer, Fixes #568
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- libImaging/PcdDecode.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libImaging/PcdDecode.c b/libImaging/PcdDecode.c
-index b6898e3..c02d005 100644
---- a/libImaging/PcdDecode.c
-+++ b/libImaging/PcdDecode.c
-@@ -47,7 +47,7 @@ ImagingPcdDecode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
- 	    out[0] = ptr[x];
- 	    out[1] = ptr[(x+4*state->xsize)/2];
- 	    out[2] = ptr[(x+5*state->xsize)/2];
--	    out += 4;
-+	    out += 3;
- 	}
- 
- 	state->shuffle((UINT8*) im->image[state->y],
-@@ -62,7 +62,7 @@ ImagingPcdDecode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
- 	    out[0] = ptr[x+state->xsize];
- 	    out[1] = ptr[(x+4*state->xsize)/2];
- 	    out[2] = ptr[(x+5*state->xsize)/2];
--	    out += 4;
-+	    out += 3;
- 	}
- 
- 	state->shuffle((UINT8*) im->image[state->y],
--- 
-1.7.9.5
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch
deleted file mode 100644
index 028a51a..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-imaging/remove-host-libdir.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Avoid getting host sysroot paths in the library paths to fix issue like:
-
-| /home/andrei/work/yocto/build-rpi-master/tmp/sysroots/x86_64-linux/usr/lib/libz.so: file not recognized: File format not recognized
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-
-Index: Imaging-1.1.7/setup.py
-===================================================================
---- Imaging-1.1.7.orig/setup.py
-+++ Imaging-1.1.7/setup.py
-@@ -155,11 +155,6 @@ class pil_build_ext(build_ext):
- 
-         # FIXME: check /opt/stuff directories here?
- 
--        prefix = sysconfig.get_config_var("prefix")
--        if prefix:
--            add_directory(library_dirs, os.path.join(prefix, "lib"))
--            add_directory(include_dirs, os.path.join(prefix, "include"))
--
-         #
-         # locate tkinter libraries
- 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-mccabe/0001-python-mccabe-remove-unnecessary-setup_requires-pyte.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-mccabe/0001-python-mccabe-remove-unnecessary-setup_requires-pyte.patch
deleted file mode 100644
index 941bed3..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-mccabe/0001-python-mccabe-remove-unnecessary-setup_requires-pyte.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3484bdfa7adbaebcf8bb8e7d4820f64b12717932 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Fri, 29 Jul 2016 15:37:18 +0800
-Subject: [PATCH] python-mccabe: remove unnecessary setup_requires
- pytest-runner
-
-* Remove setup_requires pytest-runner as the
-  setup_requires pytest-runner actually is not
-  used for pytest which only in do_compile phase
-  via setup.py build
-
-Upstream-Status: Pending
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- setup.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index e59903d..bf2aaba 100644
---- a/setup.py
-+++ b/setup.py
-@@ -33,7 +33,6 @@ setup(
-     license='Expat license',
-     py_modules=['mccabe'],
-     zip_safe=False,
--    setup_requires=['pytest-runner'],
-     tests_require=['pytest'],
-     entry_points={
-         'flake8.extension': [
--- 
-2.8.1
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch
deleted file mode 100644
index 81ed744..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 322e781c67d7a78fc2cfc3d377f50b825fc64abb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Jun 2017 20:21:01 -0700
-Subject: [PATCH] it tries to define this function differently than it is
- defined in sys/time.h.
-
-Use the definition from system
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Packages/RNG/Src/ranf.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/Packages/RNG/Src/ranf.c b/Packages/RNG/Src/ranf.c
-index 5ca7dc5..e669fa8 100644
---- a/Packages/RNG/Src/ranf.c
-+++ b/Packages/RNG/Src/ranf.c
-@@ -149,9 +149,6 @@ void Mixranf(int *s,u32 s48[2])
- #else
- 	struct timeval tv;
- 	struct timezone tz;
--#if !defined(__sgi)
--	int gettimeofday(struct timeval *, struct timezone *);
--#endif
- 
- 	(void)gettimeofday(&tv,&tz);
- 	s48[0] = (u32)tv.tv_sec;
--- 
-2.13.0
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch
deleted file mode 100644
index 1f31cb8..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0001-reflect-2.1-reporting-for-key-imports.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From ed44474c11f577c1644910964a917a4cf701bb0f Mon Sep 17 00:00:00 2001
-From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-Date: Tue, 26 Jan 2016 14:24:26 -0500
-Subject: [PATCH] reflect 2.1 reporting for key imports
-
-GnuPG 2.1 changes how it reports key imports.  These changes should
-make the pygpgme test suite compatible with GnuPG 2.1.
-
-See also:
-https://lists.gnupg.org/pipermail/gnupg-devel/2016-January/030718.html
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
-
----
- tests/test_import.py | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/tests/test_import.py b/tests/test_import.py
-index 10eb816..597eb47 100644
---- a/tests/test_import.py
-+++ b/tests/test_import.py
-@@ -55,7 +55,7 @@ class ImportTestCase(GpgHomeTestCase):
-         ctx = gpgme.Context()
-         with self.keyfile('key1.sec') as fp:
-             result = ctx.import_(fp)
--        self.assertEqual(result.considered, 1)
-+        self.assertEqual(result.considered, 3)
-         self.assertEqual(result.no_user_id, 0)
-         self.assertEqual(result.imported, 1)
-         self.assertEqual(result.imported_rsa, 0)
-@@ -64,18 +64,18 @@ class ImportTestCase(GpgHomeTestCase):
-         self.assertEqual(result.new_sub_keys, 0)
-         self.assertEqual(result.new_signatures, 0)
-         self.assertEqual(result.new_revocations, 0)
--        self.assertEqual(result.secret_read, 1)
--        self.assertEqual(result.secret_imported, 1)
-+        self.assertEqual(result.secret_read, 3)
-+        self.assertEqual(result.secret_imported, 2)
-         self.assertEqual(result.secret_unchanged, 0)
-         self.assertEqual(result.skipped_new_keys, 0)
-         self.assertEqual(result.not_imported, 0)
-         self.assertEqual(len(result.imports), 2)
-         self.assertEqual(result.imports[0],
-                          ('E79A842DA34A1CA383F64A1546BB55F0885C65A4',
--                          None, gpgme.IMPORT_NEW | gpgme.IMPORT_SECRET))
-+                          None, gpgme.IMPORT_NEW))
-         self.assertEqual(result.imports[1],
-                          ('E79A842DA34A1CA383F64A1546BB55F0885C65A4',
--                          None, gpgme.IMPORT_NEW))
-+                          None, gpgme.IMPORT_NEW | gpgme.IMPORT_SECRET))
-         # can we get the public key?
-         key = ctx.get_key('E79A842DA34A1CA383F64A1546BB55F0885C65A4')
-         # can we get the secret key?
-@@ -102,17 +102,17 @@ class ImportTestCase(GpgHomeTestCase):
-         fp = BytesIO(b'\n'.join(keys))
-         ctx = gpgme.Context()
-         result = ctx.import_(fp)
--        self.assertEqual(result.considered, 3)
-+        self.assertEqual(result.considered, 5)
-         self.assertEqual(result.no_user_id, 0)
-         self.assertEqual(result.imported, 2)
--        self.assertEqual(result.imported_rsa, 1)
-+        self.assertEqual(result.imported_rsa, 0)
-         self.assertEqual(result.unchanged, 0)
-         self.assertEqual(result.new_user_ids, 0)
-         self.assertEqual(result.new_sub_keys, 0)
-         self.assertEqual(result.new_signatures, 1)
-         self.assertEqual(result.new_revocations, 0)
--        self.assertEqual(result.secret_read, 1)
--        self.assertEqual(result.secret_imported, 1)
-+        self.assertEqual(result.secret_read, 3)
-+        self.assertEqual(result.secret_imported, 2)
-         self.assertEqual(result.secret_unchanged, 0)
-         self.assertEqual(result.skipped_new_keys, 0)
-         self.assertEqual(result.not_imported, 0)
-@@ -122,10 +122,10 @@ class ImportTestCase(GpgHomeTestCase):
-                           None, gpgme.IMPORT_NEW))
-         self.assertEqual(result.imports[1],
-                          ('E79A842DA34A1CA383F64A1546BB55F0885C65A4',
--                          None, gpgme.IMPORT_NEW | gpgme.IMPORT_SECRET))
-+                          None, gpgme.IMPORT_SIG))
-         self.assertEqual(result.imports[2],
-                          ('E79A842DA34A1CA383F64A1546BB55F0885C65A4',
--                          None, gpgme.IMPORT_SIG))
-+                          None, gpgme.IMPORT_NEW | gpgme.IMPORT_SECRET))
-         self.assertEqual(result.imports[3],
-                          ('93C2240D6B8AA10AB28F701D2CF46B7FC97E6B0F',
-                           None, gpgme.IMPORT_NEW))
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch
deleted file mode 100644
index c18cf3f..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0002-passphrase_cb-is-deprecated.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From ba0dc8273e4f83bcd2d43baa5910aae34b93048c Mon Sep 17 00:00:00 2001
-From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-Date: Mon, 1 Feb 2016 19:25:12 -0500
-Subject: [PATCH] passphrase_cb is deprecated
-
-https://bugs.gnupg.org/gnupg/issue767 indicates that
-gpgme_set_passphrase_cb is a deprecated corner of the API and that
-developers using gpgme should really rely on the gpg-agent to handle
-this stuff.  This should actually simplify things for most
-installations -- just strip out all passphrase handling from your
-application entirely, relying on gpg to figure out how to find the
-agent, and relying on the agent figuring out how to prompt the user
-(if necessary).
-
-However, if a developer really wants to use the passphrase callback
-approach, they'll have to use loopback pinentry.  This sets up the
-test suite to be able to make those tests.
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
-
----
- tests/util.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/tests/util.py b/tests/util.py
-index cd803c2..86892ca 100644
---- a/tests/util.py
-+++ b/tests/util.py
-@@ -28,7 +28,9 @@ keydir = os.path.join(os.path.dirname(__file__), 'keys')
- 
- class GpgHomeTestCase(unittest.TestCase):
- 
--    gpg_conf_contents = ''
-+    gpg_conf_contents = 'pinentry-mode loopback'
-+    gpg_agent_conf_contents = 'allow-loopback-pinentry'
-+
-     import_keys = []
- 
-     def keyfile(self, key):
-@@ -41,6 +43,10 @@ class GpgHomeTestCase(unittest.TestCase):
-         fp.write(self.gpg_conf_contents.encode('UTF-8'))
-         fp.close()
- 
-+        fp = open(os.path.join(self._gpghome, 'gpg-agent.conf'), 'wb')
-+        fp.write(self.gpg_agent_conf_contents.encode('UTF-8'))
-+        fp.close()
-+
-         # import requested keys into the keyring
-         ctx = gpgme.Context()
-         for key in self.import_keys:
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch
deleted file mode 100644
index 6acb68b..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/0003-handle-generic-error-when-no-passphrase-callback-pre.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 579b5930e15de8855bf63b3c20b6c3aaf894c3eb Mon Sep 17 00:00:00 2001
-From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-Date: Mon, 1 Feb 2016 19:27:59 -0500
-Subject: [PATCH] handle generic error when no passphrase callback present
-
-apparently gpg 2.1 returns ERR_GENERAL right now if the pinentry was
-in loopback mode and no passphrase callback was supplied.  Earlier
-versions supplied ERR_BAD_PASSPHRASE.
-
-Upstream-Status: Backport
-
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
-
----
- tests/test_passphrase.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/test_passphrase.py b/tests/test_passphrase.py
-index 0a235e9..35b3c59 100644
---- a/tests/test_passphrase.py
-+++ b/tests/test_passphrase.py
-@@ -41,7 +41,7 @@ class PassphraseTestCase(GpgHomeTestCase):
-             new_sigs = ctx.sign(plaintext, signature, gpgme.SIG_MODE_CLEAR)
-         except gpgme.GpgmeError as exc:
-             self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_GPGME)
--            self.assertEqual(exc.args[1], gpgme.ERR_BAD_PASSPHRASE)
-+            self.assertEqual(exc.args[1], gpgme.ERR_GENERAL)
-         else:
-             self.fail('gpgme.GpgmeError not raised')
- 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/run-ptest
deleted file mode 100644
index ce2abb6..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pygpgme/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-GPG_AGENT_INFO= python test_all.py -v 2>&1 | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch b/meta-openembedded/meta-python/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
deleted file mode 100644
index c58c328..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-===================================================================
---- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py
-+++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-@@ -15,7 +15,7 @@ except ImportError:
-     warnings = None
- 
- class Extension(_Extension.Extension):
--    _Extension.Extension.__doc__ + \
-+    _Extension.Extension.__doc__ or "" + \
-     """pyrex_include_dirs : [string]
-         list of directories to search for Pyrex header files (.pxd) (in
-         Unix form for portability)
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aioredis_2.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aioredis_2.0.1.bb
new file mode 100644
index 0000000..d8a8f2d
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-aioredis_2.0.1.bb
@@ -0,0 +1,16 @@
+SUMMARY = "The library is intended to provide simple and clear interface to Redis based on asyncio."
+HOMEPAGE = "https://github.com/aio-libs/aioredis-py"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bf9085f32a671dfa86ee69fe0fff7b95"
+
+SRC_URI[sha256sum] = "eaa51aaf993f2d71f54b70527c440437ba65340588afeb786cd87c55c89cd98e"
+
+PYPI_PACKAGE = "aioredis"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN} += " \
+    python3-core (>=3.6) \
+    python3-async-timeout \
+    python3-typing-extensions \
+"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.12.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.12.0.bb
deleted file mode 100644
index 1c8c709..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.12.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-SUMMARY = "ANTLR runtime for Python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=ab3c64dc056e158882a9a6b35a2f4a6e"
-
-SRC_URI[sha256sum] = "0a8b82f55032734f43ed6b60b8a48c25754721a75cd714eb1fe9ce6ed418b361"
-
-PYPI_PACKAGE = "antlr4-python3-runtime"
-
-inherit pypi python_setuptools_build_meta
-
-BBCLASSEXTEND = "nativesdk native"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.13.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.13.0.bb
new file mode 100644
index 0000000..870152c
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-antlr4-runtime_4.13.0.bb
@@ -0,0 +1,11 @@
+SUMMARY = "ANTLR runtime for Python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=b38bac4871765ce562806c44d2f18cf1"
+
+SRC_URI[sha256sum] = "0d5454928ae40c8a6b653caa35046cd8492c8743b5fbc22ff4009099d074c7ae"
+
+PYPI_PACKAGE = "antlr4-python3-runtime"
+
+inherit pypi python_setuptools_build_meta
+
+BBCLASSEXTEND = "nativesdk native"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch
deleted file mode 100644
index 2b9e6e5..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4fb61d7c621599b0db9c2c45f4243f07936c5953 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Oct 2021 08:20:00 -0700
-Subject: [PATCH] setup.py: Do not use 2to3
-
-This helps compiling with setuptools 0.58+
-and it seems to compile fine with python3
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- setup.py | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 9fe4902..f2098e1 100644
---- a/setup.py
-+++ b/setup.py
-@@ -2,8 +2,6 @@ import os
- import sys
- 
- extra = {}
--if sys.version_info >= (3, 0):
--    extra.update(use_2to3=True)
- 
- try:
-     from setuptools import setup, find_packages
--- 
-2.33.0
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/run-ptest
deleted file mode 100644
index b63c4de..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.7.1.bb
similarity index 88%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.6.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.7.1.bb
index ac3353c..8eecd2d 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.6.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-asgiref_3.7.1.bb
@@ -7,7 +7,7 @@
 SRC_URI += "file://run-ptest \
 	    "
 
-SRC_URI[sha256sum] = "9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506"
+SRC_URI[sha256sum] = "8de379fcc383bcfe4507e229fc31209ea23d4831c850f74063b2c11639474dd2"
 
 export BUILD_SYS
 export HOST_SYS
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.5.bb
similarity index 90%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.4.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.5.bb
index 6053728..7c85910 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.4.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.15.5.bb
@@ -4,7 +4,7 @@
 LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1"
 
-SRC_URI[sha256sum] = "c81e1c7fbac615037744d067a9bb5f9aeb655edf59b63ee8b59585475d6f80d8"
+SRC_URI[sha256sum] = "1039262575027b441137ab4a62a793a9b43defb42c32d5670f38686207cd780f"
 
 inherit pypi python_setuptools_build_meta
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb
index 2314f72..02ace02 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncio-glib_0.1.bb
@@ -3,7 +3,9 @@
 LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
 
-inherit setuptools3 pypi
+inherit setuptools3 pypi features_check
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
 SRC_URI[md5sum] = "60153055e76ceaacdfbaeafb03d61dd9"
 SRC_URI[sha256sum] = "fe3ceb2ba5f541330c07ca1bd7ae792468d625bad1acf5354a3a7a0b9fd87521"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak/0001-fix-poetry-version-compatibility.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak/0001-fix-poetry-version-compatibility.patch
new file mode 100644
index 0000000..cc56814
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak/0001-fix-poetry-version-compatibility.patch
@@ -0,0 +1,21 @@
+--- a/pyproject.toml	2023-04-19 19:04:47.159474100 -0300
++++ b/pyproject.toml	2023-05-04 08:08:12.289941765 -0300
+@@ -31,15 +31,15 @@
+ bleak-winrt = { version = "^1.2.0", markers = "platform_system=='Windows'" }
+ dbus-fast = { version = "^1.83.0", markers = "platform_system == 'Linux'" }
+ 
+-[tool.poetry.group.docs.dependencies]
++#[tool.poetry.group.docs.dependencies]
+ Sphinx = { version = "^5.1.1", python = ">=3.8" }
+ sphinx-rtd-theme = "^1.0.0"
+ 
+-[tool.poetry.group.lint.dependencies]
++#[tool.poetry.group.lint.dependencies]
+ black = "^22.1.0"
+ flake8 = { version = "^5.0.0", python = ">=3.8" }
+ 
+-[tool.poetry.group.test.dependencies]
++#[tool.poetry.group.test.dependencies]
+ asynctest = { version = "^0.13.0",  python = "<3.8" }
+ pytest = "^7.0.0"
+ pytest-asyncio = "^0.19.0"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.20.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.20.2.bb
new file mode 100644
index 0000000..9b81efe
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bleak_0.20.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers."
+HOMEPAGE = "https://github.com/hbldh/bleak"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
+
+SRC_URI:append = " \
+    file://0001-fix-poetry-version-compatibility.patch \
+"
+
+SRC_URI[sha256sum] = "6c92a47abe34e6dea8ffc5cea9457cbff6e1be966854839dbc25cddb36b79ee4"
+
+PYPI_PACKAGE = "bleak"
+
+inherit pypi python_poetry_core
+
+RDEPENDS:${PN} += " \
+    python3-core (>=3.7) \
+    python3-async-timeout \
+    python3-dbus-fast \
+"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.1.bb
similarity index 87%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.1.bb
index 7562b97..d7b2a95 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-can_4.2.1.bb
@@ -3,7 +3,7 @@
 LICENSE = "LGPL-3.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e6a600fd5e1d9cbde2d983680233ad02"
 
-SRC_URI[sha256sum] = "0fbda7217523b802f36a8d5a3cd26a35baad2795965f7f09bfa3dd1dfb6fbaf0"
+SRC_URI[sha256sum] = "f1ace82545cb4c7edf92a5aa6024bbb8ad23331ee5b0a1f441e782bf680a67ac"
 
 PYPI_PACKAGE="python-can"
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.6.bb
similarity index 83%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.5.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.6.bb
index fa6c520..b13384c 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.5.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.2.6.bb
@@ -3,7 +3,7 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93"
 
-SRC_URI[sha256sum] = "f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47"
+SRC_URI[sha256sum] = "2025f913f2edb0272ef15d00b1f335ff8908c921c8eb2013536fcaf61f5a683d"
 
 inherit pypi setuptools3
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_1.85.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_1.85.0.bb
new file mode 100644
index 0000000..6e1b599
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_1.85.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "A faster version of dbus-next originally from the great DBus next library."
+HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947"
+
+SRC_URI[sha256sum] = "af346e87e34fa52c7ae82d117303cbfe089cd5391b5a1cc0e51f67066ef426f5"
+
+PYPI_PACKAGE = "dbus_fast"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN} += " \
+    python3-core (>=3.7) \
+    python3-async-timeout \
+"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.1.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.1.7.bb
deleted file mode 100644
index be806ee..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.1.7.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require python-django.inc
-inherit setuptools3
-
-SRC_URI[sha256sum] = "44f714b81c5f190d9d2ddad01a532fe502fa01c4cb8faf1d081f4264ed15dcd8"
-
-RDEPENDS:${PN} += "\
-    ${PYTHON_PN}-sqlparse \
-    ${PYTHON_PN}-asgiref \
-"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.1.bb
new file mode 100644
index 0000000..b1474cf
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.1.bb
@@ -0,0 +1,9 @@
+require python-django.inc
+inherit setuptools3
+
+SRC_URI[sha256sum] = "7efa6b1f781a6119a10ac94b4794ded90db8accbe7802281cd26f8664ffed59c"
+
+RDEPENDS:${PN} += "\
+    ${PYTHON_PN}-sqlparse \
+    ${PYTHON_PN}-asgiref \
+"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
similarity index 85%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.7.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
index bee89ed..73701ec 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.7.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
@@ -2,7 +2,7 @@
 LICENSE = "LGPL-3.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b52f2d57d10c4f7ee67a7eb9615d5d24"
 
-SRC_URI[sha256sum] = "520101360892ebf9d0553f67d37e359ff92403d8a1e33814030503088a05da49"
+SRC_URI[sha256sum] = "4c90c3befaf88e612b71f4b39af7bcbef8977acfa855cec957225a8fbf504007"
 
 inherit pypi setuptools3 ptest
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.9.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.10.bb
similarity index 82%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.9.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.10.bb
index 294e3b0..7d5f1ea 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.9.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restful_0.3.10.bb
@@ -6,7 +6,7 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=685bb55ed99a366bb431995f5eef2783"
 
-SRC_URI[sha256sum] = "ccec650b835d48192138c85329ae03735e6ced58e9b2d9c2146d6c84c06fa53e"
+SRC_URI[sha256sum] = "fe4af2ef0027df8f9b4f797aba20c5566801b6ade995ac63b588abf1a59cec37"
 
 inherit pypi setuptools3
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.1.bb
similarity index 87%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.1.bb
index 5b4f13a..70a5dfb 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.18.1.bb
@@ -6,7 +6,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "c66b488a8b005b23ccb97b1198b6cece516c91869091ac5b7c267422db2733c7"
+SRC_URI[sha256sum] = "d7a3249027e7f464fbbfd7ee8319a08ad09d2eea51578575c4bd360ffa049ccb"
 
 RDEPENDS:${PN} += "\
     ${PYTHON_PN}-asyncio \
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.28.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.29.0.bb
similarity index 81%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.28.1.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.29.0.bb
index a747609..3ca9e3c 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.28.1.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.29.0.bb
@@ -5,7 +5,7 @@
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=24cb9a367a9e641b459a01c4d15256ba"
 
-SRC_URI[sha256sum] = "5db5087be5c814ecf7e2c7d30a1a15c97eca97d8c26f31ddc54d767d4a43bce8"
+SRC_URI[sha256sum] = "5aa207ab61aca233a7a312951ac603d618b78418eac749e3dc5035010531e25b"
 
 inherit pypi setuptools3
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.1.0..bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.1.0..bb
index 684bca0..ca1fc5f 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.1.0..bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.1.0..bb
@@ -43,7 +43,7 @@
 KIVY_CROSS_SYSROOT="${RECIPE_SYSROOT}"
 export KIVY_CROSS_SYSROOT
 
-REQUIRED_DISTRO_FEATURES += "x11 opengl"
+REQUIRED_DISTRO_FEATURES += "x11 opengl gobject-introspection-data"
 
 DEPENDS += " \
     gstreamer1.0 \
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.1.bb
similarity index 91%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.1.bb
index 52f34cf..e0c9ef9 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.23.1.bb
@@ -7,7 +7,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "5f1eba1da2a2f3f7df469fccddef3cc060b8a16cfe3cc65961ad36b4dbcf59c5"
+SRC_URI[sha256sum] = "95789b569418a3e32a53f43d7763be3d490a831e9c08042539462b6d972c2d7e"
 
 # http://errors.yoctoproject.org/Errors/Details/184715/
 # Can't find required file: ../src/google/protobuf/descriptor.proto
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.2.bb
similarity index 84%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.1.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.2.bb
index ca4cdce..4da7290 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.1.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_23.5.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f1d10048469ff90123263eb5e214061d"
 
-SRC_URI[sha256sum] = "8efc260ed7212ee4f9e50a8b856c84911265f4eac42cc6c02c7b37c851a2834b"
+SRC_URI[sha256sum] = "e911d398eaf0539cf3c63b4217357b51a3d1b7e4a50607d1591cf2b49f5d2c6a"
 
 RDEPENDS:${PN} += " \
 	libpulse \
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.46.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.46.0.bb
index 4595eaf..aa3000b 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.46.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.46.0.bb
@@ -15,6 +15,7 @@
 # Same restriction as gtk+
 inherit features_check setuptools3
 ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
 inherit pkgconfig autotools python3native
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch
deleted file mode 100644
index 699eb61..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11/0001-Do-not-strip-binaries.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From debd676cd94f92a30b3be45f1245aa13d8c398c0 Mon Sep 17 00:00:00 2001
-From: Philip Balister <philip@balister.org>
-Date: Wed, 8 Jul 2020 09:41:43 -0400
-Subject: [PATCH] Do not strip binaries.
-
- * OpenEmbedded strips them after creating debug packages.
-
-Signed-off-by: Philip Balister <philip@balister.org>
-Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
----
- tools/pybind11NewTools.cmake | 5 -----
- tools/pybind11Tools.cmake    | 4 ----
- 2 files changed, 9 deletions(-)
-
-diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake
-index 18da8be1..82ebf5e7 100644
---- a/tools/pybind11NewTools.cmake
-+++ b/tools/pybind11NewTools.cmake
-@@ -246,11 +246,6 @@ function(pybind11_add_module target_name)
-     endif()
-   endif()
- 
--  if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
--    # Strip unnecessary sections of the binary on Linux/macOS
--    pybind11_strip(${target_name})
--  endif()
--
-   if(MSVC)
-     target_link_libraries(${target_name} PRIVATE pybind11::windows_extras)
-   endif()
-diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake
-index 32313539..a7d81012 100644
---- a/tools/pybind11Tools.cmake
-+++ b/tools/pybind11Tools.cmake
-@@ -201,10 +201,6 @@ function(pybind11_add_module target_name)
-     endif()
-   endif()
- 
--  if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
--    pybind11_strip(${target_name})
--  endif()
--
-   if(MSVC)
-     target_link_libraries(${target_name} PRIVATE pybind11::windows_extras)
-   endif()
--- 
-2.17.1
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus-manager_git.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus-manager_git.bb
deleted file mode 100644
index 796f721..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus-manager_git.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "DBus.ObjectManager implementation for pydbus"
-AUTHOR = "Sébastien Corne"
-
-LICENSE = "WTFPL"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0fd5bb1dae91ba145745db55870be6a7"
-
-inherit setuptools3
-
-SRC_URI = "git://github.com/seebz/pydbus-manager.git;branch=master;protocol=https"
-SRCREV = "6b576b969cbda50521dca62a7df929167207f9fc"
-PV = "git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-RDEPENDS:${PN} += "python3-pydbus"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch
deleted file mode 100644
index eb97f05..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 39a7d79ee6c548902fbac8b95c934af7e4c69260 Mon Sep 17 00:00:00 2001
-From: Vendula Poncova <vponcova@redhat.com>
-Date: Thu, 2 Aug 2018 15:30:45 +0800
-Subject: [PATCH 1/2] Support asynchronous calls (#58)
-
-Added support for asynchronous calls of methods. A method is called
-synchronously unless its callback parameter is specified. A callback
-is a function f(*args, returned=None, error=None), where args is
-callback_args specified in the method call, returned is a return
-value of the method and error is an exception raised by the method.
-
-Example of an asynchronous call:
-
-def func(x, y, returned=None, error=None):
-  pass
-
-proxy.Method(a, b, callback=func, callback_args=(x, y))
-
-Upstream-Status: Backport [https://src.fedoraproject.org/cgit/rpms/python-pydbus.git/]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- pydbus/proxy_method.py | 44 ++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 38 insertions(+), 6 deletions(-)
-
-diff --git a/pydbus/proxy_method.py b/pydbus/proxy_method.py
-index 8798edd..4ea4304 100644
---- a/pydbus/proxy_method.py
-+++ b/pydbus/proxy_method.py
-@@ -65,15 +65,34 @@ class ProxyMethod(object):
- 
- 		# Python 2 sux
- 		for kwarg in kwargs:
--			if kwarg not in ("timeout",):
-+			if kwarg not in ("timeout", "callback", "callback_args"):
- 				raise TypeError(self.__qualname__ + " got an unexpected keyword argument '{}'".format(kwarg))
- 		timeout = kwargs.get("timeout", None)
-+		callback = kwargs.get("callback", None)
-+		callback_args = kwargs.get("callback_args", tuple())
-+
-+		call_args = (
-+			instance._bus_name,
-+			instance._path,
-+			self._iface_name,
-+			self.__name__,
-+			GLib.Variant(self._sinargs, args),
-+			GLib.VariantType.new(self._soutargs),
-+			0,
-+			timeout_to_glib(timeout),
-+			None
-+		)
-+
-+		if callback:
-+			call_args += (self._finish_async_call, (callback, callback_args))
-+			instance._bus.con.call(*call_args)
-+			return None
-+		else:
-+			ret = instance._bus.con.call_sync(*call_args)
-+			return self._unpack_return(ret)
- 
--		ret = instance._bus.con.call_sync(
--			instance._bus_name, instance._path,
--			self._iface_name, self.__name__, GLib.Variant(self._sinargs, args), GLib.VariantType.new(self._soutargs),
--			0, timeout_to_glib(timeout), None).unpack()
--
-+	def _unpack_return(self, values):
-+		ret = values.unpack()
- 		if len(self._outargs) == 0:
- 			return None
- 		elif len(self._outargs) == 1:
-@@ -81,6 +100,19 @@ class ProxyMethod(object):
- 		else:
- 			return ret
- 
-+	def _finish_async_call(self, source, result, user_data):
-+		error = None
-+		return_args = None
-+
-+		try:
-+			ret = source.call_finish(result)
-+			return_args = self._unpack_return(ret)
-+		except Exception as err:
-+			error = err
-+
-+		callback, callback_args = user_data
-+		callback(*callback_args, returned=return_args, error=error)
-+
- 	def __get__(self, instance, owner):
- 		if instance is None:
- 			return self
--- 
-2.7.4
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch
deleted file mode 100644
index 9c9b9b7..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From 69968dec867053e38de0b91d76ac41d5a5735e36 Mon Sep 17 00:00:00 2001
-From: Vendula Poncova <vponcova@redhat.com>
-Date: Thu, 2 Aug 2018 15:31:56 +0800
-Subject: [PATCH 2/2] Support transformation between D-Bus errors and
- exceptions.
-
-Exceptions can be registered with decorators, raised in a remote
-method and recreated after return from the remote call.
-
-Upstream-Status: Backport [https://src.fedoraproject.org/cgit/rpms/python-pydbus.git/]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- pydbus/error.py        | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++
- pydbus/proxy_method.py | 18 ++++++++--
- pydbus/registration.py | 16 ++++++---
- 3 files changed, 123 insertions(+), 8 deletions(-)
- create mode 100644 pydbus/error.py
-
-diff --git a/pydbus/error.py b/pydbus/error.py
-new file mode 100644
-index 0000000..aaa3510
---- /dev/null
-+++ b/pydbus/error.py
-@@ -0,0 +1,97 @@
-+from gi.repository import GLib, Gio
-+
-+
-+def register_error(name, domain, code):
-+	"""Register and map decorated exception class to a DBus error."""
-+	def decorated(cls):
-+		error_registration.register_error(cls, name, domain, code)
-+		return cls
-+
-+	return decorated
-+
-+
-+def map_error(error_name):
-+	"""Map decorated exception class to a DBus error."""
-+	def decorated(cls):
-+		error_registration.map_error(cls, error_name)
-+		return cls
-+
-+	return decorated
-+
-+
-+def map_by_default(cls):
-+	"""Map decorated exception class to all unknown DBus errors."""
-+	error_registration.map_by_default(cls)
-+	return cls
-+
-+
-+class ErrorRegistration(object):
-+	"""Class for mapping exceptions to DBus errors."""
-+
-+	_default = None
-+	_map = dict()
-+	_reversed_map = dict()
-+
-+	def map_by_default(self, exception_cls):
-+		"""Set the exception class as a default."""
-+		self._default = exception_cls
-+
-+	def map_error(self, exception_cls, name):
-+		"""Map the exception class to a DBus name."""
-+		self._map[name] = exception_cls
-+		self._reversed_map[exception_cls] = name
-+
-+	def register_error(self, exception_cls, name, domain, code):
-+		"""Map and register the exception class to a DBus name."""
-+		self.map_error(exception_cls, name)
-+		return Gio.DBusError.register_error(domain, code, name)
-+
-+	def is_registered_exception(self, obj):
-+		"""Is the exception registered?"""
-+		return obj.__class__ in self._reversed_map
-+
-+	def get_dbus_name(self, obj):
-+		"""Get the DBus name of the exception."""
-+		return self._reversed_map.get(obj.__class__)
-+
-+	def get_exception_class(self, name):
-+		"""Get the exception class mapped to the DBus name."""
-+		return self._map.get(name, self._default)
-+
-+	def transform_message(self, name, message):
-+		"""Transform the message of the exception."""
-+		prefix = "{}:{}: ".format("GDBus.Error", name)
-+
-+		if message.startswith(prefix):
-+			return message[len(prefix):]
-+
-+		return message
-+
-+	def transform_exception(self, e):
-+		"""Transform the remote error to the exception."""
-+		if not isinstance(e, GLib.Error):
-+			return e
-+
-+		if not Gio.DBusError.is_remote_error(e):
-+			return e
-+
-+		# Get DBus name of the error.
-+		name = Gio.DBusError.get_remote_error(e)
-+		# Get the exception class.
-+		exception_cls = self.get_exception_class(name)
-+
-+		# Return the original exception.
-+		if not exception_cls:
-+			return e
-+
-+		# Return new exception.
-+		message = self.transform_message(name, e.message)
-+		exception = exception_cls(message)
-+		exception.dbus_name = name
-+		exception.dbus_domain = e.domain
-+		exception.dbus_code = e.code
-+		return exception
-+
-+
-+# Default error registration.
-+error_registration = ErrorRegistration()
-diff --git a/pydbus/proxy_method.py b/pydbus/proxy_method.py
-index 4ea4304..e9496f5 100644
---- a/pydbus/proxy_method.py
-+++ b/pydbus/proxy_method.py
-@@ -2,6 +2,7 @@ from gi.repository import GLib
- from .generic import bound_method
- from .identifier import filter_identifier
- from .timeout import timeout_to_glib
-+from .error import error_registration
- 
- try:
- 	from inspect import Signature, Parameter
-@@ -87,9 +88,20 @@ class ProxyMethod(object):
- 			call_args += (self._finish_async_call, (callback, callback_args))
- 			instance._bus.con.call(*call_args)
- 			return None
-+
- 		else:
--			ret = instance._bus.con.call_sync(*call_args)
--			return self._unpack_return(ret)
-+			result = None
-+			error = None
-+
-+			try:
-+				result = instance._bus.con.call_sync(*call_args)
-+			except Exception as e:
-+				error = error_registration.transform_exception(e)
-+
-+			if error:
-+				raise error
-+
-+			return self._unpack_return(result)
- 
- 	def _unpack_return(self, values):
- 		ret = values.unpack()
-@@ -108,7 +120,7 @@ class ProxyMethod(object):
- 			ret = source.call_finish(result)
- 			return_args = self._unpack_return(ret)
- 		except Exception as err:
--			error = err
-+			error = error_registration.transform_exception(err)
- 
- 		callback, callback_args = user_data
- 		callback(*callback_args, returned=return_args, error=error)
-diff --git a/pydbus/registration.py b/pydbus/registration.py
-index f531539..1d2cbcb 100644
---- a/pydbus/registration.py
-+++ b/pydbus/registration.py
-@@ -5,6 +5,7 @@ from . import generic
- from .exitable import ExitableWithAliases
- from functools import partial
- from .method_call_context import MethodCallContext
-+from .error import error_registration
- import logging
- 
- try:
-@@ -91,11 +92,16 @@ class ObjectWrapper(ExitableWithAliases("unwrap")):
- 			logger = logging.getLogger(__name__)
- 			logger.exception("Exception while handling %s.%s()", interface_name, method_name)
- 
--			#TODO Think of a better way to translate Python exception types to DBus error types.
--			e_type = type(e).__name__
--			if not "." in e_type:
--				e_type = "unknown." + e_type
--			invocation.return_dbus_error(e_type, str(e))
-+			if error_registration.is_registered_exception(e):
-+				name = error_registration.get_dbus_name(e)
-+				invocation.return_dbus_error(name, str(e))
-+			else:
-+				logger.info("name is not registered")
-+				e_type = type(e).__name__
-+				if not "." in e_type:
-+					e_type = "unknown." + e_type
-+
-+				invocation.return_dbus_error(e_type, str(e))
- 
- 	def Get(self, interface_name, property_name):
- 		type = self.readable_properties[interface_name + "." + property_name]
--- 
-2.7.4
-
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb
deleted file mode 100644
index a1b9fff..0000000
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "Pythonic DBus library"
-HOMEPAGE = "https://pypi.python.org/pypi/pydbus/"
-LICENSE = "LGPL-2.1-only"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a916467b91076e631dd8edb7424769c7"
-
-SRC_URI += "file://0001-Support-asynchronous-calls-58.patch \
-            file://0002-Support-transformation-between-D-Bus-errors-and-exce.patch \
-"
-
-SRC_URI[md5sum] = "c6abd44862322679bd4e907bebc3e0d0"
-SRC_URI[sha256sum] = "4207162eff54223822c185da06c1ba8a34137a9602f3da5a528eedf3f78d0f2c"
-
-inherit pypi setuptools3
-
-S = "${WORKDIR}/pydbus-${PV}"
-
-RDEPENDS:${PN} = "${PYTHON_PN}-pygobject \
-                  ${PYTHON_PN}-io \
-                  ${PYTHON_PN}-logging"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.1.bb
similarity index 84%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.1.bb
index aa36066..6001977 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-xdist_3.3.1.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=772fcdaca14b378878d05c7d857e6c3e"
 
-SRC_URI[sha256sum] = "d42c9efb388da35480878ef4b2993704c6cea800c8bafbe85a8cdc461baf0748"
+SRC_URI[sha256sum] = "d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93"
 
 inherit pypi python_setuptools_build_meta
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.22.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.24.0.bb
similarity index 86%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.22.2.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.24.0.bb
index 359090c..9e4b87d 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.22.2.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.24.0.bb
@@ -15,7 +15,7 @@
 	${PYTHON_PN}-datetime \
 "
 
-SRC_URI[sha256sum] = "5932c092c6e6035584eb74d77064e4bce3b7935dfc4a331349719a40db265840"
+SRC_URI[sha256sum] = "0bbcecda9f51936904c1030e7fef0fe693e633888f02a14d1cb68646a50e83b3"
 
 PYPI_PACKAGE = "sentry-sdk"
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.13.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.15.bb
similarity index 86%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.13.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.15.bb
index 3963f06..3af41be 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.13.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.15.bb
@@ -4,7 +4,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b707d50badb798e1d897f2c8f649382d"
 
-SRC_URI[sha256sum] = "8d97b37b4e60073c38bcf94e289e3be09ef9be870de88d163f16e08f2b9ded1a"
+SRC_URI[sha256sum] = "2e940a8659ef870ae10e0d9e2a6d5aaddf0ff6e91f7d0d7732afc9e8c4be9bbc"
 
 PYPI_PACKAGE = "SQLAlchemy"
 inherit pypi setuptools3
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb
similarity index 80%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.0.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb
index 6b40b6c..d60d017 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.0.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_5.1.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI[sha256sum] = "2c428d2338976279e8eb2196f7a94910960d9f7ba2f41f3988511e95ca447021"
+SRC_URI[sha256sum] = "a54534acf9b89bc7ed264807013b505bf07f74dbe4bcfa37d32bd063870b087c"
 
 DEPENDS += "${PYTHON_PN}-pbr-native"
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_4.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_5.0.1.bb
similarity index 79%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_4.3.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_5.0.1.bb
index 37d5ed6..43649bf 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_4.3.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_5.0.1.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=57e0bd61643d81d05683cdce65b11d10"
 
-SRC_URI[sha256sum] = "3f21d09e1b2aa9f2dacca12da240ca37de3ba5237a93addfd6d593afe9073355"
+SRC_URI[sha256sum] = "46eb99ad4bdb71f3f72b7d24f4267753e240944ecfc16f25d2719ba89827a803"
 
 inherit pypi python_setuptools_build_meta
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.7.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.8.0.bb
similarity index 72%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.7.2.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.8.0.bb
index 7231a51..8baedcb 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.7.2.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.8.0.bb
@@ -1,9 +1,9 @@
 DESCRIPTION = "A portable, lightweight MessagePack serializer and deserializer written in pure Python."
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=31e3e7e79c4e2dafffffdd0b4d40c849"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=17df11353545c53a2df0ce7655859306"
 
-SRC_URI[sha256sum] = "e86f7ac6aa0ef4c6c49f004b4fd435bce99c23e2dd5d73003f3f9816024c2bd8"
+SRC_URI[sha256sum] = "b801a83d6ed75e6df41e44518b4f2a9c221dc2da4bcd5380e3a0feda520bc61a"
 
 inherit pypi setuptools3 ptest
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.2.bb
similarity index 83%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.1.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.2.bb
index 41d469c..742a938 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.1.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.5.2.bb
@@ -7,7 +7,7 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b969e9612325987c823fc0737063ebc8"
 
-SRC_URI[sha256sum] = "3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40"
+SRC_URI[sha256sum] = "c7d67c13b928645f259d9b847ab5b57fd2d127213ca41ebd880de1f553b7c23b"
 
 inherit pypi setuptools3
 
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.1.bb
similarity index 82%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.0.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.1.bb
index d556e8b..ff3a622 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.0.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.1.1.bb
@@ -16,6 +16,6 @@
 	python3-io \
 "
 
-SRC_URI[sha256sum] = "02913b50b74c00f165933d5da3e3a02cab4204cb4932722a1b342c5c71034122"
+SRC_URI[sha256sum] = "03459ee76f664470c4c63a8977cab624fb259d0fc1faac64dc9cc6f3cc08f945"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.2.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.0.bb
similarity index 84%
rename from meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.2.3.bb
rename to meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.0.bb
index 8e48dc5..48bb388 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.2.3.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=0ab20f8e337bea2e6874f372edfd12c0"
 
-SRC_URI[sha256sum] = "d21ba86af4432720231fb4b40f1205fa75fd718d6856ec3b8118984de31c225b"
+SRC_URI[sha256sum] = "c2d583f7d07c6bac157d075889d15c128f34afdc79e4f70b4fb3c6adedc59bfe"
 
 PYPI_PACKAGE = "xmlschema"
 inherit pypi setuptools3
diff --git a/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.3.0.bb b/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.3.0.bb
index 29e7a26..aba1278 100644
--- a/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.3.0.bb
+++ b/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.3.0.bb
@@ -15,7 +15,7 @@
            "
 
 inherit features_check
-REQUIRED_DISTRO_FEATURES = "x11 systemd"
+REQUIRED_DISTRO_FEATURES = "x11 systemd gobject-introspection-data"
 
 inherit setuptools3_legacy python3native
 
diff --git a/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch b/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
deleted file mode 100644
index 3eb3067..0000000
--- a/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b0526a9b5325bd4758dad8d14efd85c98ef2ebff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 14 Jul 2017 18:25:23 -0700
-Subject: [PATCH] configure: Respect LIBS variable from env
-
-For musl we need to pass -lexecinfo from env
-this change accomodates that
-
-Upstream-Status: Inappropriate [OE-specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 4286c34..f1c65db 100755
---- a/configure
-+++ b/configure
-@@ -620,7 +620,7 @@ LIBDEFS = -DSHAREDLIB -fPIC \$(DEFS)
- INCDIR  = ./include
- LDFLAGS = $LDFLAGS
- DESTDIR = ../bin/monkey
--LIBS    = -ldl $libs
-+LIBS    = -ldl $libs ${LIBS}
- OBJ     = monkey.o mk_method.o mk_mimetype.o mk_vhost.o mk_request.o \\
-           mk_header.o mk_config.o mk_signals.o \\
-           mk_user.o mk_utils.o mk_epoll.o mk_scheduler.o \\
--- 
-2.13.3
-
diff --git a/meta-openembedded/meta-xfce/recipes-apps/catfish/catfish_4.16.3.bb b/meta-openembedded/meta-xfce/recipes-apps/catfish/catfish_4.16.3.bb
index 8fe879b..249c8e1 100644
--- a/meta-openembedded/meta-xfce/recipes-apps/catfish/catfish_4.16.3.bb
+++ b/meta-openembedded/meta-xfce/recipes-apps/catfish/catfish_4.16.3.bb
@@ -3,7 +3,9 @@
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
 
-inherit xfce-app python_setuptools_build_meta gtk-icon-cache mime-xdg
+inherit xfce-app python_setuptools_build_meta gtk-icon-cache mime-xdg features_check
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
 DEPENDS += "python3-distutils-extra-native"
 
diff --git a/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.2.3.bb b/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.2.3.bb
index 65aa7a5..609caf3 100644
--- a/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.2.3.bb
+++ b/meta-openembedded/meta-xfce/recipes-apps/menulibre/menulibre_2.2.3.bb
@@ -10,7 +10,7 @@
 "
 
 inherit setuptools3_legacy gtk-icon-cache features_check
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "x11 gobject-introspection-data"
 
 SRC_URI = "git://github.com/bluesabre/menulibre.git;protocol=https;branch=master"
 SRCREV = "86ee9ad7568128fe9555e54799933b2d3762331a"
diff --git a/meta-openembedded/meta-xfce/recipes-apps/xfce4-panel-profiles/xfce4-panel-profiles_1.0.13.bb b/meta-openembedded/meta-xfce/recipes-apps/xfce4-panel-profiles/xfce4-panel-profiles_1.0.13.bb
index ab1b827..feb9121 100644
--- a/meta-openembedded/meta-xfce/recipes-apps/xfce4-panel-profiles/xfce4-panel-profiles_1.0.13.bb
+++ b/meta-openembedded/meta-xfce/recipes-apps/xfce4-panel-profiles/xfce4-panel-profiles_1.0.13.bb
@@ -5,7 +5,7 @@
 
 inherit python3native gettext gtk-icon-cache features_check
 
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "x11 gobject-introspection-data"
 
 DEPENDS += "intltool-native"
 
diff --git a/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.8.3.bb b/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.8.3.bb
index cdf4557..21e9b39 100644
--- a/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.8.3.bb
+++ b/meta-openembedded/meta-xfce/recipes-extended/imsettings/imsettings_1.8.3.bb
@@ -12,7 +12,7 @@
 
 inherit autotools gtk-doc gobject-introspection gettext features_check
 
-DEPENDS = "gtk+3 libnotify"
+DEPENDS = "autoconf-archive-native gtk+3 libnotify"
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
diff --git a/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.7.1.bb b/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.7.1.bb
index 6621099..3dfc76f 100644
--- a/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.7.1.bb
+++ b/meta-openembedded/meta-xfce/recipes-panel-plugins/whiskermenu/xfce4-whiskermenu-plugin_2.7.1.bb
@@ -6,5 +6,3 @@
 inherit xfce-panel-plugin cmake
 
 SRC_URI[sha256sum] = "04ae0c1764a0d5ec70f18a760d998a2109bb6724f048554d7d6999d9072ca63e"
-
-RRECOMMENDS:${PN} += "menulibre"
diff --git a/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb b/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
index 64f8863..711059c 100644
--- a/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
+++ b/meta-openembedded/meta-xfce/recipes-xfce/packagegroups/packagegroup-xfce-extended.bb
@@ -50,7 +50,7 @@
     xfce4-verve-plugin \
     \
     ${@bb.utils.contains('DISTRO_FEATURES','polkit','xfce-polkit','',d)} \
-    ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth", "blueman", "", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth gobject-introspection", "blueman", "", d)} \
     \
     thunar-media-tags-plugin \
     thunar-archive-plugin \
@@ -63,6 +63,6 @@
     xfce4-taskmanager \
     gigolo \
     mousepad \
-    catfish \
-    xfce4-panel-profiles \
+    ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "catfish", "", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data", "xfce4-panel-profiles", "", d)} \
 "
diff --git a/meta-raspberrypi/conf/machine/raspberrypi-cm.conf b/meta-raspberrypi/conf/machine/raspberrypi-cm.conf
index f9371df..365d030 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi-cm.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi-cm.conf
@@ -2,7 +2,7 @@
 #@NAME: RaspberryPi Compute Module (CM1)
 #@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module (CM1)
 
-MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
+MACHINEOVERRIDES =. "raspberrypi:"
 include conf/machine/raspberrypi.conf
 
 ARMSTUB ?= "armstub.bin"
diff --git a/meta-raspberrypi/conf/machine/raspberrypi0-2w-64.conf b/meta-raspberrypi/conf/machine/raspberrypi0-2w-64.conf
index 8e4729a..0264107 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi0-2w-64.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi0-2w-64.conf
@@ -2,9 +2,9 @@
 #@NAME: RaspberryPi0 2 Wifi Development Board
 #@DESCRIPTION: Machine configuration for the RaspberryPi0 2 Wifi in 64 bits mode
 
-include conf/machine/raspberrypi3-64.conf
+MACHINEOVERRIDES =. "raspberrypi3-64:"
 
-MACHINEOVERRIDES := "${@'${MACHINEOVERRIDES}'.replace(':${MACHINE}',':raspberrypi3-64:${MACHINE}')}"
+include conf/machine/raspberrypi3-64.conf
 
 MACHINE_EXTRA_RRECOMMENDS += "\
     linux-firmware-rpidistro-bcm43436 \
diff --git a/meta-raspberrypi/conf/machine/raspberrypi0-2w.conf b/meta-raspberrypi/conf/machine/raspberrypi0-2w.conf
index 63c7bfb..f3a4c4d 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi0-2w.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi0-2w.conf
@@ -2,9 +2,9 @@
 #@NAME: RaspberryPi0 2 Wifi Development Board
 #@DESCRIPTION: Machine configuration for the RaspberryPi0 2 Wifi in 32 bits mode
 
-include conf/machine/raspberrypi3.conf
+MACHINEOVERRIDES =. "raspberrypi3:"
 
-MACHINEOVERRIDES := "${@'${MACHINEOVERRIDES}'.replace(':${MACHINE}',':raspberrypi3:${MACHINE}')}"
+include conf/machine/raspberrypi3.conf
 
 MACHINE_EXTRA_RRECOMMENDS += "\
     linux-firmware-rpidistro-bcm43436 \
diff --git a/meta-raspberrypi/conf/machine/raspberrypi0.conf b/meta-raspberrypi/conf/machine/raspberrypi0.conf
index 80297b5..597918a 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi0.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi0.conf
@@ -2,7 +2,7 @@
 #@NAME: RaspberryPi Zero Development Board
 #@DESCRIPTION: Machine configuration for the RaspberryPi Zero board (https://www.raspberrypi.org/blog/raspberry-pi-zero)
 
-MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
+MACHINEOVERRIDES =. "raspberrypi:"
 include conf/machine/raspberrypi.conf
 
 SERIAL_CONSOLES ?= "115200;ttyAMA0"
diff --git a/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
index 573b079..50dd533 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi3-64.conf
@@ -2,7 +2,7 @@
 #@NAME: RaspberryPi 3 Development Board
 #@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 64 bits mode
 
-MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
+MACHINEOVERRIDES =. "raspberrypi3:"
 
 MACHINE_EXTRA_RRECOMMENDS += "\
     linux-firmware-rpidistro-bcm43430 \
diff --git a/meta-raspberrypi/conf/machine/raspberrypi4-64.conf b/meta-raspberrypi/conf/machine/raspberrypi4-64.conf
index 37217c5..42ed4be 100644
--- a/meta-raspberrypi/conf/machine/raspberrypi4-64.conf
+++ b/meta-raspberrypi/conf/machine/raspberrypi4-64.conf
@@ -2,7 +2,7 @@
 #@NAME: RaspberryPi 4 Development Board (64bit)
 #@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode
 
-MACHINEOVERRIDES = "raspberrypi4:${MACHINE}"
+MACHINEOVERRIDES =. "raspberrypi4:"
 
 MACHINE_FEATURES += "pci"
 MACHINE_EXTRA_RRECOMMENDS += "\
diff --git a/meta-security/conf/layer.conf b/meta-security/conf/layer.conf
index b5a74f1..334a945 100644
--- a/meta-security/conf/layer.conf
+++ b/meta-security/conf/layer.conf
@@ -28,3 +28,4 @@
 
 QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
+addpylib ${LAYERDIR}/lib oeqa
diff --git a/meta-security/meta-integrity/conf/layer.conf b/meta-security/meta-integrity/conf/layer.conf
index b273b5b..0622a5f 100644
--- a/meta-security/meta-integrity/conf/layer.conf
+++ b/meta-security/meta-integrity/conf/layer.conf
@@ -33,3 +33,5 @@
 BBFILES_DYNAMIC += " \
 networking-layer:${LAYERDIR}/dynamic-layers/meta-networking/recipes-*/*/*.bbappend \
 "
+
+addpylib ${LAYERDIR}/lib oeqa
diff --git a/meta-security/meta-security-compliance/conf/layer.conf b/meta-security/meta-security-compliance/conf/layer.conf
index 82409a6..cb33c2c 100644
--- a/meta-security/meta-security-compliance/conf/layer.conf
+++ b/meta-security/meta-security-compliance/conf/layer.conf
@@ -13,3 +13,5 @@
 LAYERDEPENDS_scanners-layer = "core openembedded-layer meta-python"
 
 BBLAYERS_LAYERINDEX_NAME_scanners-layer = "meta-security-compliance"
+
+addpylib ${LAYERDIR}/lib oeqa
diff --git a/meta-security/meta-security-isafw/conf/layer.conf b/meta-security/meta-security-isafw/conf/layer.conf
index 550cced..fca5868 100644
--- a/meta-security/meta-security-isafw/conf/layer.conf
+++ b/meta-security/meta-security-isafw/conf/layer.conf
@@ -15,3 +15,5 @@
 LAYERDEPENDS_security-isafw = "core"
 
 LAYERSERIES_COMPAT_security-isafw = "mickledore"
+
+addpylib ${LAYERDIR}/lib oeqa
diff --git a/meta-security/meta-tpm/conf/layer.conf b/meta-security/meta-tpm/conf/layer.conf
index 12bd6b7..3b199f7 100644
--- a/meta-security/meta-tpm/conf/layer.conf
+++ b/meta-security/meta-tpm/conf/layer.conf
@@ -24,3 +24,5 @@
 BBFILES_DYNAMIC += " \
 networking-layer:${LAYERDIR}/dynamic-layers/meta-networking/recipes-*/*/*.bbappend \
 "
+
+addpylib ${LAYERDIR}/lib oeqa
diff --git a/meta-security/meta-tpm/recipes-tpm1/hoth/libhoth_git.bb b/meta-security/meta-tpm/recipes-tpm1/hoth/libhoth_git.bb
index a3ebce7..0485afc 100644
--- a/meta-security/meta-tpm/recipes-tpm1/hoth/libhoth_git.bb
+++ b/meta-security/meta-tpm/recipes-tpm1/hoth/libhoth_git.bb
@@ -7,7 +7,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 SRC_URI = "git://github.com/google/libhoth;protocol=https;branch=main"
-SRCREV = "1622e8a040d21dd564fdc1cb4df5eda01688c197"
+SRCREV = "769296220dc88df33f4726aa11e39e049257b3c4"
 
 DEPENDS += "libusb1"
 
diff --git a/meta-security/recipes-ids/samhain/samhain.inc b/meta-security/recipes-ids/samhain/samhain.inc
index 8967d72..2788bc3 100644
--- a/meta-security/recipes-ids/samhain/samhain.inc
+++ b/meta-security/recipes-ids/samhain/samhain.inc
@@ -3,7 +3,7 @@
 LICENSE     = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=8ca43cbc842c2336e835926c2166c28b"
 
-PV = "4.4.9"
+PV = "4.4.10"
 
 SRC_URI = "https://la-samhna.de/archive/samhain_signed-${PV}.tar.gz \
            file://${INITSCRIPT_NAME}.init \
@@ -21,7 +21,7 @@
            file://samhain-fix-initializer-element-is-not-constant.patch \
            "
 
-SRC_URI[sha256sum] = "dd85bf2f90db3ce616a09608e650f3707a4d69aa1e1fe718f8b359ce0aafc198"
+SRC_URI[sha256sum] = "ae6ee8eff3cb111b7fc14a57bcc258443dd0bcf1bfacfdf229935ed053c1ce3d"
 
 UPSTREAM_CHECK_URI = "https://www.la-samhna.de/samhain/archive.html"
 UPSTREAM_CHECK_REGEX = "samhain_signed-(?P<pver>(\d+(\.\d+)+))\.tar"
diff --git a/poky/bitbake/bin/bitbake-worker b/poky/bitbake/bin/bitbake-worker
index d743ff5..451e692 100755
--- a/poky/bitbake/bin/bitbake-worker
+++ b/poky/bitbake/bin/bitbake-worker
@@ -151,6 +151,7 @@
     taskhash = runtask['taskhash']
     unihash = runtask['unihash']
     appends = runtask['appends']
+    layername = runtask['layername']
     taskdepdata = runtask['taskdepdata']
     quieterrors = runtask['quieterrors']
     # We need to setup the environment BEFORE the fork, since
@@ -262,7 +263,7 @@
                     bb.parse.siggen.set_taskhashes(workerdata["newhashes"])
                 ret = 0
 
-                the_data = databuilder.parseRecipe(fn, appends)
+                the_data = databuilder.parseRecipe(fn, appends, layername)
                 the_data.setVar('BB_TASKHASH', taskhash)
                 the_data.setVar('BB_UNIHASH', unihash)
                 bb.parse.siggen.setup_datacache_from_datastore(fn, the_data)
diff --git a/poky/bitbake/lib/bb/cache.py b/poky/bitbake/lib/bb/cache.py
index 10910a6..5ea41c5 100644
--- a/poky/bitbake/lib/bb/cache.py
+++ b/poky/bitbake/lib/bb/cache.py
@@ -514,11 +514,11 @@
 
         return len(self.depends_cache)
 
-    def parse(self, filename, appends):
+    def parse(self, filename, appends, layername):
         """Parse the specified filename, returning the recipe information"""
         self.logger.debug("Parsing %s", filename)
         infos = []
-        datastores = self.databuilder.parseRecipeVariants(filename, appends, mc=self.mc)
+        datastores = self.databuilder.parseRecipeVariants(filename, appends, mc=self.mc, layername=layername)
         depends = []
         variants = []
         # Process the "real" fn last so we can store variants list
diff --git a/poky/bitbake/lib/bb/command.py b/poky/bitbake/lib/bb/command.py
index 9e2cdc5..a355f56 100644
--- a/poky/bitbake/lib/bb/command.py
+++ b/poky/bitbake/lib/bb/command.py
@@ -561,6 +561,7 @@
                 appendfiles = command.cooker.collections[mc].get_file_appends(fn)
         else:
             appendfiles = []
+        layername = command.cooker.collections[mc].calc_bbfile_priority(fn)[2]
         # We are calling bb.cache locally here rather than on the server,
         # but that's OK because it doesn't actually need anything from
         # the server barring the global datastore (which we have a remote
@@ -568,10 +569,10 @@
         if config_data:
             # We have to use a different function here if we're passing in a datastore
             # NOTE: we took a copy above, so we don't do it here again
-            envdata = command.cooker.databuilder._parse_recipe(config_data, fn, appendfiles, mc)['']
+            envdata = command.cooker.databuilder._parse_recipe(config_data, fn, appendfiles, mc, layername)['']
         else:
             # Use the standard path
-            envdata = command.cooker.databuilder.parseRecipe(fn, appendfiles)
+            envdata = command.cooker.databuilder.parseRecipe(fn, appendfiles, layername)
         idx = command.remotedatastores.store(envdata)
         return DataStoreConnectionHandle(idx)
     parseRecipeFile.readonly = True
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index 554c7f1..0a21f1c 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -504,6 +504,9 @@
             self.recipecaches[mc] = bb.cache.CacheData(self.caches_array)
 
         self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
+        self.collections = {}
+        for mc in self.multiconfigs:
+            self.collections[mc] = CookerCollectFiles(self.bbfile_config_priorities, mc)
 
         self._parsecache_set(False)
 
@@ -640,7 +643,8 @@
 
         if fn:
             try:
-                envdata = self.databuilder.parseRecipe(fn, self.collections[mc].get_file_appends(fn))
+                layername = self.collections[mc].calc_bbfile_priority(fn)[2]
+                envdata = self.databuilder.parseRecipe(fn, self.collections[mc].get_file_appends(fn), layername)
             except Exception as e:
                 parselog.exception("Unable to read %s", fn)
                 raise
@@ -1378,8 +1382,8 @@
         if bf.startswith("/") or bf.startswith("../"):
             bf = os.path.abspath(bf)
 
-        self.collections = {mc: CookerCollectFiles(self.bbfile_config_priorities, mc)}
-        filelist, masked, searchdirs = self.collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc])
+        collections = {mc: CookerCollectFiles(self.bbfile_config_priorities, mc)}
+        filelist, masked, searchdirs = collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc])
         try:
             os.stat(bf)
             bf = os.path.abspath(bf)
@@ -1445,7 +1449,8 @@
 
         bb_caches = bb.cache.MulticonfigCache(self.databuilder, self.data_hash, self.caches_array)
 
-        infos = bb_caches[mc].parse(fn, self.collections[mc].get_file_appends(fn))
+        layername = self.collections[mc].calc_bbfile_priority(fn)[2]
+        infos = bb_caches[mc].parse(fn, self.collections[mc].get_file_appends(fn), layername)
         infos = dict(infos)
 
         fn = bb.cache.realfn2virtual(fn, cls, mc)
@@ -1676,13 +1681,10 @@
                 for dep in self.configuration.extra_assume_provided:
                     self.recipecaches[mc].ignored_dependencies.add(dep)
 
-            self.collections = {}
-
             mcfilelist = {}
             total_masked = 0
             searchdirs = set()
             for mc in self.multiconfigs:
-                self.collections[mc] = CookerCollectFiles(self.bbfile_config_priorities, mc)
                 (filelist, masked, search) = self.collections[mc].collect_bbfiles(self.databuilder.mcdata[mc], self.databuilder.mcdata[mc])
 
                 mcfilelist[mc] = filelist
@@ -1833,10 +1835,10 @@
         self.bbfile_config_priorities = sorted(priorities, key=lambda tup: tup[1], reverse=True)
 
     def calc_bbfile_priority(self, filename):
-        for _, _, regex, pri in self.bbfile_config_priorities:
+        for layername, _, regex, pri in self.bbfile_config_priorities:
             if regex.match(filename):
-                return pri, regex
-        return 0, None
+                return pri, regex, layername
+        return 0, None, None
 
     def get_bbfiles(self):
         """Get list of default .bb files by reading out the current directory"""
@@ -2009,7 +2011,7 @@
         # Calculate priorities for each file
         for p in pkgfns:
             realfn, cls, mc = bb.cache.virtualfn2realfn(p)
-            priorities[p], regex = self.calc_bbfile_priority(realfn)
+            priorities[p], regex, _ = self.calc_bbfile_priority(realfn)
             if regex in unmatched_regex:
                 matched_regex.add(regex)
                 unmatched_regex.remove(regex)
@@ -2146,7 +2148,7 @@
             self.results.close()
             self.results.join_thread()
 
-    def parse(self, mc, cache, filename, appends):
+    def parse(self, mc, cache, filename, appends, layername):
         try:
             origfilter = bb.event.LogHandler.filter
             # Record the filename we're parsing into any events generated
@@ -2160,7 +2162,7 @@
             bb.event.set_class_handlers(self.handlers.copy())
             bb.event.LogHandler.filter = parse_filter
 
-            return True, mc, cache.parse(filename, appends)
+            return True, mc, cache.parse(filename, appends, layername)
         except Exception as exc:
             tb = sys.exc_info()[2]
             exc.recipe = filename
@@ -2200,10 +2202,11 @@
         for mc in self.cooker.multiconfigs:
             for filename in self.mcfilelist[mc]:
                 appends = self.cooker.collections[mc].get_file_appends(filename)
+                layername = self.cooker.collections[mc].calc_bbfile_priority(filename)[2]
                 if not self.bb_caches[mc].cacheValid(filename, appends):
-                    self.willparse.add((mc, self.bb_caches[mc], filename, appends))
+                    self.willparse.add((mc, self.bb_caches[mc], filename, appends, layername))
                 else:
-                    self.fromcache.add((mc, self.bb_caches[mc], filename, appends))
+                    self.fromcache.add((mc, self.bb_caches[mc], filename, appends, layername))
 
         self.total = len(self.fromcache) + len(self.willparse)
         self.toparse = len(self.willparse)
@@ -2314,7 +2317,7 @@
             self.syncthread.join()
 
     def load_cached(self):
-        for mc, cache, filename, appends in self.fromcache:
+        for mc, cache, filename, appends, layername in self.fromcache:
             infos = cache.loadCached(filename, appends)
             yield False, mc, infos
 
@@ -2417,9 +2420,10 @@
         bb.cache.SiggenRecipeInfo.reset()
         to_reparse = set()
         for mc in self.cooker.multiconfigs:
-            to_reparse.add((mc, filename, self.cooker.collections[mc].get_file_appends(filename)))
+            layername = self.cooker.collections[mc].calc_bbfile_priority(filename)[2]
+            to_reparse.add((mc, filename, self.cooker.collections[mc].get_file_appends(filename), layername))
 
-        for mc, filename, appends in to_reparse:
-            infos = self.bb_caches[mc].parse(filename, appends)
+        for mc, filename, appends, layername in to_reparse:
+            infos = self.bb_caches[mc].parse(filename, appends, layername)
             for vfn, info_array in infos:
                 self.cooker.recipecaches[mc].add_from_recipeinfo(vfn, info_array)
diff --git a/poky/bitbake/lib/bb/cookerdata.py b/poky/bitbake/lib/bb/cookerdata.py
index adde0e7..42b8d64 100644
--- a/poky/bitbake/lib/bb/cookerdata.py
+++ b/poky/bitbake/lib/bb/cookerdata.py
@@ -494,8 +494,9 @@
         return data
 
     @staticmethod
-    def _parse_recipe(bb_data, bbfile, appends, mc=''):
+    def _parse_recipe(bb_data, bbfile, appends, mc, layername):
         bb_data.setVar("__BBMULTICONFIG", mc)
+        bb_data.setVar("FILE_LAYERNAME", layername)
 
         bbfile_loc = os.path.abspath(os.path.dirname(bbfile))
         bb.parse.cached_mtime_noerror(bbfile_loc)
@@ -505,7 +506,7 @@
         bb_data = bb.parse.handle(bbfile, bb_data)
         return bb_data
 
-    def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None):
+    def parseRecipeVariants(self, bbfile, appends, virtonly=False, mc=None, layername=None):
         """
         Load and parse one .bb build file
         Return the data and whether parsing resulted in the file being skipped
@@ -515,32 +516,32 @@
             (bbfile, virtual, mc) = bb.cache.virtualfn2realfn(bbfile)
             bb_data = self.mcdata[mc].createCopy()
             bb_data.setVar("__ONLYFINALISE", virtual or "default")
-            datastores = self._parse_recipe(bb_data, bbfile, appends, mc)
+            datastores = self._parse_recipe(bb_data, bbfile, appends, mc, layername)
             return datastores
 
         if mc is not None:
             bb_data = self.mcdata[mc].createCopy()
-            return self._parse_recipe(bb_data, bbfile, appends, mc)
+            return self._parse_recipe(bb_data, bbfile, appends, mc, layername)
 
         bb_data = self.data.createCopy()
-        datastores = self._parse_recipe(bb_data, bbfile, appends)
+        datastores = self._parse_recipe(bb_data, bbfile, appends, '', layername)
 
         for mc in self.mcdata:
             if not mc:
                 continue
             bb_data = self.mcdata[mc].createCopy()
-            newstores = self._parse_recipe(bb_data, bbfile, appends, mc)
+            newstores = self._parse_recipe(bb_data, bbfile, appends, mc, layername)
             for ns in newstores:
                 datastores["mc:%s:%s" % (mc, ns)] = newstores[ns]
 
         return datastores
 
-    def parseRecipe(self, virtualfn, appends):
+    def parseRecipe(self, virtualfn, appends, layername):
         """
         Return a complete set of data for fn.
         To do this, we need to parse the file.
         """
         logger.debug("Parsing %s (full)" % virtualfn)
         (fn, virtual, mc) = bb.cache.virtualfn2realfn(virtualfn)
-        bb_data = self.parseRecipeVariants(virtualfn, appends, virtonly=True)
+        bb_data = self.parseRecipeVariants(virtualfn, appends, virtonly=True, layername=layername)
         return bb_data[virtual]
diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py
index 1a86d8f..770021d 100644
--- a/poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/poky/bitbake/lib/bb/fetch2/__init__.py
@@ -1234,7 +1234,7 @@
         ud = fetch.ud[u]
         if ud and isinstance(ud.method, local.Local):
             found = False
-            paths = ud.method.localpaths(ud, d)
+            paths = ud.method.localfile_searchpaths(ud, d)
             for f in paths:
                 pth = ud.decodedurl
                 if os.path.exists(f):
diff --git a/poky/bitbake/lib/bb/fetch2/crate.py b/poky/bitbake/lib/bb/fetch2/crate.py
index a7021e5..3310ed0 100644
--- a/poky/bitbake/lib/bb/fetch2/crate.py
+++ b/poky/bitbake/lib/bb/fetch2/crate.py
@@ -59,11 +59,11 @@
         # version is expected to be the last token
         # but ignore possible url parameters which will be used
         # by the top fetcher class
-        version, _, _ = parts[len(parts) -1].partition(";")
+        version = parts[-1].split(";")[0]
         # second to last field is name
-        name = parts[len(parts) - 2]
+        name = parts[-2]
         # host (this is to allow custom crate registries to be specified
-        host = '/'.join(parts[2:len(parts) - 2])
+        host = '/'.join(parts[2:-2])
 
         # if using upstream just fix it up nicely
         if host == 'crates.io':
@@ -98,8 +98,8 @@
         save_cwd = os.getcwd()
         os.chdir(rootdir)
 
-        pn = d.getVar('BPN')
-        if pn == ud.parm.get('name'):
+        bp = d.getVar('BP')
+        if bp == ud.parm.get('name'):
             cmd = "tar -xz --no-same-owner -f %s" % thefile
         else:
             cargo_bitbake = self._cargo_bitbake_path(rootdir)
diff --git a/poky/bitbake/lib/bb/fetch2/local.py b/poky/bitbake/lib/bb/fetch2/local.py
index 5332faa..7d76681 100644
--- a/poky/bitbake/lib/bb/fetch2/local.py
+++ b/poky/bitbake/lib/bb/fetch2/local.py
@@ -41,9 +41,9 @@
         """
         Return the local filename of a given url assuming a successful fetch.
         """
-        return self.localpaths(urldata, d)[-1]
+        return self.localfile_searchpaths(urldata, d)[-1]
 
-    def localpaths(self, urldata, d):
+    def localfile_searchpaths(self, urldata, d):
         """
         Return the local filename of a given url assuming a successful fetch.
         """
@@ -51,11 +51,13 @@
         path = urldata.decodedurl
         newpath = path
         if path[0] == "/":
+            logger.debug2("Using absolute %s" % (path))
             return [path]
         filespath = d.getVar('FILESPATH')
         if filespath:
             logger.debug2("Searching for %s in paths:\n    %s" % (path, "\n    ".join(filespath.split(":"))))
             newpath, hist = bb.utils.which(filespath, path, history=True)
+            logger.debug2("Using %s for %s" % (newpath, path))
             searched.extend(hist)
         return searched
 
diff --git a/poky/bitbake/lib/bb/fetch2/npm.py b/poky/bitbake/lib/bb/fetch2/npm.py
index 8a179a3..e6d0598 100644
--- a/poky/bitbake/lib/bb/fetch2/npm.py
+++ b/poky/bitbake/lib/bb/fetch2/npm.py
@@ -103,6 +103,7 @@
         """Run npm command in a controlled environment"""
         with tempfile.TemporaryDirectory() as tmpdir:
             d = bb.data.createCopy(self.d)
+            d.setVar("PATH", d.getVar("PATH"))  # PATH might contain $HOME - evaluate it before patching
             d.setVar("HOME", tmpdir)
 
             if not workdir:
diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py
index 02f1474..1eac2da 100644
--- a/poky/bitbake/lib/bb/runqueue.py
+++ b/poky/bitbake/lib/bb/runqueue.py
@@ -2166,6 +2166,7 @@
                 'unihash' : self.rqdata.get_task_unihash(task),
                 'quieterrors' : True,
                 'appends' : self.cooker.collections[mc].get_file_appends(taskfn),
+                'layername' : self.cooker.collections[mc].calc_bbfile_priority(taskfn)[2],
                 'taskdepdata' : self.sq_build_taskdepdata(task),
                 'dry_run' : False,
                 'taskdep': taskdep,
@@ -2259,6 +2260,7 @@
                 'unihash' : self.rqdata.get_task_unihash(task),
                 'quieterrors' : False,
                 'appends' : self.cooker.collections[mc].get_file_appends(taskfn),
+                'layername' : self.cooker.collections[mc].calc_bbfile_priority(taskfn)[2],
                 'taskdepdata' : self.build_taskdepdata(task),
                 'dry_run' : self.rqdata.setscene_enforce,
                 'taskdep': taskdep,
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index 532adb9..d230120 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -424,6 +424,10 @@
 
     def git_init(self, cwd=None):
         self.git('init', cwd=cwd)
+        # Explicitly set initial branch to master as
+        # a common setup is to use other default
+        # branch than master.
+        self.git(['checkout', '-b', 'master'], cwd=cwd)
         if not self.git(['config', 'user.email'], cwd=cwd):
             self.git(['config', 'user.email', 'you@example.com'], cwd=cwd)
         if not self.git(['config', 'user.name'], cwd=cwd):
@@ -2392,6 +2396,31 @@
         self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/glob-0.2.11/src/lib.rs"))
 
     @skipIfNoNetwork()
+    def test_crate_url_matching_recipe(self):
+
+        self.d.setVar('BP', 'glob-0.2.11')
+
+        uri = "crate://crates.io/glob/0.2.11"
+        self.d.setVar('SRC_URI', uri)
+
+        uris = self.d.getVar('SRC_URI').split()
+        d = self.d
+
+        fetcher = bb.fetch2.Fetch(uris, self.d)
+        ud = fetcher.ud[fetcher.urls[0]]
+
+        self.assertIn("name", ud.parm)
+        self.assertEqual(ud.parm["name"], "glob-0.2.11")
+        self.assertIn("downloadfilename", ud.parm)
+        self.assertEqual(ud.parm["downloadfilename"], "glob-0.2.11.crate")
+
+        fetcher.download()
+        fetcher.unpack(self.tempdir)
+        self.assertEqual(sorted(os.listdir(self.tempdir)), ['download', 'glob-0.2.11', 'unpacked'])
+        self.assertEqual(sorted(os.listdir(self.tempdir + "/download")), ['glob-0.2.11.crate', 'glob-0.2.11.crate.done'])
+        self.assertTrue(os.path.exists(self.tempdir + "/glob-0.2.11/src/lib.rs"))
+
+    @skipIfNoNetwork()
     def test_crate_url_params(self):
 
         uri = "crate://crates.io/aho-corasick/0.7.20;name=aho-corasick-renamed"
diff --git a/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc b/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc
index b42b830..3279752 100644
--- a/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc
+++ b/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc
@@ -2,7 +2,7 @@
 DISTRO_FEATURES:append = " pam"
 
 # Use the LTSI Kernel
-PREFERRED_VERSION_linux-yocto = "5.15%"
+PREFERRED_VERSION_linux-yocto = "6.1%"
 
 # Ensure the kernel nfs server is enabled
 KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
diff --git a/poky/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/poky/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
new file mode 100644
index 0000000..fc7169b
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main(void)
+{
+	printf("Hello world!\n");
+
+	return 0;
+}
diff --git a/poky/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/poky/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
new file mode 100644
index 0000000..547587b
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Simple helloworld application -- selftest variant"
+SECTION = "examples"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://helloworld.c"
+
+S = "${WORKDIR}"
+
+do_compile() {
+	${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 helloworld ${D}${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file
diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend
deleted file mode 100644
index 7a33505..0000000
--- a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend
+++ /dev/null
@@ -1,19 +0,0 @@
-KBRANCH:genericx86  = "v5.15/standard/base"
-KBRANCH:genericx86-64  = "v5.15/standard/base"
-KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
-
-KMACHINE:genericx86 ?= "common-pc"
-KMACHINE:genericx86-64 ?= "common-pc-64"
-KMACHINE:beaglebone-yocto ?= "beaglebone"
-
-SRCREV_machine:genericx86 ?= "024d08fb706170a9723e9751e505681f9d4c7ab6"
-SRCREV_machine:genericx86-64 ?= "024d08fb706170a9723e9751e505681f9d4c7ab6"
-SRCREV_machine:beaglebone-yocto ?= "26aee42556a000123129552b73de6bf2ac039034"
-
-COMPATIBLE_MACHINE:genericx86 = "genericx86"
-COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
-
-LINUX_VERSION:genericx86 = "5.15.103"
-LINUX_VERSION:genericx86-64 = "5.15.103"
-LINUX_VERSION:beaglebone-yocto = "5.15.103"
diff --git a/poky/meta/classes-global/staging.bbclass b/poky/meta/classes-global/staging.bbclass
index 6eefba4..3a300c3 100644
--- a/poky/meta/classes-global/staging.bbclass
+++ b/poky/meta/classes-global/staging.bbclass
@@ -654,7 +654,7 @@
     bbtasks = e.tasklist
     for task in bbtasks:
         deps = d.getVarFlag(task, "depends")
-        if task == "do_configure" or (deps and "populate_sysroot" in deps):
+        if task != 'do_prepare_recipe_sysroot' and (task == "do_configure" or (deps and "populate_sysroot" in deps)):
             d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ")
 }
 staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
diff --git a/poky/meta/classes-recipe/gi-docgen.bbclass b/poky/meta/classes-recipe/gi-docgen.bbclass
index 8b7eaac..eb30c60 100644
--- a/poky/meta/classes-recipe/gi-docgen.bbclass
+++ b/poky/meta/classes-recipe/gi-docgen.bbclass
@@ -10,7 +10,8 @@
 
 # This variable is set to True if api-documentation is in
 # DISTRO_FEATURES, and False otherwise.
-GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'True', 'False', d)}"
+GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation gobject-introspection-data', 'True', 'False', d)}"
+
 # When building native recipes, disable gi-docgen, as it is not necessary,
 # pulls in additional dependencies, and makes build times longer
 GIDOCGEN_ENABLED:class-native = "False"
diff --git a/poky/meta/classes-recipe/go.bbclass b/poky/meta/classes-recipe/go.bbclass
index b02a83a..39bfaa5 100644
--- a/poky/meta/classes-recipe/go.bbclass
+++ b/poky/meta/classes-recipe/go.bbclass
@@ -132,7 +132,7 @@
 	tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
 		tar -C ${D}${libdir}/go --no-same-owner -xf -
 
-	if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
+	if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then
 		install -d ${D}${bindir}
 		install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
 	fi
diff --git a/poky/meta/classes-recipe/gobject-introspection.bbclass b/poky/meta/classes-recipe/gobject-introspection.bbclass
index 98edb93..65c67dd 100644
--- a/poky/meta/classes-recipe/gobject-introspection.bbclass
+++ b/poky/meta/classes-recipe/gobject-introspection.bbclass
@@ -35,23 +35,19 @@
 
 # Generating introspection data depends on a combination of native and target
 # introspection tools, and qemu to run the target tools.
-DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection gobject-introspection-native qemu-native', '', d)}"
+DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection qemu-native', '', d)}"
 
-# Even though introspection is disabled on -native, gobject-introspection package is still
-# needed for m4 macros.
-DEPENDS:append:class-native = " gobject-introspection-native"
-DEPENDS:append:class-nativesdk = " gobject-introspection-native"
+# Even when introspection is disabled, the gobject-introspection package is still needed for m4 macros.
+DEPENDS:append = " gobject-introspection-native"
 
 # This is used by introspection tools to find .gir includes
 export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}"
 
 do_configure:prepend:class-target () {
-    if [ "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '1', '0', d)}" = "1" ] ; then
-        # introspection.m4 pre-packaged with upstream tarballs does not yet
-        # have our fixes
-        mkdir -p ${S}/m4
-        cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4
-    fi
+    # introspection.m4 pre-packaged with upstream tarballs does not yet
+    # have our fixes
+    mkdir -p ${S}/m4
+    cp ${STAGING_DIR_NATIVE}/${datadir}/aclocal/introspection.m4 ${S}/m4
 }
 
 # .typelib files are needed at runtime and so they go to the main package (so
diff --git a/poky/meta/classes-recipe/image-live.bbclass b/poky/meta/classes-recipe/image-live.bbclass
index 1034acc..168774a 100644
--- a/poky/meta/classes-recipe/image-live.bbclass
+++ b/poky/meta/classes-recipe/image-live.bbclass
@@ -38,7 +38,7 @@
 LABELS_LIVE ?= "boot install"
 ROOT_LIVE ?= "root=/dev/ram0"
 INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs"
-INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}"
+INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}${IMAGE_MACHINE_SUFFIX}.${INITRAMFS_FSTYPES}"
 
 LIVE_ROOTFS_TYPE ?= "ext4"
 ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}"
diff --git a/poky/meta/classes-recipe/kernel-devicetree.bbclass b/poky/meta/classes-recipe/kernel-devicetree.bbclass
index a6c6c5f..b3bae32 100644
--- a/poky/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/poky/meta/classes-recipe/kernel-devicetree.bbclass
@@ -12,12 +12,12 @@
             d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
 }
 
+# recursivly search for devicetree files
 FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
-    /${KERNEL_DTBDEST}/*.dtb \
-    /${KERNEL_DTBDEST}/*.dtbo \
-    /${KERNEL_DTBDEST}/*/*.dtb \
-    /${KERNEL_DTBDEST}/*/*.dtbo \
+    /${KERNEL_DTBDEST}/**/*.dtb \
+    /${KERNEL_DTBDEST}/**/*.dtbo \
 "
+
 FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
 
 # Generate kernel+devicetree bundle
@@ -82,7 +82,7 @@
 	for dtbf in ${KERNEL_DEVICETREE}; do
 		dtb=`normalize_dtb "$dtbf"`
 		dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-		if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+		if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
 			dtb_ext=${dtb##*.}
 			dtb_base_name=`basename $dtb .$dtb_ext`
 			dtb=$dtb_base_name.$dtb_ext
@@ -97,7 +97,7 @@
 		dtb_ext=${dtb##*.}
 		dtb_base_name=`basename $dtb .$dtb_ext`
 		install -d $deployDir
-		if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+		if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
 			dtb=$dtb_base_name.$dtb_ext
 		fi
 		install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
diff --git a/poky/meta/classes-recipe/kernel.bbclass b/poky/meta/classes-recipe/kernel.bbclass
index 8f022b23..4bce64c 100644
--- a/poky/meta/classes-recipe/kernel.bbclass
+++ b/poky/meta/classes-recipe/kernel.bbclass
@@ -216,7 +216,7 @@
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration
diff --git a/poky/meta/classes/archiver.bbclass b/poky/meta/classes/archiver.bbclass
index 4049694..0eee1ab 100644
--- a/poky/meta/classes/archiver.bbclass
+++ b/poky/meta/classes/archiver.bbclass
@@ -76,6 +76,28 @@
 
 # This is a convenience for the shell script to use it
 
+def include_package(d, pn):
+
+    included, reason = copyleft_should_include(d)
+    if not included:
+        bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason))
+        return False
+
+    else:
+        bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
+
+    # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted,
+    # so avoid archiving source here.
+    if pn.startswith('glibc-locale'):
+        return False
+
+    # We just archive gcc-source for all the gcc related recipes
+    if d.getVar('BPN') in ['gcc', 'libgcc'] \
+            and not pn.startswith('gcc-source'):
+        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
+        return False
+
+    return True
 
 python () {
     pn = d.getVar('PN')
@@ -86,23 +108,7 @@
                 pn = p
                 break
 
-    included, reason = copyleft_should_include(d)
-    if not included:
-        bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason))
-        return
-    else:
-        bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
-
-
-    # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted,
-    # so avoid archiving source here.
-    if pn.startswith('glibc-locale'):
-        return
-
-    # We just archive gcc-source for all the gcc related recipes
-    if d.getVar('BPN') in ['gcc', 'libgcc'] \
-            and not pn.startswith('gcc-source'):
-        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
+    if not include_package(d, pn):
         return
 
     # TARGET_SYS in ARCHIVER_ARCH will break the stamp for gcc-source in multiconfig
diff --git a/poky/meta/conf/bitbake.conf b/poky/meta/conf/bitbake.conf
index 2db84a4..b527dc5 100644
--- a/poky/meta/conf/bitbake.conf
+++ b/poky/meta/conf/bitbake.conf
@@ -648,7 +648,8 @@
 # Optimization flags.
 ##################################################################
 # Beware: applied last to first
-DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
+ -fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fdebug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fmacro-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fdebug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
@@ -954,14 +955,14 @@
     PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
     GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
     HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
-    BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT"
+    BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT BB_NICE_LEVEL"
 BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
     lockfiles vardepsexclude vardeps vardepvalue vardepvalueexclude \
     file-checksums python task nostamp \
     sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
     recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \
     progress mcdepends number_threads"
-BB_HASH_CODEPARSER_VALS = "LOGFIFO=/ T=/ WORKDIR=/ DATE=1234 TIME=1234 PV=0.0-1 PN=no-pn METADATA_REVISION=1234"
+BB_HASH_CODEPARSER_VALS = "LOGFIFO=/ T=/ WORKDIR=/ DATE=1234 TIME=1234 PV=0.0-1 PN=no-pn METADATA_REVISION=1234 SRC_URI= "
 
 MLPREFIX ??= ""
 MULTILIB_VARIANTS ??= ""
diff --git a/poky/meta/conf/distro/include/maintainers.inc b/poky/meta/conf/distro/include/maintainers.inc
index 395c187..f0b952c 100644
--- a/poky/meta/conf/distro/include/maintainers.inc
+++ b/poky/meta/conf/distro/include/maintainers.inc
@@ -189,7 +189,7 @@
 RECIPE_MAINTAINER:pn-gcc-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER:pn-gcc-runtime = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER:pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER:pn-gcc-source-12.2.0 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER:pn-gcc-source-13.1.0 = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER:pn-gconf = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER:pn-gcr3 = "Markus Volk <f_l_k@t-online.de>"
 RECIPE_MAINTAINER:pn-gcr = "Alexander Kanavin <alex.kanavin@gmail.com>"
@@ -406,6 +406,7 @@
 RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield <bruce.ashfield@gmail.com>"
 RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER:pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>"
@@ -600,7 +601,6 @@
 RECIPE_MAINTAINER:pn-puzzles = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER:pn-python3 = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
 RECIPE_MAINTAINER:pn-python3-alabaster = "Tim Orling <tim.orling@konsulko.com>"
-RECIPE_MAINTAINER:pn-python3-async = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
 RECIPE_MAINTAINER:pn-python3-asn1crypto = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-atomicwrites = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-attrs = "Tim Orling <tim.orling@konsulko.com>"
diff --git a/poky/meta/conf/distro/include/ptest-packagelists.inc b/poky/meta/conf/distro/include/ptest-packagelists.inc
index faa9bd6..da9153b 100644
--- a/poky/meta/conf/distro/include/ptest-packagelists.inc
+++ b/poky/meta/conf/distro/include/ptest-packagelists.inc
@@ -17,6 +17,7 @@
     diffutils \
     ethtool \
     expat \
+    expect \
     findutils \
     flex \
     gawk \
diff --git a/poky/meta/conf/distro/include/tcmode-default.inc b/poky/meta/conf/distro/include/tcmode-default.inc
index 9d0b319..52b050e 100644
--- a/poky/meta/conf/distro/include/tcmode-default.inc
+++ b/poky/meta/conf/distro/include/tcmode-default.inc
@@ -16,7 +16,7 @@
 # Default libc config
 PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 
-GCCVERSION ?= "12.%"
+GCCVERSION ?= "13.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
 BINUVERSION ?= "2.40%"
 GDBVERSION ?= "13.%"
@@ -24,7 +24,7 @@
 LINUXLIBCVERSION ?= "6.1%"
 QEMUVERSION ?= "8.0%"
 GOVERSION ?= "1.20%"
-LLVMVERSION ?= "15.%"
+LLVMVERSION ?= "16.%"
 RUSTVERSION ?= "1.69%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
diff --git a/poky/meta/lib/oe/package.py b/poky/meta/lib/oe/package.py
index edb70da..70040f0 100644
--- a/poky/meta/lib/oe/package.py
+++ b/poky/meta/lib/oe/package.py
@@ -550,7 +550,7 @@
             f = '.' + f
         if not f.startswith("./"):
             f = './' + f
-        globbed = glob.glob(f)
+        globbed = glob.glob(f, recursive=True)
         if globbed:
             if [ f ] != globbed:
                 files += globbed
diff --git a/poky/meta/lib/oe/terminal.py b/poky/meta/lib/oe/terminal.py
index 71ffc87..4412bc1 100644
--- a/poky/meta/lib/oe/terminal.py
+++ b/poky/meta/lib/oe/terminal.py
@@ -104,6 +104,10 @@
     command = 'rxvt -T "{title}" -e {command}'
     priority = 1
 
+class URxvt(XTerminal):
+    command = 'urxvt -T "{title}" -e {command}'
+    priority = 1
+
 class Screen(Terminal):
     command = 'screen -D -m -t "{title}" -S devshell {command}'
 
diff --git a/poky/meta/lib/oeqa/selftest/cases/bbtests.py b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
index d97bda1..1dd2839 100644
--- a/poky/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -41,7 +41,7 @@
 
     def test_event_handler(self):
         self.write_config("INHERIT += \"test_events\"")
-        result = bitbake('m4-native')
+        result = bitbake('selftest-hello-native')
         find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing.*Tasks", result.output)
         find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
         self.assertTrue(find_build_started, msg = "Match failed in:\n%s"  % result.output)
@@ -49,11 +49,11 @@
         self.assertNotIn('Test for bb.event.InvalidEvent', result.output)
 
     def test_local_sstate(self):
-        bitbake('m4-native')
-        bitbake('m4-native -cclean')
-        result = bitbake('m4-native')
-        find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
-        self.assertTrue(find_setscene, msg = "No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
+        bitbake('selftest-hello-native')
+        bitbake('selftest-hello-native -cclean')
+        result = bitbake('selftest-hello-native')
+        find_setscene = re.search("selftest-hello-native.*do_.*_setscene", result.output)
+        self.assertTrue(find_setscene, msg = "No \"selftest-hello-native.*do_.*_setscene\" message found during bitbake selftest-hello-native. bitbake output: %s" % result.output )
 
     def test_bitbake_invalid_recipe(self):
         result = bitbake('-b asdf', ignore_status=True)
@@ -175,7 +175,7 @@
         self.assertIn('localconf', result.output)
 
     def test_dry_run(self):
-        result = runCmd('bitbake -n m4-native')
+        result = runCmd('bitbake -n selftest-hello-native')
         self.assertEqual(0, result.status, "bitbake dry run didn't run as expected. %s" % result.output)
 
     def test_just_parse(self):
@@ -233,7 +233,7 @@
 
     def test_setscene_only(self):
         """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
-        test_recipe = 'ed'
+        test_recipe = 'selftest-hello-native'
 
         bitbake(test_recipe)
         bitbake('-c clean %s' % test_recipe)
@@ -246,7 +246,7 @@
                                              'Executed tasks were: %s' % (task, str(tasks)))
 
     def test_skip_setscene(self):
-        test_recipe = 'ed'
+        test_recipe = 'selftest-hello-native'
 
         bitbake(test_recipe)
         bitbake('-c clean %s' % test_recipe)
diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py
index 1896944..397895c 100644
--- a/poky/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/poky/meta/lib/oeqa/selftest/cases/devtool.py
@@ -10,6 +10,7 @@
 import tempfile
 import glob
 import fnmatch
+import unittest
 
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
@@ -40,6 +41,13 @@
             canonical_layerpath = os.path.realpath(canonical_layerpath) + '/'
             edited_layers.append(layerpath)
             oldmetapath = os.path.realpath(layerpath)
+
+            # when downloading poky from tar.gz some tests will be skipped (BUG 12389)
+            try:
+                runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath)
+            except:
+                raise unittest.SkipTest("devtool tests require folder to be a git repo")
+
             result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
             oldreporoot = result.output.rstrip()
             newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
diff --git a/poky/meta/lib/oeqa/utils/qemurunner.py b/poky/meta/lib/oeqa/utils/qemurunner.py
index 6734cee..7f520d4 100644
--- a/poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/poky/meta/lib/oeqa/utils/qemurunner.py
@@ -451,7 +451,7 @@
         self.logger.debug("Waiting at most %d seconds for login banner (%s)" %
                           (self.boottime, time.strftime("%D %H:%M:%S")))
         endtime = time.time() + self.boottime
-        socklist = [self.server_socket]
+        filelist = [self.server_socket, self.runqemu.stdout]
         reachedlogin = False
         stopread = False
         qemusock = None
@@ -459,30 +459,40 @@
         data = b''
         while time.time() < endtime and not stopread:
             try:
-                sread, swrite, serror = select.select(socklist, [], [], 5)
+                sread, swrite, serror = select.select(filelist, [], [], 5)
             except InterruptedError:
                 continue
-            for sock in sread:
-                if sock is self.server_socket:
+            for file in sread:
+                if file is self.server_socket:
                     qemusock, addr = self.server_socket.accept()
-                    qemusock.setblocking(0)
-                    socklist.append(qemusock)
-                    socklist.remove(self.server_socket)
+                    qemusock.setblocking(False)
+                    filelist.append(qemusock)
+                    filelist.remove(self.server_socket)
                     self.logger.debug("Connection from %s:%s" % addr)
                 else:
                     # try to avoid reading only a single character at a time
                     time.sleep(0.1)
-                    data = data + sock.recv(1024)
+                    if hasattr(file, 'read'):
+                        read = file.read(1024)
+                    elif hasattr(file, 'recv'):
+                        read = file.recv(1024)
+                    else:
+                        self.logger.error('Invalid file type: %s\n%s' % (file))
+                        read = b''
+
+                    self.logger.debug2('Partial boot log:\n%s' % (read.decode('utf-8', errors='ignore')))
+                    data = data + read
                     if data:
                         bootlog += data
                         if self.serial_ports < 2:
-                            # this socket has mixed console/kernel data, log it to logfile
+                            # this file has mixed console/kernel data, log it to logfile
                             self.log(data)
 
                         data = b''
 
                         decodedlog = self.decode_qemulog(bootlog)
                         if self.boot_patterns['search_reached_prompt'] in decodedlog:
+                            self.server_socket.close()
                             self.server_socket = qemusock
                             stopread = True
                             reachedlogin = True
@@ -493,8 +503,8 @@
                         # no need to check if reachedlogin unless we support multiple connections
                         self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %
                                           time.strftime("%D %H:%M:%S"))
-                        socklist.remove(sock)
-                        sock.close()
+                        filelist.remove(file)
+                        file.close()
                         stopread = True
 
         if not reachedlogin:
diff --git a/poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
index c6a4bc4..dcc09f2 100644
--- a/poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
+++ b/poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
@@ -19,9 +19,12 @@
 
 RDEPENDS:${PN} = "grep bash"
 
+EXTRA_OECONF = "--libdir=${nonarch_libdir}"
+
 do_configure:prepend () {
 	( cd ${S}; autoreconf -f -i -s )
 }
 
-FILES:${PN} += "${libdir}/${BPN}/*"
+FILES:${PN} += "${nonarch_libdir}/${BPN}/*"
 FILES:${PN}-dbg += "${datadir}/doc/pm-utils/README.debugging"
+FILES:${PN}-dev += "${nonarch_libdir}/pkgconfig/pm-utils.pc"
diff --git a/poky/meta/recipes-connectivity/avahi/avahi_0.8.bb b/poky/meta/recipes-connectivity/avahi/avahi_0.8.bb
index bf6835e..8649140 100644
--- a/poky/meta/recipes-connectivity/avahi/avahi_0.8.bb
+++ b/poky/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -83,7 +83,6 @@
 do_install() {
 	autotools_do_install
 	rm -rf ${D}/run
-	rm -rf ${D}${datadir}/dbus-1/interfaces
 	test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
 	rm -rf ${D}${libdir}/avahi
 
@@ -135,7 +134,7 @@
                       ${sysconfdir}/avahi/services \
                       ${sysconfdir}/dbus-1 \
                       ${sysconfdir}/init.d/avahi-daemon \
-                      ${datadir}/avahi/introspection/*.introspect \
+                      ${datadir}/dbus-1/interfaces \
                       ${datadir}/avahi/avahi-service.dtd \
                       ${datadir}/avahi/service-types \
                       ${datadir}/dbus-1/system-services"
diff --git a/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb b/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb
similarity index 83%
rename from poky/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
rename to poky/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb
index 21b2eeb..de007a6 100644
--- a/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
+++ b/poky/meta/recipes-connectivity/dhcpcd/dhcpcd_10.0.1.bb
@@ -7,20 +7,17 @@
 HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
 
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d148485768fe85b9f1072b186a7e9b4d"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd"
 
-SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=dhcpcd-9 \
+SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \
            file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
            file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
-           file://0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch \
-           file://0002-privsep-Allow-newfstatat-syscall-as-well.patch \
-           file://0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch \
            file://dhcpcd.service \
            file://dhcpcd@.service \
            file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
            "
 
-SRCREV = "3c458fc7fa4146029a1e4f9e98cd7e7adf03081a"
+SRCREV = "5d9bf80c26b4b7dc9d8aa175d96d5a24e75b4d48"
 S = "${WORKDIR}/git"
 
 inherit pkgconfig autotools-brokensep systemd useradd
diff --git a/poky/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch b/poky/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch
index 6f90c88..8d1ed66 100644
--- a/poky/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch
+++ b/poky/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch
@@ -27,7 +27,7 @@
  1 file changed, 13 insertions(+), 4 deletions(-)
 
 diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf
-index 504a6c53..eb6e5845 100644
+index 7c29e276..becc019f 100644
 --- a/hooks/20-resolv.conf
 +++ b/hooks/20-resolv.conf
 @@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming"
@@ -35,7 +35,7 @@
  "
  : ${resolvconf:=resolvconf}
 +resolvconf_from_systemd=false
- if type "$resolvconf" >/dev/null 2>&1; then
+ if command -v "$resolvconf" >/dev/null 2>&1; then
  	have_resolvconf=true
 +	if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then
 +		resolvconf_from_systemd=true
diff --git a/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch b/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch
deleted file mode 100644
index 68ab934..0000000
--- a/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c6cdf0aee71ab4126d36b045f02428ee3c6ec50b Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Fri, 26 Aug 2022 09:08:36 +0100
-Subject: [PATCH 1/2] privsep: Allow getrandom sysctl for newer glibc
-
-Fixes #120
-
-Upstream-Status: Backport [c6cdf0aee71ab4126d36b045f02428ee3c6ec50b]
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/privsep-linux.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/privsep-linux.c b/src/privsep-linux.c
-index b238644b..479a1d82 100644
---- a/src/privsep-linux.c
-+++ b/src/privsep-linux.c
-@@ -300,6 +300,9 @@ static struct sock_filter ps_seccomp_filter[] = {
- #ifdef __NR_getpid
- 	SECCOMP_ALLOW(__NR_getpid),
- #endif
-+#ifdef __NR_getrandom
-+	SECCOMP_ALLOW(__NR_getrandom),
-+#endif
- #ifdef __NR_getsockopt
- 	/* For route socket overflow */
- 	SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET),
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch b/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch
deleted file mode 100644
index 1c514f9..0000000
--- a/poky/meta/recipes-connectivity/dhcpcd/files/0001-privsep-linux-fix-SECCOMP_AUDIT_ARCH-missing-ppc64le.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 7a2d9767585ed2c407d4985bd2d81552034fb90a Mon Sep 17 00:00:00 2001
-From: CHEN Xiangyu <xiangyu.chen@aol.com>
-Date: Thu, 9 Feb 2023 18:41:52 +0800
-Subject: [PATCH] privsep-linux: fix SECCOMP_AUDIT_ARCH missing ppc64le (#181)
-
-when dhcpcd running on ppc64le platform, it would be killed by SIGSYS.
-
-Upstream-Status: Backport [7a2d9767585ed2c407d4985bd2d81552034fb90a]
-
-Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
----
- src/privsep-linux.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/privsep-linux.c b/src/privsep-linux.c
-index 7372d26b..6a301950 100644
---- a/src/privsep-linux.c
-+++ b/src/privsep-linux.c
-@@ -232,7 +232,11 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
- #elif defined(__or1k__)
- #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_OPENRISC
- #elif defined(__powerpc64__)
--#  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64
-+#  if (BYTE_ORDER == LITTLE_ENDIAN)
-+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE
-+#  else
-+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64
-+#  endif
- #elif defined(__powerpc__)
- #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC
- #elif defined(__riscv)
--- 
-2.34.1
-
diff --git a/poky/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch b/poky/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch
deleted file mode 100644
index c5d2cba..0000000
--- a/poky/meta/recipes-connectivity/dhcpcd/files/0002-privsep-Allow-newfstatat-syscall-as-well.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7625a555797f587a89dc2447fd9d621024d5165c Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Fri, 26 Aug 2022 09:24:50 +0100
-Subject: [PATCH 2/2] privsep: Allow newfstatat syscall as well
-
-Allows newer glibc variants to work apparently.
-As reported in #84 and #89.
-
-Upstream-Status: Backport [7625a555797f587a89dc2447fd9d621024d5165c]
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/privsep-linux.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/privsep-linux.c b/src/privsep-linux.c
-index 479a1d82..6327b1bc 100644
---- a/src/privsep-linux.c
-+++ b/src/privsep-linux.c
-@@ -328,6 +328,9 @@ static struct sock_filter ps_seccomp_filter[] = {
- #ifdef __NR_nanosleep
- 	SECCOMP_ALLOW(__NR_nanosleep),	/* XXX should use ppoll instead */
- #endif
-+#ifdef __NR_newfstatat
-+	SECCOMP_ALLOW(__NR_newfstatat),
-+#endif
- #ifdef __NR_ppoll
- 	SECCOMP_ALLOW(__NR_ppoll),
- #endif
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch b/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch
deleted file mode 100644
index 49d319f..0000000
--- a/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 7d39930468e272c740b0eed3c7e5b7fb3abf29e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Aug 2020 10:36:22 -0700
-Subject: [PATCH] ftpd,telnetd: Fix multiple definitions of errcatch and not42
-
-This helps fix build failures when -fno-common option is used
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ftpd/extern.h     | 2 +-
- ftpd/ftpcmd.c     | 1 +
- telnetd/utility.c | 2 +-
- 3 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ftpd/extern.h b/ftpd/extern.h
-index ab33cf3..91dbbee 100644
---- a/ftpd/extern.h
-+++ b/ftpd/extern.h
-@@ -90,7 +90,7 @@ extern void user (const char *);
- extern char *sgetsave (const char *);
- 
- /* Exported from ftpd.c.  */
--jmp_buf errcatch;
-+extern jmp_buf errcatch;
- extern struct sockaddr_storage data_dest;
- extern socklen_t data_dest_len;
- extern struct sockaddr_storage his_addr;
-diff --git a/ftpd/ftpcmd.c b/ftpd/ftpcmd.c
-index beb1f06..d272e9d 100644
---- a/ftpd/ftpcmd.c
-+++ b/ftpd/ftpcmd.c
-@@ -106,6 +106,7 @@
- #endif
- 
- off_t restart_point;
-+jmp_buf errcatch;
- 
- static char cbuf[512];           /* Command Buffer.  */
- static char *fromname;
-diff --git a/telnetd/utility.c b/telnetd/utility.c
-index e7ffb8e..46bf91e 100644
---- a/telnetd/utility.c
-+++ b/telnetd/utility.c
-@@ -63,7 +63,7 @@ static int ncc;
- static char ptyibuf[BUFSIZ], *ptyip;
- static int pcc;
- 
--int not42;
-+extern int not42;
- 
- static int
- readstream (int p, char *ibuf, int bufsize)
--- 
-2.28.0
-
diff --git a/poky/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch b/poky/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch
deleted file mode 100644
index a91913c..0000000
--- a/poky/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-tftpd: Fix abort on error path
-
-When trying to fetch a non existent file, the app crashes with:
-
-*** buffer overflow detected ***: 
-Aborted
-
-
-Upstream-Status: Submitted [https://www.mail-archive.com/bug-inetutils@gnu.org/msg03036.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91205]
-Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
-diff --git a/src/tftpd.c b/src/tftpd.c
-index 56002a0..144012f 100644
---- a/src/tftpd.c
-+++ b/src/tftpd.c
-@@ -864,9 +864,8 @@ nak (int error)
-       pe->e_msg = strerror (error - 100);
-       tp->th_code = EUNDEF;	/* set 'undef' errorcode */
-     }
--  strcpy (tp->th_msg, pe->e_msg);
-   length = strlen (pe->e_msg);
--  tp->th_msg[length] = '\0';
-+  memcpy(tp->th_msg, pe->e_msg, length + 1);
-   length += 5;
-   if (sendto (peer, buf, length, 0, (struct sockaddr *) &from, fromlen) != length)
-     syslog (LOG_ERR, "nak: %m\n");
diff --git a/poky/meta/recipes-connectivity/neard/neard_0.18.bb b/poky/meta/recipes-connectivity/neard/neard_0.18.bb
index dbd6e38..362a761 100644
--- a/poky/meta/recipes-connectivity/neard/neard_0.18.bb
+++ b/poky/meta/recipes-connectivity/neard/neard_0.18.bb
@@ -6,7 +6,7 @@
                     file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
                    "
 
-DEPENDS = "dbus glib-2.0 libnl"
+DEPENDS = "dbus glib-2.0 libnl autoconf-archive-native"
 
 SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=https;branch=master \
            file://neard.in \
diff --git a/poky/meta/recipes-connectivity/ppp/ppp/0001-ppp-fix-build-against-5.15-headers.patch b/poky/meta/recipes-connectivity/ppp/ppp/0001-ppp-fix-build-against-5.15-headers.patch
deleted file mode 100644
index c91246d..0000000
--- a/poky/meta/recipes-connectivity/ppp/ppp/0001-ppp-fix-build-against-5.15-headers.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From aba3273273e826c6dc90f197ca9a3e800e826891 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@gmail.com>
-Date: Fri, 5 Nov 2021 12:41:35 -0400
-Subject: [PATCH] ppp: fix build against 5.15 headers
-
-The 5.15 kernel has removed ipx support, along with the userspace
-visible header.
-
-This support wasn't used previously (as it hasn't been very well
-maintained in the kernel for several years), so we can simply
-disable it in our build and wait for upstream to do a release that
-drops the support.
-
-Upstream-Status: Inappropriate [OE-specific configuration/headers]
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
----
- pppd/Makefile.linux | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 22837c5..23b9b22 100644
---- a/pppd/Makefile.linux
-+++ b/pppd/Makefile.linux
-@@ -91,7 +91,7 @@ MAXOCTETS=y
- 
- INCLUDE_DIRS= -I../include
- 
--COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -pipe
-+COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP -pipe
- 
- CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
- 
--- 
-2.25.1
-
diff --git a/poky/meta/recipes-connectivity/ppp/ppp/CVE-2022-4603.patch b/poky/meta/recipes-connectivity/ppp/ppp/CVE-2022-4603.patch
deleted file mode 100644
index 4325b1d..0000000
--- a/poky/meta/recipes-connectivity/ppp/ppp/CVE-2022-4603.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From a75fb7b198eed50d769c80c36629f38346882cbf Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Thu, 4 Aug 2022 12:23:08 +1000
-Subject: [PATCH] pppdump: Avoid out-of-range access to packet buffer
-
-This fixes a potential vulnerability where data is written to spkt.buf
-and rpkt.buf without a check on the array index.  To fix this, we
-check the array index (pkt->cnt) before storing the byte or
-incrementing the count.  This also means we no longer have a potential
-signed integer overflow on the increment of pkt->cnt.
-
-Fortunately, pppdump is not used in the normal process of setting up a
-PPP connection, is not installed setuid-root, and is not invoked
-automatically in any scenario that I am aware of.
-
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
----
- pppdump/pppdump.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c
-index 2b815fc9..b85a8627 100644
---- a/pppdump/pppdump.c
-+++ b/pppdump/pppdump.c
-@@ -297,6 +297,10 @@ dumpppp(f)
- 			    printf("%s aborted packet:\n     ", dir);
- 			    q = "    ";
- 			}
-+			if (pkt->cnt >= sizeof(pkt->buf)) {
-+			    printf("%s over-long packet truncated:\n     ", dir);
-+			    q = "    ";
-+			}
- 			nb = pkt->cnt;
- 			p = pkt->buf;
- 			pkt->cnt = 0;
-@@ -400,7 +404,8 @@ dumpppp(f)
- 			c ^= 0x20;
- 			pkt->esc = 0;
- 		    }
--		    pkt->buf[pkt->cnt++] = c;
-+		    if (pkt->cnt < sizeof(pkt->buf))
-+			pkt->buf[pkt->cnt++] = c;
- 		    break;
- 		}
- 	    }
diff --git a/poky/meta/recipes-connectivity/ppp/ppp/makefix.patch b/poky/meta/recipes-connectivity/ppp/ppp/makefix.patch
deleted file mode 100644
index fce068c..0000000
--- a/poky/meta/recipes-connectivity/ppp/ppp/makefix.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-We were seeing reproducibility issues where one host would use the internal 
-logwtmp wrapper, another would use the one in libutil. The issue was that in
-some cases the "\#include" was making it to CC, in others, "#include". The
-issue seems to be related to shell escaping.
-
-The root cause looks to be:
-http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4
-
-Instead of relying on shell quoting, use make to indirect the variable
-and avoid the problem.
-
-See https://github.com/paulusmack/ppp/issues/233
-
-Upstream-Status: Backport [https://github.com/paulusmack/ppp/commit/b4430f7092ececdff2504d5f3393a4c6528c3686]
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Index: ppp-2.4.9/pppd/Makefile.linux
-===================================================================
---- ppp-2.4.9.orig/pppd/Makefile.linux
-+++ ppp-2.4.9/pppd/Makefile.linux
-@@ -80,7 +80,8 @@ PLUGIN=y
- #USE_SRP=y
- 
- # Use libutil; test if logwtmp is declared in <utmp.h> to detect
--ifeq ($(shell echo '\#include <utmp.h>' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
-+UTMPHEADER = "\#include <utmp.h>"
-+ifeq ($(shell echo $(UTMPHEADER) | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes)
- USE_LIBUTIL=y
- endif
- 
-@@ -143,7 +144,8 @@ CFLAGS   += -DHAS_SHADOW
- #LIBS     += -lshadow $(LIBS)
- endif
- 
--ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
-+CRYPTHEADER = "\#include <crypt.h>"
-+ifeq ($(shell echo $(CRYPTHEADER) | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
- CFLAGS  += -DHAVE_CRYPT_H=1
- LIBS	+= -lcrypt
- endif
diff --git a/poky/meta/recipes-connectivity/ppp/ppp_2.4.9.bb b/poky/meta/recipes-connectivity/ppp/ppp_2.5.0.bb
similarity index 77%
rename from poky/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
rename to poky/meta/recipes-connectivity/ppp/ppp_2.5.0.bb
index 7e3ae43..4b052f8 100644
--- a/poky/meta/recipes-connectivity/ppp/ppp_2.4.9.bb
+++ b/poky/meta/recipes-connectivity/ppp/ppp_2.5.0.bb
@@ -12,7 +12,6 @@
                     file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
 
 SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
-           file://makefix.patch \
            file://pon \
            file://poff \
            file://init \
@@ -24,31 +23,15 @@
            file://ppp_on_boot \
            file://provider \
            file://ppp@.service \
-           file://0001-ppp-fix-build-against-5.15-headers.patch \
-           file://CVE-2022-4603.patch \
            "
 
-SRC_URI[sha256sum] = "f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d"
+SRC_URI[sha256sum] = "5cae0e8075f8a1755f16ca290eb44e6b3545d3f292af4da65ecffe897de636ff"
 
-inherit autotools-brokensep systemd
+inherit autotools systemd
 
-TARGET_CC_ARCH += " ${LDFLAGS}"
-EXTRA_OEMAKE = "CC='${CC}' STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}"
-EXTRA_OECONF = "--disable-strip"
-
-# Package Makefile computes CFLAGS, referencing COPTS.
-# Typically hard-coded to '-O2 -g' in the Makefile's.
-#
-EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"'
-
-EXTRA_OECONF:append:libc-musl = " --disable-ipxcp"
-
-do_configure () {
-	oe_runconf
-}
+EXTRA_OECONF += "--with-openssl=${STAGING_EXECPREFIXDIR}"
 
 do_install:append () {
-	make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
 	mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
 	mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
 	mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
@@ -68,12 +51,6 @@
 	install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_system_unitdir}
 	sed -i -e 's,@SBINDIR@,${sbindir},g' \
 	       ${D}${systemd_system_unitdir}/ppp@.service
-	rm -rf ${D}/${mandir}/man8/man8
-	chmod u+s ${D}${sbindir}/pppd
-}
-
-do_install:append:libc-musl () {
-	install -Dm 0644 ${S}/include/net/ppp_defs.h ${D}${includedir}/net/ppp_defs.h
 }
 
 CONFFILES:${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
@@ -96,5 +73,3 @@
 SUMMARY:${PN}-l2tp     = "Plugin for PPP for l2tp support"
 SUMMARY:${PN}-tools    = "Additional tools for the PPP package"
 
-# Ignore compatibility symlink rp-pppoe.so->pppoe.so
-INSANE_SKIP:${PN}-oe += "dev-so"
diff --git a/poky/meta/recipes-core/dbus/dbus_1.14.6.bb b/poky/meta/recipes-core/dbus/dbus_1.14.6.bb
index a6e18a9..da25155 100644
--- a/poky/meta/recipes-core/dbus/dbus_1.14.6.bb
+++ b/poky/meta/recipes-core/dbus/dbus_1.14.6.bb
@@ -42,7 +42,7 @@
 PACKAGECONFIG[audit] = "--enable-libaudit,--disable-libaudit,audit"
 PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
 
-DEPENDS = "expat virtual/libintl autoconf-archive glib-2.0"
+DEPENDS = "expat virtual/libintl autoconf-archive-native glib-2.0"
 RDEPENDS:${PN} += "${PN}-common ${PN}-tools"
 RDEPENDS:${PN}:class-native = ""
 
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Avoid-having-g_futex_simple-inadvertently-modify-err.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Avoid-having-g_futex_simple-inadvertently-modify-err.patch
new file mode 100644
index 0000000..db63cfd
--- /dev/null
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Avoid-having-g_futex_simple-inadvertently-modify-err.patch
@@ -0,0 +1,36 @@
+From edd1e47f107410d9e4edb691335410026ae5a534 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+Date: Tue, 25 Apr 2023 20:02:31 +0200
+Subject: [PATCH] Avoid having g_futex_simple() inadvertently modify errno
+
+If both __NR_futex and __NR_futex_time64 are defined, g_futex_simple()
+will first call futex_time64(). If that fails with ENOSYS, then
+futex_time() is called instead. However, errno was not saved and
+restored in this case, which would result in g_futex_simple()
+returning with errno set to ENOSYS, even if futex_time() succeeded.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/edd1e47f107410d9e4edb691335410026ae5a534]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ glib/gthreadprivate.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h
+index 9c847e039..74d37ba32 100644
+--- a/glib/gthreadprivate.h
++++ b/glib/gthreadprivate.h
+@@ -65,9 +65,13 @@ struct  _GRealThread
+ #define g_futex_simple(uaddr, futex_op, ...)                                     \
+   G_STMT_START                                                                   \
+   {                                                                              \
++    int saved_errno = errno;                                                     \
+     int res = syscall (__NR_futex_time64, uaddr, (gsize) futex_op, __VA_ARGS__); \
+     if (res < 0 && errno == ENOSYS)                                              \
+-      syscall (__NR_futex, uaddr, (gsize) futex_op, __VA_ARGS__);                \
++      {                                                                          \
++        errno = saved_errno;                                                     \
++        syscall (__NR_futex, uaddr, (gsize) futex_op, __VA_ARGS__);              \
++      }                                                                          \
+   }                                                                              \
+   G_STMT_END
+ #elif defined(__NR_futex_time64)
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch
deleted file mode 100644
index 57ada66..0000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 3c56ff21b9a5fe18f9cec9b97ae1788fdf5d563e Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Tue, 6 Jul 2021 19:26:03 +0100
-Subject: [PATCH] gio/tests/g-file-info: don't assume million-in-one events
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2990]
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
- don't happen
-
-The access and creation time tests create a file, gets the time in
-seconds, then gets the time in microseconds and assumes that the
-difference between the two has to be above 0.
-
-As rare as this may be, it can happen:
-
-$ stat g-file-info-test-50A450 -c %y
-2021-07-06 18:24:56.000000767 +0100
-
-Change the test to simply assert that the difference not negative to
-handle this case.
-
-This is the same fix as 289f8b, but that was just modification time.
-
----
- gio/tests/g-file-info.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c
-index d9ad045..c9b12b0 100644
---- a/gio/tests/g-file-info.c
-+++ b/gio/tests/g-file-info.c
-@@ -307,7 +307,7 @@ test_g_file_info_access_time (void)
-   g_assert_nonnull (dt_usecs);
- 
-   ts = g_date_time_difference (dt_usecs, dt);
--  g_assert_cmpint (ts, >, 0);
-+  g_assert_cmpint (ts, >=, 0);
-   g_assert_cmpint (ts, <, G_USEC_PER_SEC);
- 
-   /* Try again with nanosecond precision. */
-@@ -442,7 +442,7 @@ test_g_file_info_creation_time (void)
-   g_assert_nonnull (dt_usecs);
- 
-   ts = g_date_time_difference (dt_usecs, dt);
--  g_assert_cmpint (ts, >, 0);
-+  g_assert_cmpint (ts, >=, 0);
-   g_assert_cmpint (ts, <, G_USEC_PER_SEC);
- 
-   /* Try again with nanosecond precision. */
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch
deleted file mode 100644
index db08b5a..0000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From fdbffaea2fa85c203cc6aacb5734acac65aeaa19 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Fri, 11 Nov 2022 13:12:42 +0100
-Subject: [PATCH] tests/meson.build: do not use can_run_host_binaries()
-
-can_run_host_binaries() returns true even when cross compiling,
-if there is an executable wrapper defined that can run
-cross-binaries under some kind of emulation.
-
-Unfortunately, custom_target() will not use the wrapper
-and will attempt to execute the command directly. Until
-this is addressed in meson upstream, we have to disable
-these targets in cross scenarios.
-
-Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3067]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
-
----
- gio/tests/meson.build  | 2 +-
- glib/tests/meson.build | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 49cfa25ce..ea59656f9 100644
---- a/gio/tests/meson.build
-+++ b/gio/tests/meson.build
-@@ -652,7 +652,7 @@ if installed_tests_enabled
-   endforeach
- endif
- 
--if meson.can_run_host_binaries()
-+if not meson.is_cross_build()
- 
-   compiler_type = '--compiler=@0@'.format(cc.get_id())
- 
-diff --git a/glib/tests/meson.build b/glib/tests/meson.build
-index 69508178e..e4f75f302 100644
---- a/glib/tests/meson.build
-+++ b/glib/tests/meson.build
-@@ -411,7 +411,7 @@ executable('testing-helper', 'testing-helper.c',
- )
- 
- # some testing of gtester functionality
--if meson.can_run_host_binaries() and host_system != 'windows'
-+if not meson.is_cross_build() and host_system != 'windows'
-   xmllint = find_program('xmllint', required: false)
-   if xmllint.found()
-     tmpsample_xml = custom_target('tmpsample.xml',
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch
deleted file mode 100644
index 63cbf90..0000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 0ca5254c5d92aec675b76b4bfa72a6885cde6066 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
-Date: Sat, 29 Oct 2022 04:30:52 +0200
-Subject: [PATCH] glib/gmacros: Always define NULL as nullptr in C++11 and
- newer
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/0ca5254c5d92aec675b76b4bfa72a6885cde6066]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- glib/gmacros.h     |  9 ++++++++-
- glib/tests/cxx.cpp | 13 -------------
- 2 files changed, 8 insertions(+), 14 deletions(-)
-
-diff --git a/glib/gmacros.h b/glib/gmacros.h
-index 5302841105..9fe8270822 100644
---- a/glib/gmacros.h
-+++ b/glib/gmacros.h
-@@ -870,10 +870,17 @@
-  */
- #ifndef NULL
- #  ifdef __cplusplus
--#  define NULL        (0L)
-+#    if __cplusplus >= 201103L
-+#      define NULL (nullptr)
-+#    else
-+#      define NULL (0L)
-+#    endif /* __cplusplus >= 201103L */
- #  else /* !__cplusplus */
- #  define NULL        ((void*) 0)
- #  endif /* !__cplusplus */
-+#elif defined (__cplusplus) && __cplusplus >= 201103L
-+#  undef NULL
-+#  define NULL (nullptr)
- #endif
- 
- #ifndef	FALSE
-diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
-index 6ac60791c8..045457c6e2 100644
---- a/glib/tests/cxx.cpp
-+++ b/glib/tests/cxx.cpp
-@@ -34,21 +34,12 @@ test_typeof (void)
-   MyObject *obj3 = g_atomic_pointer_get (&obj2);
-   g_assert_true (obj3 == obj);
- 
--#if __cplusplus >= 201103L
--  MyObject *obj4 = nullptr;
--#else
-   MyObject *obj4 = NULL;
--#endif
-   g_atomic_pointer_set (&obj4, obj3);
-   g_assert_true (obj4 == obj);
- 
--#if __cplusplus >= 201103L
--  MyObject *obj5 = nullptr;
--  g_atomic_pointer_compare_and_exchange (&obj5, nullptr, obj4);
--#else
-   MyObject *obj5 = NULL;
-   g_atomic_pointer_compare_and_exchange (&obj5, NULL, obj4);
--#endif
-   g_assert_true (obj5 == obj);
- 
-   MyObject *obj6 = g_steal_pointer (&obj5);
-@@ -195,11 +186,7 @@ test_steal_pointer (void)
- int
- main (int argc, char *argv[])
- {
--#if __cplusplus >= 201103L
--  g_test_init (&argc, &argv, nullptr);
--#else
-   g_test_init (&argc, &argv, NULL);
--#endif
- 
-   g_test_add_func ("/C++/typeof", test_typeof);
-   g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
--- 
-GitLab
-
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch
deleted file mode 100644
index 763d5ce..0000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7dc19632f3115e3f517c6bc80436fe72c1dcdeb4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
-Date: Sat, 29 Oct 2022 04:16:00 +0200
-Subject: [PATCH] glib/tests/cxx: Ensure NULL is always casted to a pointer
- type
-
-Otherwise it may not be recognized as valid sentinel
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/7dc19632f3115e3f517c6bc80436fe72c1dcdeb4]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- glib/tests/cxx.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
-index 045457c6e2..aa5e0cb576 100644
---- a/glib/tests/cxx.cpp
-+++ b/glib/tests/cxx.cpp
-@@ -186,7 +186,11 @@ test_steal_pointer (void)
- int
- main (int argc, char *argv[])
- {
-+#if __cplusplus >= 201103L
-   g_test_init (&argc, &argv, NULL);
-+#else
-+  g_test_init (&argc, &argv, static_cast<void *>(NULL));
-+#endif
- 
-   g_test_add_func ("/C++/typeof", test_typeof);
-   g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
--- 
-GitLab
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index ae6881b..3dba599 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,4 +1,4 @@
-From a3cdf17643bf33d532ec269913974195e136b7fc Mon Sep 17 00:00:00 2001
+From 38e401969a2ff8269919cbeacec733a67f041735 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Fri, 11 Mar 2016 15:35:55 +0000
 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
@@ -13,38 +13,33 @@
 
 Port patch to 2.48
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
 ---
- gio/giomodule.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
+ gio/giomodule.c | 5 -----
+ 1 file changed, 5 deletions(-)
 
 diff --git a/gio/giomodule.c b/gio/giomodule.c
-index f5dbb45..c926e77 100644
+index 11ce7d8..cc27ecd 100644
 --- a/gio/giomodule.c
 +++ b/gio/giomodule.c
-@@ -58,6 +58,8 @@
- #ifdef G_OS_WIN32
- #include "gregistrysettingsbackend.h"
- #include "giowin32-priv.h"
-+#else
-+#include <dlfcn.h>
- #endif
- #include <glib/gstdio.h>
- 
-@@ -1261,7 +1263,15 @@ get_gio_module_dir (void)
-                                      NULL);
+@@ -1271,9 +1271,6 @@ get_gio_module_dir (void)
        g_free (install_dir);
  #else
--      module_dir = g_strdup (GIO_MODULE_DIR);
-+      Dl_info info;
-+
-+      if (dladdr (g_io_module_new, &info)) {
-+        char *libdir = g_path_get_dirname (info.dli_fname);
-+        module_dir = g_build_filename (libdir, "gio", "modules", NULL);
-+        g_free (libdir);
-+      } else {
-+        module_dir = g_strdup (GIO_MODULE_DIR);
-+      }
+       module_dir = g_strdup (GIO_MODULE_DIR);
+-#ifdef __APPLE__
+-#include "TargetConditionals.h"
+-#if TARGET_OS_OSX
+ #include <dlfcn.h>
+       {
+         g_autofree gchar *path = NULL;
+@@ -1292,8 +1289,6 @@ get_gio_module_dir (void)
+               }
+           }
+       }
+-#endif
+-#endif
  #endif
      }
  
+-- 
+2.30.2
+
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index c476d67..831bc3b 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -6,5 +6,5 @@
 fi
 useradd glib2-test
 cd /tmp
-su glib2-test -c 'gnome-desktop-testing-runner glib'
+su glib2-test -c 'G_TEST_TMPDIR=`readlink -f /tmp` gnome-desktop-testing-runner glib'
 userdel glib2-test
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb
similarity index 86%
rename from poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb
rename to poky/meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb
index 5b79ae4..f3a716e 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb
@@ -14,14 +14,11 @@
            file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
            file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
            file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
-           file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \
-           file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \
-           file://cpp-null.patch \
-           file://cpp-null2.patch \
+           file://0001-Avoid-having-g_futex_simple-inadvertently-modify-err.patch \
            "
 SRC_URI:append:class-native = " file://relocate-modules.patch"
 
-SRC_URI[sha256sum] = "069cf7e51cd261eb163aaf06c8d1754c6835f31252180aff5814e5afc7757fbc"
+SRC_URI[sha256sum] = "24f3847857b1d8674cdb0389a36edec0f13c666cd3ce727ecd340eb9da8aca9e"
 
 # Find any meson cross files in FILESPATH that are relevant for the current
 # build (using siteinfo) and add them to EXTRA_OEMESON.
diff --git a/poky/meta/recipes-core/glib-networking/glib-networking_2.74.0.bb b/poky/meta/recipes-core/glib-networking/glib-networking_2.74.0.bb
index b3a88ac..fe6900b 100644
--- a/poky/meta/recipes-core/glib-networking/glib-networking_2.74.0.bb
+++ b/poky/meta/recipes-core/glib-networking/glib-networking_2.74.0.bb
@@ -3,22 +3,27 @@
 HOMEPAGE = "https://gitlab.gnome.org/GNOME/glib-networking/"
 BUGTRACKER = "http://bugzilla.gnome.org"
 
-LICENSE = "LGPL-2.1-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+LICENSE = "LGPL-2.1-or-later"
+LICENSE:append = "${@bb.utils.contains('PACKAGECONFIG', 'openssl', ' & Glib-Networking-OpenSSL-Exception', '', d)}"
+NO_GENERIC_LICENSE[Glib-Networking-OpenSSL-Exception] = "LICENSE_EXCEPTION"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://LICENSE_EXCEPTION;md5=0f5be697951b5e71aff00f4a4ce66be8 \
+                    file://tls/base/gtlsconnection-base.c;beginline=7;endline=22;md5=ab641ac307f3337811008ea9afe7059f"
 
 SECTION = "libs"
 DEPENDS = "glib-2.0-native glib-2.0"
 
 SRC_URI[archive.sha256sum] = "1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b"
 
-PACKAGECONFIG ??= "openssl ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
+PACKAGECONFIG ??= "openssl environment ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
 
 PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls"
 PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl"
+PACKAGECONFIG[environment] = "-Denvironment_proxy=enabled,-Denvironment_proxy=disabled"
 PACKAGECONFIG[libproxy] = "-Dlibproxy=enabled,-Dlibproxy=disabled,libproxy"
 PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false"
-
-EXTRA_OEMESON = "-Dgnome_proxy=disabled"
+PACKAGECONFIG[gnomeproxy] = "-Dgnome_proxy=enabled,-Dgnome_proxy=disabled,gsettings-desktop-schemas"
 
 GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase gettext upstream-version-is-even gio-module-cache ptest-gnome
diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb
index 19b07d6..7c8434f 100644
--- a/poky/meta/recipes-core/musl/musl_git.bb
+++ b/poky/meta/recipes-core/musl/musl_git.bb
@@ -12,7 +12,7 @@
 
 # mirror is at git://github.com/kraj/musl.git
 
-SRC_URI = "git://git.musl-libc.org/musl;branch=master;protocol=https \
+SRC_URI = "git://git.musl-libc.org/git/musl;branch=master;protocol=https \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
           "
diff --git a/poky/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch b/poky/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
deleted file mode 100644
index 7645be7..0000000
--- a/poky/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Inappropriate  [OE-Specific]
-
-When trying to build libgloss for an arm target, the build system
-complains about missing some include files:
-
-| fatal error: acle-compiat.h: No such file or directory
-|  #include "acle-compat.h"
-|           ^~~~~~~~~~~~~~~
-| compilation terminated.
-
-These include files come from the newlib source, but since we
-are building libgloss separately from newlib, libgloss is unaware
-of where they are, this patch fixes the INCLUDES so the build system
-can find such files.
-
-Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
-
-Index: newlib-3.0.0/libgloss/config/default.mh
-===================================================================
---- newlib-3.0.0.orig/libgloss/config/default.mh
-+++ newlib-3.0.0/libgloss/config/default.mh
-@@ -1,7 +1,7 @@
- NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
- NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
- 
--INCLUDES = -I. -I$(srcdir)/..
-+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../newlib/libc/machine/arm
- # Note that when building the library, ${MULTILIB} is not the way multilib
- # options are passed; they're passed in $(CFLAGS).
- CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
diff --git a/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch
index 1b6687c..7adc454 100644
--- a/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch
+++ b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch
@@ -1,4 +1,4 @@
-From 9f28dd5f183f6e4d2b023cd555bb30446ae5f618 Mon Sep 17 00:00:00 2001
+From cf6361f27cd6318622fd58ab6c0a9407cc633b1e Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 14 Jun 2021 19:56:28 +0200
 Subject: [PATCH] debug prefix map
@@ -22,7 +22,7 @@
  1 file changed, 9 insertions(+), 9 deletions(-)
 
 diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
-index c4e4c7ded0..058205da72 100755
+index 471eb67c0c..a16fb5c9f1 100755
 --- a/BaseTools/Conf/tools_def.template
 +++ b/BaseTools/Conf/tools_def.template
 @@ -1849,7 +1849,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG     = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
@@ -31,10 +31,10 @@
  

 -DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common

 +DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common ENV(GCC_PREFIX_MAP)

- DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe

- DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe

- DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie

-@@ -1871,8 +1871,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS      = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere
+ DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie

+ DEFINE GCC_LOONGARCH64_CC_FLAGS    = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections

+ DEFINE GCC_ARM_CC_XIPFLAGS         = -mno-unaligned-access

+@@ -1869,8 +1869,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS      = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere
  DEFINE GCC_AARCH64_ASLDLINK_FLAGS  = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)

  DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)

  DEFINE GCC_IA32_X64_DLINK_FLAGS    = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map

@@ -45,59 +45,59 @@
  DEFINE GCC_VFRPP_FLAGS             = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h

  DEFINE GCC_ASLPP_FLAGS             = -x c -E -include AutoGen.h

  DEFINE GCC_ASLCC_FLAGS             = -x c

-@@ -2026,7 +2026,7 @@ DEFINE GCC_PP_FLAGS                        = -E -x assembler-with-cpp -include A
+@@ -2022,7 +2022,7 @@ DEFINE GCC5_LOONGARCH64_PP_FLAGS           = -mabi=lp64d -march=loongarch64 DEF(
  *_GCC48_IA32_DLINK2_FLAGS         = DEF(GCC48_IA32_DLINK2_FLAGS)

  *_GCC48_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)

  *_GCC48_IA32_OBJCOPY_FLAGS        =

 -*_GCC48_IA32_NASM_FLAGS           = -f elf32

 +*_GCC48_IA32_NASM_FLAGS           = -f elf32 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Os

- RELEASE_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable

-@@ -2054,7 +2054,7 @@ RELEASE_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
+   DEBUG_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS)

+ RELEASE_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable

+@@ -2050,7 +2050,7 @@ RELEASE_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set
  *_GCC48_X64_DLINK2_FLAGS         = DEF(GCC48_X64_DLINK2_FLAGS)

  *_GCC48_X64_RC_FLAGS             = DEF(GCC_X64_RC_FLAGS)

  *_GCC48_X64_OBJCOPY_FLAGS        =

 -*_GCC48_X64_NASM_FLAGS           = -f elf64

 +*_GCC48_X64_NASM_FLAGS           = -f elf64 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS) -Os

- RELEASE_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable

-@@ -2166,7 +2166,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
+   DEBUG_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS)

+ RELEASE_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable

+@@ -2159,7 +2159,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
  *_GCC49_IA32_DLINK2_FLAGS         = DEF(GCC49_IA32_DLINK2_FLAGS)

  *_GCC49_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)

  *_GCC49_IA32_OBJCOPY_FLAGS        =

 -*_GCC49_IA32_NASM_FLAGS           = -f elf32

 +*_GCC49_IA32_NASM_FLAGS           = -f elf32 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Os

- RELEASE_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable

-@@ -2194,7 +2194,7 @@ RELEASE_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
+   DEBUG_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS)

+ RELEASE_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable

+@@ -2187,7 +2187,7 @@ RELEASE_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set
  *_GCC49_X64_DLINK2_FLAGS         = DEF(GCC49_X64_DLINK2_FLAGS)

  *_GCC49_X64_RC_FLAGS             = DEF(GCC_X64_RC_FLAGS)

  *_GCC49_X64_OBJCOPY_FLAGS        =

 -*_GCC49_X64_NASM_FLAGS           = -f elf64

 +*_GCC49_X64_NASM_FLAGS           = -f elf64 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC49_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -Os

- RELEASE_GCC49_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable

-@@ -2312,7 +2312,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
+   DEBUG_GCC49_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS)

+ RELEASE_GCC49_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable

+@@ -2302,7 +2302,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
  *_GCC5_IA32_DLINK2_FLAGS         = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie

  *_GCC5_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)

  *_GCC5_IA32_OBJCOPY_FLAGS        =

 -*_GCC5_IA32_NASM_FLAGS           = -f elf32

 +*_GCC5_IA32_NASM_FLAGS           = -f elf32 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC5_IA32_CC_FLAGS       = DEF(GCC5_IA32_CC_FLAGS) -flto -Os

+   DEBUG_GCC5_IA32_CC_FLAGS       = DEF(GCC5_IA32_CC_FLAGS) -flto

    DEBUG_GCC5_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386

-@@ -2344,7 +2344,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
+@@ -2334,7 +2334,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
  *_GCC5_X64_DLINK2_FLAGS          = DEF(GCC5_X64_DLINK2_FLAGS)

  *_GCC5_X64_RC_FLAGS              = DEF(GCC_X64_RC_FLAGS)

  *_GCC5_X64_OBJCOPY_FLAGS         =

 -*_GCC5_X64_NASM_FLAGS            = -f elf64

 +*_GCC5_X64_NASM_FLAGS            = -f elf64 ENV(NASM_PREFIX_MAP)

  

-   DEBUG_GCC5_X64_CC_FLAGS        = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os

+   DEBUG_GCC5_X64_CC_FLAGS        = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO

    DEBUG_GCC5_X64_DLINK_FLAGS     = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os

 -- 
 2.30.2
diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb
index 5ca0b49..bd92c5d 100644
--- a/poky/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb
@@ -26,8 +26,8 @@
            file://0006-reproducible.patch \
            "
 
-PV = "edk2-stable202211"
-SRCREV = "fff6d81270b57ee786ea18ad74f43149b9f03494"
+PV = "edk2-stable202302"
+SRCREV = "f80f052277c88a67c55e107b550f504eeea947d3"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
 
 inherit deploy
diff --git a/poky/meta/recipes-core/systemd/systemd/0007-Add-sys-stat.h-for-S_IFDIR.patch b/poky/meta/recipes-core/systemd/systemd/0007-Add-sys-stat.h-for-S_IFDIR.patch
deleted file mode 100644
index 479b9a1..0000000
--- a/poky/meta/recipes-core/systemd/systemd/0007-Add-sys-stat.h-for-S_IFDIR.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1480ef4ea9f71befbc22272c219b62ee5cd71d43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 21 Jan 2022 15:17:37 -0800
-Subject: [PATCH] Add sys/stat.h for S_IFDIR
-
-../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR'
-        r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR);
-
-Upstream-Status: Backport [29b7114c5d9624002aa7c17748d960cd1e45362d]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/shared/mkdir-label.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c
-index e3afc2b666..f1df778966 100644
---- a/src/shared/mkdir-label.c
-+++ b/src/shared/mkdir-label.c
-@@ -7,6 +7,7 @@
- #include "selinux-util.h"
- #include "smack-util.h"
- #include "user-util.h"
-+#include <sys/stat.h>
- 
- int mkdirat_label(int dirfd, const char *path, mode_t mode) {
-         int r;
--- 
-2.39.2
-
diff --git a/poky/meta/recipes-core/systemd/systemd_253.3.bb b/poky/meta/recipes-core/systemd/systemd_253.3.bb
index a79d6cb..45dc6ab 100644
--- a/poky/meta/recipes-core/systemd/systemd_253.3.bb
+++ b/poky/meta/recipes-core/systemd/systemd_253.3.bb
@@ -49,7 +49,6 @@
                file://0023-Handle-missing-gshadow.patch \
                file://0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
                file://0005-pass-correct-parameters-to-getdents64.patch \
-               file://0007-Add-sys-stat.h-for-S_IFDIR.patch \
                file://0001-Adjust-for-musl-headers.patch \
                file://0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \
                file://0003-errno-util-Make-STRERROR-portable-for-musl.patch \
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.40.inc b/poky/meta/recipes-devtools/binutils/binutils-2.40.inc
index 3d6d832..84dbf5f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.40.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.40.inc
@@ -18,7 +18,7 @@
 
 UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
 
-SRCREV ?= "ffb83e32fc11f36b7b82b876c14888f82cd983b3"
+SRCREV ?= "4671be001eb5a899ecac3e2686a92934000f8262"
 BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
 SRC_URI = "\
      ${BINUTILS_GIT_URI} \
@@ -32,7 +32,6 @@
      file://0011-Check-for-clang-before-checking-gcc-version.patch \
      file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
      file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
-     file://0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch \
      file://0015-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
      file://0016-CVE-2023-25586.patch \
      file://fix-time64.patch \
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 7fffa81..ca24983 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,4 +1,4 @@
-From 25e715730ddcca37021fa4876aed4fa91d5dea25 Mon Sep 17 00:00:00 2001
+From 4bdab425bdd7dc52c95bfd62e035c1b9abe9595e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:58:54 +0000
 Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 87a19c9..663dc4a 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -1,4 +1,4 @@
-From 080a8eafc5961f78222d84aaa816d0933441b7ab Mon Sep 17 00:00:00 2001
+From c79005d4d9991593557766ad569f48c26482399f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Mar 2017 23:37:05 -0800
 Subject: [PATCH] binutils-cross: Do not generate linker script directories
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch b/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
index 54967b9..f46116f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
@@ -1,4 +1,4 @@
-From 90d1bb804033a74b54f64cd5d3127c004c266af8 Mon Sep 17 00:00:00 2001
+From 70da8b91026c5381d430194910fc15e3b6c5ec7f Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 19 Feb 2020 09:51:16 -0800
 Subject: [PATCH] binutils-nativesdk: Search for alternative ld.so.conf in SDK
@@ -29,7 +29,7 @@
  5 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 12b2c3c453f..0590b7055d0 100644
+index b3195b4be68..fc6460317a7 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
 @@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
@@ -43,7 +43,7 @@
  NO_WERROR = @NO_WERROR@
  AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 3d5685d6bae..70643b1ce46 100644
+index fe422569228..4a4c851b44a 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
 @@ -566,7 +566,8 @@ ZLIB = @zlibdir@ -lz
@@ -65,7 +65,7 @@
        info.path = NULL;
        info.len = info.alloc = 0;
 -      tmppath = concat (ld_sysroot, prefix, "/etc/ld.so.conf",
-+      tmppath = concat (ld_sysconfdir, "/ld.so.conf",
++      tmppath = concat (ld_sysconfdir, "/etc/ld.so.conf",
  			(const char *) NULL);
        if (!ldelf_parse_ld_so_conf (&info, tmppath))
  	{
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
index 90abd50..e7d2593 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -1,4 +1,4 @@
-From a7c988d60f11c8279453c2d9edeede001cce7c9e Mon Sep 17 00:00:00 2001
+From fa477bb947fa17543f4550bc0e7e715c8355649c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:09:58 +0000
 Subject: [PATCH] Point scripts location to libdir
@@ -12,7 +12,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 0590b7055d0..c30db94ee3c 100644
+index fc6460317a7..1b875904b8d 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
 @@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
@@ -25,7 +25,7 @@
  EMUL = @EMUL@
  EMULATION_OFILES = @EMULATION_OFILES@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 70643b1ce46..0405028e02f 100644
+index 4a4c851b44a..08dcd7b75fc 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
 @@ -574,7 +574,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/poky/meta/recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index 9557e87..7242f48 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,4 +1,4 @@
-From fc39b9c332a346910695817274d55d0c20dc717a Mon Sep 17 00:00:00 2001
+From 7912f5a918e612950feb04d845934f26160e85da Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:39:01 +0000
 Subject: [PATCH] don't let the distro compiler point to the wrong installation
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch b/poky/meta/recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch
index 0ca55d4..87bbe9f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,4 +1,4 @@
-From b9af05e87ac8eb4fa18a75939edb661056246c30 Mon Sep 17 00:00:00 2001
+From 725ca09ee1041f64589f26ba815ef11da687c608 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 15 Jan 2016 06:31:09 +0000
 Subject: [PATCH] warn for uses of system directories when cross linking
@@ -77,7 +77,7 @@
  #undef EXTRA_SHLIB_EXTENSION
  
 diff --git a/ld/configure b/ld/configure
-index 49936a0cb2a..5f5dad6d67c 100755
+index 995708089fd..6406a42c442 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -839,6 +839,7 @@ with_lib_path
@@ -253,7 +253,7 @@
      {
        if (error_count < MAX_ERRORS_IN_A_ROW)
 diff --git a/ld/lexsup.c b/ld/lexsup.c
-index c5960385572..eb54627fb71 100644
+index a1c6140100d..d47ba4f977d 100644
 --- a/ld/lexsup.c
 +++ b/ld/lexsup.c
 @@ -613,6 +613,14 @@ static const struct ld_option ld_options[] =
@@ -271,7 +271,7 @@
  };
  
  #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1735,6 +1743,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1737,6 +1745,14 @@ parse_args (unsigned argc, char **argv)
  	  config.print_map_discarded = true;
  	  break;
  
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/poky/meta/recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
index 502ce82..fdd1f77 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -1,4 +1,4 @@
-From ef9aa69324a209e546956a2f674462717ec5af0f Mon Sep 17 00:00:00 2001
+From 4e9d4ace8a340399aeaa8332e2cfbfcc7d2d14d7 Mon Sep 17 00:00:00 2001
 From: Zhenhua Luo <zhenhua.luo@nxp.com>
 Date: Sat, 11 Jun 2016 22:08:29 -0500
 Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch b/poky/meta/recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch
index 7e7c257..0be871f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch
@@ -1,4 +1,4 @@
-From 0ad92af822bb6f58de3f3889d0adc0b2ef9d477f Mon Sep 17 00:00:00 2001
+From a66b1806350a9bed7b188c7d115991f6cdee51a9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 14 Feb 2016 17:04:07 +0000
 Subject: [PATCH] Use libtool 2.4
@@ -76,7 +76,7 @@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  all_backends = @all_backends@
 diff --git a/bfd/configure b/bfd/configure
-index e5d464378f8..ee8ea251479 100755
+index 60ea6becab2..84dcdf167ba 100755
 --- a/bfd/configure
 +++ b/bfd/configure
 @@ -706,6 +706,9 @@ OTOOL
@@ -2038,7 +2038,7 @@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  am__include = @am__include@
 diff --git a/binutils/configure b/binutils/configure
-index 3cb797c2b8d..5578150c1d9 100755
+index c7bd42049c3..06285371350 100755
 --- a/binutils/configure
 +++ b/binutils/configure
 @@ -700,8 +700,11 @@ OTOOL
@@ -3977,7 +3977,7 @@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  am__include = @am__include@
 diff --git a/gas/configure b/gas/configure
-index 684e68e0ea2..ba35172965e 100755
+index 3c0c3e27d3b..11baafb9db6 100755
 --- a/gas/configure
 +++ b/gas/configure
 @@ -686,8 +686,11 @@ OTOOL
@@ -5916,7 +5916,7 @@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  am__include = @am__include@
 diff --git a/gprof/configure b/gprof/configure
-index 3e8edd112cb..5b320c60f50 100755
+index c5a081c88aa..a1b06379df4 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -663,8 +663,11 @@ OTOOL
@@ -7830,7 +7830,7 @@
    chmod +x "$ofile"
  
 diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in
-index 01f7dca3f2a..3db326271c9 100644
+index a2854950e34..4d307543d81 100644
 --- a/gprofng/Makefile.in
 +++ b/gprofng/Makefile.in
 @@ -253,6 +253,7 @@ CXXFLAGS = @CXXFLAGS@
@@ -7850,10 +7850,10 @@
  NM = @NM@
  NMEDIT = @NMEDIT@
 diff --git a/gprofng/configure b/gprofng/configure
-index 2afc9a381a6..1e57b41ffa4 100755
+index 3ad87139280..e4593cbb838 100755
 --- a/gprofng/configure
 +++ b/gprofng/configure
-@@ -672,6 +672,8 @@ OTOOL
+@@ -674,6 +674,8 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -7862,7 +7862,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -802,6 +804,7 @@ enable_static
+@@ -804,6 +806,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -7870,7 +7870,7 @@
  enable_libtool_lock
  enable_werror_always
  enable_gprofng_tools
-@@ -1465,6 +1468,8 @@ Optional Packages:
+@@ -1467,6 +1470,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -7879,7 +7879,7 @@
    --with-jdk=PATH         specify prefix directory for installed JDK.
    --with-system-zlib      use installed libz
  
-@@ -6156,8 +6161,8 @@ esac
+@@ -6158,8 +6163,8 @@ esac
  
  
  
@@ -7890,7 +7890,7 @@
  
  
  
-@@ -6197,7 +6202,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -6199,7 +6204,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -7899,7 +7899,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6890,8 +6895,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6892,8 +6897,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -7910,7 +7910,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6940,6 +6945,80 @@ esac
+@@ -6942,6 +6947,80 @@ esac
  
  
  
@@ -7991,7 +7991,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if ${lt_cv_ld_reload_flag+:} false; then :
-@@ -6956,6 +7035,11 @@ case $reload_flag in
+@@ -6958,6 +7037,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -8003,7 +8003,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -7124,7 +7208,8 @@ mingw* | pw32*)
+@@ -7126,7 +7210,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -8013,7 +8013,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -7278,6 +7363,21 @@ esac
+@@ -7280,6 +7365,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -8035,7 +8035,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -7293,6 +7393,157 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -7295,6 +7395,157 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -8193,7 +8193,7 @@
  plugin_option=
  plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
  for plugin in $plugin_names; do
-@@ -7307,8 +7558,10 @@ for plugin in $plugin_names; do
+@@ -7309,8 +7560,10 @@ for plugin in $plugin_names; do
  done
  
  if test -n "$ac_tool_prefix"; then
@@ -8206,7 +8206,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_AR+:} false; then :
-@@ -7324,7 +7577,7 @@ do
+@@ -7326,7 +7579,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -8215,7 +8215,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -7344,11 +7597,15 @@ $as_echo "no" >&6; }
+@@ -7346,11 +7599,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -8234,7 +8234,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_ac_ct_AR+:} false; then :
-@@ -7364,7 +7621,7 @@ do
+@@ -7366,7 +7623,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -8243,7 +8243,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -7383,6 +7640,10 @@ else
+@@ -7385,6 +7642,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -8254,7 +8254,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -7394,29 +7655,81 @@ ac_tool_warned=yes ;;
+@@ -7396,29 +7657,81 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -8351,7 +8351,7 @@
  
  
  
-@@ -7763,8 +8076,8 @@ esac
+@@ -7765,8 +8078,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -8362,7 +8362,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -7800,6 +8113,7 @@ for ac_symprfx in "" "_"; do
+@@ -7802,6 +8115,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -8370,7 +8370,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7841,6 +8155,18 @@ _LT_EOF
+@@ -7843,6 +8157,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -8389,7 +8389,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7852,7 +8178,7 @@ _LT_EOF
+@@ -7854,7 +8180,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -8398,7 +8398,7 @@
    const char *name;
    void       *address;
  }
-@@ -7878,8 +8204,8 @@ static const void *lt_preloaded_setup() {
+@@ -7880,8 +8206,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -8409,7 +8409,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7889,8 +8215,8 @@ _LT_EOF
+@@ -7891,8 +8217,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -8420,7 +8420,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7927,6 +8253,13 @@ else
+@@ -7929,6 +8255,13 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -8434,7 +8434,7 @@
  
  
  
-@@ -7946,6 +8279,48 @@ fi
+@@ -7948,6 +8281,48 @@ fi
  
  
  
@@ -8483,7 +8483,7 @@
  
  
  # Check whether --enable-libtool-lock was given.
-@@ -8154,6 +8529,123 @@ esac
+@@ -8156,6 +8531,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -8607,7 +8607,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -8717,6 +9209,8 @@ _LT_EOF
+@@ -8719,6 +9211,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -8616,7 +8616,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8785,6 +9279,16 @@ done
+@@ -8787,6 +9281,16 @@ done
  
  
  
@@ -8633,7 +8633,7 @@
  
  
  # Set options
-@@ -9270,8 +9774,6 @@ fi
+@@ -9272,8 +9776,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -8642,7 +8642,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -9437,6 +9939,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9439,6 +9941,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -8655,7 +8655,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -9499,7 +10007,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9501,7 +10009,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -8664,7 +8664,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -9556,13 +10064,17 @@ case $host_os in
+@@ -9558,13 +10066,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -8688,7 +8688,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -9623,6 +10135,11 @@ fi
+@@ -9625,6 +10137,11 @@ fi
  
  
  
@@ -8700,7 +8700,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9973,7 +10490,8 @@ _LT_EOF
+@@ -9975,7 +10492,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -8710,7 +8710,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -10072,12 +10590,12 @@ _LT_EOF
+@@ -10074,12 +10592,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8725,7 +8725,7 @@
  	  fi
  	  ;;
  	esac
-@@ -10091,8 +10609,8 @@ _LT_EOF
+@@ -10093,8 +10611,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -8736,7 +8736,7 @@
        fi
        ;;
  
-@@ -10110,8 +10628,8 @@ _LT_EOF
+@@ -10112,8 +10630,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8747,7 +8747,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -10157,8 +10675,8 @@ _LT_EOF
+@@ -10159,8 +10677,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8758,7 +8758,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -10288,7 +10806,13 @@ _LT_EOF
+@@ -10290,7 +10808,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -8773,7 +8773,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -10301,22 +10825,29 @@ main ()
+@@ -10303,22 +10827,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8816,7 +8816,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -10328,7 +10859,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10330,7 +10861,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -8831,7 +8831,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -10341,22 +10878,29 @@ main ()
+@@ -10343,22 +10880,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8874,7 +8874,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -10401,20 +10945,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10403,20 +10947,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -8952,7 +8952,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -10475,7 +11062,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10477,7 +11064,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -8961,7 +8961,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -10483,7 +11070,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10485,7 +11072,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -8970,7 +8970,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -10499,7 +11086,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10501,7 +11088,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8979,7 +8979,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -10523,10 +11110,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10525,10 +11112,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -8992,7 +8992,7 @@
  	  ;;
  	esac
        else
-@@ -10605,23 +11192,36 @@ fi
+@@ -10607,23 +11194,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -9037,7 +9037,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10706,7 +11306,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10708,7 +11308,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -9046,7 +9046,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -10725,9 +11325,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10727,9 +11327,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -9058,7 +9058,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -11303,8 +11903,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11305,8 +11905,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -9070,7 +9070,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -11337,13 +11938,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11339,13 +11940,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -9143,16 +9143,16 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -12221,7 +12880,7 @@ else
+@@ -12223,7 +12882,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 12224 "configure"
+-#line 12226 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -12265,10 +12924,10 @@ else
+@@ -12267,10 +12926,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9165,16 +9165,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12327,7 +12986,7 @@ else
+@@ -12329,7 +12988,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 12330 "configure"
+-#line 12332 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -12371,10 +13030,10 @@ else
+@@ -12373,10 +13032,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9187,7 +9187,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12766,6 +13425,7 @@ $RM -r conftest*
+@@ -12768,6 +13427,7 @@ $RM -r conftest*
  
    # Allow CC to be a program name with arguments.
    lt_save_CC=$CC
@@ -9195,7 +9195,7 @@
    lt_save_LD=$LD
    lt_save_GCC=$GCC
    GCC=$GXX
-@@ -12783,6 +13443,7 @@ $RM -r conftest*
+@@ -12785,6 +13445,7 @@ $RM -r conftest*
    fi
    test -z "${LDCXX+set}" || LD=$LDCXX
    CC=${CXX-"c++"}
@@ -9203,7 +9203,7 @@
    compiler=$CC
    compiler_CXX=$CC
    for cc_temp in $compiler""; do
-@@ -13065,7 +13726,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -13067,7 +13728,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
            allow_undefined_flag_CXX='-berok'
            # Determine the default libpath from the value encoded in an empty
            # executable.
@@ -9218,7 +9218,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -13078,22 +13745,29 @@ main ()
+@@ -13080,22 +13747,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9261,7 +9261,7 @@
  
            hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  
-@@ -13106,7 +13780,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13108,7 +13782,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            else
  	    # Determine the default libpath from the value encoded in an
  	    # empty executable.
@@ -9276,7 +9276,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -13119,22 +13799,29 @@ main ()
+@@ -13121,22 +13801,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9319,7 +9319,7 @@
  
  	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  	    # Warning - without using the other run time loading flags,
-@@ -13177,29 +13864,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13179,29 +13866,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
          ;;
  
        cygwin* | mingw* | pw32* | cegcc*)
@@ -9418,7 +9418,7 @@
        darwin* | rhapsody*)
  
  
-@@ -13305,7 +14038,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13307,7 +14040,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
              ;;
            *)
              if test "$GXX" = yes; then
@@ -9427,7 +9427,7 @@
              else
                # FIXME: insert proper C++ library support
                ld_shlibs_CXX=no
-@@ -13376,10 +14109,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13378,10 +14111,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  	            ;;
  	          ia64*)
@@ -9440,7 +9440,7 @@
  	            ;;
  	        esac
  	      fi
-@@ -13420,9 +14153,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13422,9 +14155,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            *)
  	    if test "$GXX" = yes; then
  	      if test "$with_gnu_ld" = no; then
@@ -9452,7 +9452,7 @@
  	      fi
  	    fi
  	    link_all_deplibs_CXX=yes
-@@ -13492,20 +14225,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13494,20 +14227,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	      prelink_cmds_CXX='tpldir=Template.dir~
  		rm -rf $tpldir~
  		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9477,7 +9477,7 @@
  	      ;;
  	    *) # Version 6 and above use weak symbols
  	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13700,7 +14433,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13702,7 +14435,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  		  ;;
  	        *)
@@ -9486,7 +9486,7 @@
  		  ;;
  	      esac
  
-@@ -13746,7 +14479,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13748,7 +14481,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
        solaris*)
          case $cc_basename in
@@ -9495,7 +9495,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
              archive_cmds_need_lc_CXX=yes
  	    no_undefined_flag_CXX=' -zdefs'
-@@ -13787,9 +14520,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13789,9 +14522,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
  	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9507,7 +9507,7 @@
  
  	        # Commands to make compiler produce verbose output that lists
  	        # what "hidden" libraries, object files and flags are used when
-@@ -13924,6 +14657,13 @@ private:
+@@ -13926,6 +14659,13 @@ private:
  };
  _LT_EOF
  
@@ -9521,7 +9521,7 @@
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    (eval $ac_compile) 2>&5
    ac_status=$?
-@@ -13937,7 +14677,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13939,7 +14679,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    pre_test_object_deps_done=no
  
    for p in `eval "$output_verbose_link_cmd"`; do
@@ -9530,7 +9530,7 @@
  
      -L* | -R* | -l*)
         # Some compilers place space between "-{L,R}" and the path.
-@@ -13946,13 +14686,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13948,13 +14688,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
            test $p = "-R"; then
  	 prev=$p
  	 continue
@@ -9557,7 +9557,7 @@
  	   # Internal compiler library paths should come after those
  	   # provided the user.  The postdeps already come after the
  	   # user supplied libs so there is no need to process them.
-@@ -13972,8 +14721,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13974,8 +14723,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
  	 fi
         fi
@@ -9568,7 +9568,7 @@
      *.$objext)
         # This assumes that the test object file only shows up
         # once in the compiler output.
-@@ -14009,6 +14760,7 @@ else
+@@ -14011,6 +14762,7 @@ else
  fi
  
  $RM -f confest.$objext
@@ -9576,7 +9576,7 @@
  
  # PORTME: override above test on systems where it is broken
  case $host_os in
-@@ -14044,7 +14796,7 @@ linux*)
+@@ -14046,7 +14798,7 @@ linux*)
  
  solaris*)
    case $cc_basename in
@@ -9585,7 +9585,7 @@
      # The more standards-conforming stlport4 library is
      # incompatible with the Cstd library. Avoid specifying
      # it if it's in CXXFLAGS. Ignore libCrun as
-@@ -14109,8 +14861,6 @@ fi
+@@ -14111,8 +14863,6 @@ fi
  lt_prog_compiler_pic_CXX=
  lt_prog_compiler_static_CXX=
  
@@ -9594,7 +9594,7 @@
  
    # C++ specific cases for pic, static, wl, etc.
    if test "$GXX" = yes; then
-@@ -14215,6 +14965,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14217,6 +14967,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	  ;;
  	esac
  	;;
@@ -9606,7 +9606,7 @@
        dgux*)
  	case $cc_basename in
  	  ec++*)
-@@ -14367,7 +15122,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14369,7 +15124,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	;;
        solaris*)
  	case $cc_basename in
@@ -9615,7 +9615,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
  	    lt_prog_compiler_pic_CXX='-KPIC'
  	    lt_prog_compiler_static_CXX='-Bstatic'
-@@ -14432,10 +15187,17 @@ case $host_os in
+@@ -14434,10 +15189,17 @@ case $host_os in
      lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
      ;;
  esac
@@ -9636,7 +9636,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -14493,6 +15255,8 @@ fi
+@@ -14495,6 +15257,8 @@ fi
  
  
  
@@ -9645,7 +9645,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -14670,6 +15434,7 @@ fi
+@@ -14672,6 +15436,7 @@ fi
  $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
  
    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9653,7 +9653,7 @@
    case $host_os in
    aix[4-9]*)
      # If we're using GNU nm, then we don't want the "-C" option.
-@@ -14684,15 +15449,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14686,15 +15451,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
      ;;
    pw32*)
      export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9679,7 +9679,7 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
  $as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14955,8 +15725,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14957,8 +15727,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -9691,7 +9691,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -14988,13 +15759,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14990,13 +15761,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -9764,7 +9764,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -15534,6 +16363,7 @@ fi
+@@ -15536,6 +16365,7 @@ fi
    fi # test -n "$compiler"
  
    CC=$lt_save_CC
@@ -9772,7 +9772,7 @@
    LDCXX=$LD
    LD=$lt_save_LD
    GCC=$lt_save_GCC
-@@ -17690,13 +18520,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -17751,13 +18581,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -9793,7 +9793,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -17711,14 +18548,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -17772,14 +18609,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -9812,7 +9812,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -17751,12 +18591,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -17812,12 +18652,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -9826,7 +9826,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -17795,8 +18635,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -17856,8 +18696,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
  compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
  GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
  lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9836,7 +9836,7 @@
  lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
  lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
  archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -17823,12 +18663,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -17884,12 +18724,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
  hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
  inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9850,7 +9850,7 @@
  file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
  hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
  compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -17866,8 +18706,13 @@ reload_flag \
+@@ -17927,8 +18767,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -9864,7 +9864,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -17877,12 +18722,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -17938,12 +18783,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -9880,7 +9880,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -17898,7 +18745,6 @@ no_undefined_flag \
+@@ -17959,7 +18806,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -9888,7 +9888,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -17920,8 +18766,8 @@ LD_CXX \
+@@ -17981,8 +18827,8 @@ LD_CXX \
  reload_flag_CXX \
  compiler_CXX \
  lt_prog_compiler_no_builtin_flag_CXX \
@@ -9898,7 +9898,7 @@
  lt_prog_compiler_static_CXX \
  lt_cv_prog_compiler_c_o_CXX \
  export_dynamic_flag_spec_CXX \
-@@ -17933,7 +18779,6 @@ no_undefined_flag_CXX \
+@@ -17994,7 +18840,6 @@ no_undefined_flag_CXX \
  hardcode_libdir_flag_spec_CXX \
  hardcode_libdir_flag_spec_ld_CXX \
  hardcode_libdir_separator_CXX \
@@ -9906,7 +9906,7 @@
  exclude_expsyms_CXX \
  include_expsyms_CXX \
  file_list_spec_CXX \
-@@ -17967,6 +18812,7 @@ module_cmds \
+@@ -18028,6 +18873,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -9914,7 +9914,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -17981,7 +18827,8 @@ archive_expsym_cmds_CXX \
+@@ -18042,7 +18888,8 @@ archive_expsym_cmds_CXX \
  module_cmds_CXX \
  module_expsym_cmds_CXX \
  export_symbols_cmds_CXX \
@@ -9924,7 +9924,7 @@
      case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
      *[\\\\\\\`\\"\\\$]*)
        eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -18738,7 +19585,8 @@ $as_echo X"$file" |
+@@ -18799,7 +19646,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9934,7 +9934,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -18841,19 +19689,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -18902,19 +19750,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -9978,7 +9978,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -18883,6 +19754,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -18944,6 +19815,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -9991,7 +9991,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -18892,6 +19769,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -18953,6 +19830,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -10001,7 +10001,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -19006,12 +19886,12 @@ with_gcc=$GCC
+@@ -19067,12 +19947,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -10017,7 +10017,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -19098,9 +19978,6 @@ inherit_rpath=$inherit_rpath
+@@ -19159,9 +20039,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -10027,7 +10027,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -19116,6 +19993,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19177,6 +20054,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -10037,7 +10037,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -19162,210 +20042,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -19223,210 +20103,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -10411,7 +10411,7 @@
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  
-@@ -19393,12 +20232,12 @@ with_gcc=$GCC_CXX
+@@ -19454,12 +20293,12 @@ with_gcc=$GCC_CXX
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
  
@@ -10427,7 +10427,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static_CXX
  
-@@ -19485,9 +20324,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -19546,9 +20385,6 @@ inherit_rpath=$inherit_rpath_CXX
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs_CXX
  
@@ -10437,7 +10437,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols_CXX
  
-@@ -19503,6 +20339,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -19564,6 +20400,9 @@ include_expsyms=$lt_include_expsyms_CXX
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds_CXX
  
@@ -10448,10 +10448,10 @@
  file_list_spec=$lt_file_list_spec_CXX
  
 diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
-index a45018334e8..4c30941c6b6 100644
+index 3cd2068cbf6..c5d431236aa 100644
 --- a/gprofng/doc/Makefile.in
 +++ b/gprofng/doc/Makefile.in
-@@ -237,6 +237,7 @@ CXXFLAGS = @CXXFLAGS@
+@@ -240,6 +240,7 @@ CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
  DEFS = @DEFS@
  DEPDIR = @DEPDIR@
@@ -10459,7 +10459,7 @@
  DSYMUTIL = @DSYMUTIL@
  DUMPBIN = @DUMPBIN@
  ECHO_C = @ECHO_C@
-@@ -272,6 +273,7 @@ LN_S = @LN_S@
+@@ -275,6 +276,7 @@ LN_S = @LN_S@
  LTLIBOBJS = @LTLIBOBJS@
  MAINT = @MAINT@
  MAKEINFO = @MAKEINFO@
@@ -10508,7 +10508,7 @@
  NM = @NM@
  NMEDIT = @NMEDIT@
 diff --git a/gprofng/libcollector/configure b/gprofng/libcollector/configure
-index e92fbfc2242..09e93f878ae 100755
+index 079a0b71ec3..a28289cfe9d 100755
 --- a/gprofng/libcollector/configure
 +++ b/gprofng/libcollector/configure
 @@ -641,6 +641,8 @@ OTOOL
@@ -13108,7 +13108,7 @@
  file_list_spec=$lt_file_list_spec_CXX
  
 diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in
-index 4274762334e..74ab09d7661 100644
+index 605fa4f6fd4..313c4ceb4ca 100644
 --- a/gprofng/src/Makefile.in
 +++ b/gprofng/src/Makefile.in
 @@ -324,6 +324,7 @@ CXXFLAGS = @CXXFLAGS@
@@ -13128,7 +13128,7 @@
  NM = @NM@
  NMEDIT = @NMEDIT@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 0405028e02f..bd18a0a9e55 100644
+index 08dcd7b75fc..17c58dd2fd0 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
 @@ -384,6 +384,7 @@ CYGPATH_W = @CYGPATH_W@
@@ -13156,7 +13156,7 @@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 diff --git a/ld/configure b/ld/configure
-index 5f5dad6d67c..18150633570 100755
+index 6406a42c442..21ab5b06709 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -700,8 +700,11 @@ OTOOL
@@ -29906,7 +29906,7 @@
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
  am__include = @am__include@
 diff --git a/opcodes/configure b/opcodes/configure
-index 483ae4f7a9c..907807594f9 100755
+index d2364991ee8..f9a46eec7a3 100755
 --- a/opcodes/configure
 +++ b/opcodes/configure
 @@ -682,6 +682,9 @@ OTOOL
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/poky/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index ce795b7..afd694d 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,4 +1,4 @@
-From d6f4f62fda4fde10b805b06d5e61792ee821449c Mon Sep 17 00:00:00 2001
+From ff2754e302d06df51f8dd8ef877afb65eb30fcab Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:42:38 +0000
 Subject: [PATCH] Fix rpath in libtool when sysroot is enabled
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch b/poky/meta/recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch
index 910bd38..cc0fb55 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch
@@ -1,4 +1,4 @@
-From 654b4ea9e28aad037e788672ca0d9ba450b3285e Mon Sep 17 00:00:00 2001
+From 039b4afd7d3b5a599aebee97410809276a622ccd Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 6 Mar 2017 23:33:27 -0800
 Subject: [PATCH] sync with OE libtool changes
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch b/poky/meta/recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch
index a825f9c..b921dd1 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch
@@ -1,4 +1,4 @@
-From 9d35ab04de550f1db5d2e74d37fdeab4ca436148 Mon Sep 17 00:00:00 2001
+From 4eb24605fb2012c0f02883d1f560d5d852c0705e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 15 Apr 2020 14:17:20 -0700
 Subject: [PATCH] Check for clang before checking gcc version
@@ -18,7 +18,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 417fc5a970c..bdc3583215f 100755
+index 9cb953a197e..b63b5cd3de0 100755
 --- a/configure
 +++ b/configure
 @@ -5460,7 +5460,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -31,7 +31,7 @@
  #endif
  int main() {}
 diff --git a/configure.ac b/configure.ac
-index 3a1eb0357e5..1c00b9aec42 100644
+index e95a9ed116e..2df870b86af 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1444,7 +1444,7 @@ if test "$GCC" = yes; then
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/poky/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index 1871fbc..f69071a 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,4 +1,4 @@
-From 9a296e537708296d32c07c1dc681f59de3d1acf9 Mon Sep 17 00:00:00 2001
+From 9613e47bfdea18d2764eec130676e3e0b40c676f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 10 Mar 2022 21:21:33 -0800
 Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/poky/meta/recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
index 91ac606..9cdc7e2 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
@@ -1,4 +1,4 @@
-From 5fb47367d885a4a32625f09138b306d36ec3769f Mon Sep 17 00:00:00 2001
+From 8af01d85c4e5a5558d770291b7df86acfd59827c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 15 Jan 2023 00:16:25 -0800
 Subject: [PATCH] Define alignof using _Alignof when using C11 or newer
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch b/poky/meta/recipes-devtools/binutils/binutils/0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
deleted file mode 100644
index 04c1310..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 518c167116ab7aa6bb84a97200aeda2c4289e064 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot@adacore.com>
-Date: Tue, 3 Jan 2023 14:24:43 +0100
-Subject: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is
- disabled
-
-Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
-about GMP and MPFR for gdb builds have been moved to the toplevel
-configure.
-However, it doesn't take into account the --disable-gdb option. Meaning
-that a build without gdb will require these libraries even if not
-needed.
-
-ChangeLog:
-
-	* configure.ac: Skip GMP and MPFR when --disable-gdb is
-	provided.
-	* configure: Regenerate.
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=5fb0e308577143ceb313fde5538dc9ecb038f29f]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure    | 4 +++-
- configure.ac | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index bdc3583215f..b63b5cd3de0 100755
---- a/configure
-+++ b/configure
-@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then
-   require_mpc=yes
- fi
- if test -d ${srcdir}/gdb ; then
--  require_gmp=yes
-+  if test "x$enable_gdb" != xno; then
-+   require_gmp=yes
-+  fi
- fi
- 
- gmplibs="-lmpfr -lgmp"
-diff --git a/configure.ac b/configure.ac
-index 1c00b9aec42..2df870b86af 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
-   require_mpc=yes
- fi
- if test -d ${srcdir}/gdb ; then
--  require_gmp=yes
-+  if test "x$enable_gdb" != xno; then
-+   require_gmp=yes
-+  fi
- fi
- 
- gmplibs="-lmpfr -lgmp"
diff --git a/poky/meta/recipes-devtools/binutils/binutils_2.40.bb b/poky/meta/recipes-devtools/binutils/binutils_2.40.bb
index 9087af8..9fe4bf5 100644
--- a/poky/meta/recipes-devtools/binutils/binutils_2.40.bb
+++ b/poky/meta/recipes-devtools/binutils/binutils_2.40.bb
@@ -66,7 +66,8 @@
 FILES:libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
 FILES:libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 FILES:gprofng = "${sysconfdir}/gprofng.rc ${libdir}/gprofng/libgp-*.so ${libdir}/gprofng/libgprofng.so.* ${bindir}/gp-* ${bindir}/gprofng"
-FILES:${PN}-dev += "${libdir}/gprofng/libgprofng.so ${libdir}/libsframe.so"
+FILES:${PN}-dev += "${libdir}/libgprofng.so ${libdir}/libsframe.so"
+FILES:${PN}-staticdev += "${libdir}/gprofng/*.a"
 SRC_URI:append:class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
 USE_ALTERNATIVES_FOR:class-nativesdk = ""
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Use-pread-pwrite-ftruncate-stat-instead-of-64bit-equ.patch b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Use-pread-pwrite-ftruncate-stat-instead-of-64bit-equ.patch
deleted file mode 100644
index 2618687..0000000
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Use-pread-pwrite-ftruncate-stat-instead-of-64bit-equ.patch
+++ /dev/null
@@ -1,903 +0,0 @@
-From 37425f422e46003ed623f8e6387bed1aa5778b96 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 11 Nov 2022 11:26:05 -0800
-Subject: [PATCH] Use pread/pwrite/ftruncate/stat instead of 64bit equivalents
-
-64bit functions are aliases to original functions when largefile feature
-is enabled via autoconf or right macro is passed on compiler cmdline
-
--D_FILE_OFFSET_BITS=64
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-btrfs/20221215084046.122836-1-raj.khem@gmail.com/T/#u]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- cmds/rescue-chunk-recover.c |   4 +-
- image/main.c                |  14 +--
- kernel-shared/zoned.c       |   6 +-
- kernel-shared/zoned.h       |   4 +-
- mkfs/main.c                 |   4 +-
- mkfs/rootdir.c              |  10 +-
- tests/fsstress.c            | 192 ++++++++++++++++++------------------
- tests/fssum.c               |   8 +-
- 8 files changed, 121 insertions(+), 121 deletions(-)
-
---- a/cmds/rescue-chunk-recover.c
-+++ b/cmds/rescue-chunk-recover.c
-@@ -755,7 +755,7 @@ static int scan_one_device(void *dev_sca
- 		if (is_super_block_address(bytenr))
- 			bytenr += rc->sectorsize;
- 
--		if (pread64(fd, buf->data, rc->nodesize, bytenr) <
-+		if (pread(fd, buf->data, rc->nodesize, bytenr) <
- 		    rc->nodesize)
- 			break;
- 
-@@ -1875,7 +1875,7 @@ static int check_one_csum(int fd, u64 st
- 	data = malloc(len);
- 	if (!data)
- 		return -1;
--	ret = pread64(fd, data, len, start);
-+	ret = pread(fd, data, len, start);
- 	if (ret < 0 || ret != len) {
- 		ret = -1;
- 		goto out;
---- a/image/main.c
-+++ b/image/main.c
-@@ -691,7 +691,7 @@ static int flush_pending(struct metadump
- 		if (start == BTRFS_SUPER_INFO_OFFSET) {
- 			int fd = get_dev_fd(md->root);
- 
--			ret = pread64(fd, async->buffer, size, start);
-+			ret = pread(fd, async->buffer, size, start);
- 			if (ret < size) {
- 				free(async->buffer);
- 				free(async);
-@@ -1366,7 +1366,7 @@ static void write_backup_supers(int fd,
- 			break;
- 		btrfs_set_super_bytenr(super, bytenr);
- 		csum_block(buf, BTRFS_SUPER_INFO_SIZE);
--		ret = pwrite64(fd, buf, BTRFS_SUPER_INFO_SIZE, bytenr);
-+		ret = pwrite(fd, buf, BTRFS_SUPER_INFO_SIZE, bytenr);
- 		if (ret < BTRFS_SUPER_INFO_SIZE) {
- 			if (ret < 0)
- 				error(
-@@ -1487,12 +1487,12 @@ static int restore_one_work(struct mdres
- 				else
- 					bytenr = logical;
- 
--				ret = pwrite64(outfd, buffer + offset, chunk_size, bytenr);
-+				ret = pwrite(outfd, buffer + offset, chunk_size, bytenr);
- 				if (ret != chunk_size)
- 					goto write_error;
- 
- 				if (physical_dup)
--					ret = pwrite64(outfd, buffer + offset,
-+					ret = pwrite(outfd, buffer + offset,
- 						       chunk_size, physical_dup);
- 				if (ret != chunk_size)
- 					goto write_error;
-@@ -2454,7 +2454,7 @@ static int fixup_device_size(struct btrf
- 	}
- 	if (S_ISREG(buf.st_mode)) {
- 		/* Don't forget to enlarge the real file */
--		ret = ftruncate64(out_fd, dev_size);
-+		ret = ftruncate(out_fd, dev_size);
- 		if (ret < 0) {
- 			error("failed to enlarge result image: %m");
- 			return -errno;
-@@ -2913,7 +2913,7 @@ static int restore_metadump(const char *
- 			goto out;
- 		}
- 		if (S_ISREG(st.st_mode) && st.st_size < dev_size) {
--			ret = ftruncate64(fileno(out), dev_size);
-+			ret = ftruncate(fileno(out), dev_size);
- 			if (ret < 0) {
- 				error(
- 		"failed to enlarge result image file from %llu to %llu: %m",
-@@ -3010,7 +3010,7 @@ static int update_disk_super_on_device(s
- 	memcpy(dev_item->fsid, fs_uuid, BTRFS_UUID_SIZE);
- 	csum_block((u8 *)&disk_super, BTRFS_SUPER_INFO_SIZE);
- 
--	ret = pwrite64(fp, &disk_super, BTRFS_SUPER_INFO_SIZE, BTRFS_SUPER_INFO_OFFSET);
-+	ret = pwrite(fp, &disk_super, BTRFS_SUPER_INFO_SIZE, BTRFS_SUPER_INFO_OFFSET);
- 	if (ret != BTRFS_SUPER_INFO_SIZE) {
- 		if (ret < 0) {
- 			errno = ret;
---- a/kernel-shared/zoned.c
-+++ b/kernel-shared/zoned.c
-@@ -194,7 +194,7 @@ static int sb_write_pointer(int fd, stru
- 			bytenr = ((zones[i].start + zones[i].len)
- 				   << SECTOR_SHIFT) - BTRFS_SUPER_INFO_SIZE;
- 
--			ret = pread64(fd, buf[i], BTRFS_SUPER_INFO_SIZE, bytenr);
-+			ret = pread(fd, buf[i], BTRFS_SUPER_INFO_SIZE, bytenr);
- 			if (ret != BTRFS_SUPER_INFO_SIZE)
- 				return -EIO;
- 			super[i] = (struct btrfs_super_block *)&buf[i];
-@@ -515,8 +515,8 @@ size_t btrfs_sb_io(int fd, void *buf, of
- 	/* We can call pread/pwrite if 'fd' is non-zoned device/file */
- 	if (zone_size_sector == 0) {
- 		if (rw == READ)
--			return pread64(fd, buf, count, offset);
--		return pwrite64(fd, buf, count, offset);
-+			return pread(fd, buf, count, offset);
-+		return pwrite(fd, buf, count, offset);
- 	}
- 
- 	ASSERT(IS_ALIGNED(zone_size_sector, sb_size_sector));
---- a/kernel-shared/zoned.h
-+++ b/kernel-shared/zoned.h
-@@ -150,9 +150,9 @@ int btrfs_wipe_temporary_sb(struct btrfs
- #else
- 
- #define sbread(fd, buf, offset) \
--	pread64(fd, buf, BTRFS_SUPER_INFO_SIZE, offset)
-+	pread(fd, buf, BTRFS_SUPER_INFO_SIZE, offset)
- #define sbwrite(fd, buf, offset) \
--	pwrite64(fd, buf, BTRFS_SUPER_INFO_SIZE, offset)
-+	pwrite(fd, buf, BTRFS_SUPER_INFO_SIZE, offset)
- 
- static inline int btrfs_reset_dev_zone(int fd, struct blk_zone *zone)
- {
---- a/mkfs/main.c
-+++ b/mkfs/main.c
-@@ -453,14 +453,14 @@ static int zero_output_file(int out_fd,
- 	/* Only zero out the first 1M */
- 	loop_num = SZ_1M / SZ_4K;
- 	for (i = 0; i < loop_num; i++) {
--		written = pwrite64(out_fd, buf, SZ_4K, location);
-+		written = pwrite(out_fd, buf, SZ_4K, location);
- 		if (written != SZ_4K)
- 			ret = -EIO;
- 		location += SZ_4K;
- 	}
- 
- 	/* Then enlarge the file to size */
--	written = pwrite64(out_fd, buf, 1, size - 1);
-+	written = pwrite(out_fd, buf, 1, size - 1);
- 	if (written < 1)
- 		ret = -EIO;
- 	return ret;
---- a/mkfs/rootdir.c
-+++ b/mkfs/rootdir.c
-@@ -340,7 +340,7 @@ static int add_file_items(struct btrfs_t
- 			goto end;
- 		}
- 
--		ret_read = pread64(fd, buffer, st->st_size, bytes_read);
-+		ret_read = pread(fd, buffer, st->st_size, bytes_read);
- 		if (ret_read == -1) {
- 			error("cannot read %s at offset %llu length %llu: %m",
- 				path_name, bytes_read, (unsigned long long)st->st_size);
-@@ -386,7 +386,7 @@ again:
- 
- 		memset(eb->data, 0, sectorsize);
- 
--		ret_read = pread64(fd, eb->data, sectorsize, file_pos +
-+		ret_read = pread(fd, eb->data, sectorsize, file_pos +
- 				   bytes_read);
- 		if (ret_read == -1) {
- 			error("cannot read %s at offset %llu length %u: %m",
-@@ -929,7 +929,7 @@ int btrfs_mkfs_shrink_fs(struct btrfs_fs
- 	u64 new_size;
- 	struct btrfs_device *device;
- 	struct list_head *cur;
--	struct stat64 file_stat;
-+	struct stat file_stat;
- 	int nr_devs = 0;
- 	int ret;
- 
-@@ -963,14 +963,14 @@ int btrfs_mkfs_shrink_fs(struct btrfs_fs
- 		*new_size_ret = new_size;
- 
- 	if (shrink_file_size) {
--		ret = fstat64(device->fd, &file_stat);
-+		ret = fstat(device->fd, &file_stat);
- 		if (ret < 0) {
- 			error("failed to stat devid %llu: %m", device->devid);
- 			return ret;
- 		}
- 		if (!S_ISREG(file_stat.st_mode))
- 			return ret;
--		ret = ftruncate64(device->fd, new_size);
-+		ret = ftruncate(device->fd, new_size);
- 		if (ret < 0) {
- 			error("failed to truncate device file of devid %llu: %m",
- 				device->devid);
---- a/tests/fsstress.c
-+++ b/tests/fsstress.c
-@@ -458,7 +458,7 @@ int	get_fname(int, long, pathname_t *, f
- void	init_pathname(pathname_t *);
- int	lchown_path(pathname_t *, uid_t, gid_t);
- int	link_path(pathname_t *, pathname_t *);
--int	lstat64_path(pathname_t *, struct stat64 *);
-+int	lstat_path(pathname_t *, struct stat *);
- void	make_freq_table(void);
- int	mkdir_path(pathname_t *, mode_t);
- int	mknod_path(pathname_t *, mode_t, dev_t);
-@@ -472,9 +472,9 @@ int	rename_path(pathname_t *, pathname_t
- int	rmdir_path(pathname_t *);
- void	separate_pathname(pathname_t *, char *, pathname_t *);
- void	show_ops(int, char *);
--int	stat64_path(pathname_t *, struct stat64 *);
-+int	stat_path(pathname_t *, struct stat *);
- int	symlink_path(const char *, pathname_t *);
--int	truncate64_path(pathname_t *, off64_t);
-+int	truncate_path(pathname_t *, off64_t);
- int	unlink_path(pathname_t *);
- void	usage(void);
- void	write_freq(void);
-@@ -998,12 +998,12 @@ void
- check_cwd(void)
- {
- #ifdef DEBUG
--	struct stat64	statbuf;
-+	struct stat	statbuf;
- 	int ret;
- 
--	ret = stat64(".", &statbuf);
-+	ret = stat(".", &statbuf);
- 	if (ret != 0) {
--		fprintf(stderr, "fsstress: check_cwd stat64() returned %d with errno: %d (%m)\n",
-+		fprintf(stderr, "fsstress: check_cwd stat() returned %d with errno: %d (%m)\n",
- 			ret, errno);
- 		goto out;
- 	}
-@@ -1171,7 +1171,7 @@ again:
- void
- doproc(void)
- {
--	struct stat64	statbuf;
-+	struct stat	statbuf;
- 	char		buf[10];
- 	char		cmd[64];
- 	opnum_t		opno;
-@@ -1182,7 +1182,7 @@ doproc(void)
- 	dividend = (operations + execute_freq) / (execute_freq + 1);
- 	sprintf(buf, "p%x", procid);
- 	(void)mkdir(buf, 0777);
--	if (chdir(buf) < 0 || stat64(".", &statbuf) < 0) {
-+	if (chdir(buf) < 0 || stat(".", &statbuf) < 0) {
- 		perror(buf);
- 		_exit(1);
- 	}
-@@ -1214,7 +1214,7 @@ doproc(void)
- 		 * the forced shutdown happened.
- 		 */
- 		if (errtag != 0 && opno % 100 == 0)  {
--			rval = stat64(".", &statbuf);
-+			rval = stat(".", &statbuf);
- 			if (rval == EIO)  {
- 				fprintf(stderr, "Detected EIO\n");
- 				goto errout;
-@@ -1537,18 +1537,18 @@ link_path(pathname_t *name1, pathname_t
- }
- 
- int
--lstat64_path(pathname_t *name, struct stat64 *sbuf)
-+lstat_path(pathname_t *name, struct stat *sbuf)
- {
- 	char		buf[NAME_MAX + 1];
- 	pathname_t	newname;
- 	int		rval;
- 
--	rval = lstat64(name->path, sbuf);
-+	rval = lstat(name->path, sbuf);
- 	if (rval >= 0 || errno != ENAMETOOLONG)
- 		return rval;
- 	separate_pathname(name, buf, &newname);
- 	if (chdir(buf) == 0) {
--		rval = lstat64_path(&newname, sbuf);
-+		rval = lstat_path(&newname, sbuf);
- 		assert(chdir("..") == 0);
- 	}
- 	free_pathname(&newname);
-@@ -1870,18 +1870,18 @@ show_ops(int flag, char *lead_str)
- }
- 
- int
--stat64_path(pathname_t *name, struct stat64 *sbuf)
-+stat_path(pathname_t *name, struct stat *sbuf)
- {
- 	char		buf[NAME_MAX + 1];
- 	pathname_t	newname;
- 	int		rval;
- 
--	rval = stat64(name->path, sbuf);
-+	rval = stat(name->path, sbuf);
- 	if (rval >= 0 || errno != ENAMETOOLONG)
- 		return rval;
- 	separate_pathname(name, buf, &newname);
- 	if (chdir(buf) == 0) {
--		rval = stat64_path(&newname, sbuf);
-+		rval = stat_path(&newname, sbuf);
- 		assert(chdir("..") == 0);
- 	}
- 	free_pathname(&newname);
-@@ -1913,18 +1913,18 @@ symlink_path(const char *name1, pathname
- }
- 
- int
--truncate64_path(pathname_t *name, off64_t length)
-+truncate_path(pathname_t *name, off64_t length)
- {
- 	char		buf[NAME_MAX + 1];
- 	pathname_t	newname;
- 	int		rval;
- 
--	rval = truncate64(name->path, length);
-+	rval = truncate(name->path, length);
- 	if (rval >= 0 || errno != ENAMETOOLONG)
- 		return rval;
- 	separate_pathname(name, buf, &newname);
- 	if (chdir(buf) == 0) {
--		rval = truncate64_path(&newname, length);
-+		rval = truncate_path(&newname, length);
- 		assert(chdir("..") == 0);
- 	}
- 	free_pathname(&newname);
-@@ -2026,7 +2026,7 @@ non_btrfs_freq(const char *path)
- 		ops[btrfs_ops[i]].freq = 0;
- }
- 
--void inode_info(char *str, size_t sz, struct stat64 *s, int verbose)
-+void inode_info(char *str, size_t sz, struct stat *s, int verbose)
- {
- 	if (verbose)
- 		snprintf(str, sz, "[%ld %ld %d %d %lld %lld]",
-@@ -2101,7 +2101,7 @@ allocsp_f(opnum_t opno, long r)
- 	struct xfs_flock64	fl;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -2122,9 +2122,9 @@ allocsp_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: allocsp - fstat64 %s failed %d\n",
-+			printf("%d/%lld: allocsp - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -2160,7 +2160,7 @@ do_aio_rw(opnum_t opno, long r, int flag
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	char		*dio_env;
-@@ -2184,9 +2184,9 @@ do_aio_rw(opnum_t opno, long r, int flag
- 			       procid, opno, f.path, e);
- 		goto aio_out;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: do_aio_rw - fstat64 %s failed %d\n",
-+			printf("%d/%lld: do_aio_rw - fstat %s failed %d\n",
- 			       procid, opno, f.path, errno);
- 		goto aio_out;
- 	}
-@@ -2278,7 +2278,7 @@ do_uring_rw(opnum_t opno, long r, int fl
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	struct io_uring_sqe	*sqe;
-@@ -2304,9 +2304,9 @@ do_uring_rw(opnum_t opno, long r, int fl
- 			       procid, opno, f.path, e);
- 		goto uring_out;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: do_uring_rw - fstat64 %s failed %d\n",
-+			printf("%d/%lld: do_uring_rw - fstat %s failed %d\n",
- 			       procid, opno, f.path, errno);
- 		goto uring_out;
- 	}
-@@ -2522,7 +2522,7 @@ bulkstat1_f(opnum_t opno, long r)
- 	int		fd;
- 	int		good;
- 	__u64		ino;
--	struct stat64	s;
-+	struct stat	s;
- 	struct xfs_bstat	t;
- 	int		v;
- 	struct xfs_fsop_bulkreq bsr;
-@@ -2534,7 +2534,7 @@ bulkstat1_f(opnum_t opno, long r)
- 		init_pathname(&f);
- 		if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
- 			append_pathname(&f, ".");
--		ino = stat64_path(&f, &s) < 0 ? (ino64_t)r : s.st_ino;
-+		ino = stat_path(&f, &s) < 0 ? (ino64_t)r : s.st_ino;
- 		check_cwd();
- 		free_pathname(&f);
- 	} else {
-@@ -2605,8 +2605,8 @@ clonerange_f(
- 	struct file_clone_range	fcr;
- 	struct pathname		fpath1;
- 	struct pathname		fpath2;
--	struct stat64		stat1;
--	struct stat64		stat2;
-+	struct stat		stat1;
-+	struct stat		stat2;
- 	char			inoinfo1[1024];
- 	char			inoinfo2[1024];
- 	off64_t			lr;
-@@ -2660,17 +2660,17 @@ clonerange_f(
- 	}
- 
- 	/* Get file stats */
--	if (fstat64(fd1, &stat1) < 0) {
-+	if (fstat(fd1, &stat1) < 0) {
- 		if (v1)
--			printf("%d/%lld: clonerange read - fstat64 %s failed %d\n",
-+			printf("%d/%lld: clonerange read - fstat %s failed %d\n",
- 				procid, opno, fpath1.path, errno);
- 		goto out_fd2;
- 	}
- 	inode_info(inoinfo1, sizeof(inoinfo1), &stat1, v1);
- 
--	if (fstat64(fd2, &stat2) < 0) {
-+	if (fstat(fd2, &stat2) < 0) {
- 		if (v2)
--			printf("%d/%lld: clonerange write - fstat64 %s failed %d\n",
-+			printf("%d/%lld: clonerange write - fstat %s failed %d\n",
- 				procid, opno, fpath2.path, errno);
- 		goto out_fd2;
- 	}
-@@ -2743,8 +2743,8 @@ copyrange_f(
- #ifdef HAVE_COPY_FILE_RANGE
- 	struct pathname		fpath1;
- 	struct pathname		fpath2;
--	struct stat64		stat1;
--	struct stat64		stat2;
-+	struct stat		stat1;
-+	struct stat		stat2;
- 	char			inoinfo1[1024];
- 	char			inoinfo2[1024];
- 	loff_t			lr;
-@@ -2802,17 +2802,17 @@ copyrange_f(
- 	}
- 
- 	/* Get file stats */
--	if (fstat64(fd1, &stat1) < 0) {
-+	if (fstat(fd1, &stat1) < 0) {
- 		if (v1)
--			printf("%d/%lld: copyrange read - fstat64 %s failed %d\n",
-+			printf("%d/%lld: copyrange read - fstat %s failed %d\n",
- 				procid, opno, fpath1.path, errno);
- 		goto out_fd2;
- 	}
- 	inode_info(inoinfo1, sizeof(inoinfo1), &stat1, v1);
- 
--	if (fstat64(fd2, &stat2) < 0) {
-+	if (fstat(fd2, &stat2) < 0) {
- 		if (v2)
--			printf("%d/%lld: copyrange write - fstat64 %s failed %d\n",
-+			printf("%d/%lld: copyrange write - fstat %s failed %d\n",
- 				procid, opno, fpath2.path, errno);
- 		goto out_fd2;
- 	}
-@@ -2900,7 +2900,7 @@ deduperange_f(
- #define INFO_SZ			1024
- 	struct file_dedupe_range *fdr;
- 	struct pathname		*fpath;
--	struct stat64		*stat;
-+	struct stat		*stat;
- 	char			*info;
- 	off64_t			*off;
- 	int			*v;
-@@ -2938,7 +2938,7 @@ deduperange_f(
- 		goto out_fdr;
- 	}
- 
--	stat = calloc(nr, sizeof(struct stat64));
-+	stat = calloc(nr, sizeof(struct stat));
- 	if (!stat) {
- 		printf("%d/%lld: line %d error %d\n",
- 			procid, opno, __LINE__, errno);
-@@ -3017,9 +3017,9 @@ deduperange_f(
- 	}
- 
- 	/* Get file stats */
--	if (fstat64(fd[0], &stat[0]) < 0) {
-+	if (fstat(fd[0], &stat[0]) < 0) {
- 		if (v[0])
--			printf("%d/%lld: deduperange read - fstat64 %s failed %d\n",
-+			printf("%d/%lld: deduperange read - fstat %s failed %d\n",
- 				procid, opno, fpath[0].path, errno);
- 		goto out_fds;
- 	}
-@@ -3027,9 +3027,9 @@ deduperange_f(
- 	inode_info(&info[0], INFO_SZ, &stat[0], v[0]);
- 
- 	for (i = 1; i < nr; i++) {
--		if (fstat64(fd[i], &stat[i]) < 0) {
-+		if (fstat(fd[i], &stat[i]) < 0) {
- 			if (v[i])
--				printf("%d/%lld: deduperange write - fstat64 %s failed %d\n",
-+				printf("%d/%lld: deduperange write - fstat %s failed %d\n",
- 					procid, opno, fpath[i].path, errno);
- 			goto out_fds;
- 		}
-@@ -3179,8 +3179,8 @@ splice_f(opnum_t opno, long r)
- {
- 	struct pathname		fpath1;
- 	struct pathname		fpath2;
--	struct stat64		stat1;
--	struct stat64		stat2;
-+	struct stat		stat1;
-+	struct stat		stat2;
- 	char			inoinfo1[1024];
- 	char			inoinfo2[1024];
- 	loff_t			lr;
-@@ -3237,17 +3237,17 @@ splice_f(opnum_t opno, long r)
- 	}
- 
- 	/* Get file stats */
--	if (fstat64(fd1, &stat1) < 0) {
-+	if (fstat(fd1, &stat1) < 0) {
- 		if (v1)
--			printf("%d/%lld: splice read - fstat64 %s failed %d\n",
-+			printf("%d/%lld: splice read - fstat %s failed %d\n",
- 				procid, opno, fpath1.path, errno);
- 		goto out_fd2;
- 	}
- 	inode_info(inoinfo1, sizeof(inoinfo1), &stat1, v1);
- 
--	if (fstat64(fd2, &stat2) < 0) {
-+	if (fstat(fd2, &stat2) < 0) {
- 		if (v2)
--			printf("%d/%lld: splice write - fstat64 %s failed %d\n",
-+			printf("%d/%lld: splice write - fstat %s failed %d\n",
- 				procid, opno, fpath2.path, errno);
- 		goto out_fd2;
- 	}
-@@ -3432,7 +3432,7 @@ dread_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	char		*dio_env;
-@@ -3454,9 +3454,9 @@ dread_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: dread - fstat64 %s failed %d\n",
-+			printf("%d/%lld: dread - fstat %s failed %d\n",
- 			       procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -3522,7 +3522,7 @@ dwrite_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	char		*dio_env;
-@@ -3544,9 +3544,9 @@ dwrite_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: dwrite - fstat64 %s failed %d\n",
-+			printf("%d/%lld: dwrite - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -3620,7 +3620,7 @@ do_fallocate(opnum_t opno, long r, int m
- 	int64_t		lr;
- 	off64_t		off;
- 	off64_t		len;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -3640,9 +3640,9 @@ do_fallocate(opnum_t opno, long r, int m
- 		return;
- 	}
- 	check_cwd();
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: do_fallocate - fstat64 %s failed %d\n",
-+			printf("%d/%lld: do_fallocate - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -3734,7 +3734,7 @@ fiemap_f(opnum_t opno, long r)
- 	int		fd;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	int blocks_to_map;
-@@ -3757,9 +3757,9 @@ fiemap_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: fiemap - fstat64 %s failed %d\n",
-+			printf("%d/%lld: fiemap - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -3807,7 +3807,7 @@ freesp_f(opnum_t opno, long r)
- 	struct xfs_flock64	fl;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -3828,9 +3828,9 @@ freesp_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: freesp - fstat64 %s failed %d\n",
-+			printf("%d/%lld: freesp - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -4226,7 +4226,7 @@ do_mmap(opnum_t opno, long r, int prot)
- 	int64_t		lr;
- 	off64_t		off;
- 	int		flags;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	sigjmp_buf	sigbus_jmpbuf;
-@@ -4248,9 +4248,9 @@ do_mmap(opnum_t opno, long r, int prot)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: do_mmap - fstat64 %s failed %d\n",
-+			printf("%d/%lld: do_mmap - fstat %s failed %d\n",
- 			       procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -4370,7 +4370,7 @@ read_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -4391,9 +4391,9 @@ read_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: read - fstat64 %s failed %d\n",
-+			printf("%d/%lld: read - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -4454,7 +4454,7 @@ readv_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	struct iovec	*iov = NULL;
-@@ -4480,9 +4480,9 @@ readv_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: readv - fstat64 %s failed %d\n",
-+			printf("%d/%lld: readv - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -4739,7 +4739,7 @@ resvsp_f(opnum_t opno, long r)
- 	struct xfs_flock64	fl;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -4760,9 +4760,9 @@ resvsp_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: resvsp - fstat64 %s failed %d\n",
-+			printf("%d/%lld: resvsp - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -4971,7 +4971,7 @@ stat_f(opnum_t opno, long r)
- {
- 	int		e;
- 	pathname_t	f;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 
- 	init_pathname(&f);
-@@ -4981,7 +4981,7 @@ stat_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	e = lstat64_path(&f, &stb) < 0 ? errno : 0;
-+	e = lstat_path(&f, &stb) < 0 ? errno : 0;
- 	check_cwd();
- 	if (v)
- 		printf("%d/%lld: stat %s %d\n", procid, opno, f.path, e);
-@@ -5133,7 +5133,7 @@ truncate_f(opnum_t opno, long r)
- 	pathname_t	f;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -5144,11 +5144,11 @@ truncate_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	e = stat64_path(&f, &stb) < 0 ? errno : 0;
-+	e = stat_path(&f, &stb) < 0 ? errno : 0;
- 	check_cwd();
- 	if (e > 0) {
- 		if (v)
--			printf("%d/%lld: truncate - stat64 %s failed %d\n",
-+			printf("%d/%lld: truncate - stat %s failed %d\n",
- 				procid, opno, f.path, e);
- 		free_pathname(&f);
- 		return;
-@@ -5157,7 +5157,7 @@ truncate_f(opnum_t opno, long r)
- 	lr = ((int64_t)random() << 32) + random();
- 	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
- 	off %= maxfsize;
--	e = truncate64_path(&f, off) < 0 ? errno : 0;
-+	e = truncate_path(&f, off) < 0 ? errno : 0;
- 	check_cwd();
- 	if (v)
- 		printf("%d/%lld: truncate %s%s %lld %d\n", procid, opno, f.path,
-@@ -5209,7 +5209,7 @@ unresvsp_f(opnum_t opno, long r)
- 	struct xfs_flock64	fl;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -5230,9 +5230,9 @@ unresvsp_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: unresvsp - fstat64 %s failed %d\n",
-+			printf("%d/%lld: unresvsp - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -5281,7 +5281,7 @@ write_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 
-@@ -5302,9 +5302,9 @@ write_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: write - fstat64 %s failed %d\n",
-+			printf("%d/%lld: write - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
-@@ -5337,7 +5337,7 @@ writev_f(opnum_t opno, long r)
- 	size_t		len;
- 	int64_t		lr;
- 	off64_t		off;
--	struct stat64	stb;
-+	struct stat	stb;
- 	int		v;
- 	char		st[1024];
- 	struct iovec	*iov = NULL;
-@@ -5363,9 +5363,9 @@ writev_f(opnum_t opno, long r)
- 		free_pathname(&f);
- 		return;
- 	}
--	if (fstat64(fd, &stb) < 0) {
-+	if (fstat(fd, &stb) < 0) {
- 		if (v)
--			printf("%d/%lld: writev - fstat64 %s failed %d\n",
-+			printf("%d/%lld: writev - fstat %s failed %d\n",
- 				procid, opno, f.path, errno);
- 		free_pathname(&f);
- 		close(fd);
---- a/tests/fssum.c
-+++ b/tests/fssum.c
-@@ -519,9 +519,9 @@ sum(int dirfd, int level, sum_t *dircs,
- 	int excl;
- 	sum_file_data_t sum_file_data = flags[FLAG_STRUCTURE] ?
- 			sum_file_data_strict : sum_file_data_permissive;
--	struct stat64 dir_st;
-+	struct stat dir_st;
- 
--	if (fstat64(dirfd, &dir_st)) {
-+	if (fstat(dirfd, &dir_st)) {
- 		perror("fstat");
- 		exit(-1);
- 	}
-@@ -552,7 +552,7 @@ sum(int dirfd, int level, sum_t *dircs,
- 	}
- 	qsort(namelist, entries, sizeof(*namelist), namecmp);
- 	for (i = 0; i < entries; ++i) {
--		struct stat64 st;
-+		struct stat st;
- 		sum_t cs;
- 		sum_t meta;
- 		char *path;
-@@ -572,7 +572,7 @@ sum(int dirfd, int level, sum_t *dircs,
- 			perror("fchdir");
- 			exit(-1);
- 		}
--		ret = lstat64(namelist[i], &st);
-+		ret = lstat(namelist[i], &st);
- 		if (ret) {
- 			fprintf(stderr, "stat failed for %s/%s: %m\n",
- 				path_prefix, path);
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.1.3.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.3.bb
similarity index 95%
rename from poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.1.3.bb
rename to poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.3.bb
index 05e84de..5c43d95 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.1.3.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_6.3.bb
@@ -17,9 +17,8 @@
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master;protocol=https \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
-           file://0001-Use-pread-pwrite-ftruncate-stat-instead-of-64bit-equ.patch \
            "
-SRCREV = "908b4b4450320e30fdef693f09b42f4eb93702c3"
+SRCREV = "fba31d634e3bc658e7d42a6c00f31ebb60adf901"
 S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= " \
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-include-rpm-rpmstring.h.patch b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-include-rpm-rpmstring.h.patch
index a249eaf..b7e5710 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-include-rpm-rpmstring.h.patch
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-include-rpm-rpmstring.h.patch
@@ -1,7 +1,7 @@
-From 8defe6aaf91613c3fcb540df65a94cd56d377367 Mon Sep 17 00:00:00 2001
+From eb66326c3fc6e942282d01ddd56659c78ed7400b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 13 Jan 2023 13:21:51 -0800
-Subject: [PATCH 1/2] include rpm/rpmstring.h
+Subject: [PATCH] include rpm/rpmstring.h
 
 Its needed for rasprintf declaration
 
@@ -11,10 +11,13 @@
 
 Upstream-Status: Submitted [https://github.com/rpm-software-management/createrepo_c/pull/340]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  src/xml_file.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/src/xml_file.c b/src/xml_file.c
+index d2400b8..871109c 100644
 --- a/src/xml_file.c
 +++ b/src/xml_file.c
 @@ -19,6 +19,7 @@
@@ -23,5 +26,5 @@
  #include <glib/gstdio.h>
 +#include <rpm/rpmstring.h>
  #include <assert.h>
+ #include <rpm/rpmstring.h>
  #include "xml_file.h"
- #include <errno.h>
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-src-cmd_parser.c-add-a-missing-parameter-name.patch b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-src-cmd_parser.c-add-a-missing-parameter-name.patch
new file mode 100644
index 0000000..0d1c6b0
--- /dev/null
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-src-cmd_parser.c-add-a-missing-parameter-name.patch
@@ -0,0 +1,39 @@
+From 970b901e1999f415da8bac205f526c808ddad0ba Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Mon, 8 May 2023 10:40:43 +0200
+Subject: [PATCH] src/cmd_parser.c: add a missing parameter name
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This resolves the following error with older versions of gcc:
+| /srv/storage/alex/yocto/build-32/tmp/work/x86_64-linux/createrepo-c-native/0.21.1-r0/git/src/cmd_parser.c: In function ‘duplicated_nevra_option_parser’:
+| /srv/storage/alex/yocto/build-32/tmp/work/x86_64-linux/createrepo-c-native/0.21.1-r0/git/src/cmd_parser.c:76:32: error: parameter name omitted
+|    76 | duplicated_nevra_option_parser(const gchar *,
+|       |                                ^~~~~~~~~~~~~
+| /srv/storage/alex/yocto/build-32/tmp/work/x86_64-linux/createrepo-c-native/0.21.1-r0/git/src/cmd_parser.c:78:32: error: parameter name omitted
+|    78 |                                gpointer,
+|       |                                ^~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/createrepo_c/pull/366]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/cmd_parser.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd_parser.c b/src/cmd_parser.c
+index 97c9ea7..63af7ea 100644
+--- a/src/cmd_parser.c
++++ b/src/cmd_parser.c
+@@ -73,9 +73,9 @@ struct CmdOptions _cmd_options = {
+ 
+ 
+ gboolean
+-duplicated_nevra_option_parser(const gchar *,
++duplicated_nevra_option_parser(const gchar *option_name,
+                                const gchar *value,
+-                               gpointer,
++                               gpointer data,
+                                GError **error)
+ {
+     if (!g_strcmp0(value, "keep"))
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.21.1.bb
similarity index 92%
rename from poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb
rename to poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.21.1.bb
index 1c4cdd5..5080131 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.21.1.bb
@@ -7,9 +7,10 @@
 SRC_URI = "git://github.com/rpm-software-management/createrepo_c;branch=master;protocol=https \
            file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            file://0001-include-rpm-rpmstring.h.patch \
+           file://0001-src-cmd_parser.c-add-a-missing-parameter-name.patch \
            "
 
-SRCREV = "af14e164a3e4ab9dfaef1212e852b9ecebc326a2"
+SRCREV = "0652d7303ce236e596c83c29ccc9bee7868fce6e"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index d345b91..0cb3f0e 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -17,7 +17,7 @@
                       file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
                       file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
 SECTION = "base"
-DEPENDS = "util-linux attr autoconf-archive"
+DEPENDS = "util-linux attr autoconf-archive-native"
 
 SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git;branch=master;protocol=https"
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index c3e46ce..20839b7 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -22,7 +22,7 @@
  	@echo "HTREE=y" >> test_one
  	@echo "QUOTA=y" >> test_one
 -	@echo "SRCDIR=@srcdir@" >> test_one
-+	@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
++	@echo "SRCDIR=@PTEST_PATH@/test" >> test_one
  	@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
  	@echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
  	@echo "DD=@DD@" >>test_one
@@ -31,7 +31,7 @@
  	@[ -f test_script ] && chmod u+w test_script || true
  	@echo "#!/bin/sh" > test_script
 -	@echo "SRCDIR=@srcdir@" >> test_script
-+	@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
++	@echo "SRCDIR=@PTEST_PATH@/test" >> test_script
  	@cat $(srcdir)/test_script.in >> test_script
  	@chmod +x-w test_script
  
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
index d3786d6..940b47c 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
@@ -133,6 +133,7 @@
 	sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
 	    -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
 	sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
+	sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/test/test_script ${D}${PTEST_PATH}/test/test_one
 
 	# Remove various files
 	find "${D}${PTEST_PATH}" -type f \
diff --git a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index 1c7cde6..93f5bdc 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
-From 81da32c3404b58cbad7b3af00854e0cf2dc3dbf1 Mon Sep 17 00:00:00 2001
+From 262ac90394e36e0b4e86042d9c5385703f5b6536 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 23 Aug 2019 10:19:48 +0800
 Subject: [PATCH] musl-utils
@@ -22,7 +22,7 @@
  4 files changed, 29 insertions(+)
 
 diff --git a/src/arlib.h b/src/arlib.h
-index e117166..8326f6c 100644
+index d4a4221..f6336d9 100644
 --- a/src/arlib.h
 +++ b/src/arlib.h
 @@ -29,6 +29,12 @@
@@ -39,7 +39,7 @@
  /* State of -D/-U flags.  */
  extern bool arlib_deterministic_output;
 diff --git a/src/elfcompress.c b/src/elfcompress.c
-index 92f2fac..0b037a5 100644
+index 18ade66..a6ed4e1 100644
 --- a/src/elfcompress.c
 +++ b/src/elfcompress.c
 @@ -37,6 +37,13 @@
@@ -57,10 +57,10 @@
  ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
  
 diff --git a/src/strip.c b/src/strip.c
-index 30a1f9d..e89a7f0 100644
+index 2a2cc80..8e9f773 100644
 --- a/src/strip.c
 +++ b/src/strip.c
-@@ -46,6 +46,13 @@
+@@ -45,6 +45,13 @@
  #include <system.h>
  #include <printversion.h>
  
@@ -75,10 +75,10 @@
  
  /* Name and version of program.  */
 diff --git a/src/unstrip.c b/src/unstrip.c
-index 3472637..40c73f3 100644
+index d5bd182..d797823 100644
 --- a/src/unstrip.c
 +++ b/src/unstrip.c
-@@ -52,6 +52,15 @@
+@@ -51,6 +51,15 @@
  #include "libeu.h"
  #include "printversion.h"
  
diff --git a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
index fd1ec01..9ee5801 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
@@ -1,4 +1,4 @@
-From ff6ab57ba5dd37947ef1ffe5de7af5dbebfeb4e9 Mon Sep 17 00:00:00 2001
+From c209233857a73970d7a7dd8da664903570efc7ea Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 22 Jun 2020 21:35:16 +0000
 Subject: [PATCH] config/eu.am: do not use -Werror
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-configure-use-AC_SYS_LARGEFILE.patch b/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-configure-use-AC_SYS_LARGEFILE.patch
deleted file mode 100644
index 75c91f5..0000000
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-configure-use-AC_SYS_LARGEFILE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From fef3b16dba2c5f6ad88951b80cdfbedd423e80a0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 7 Dec 2022 20:16:52 -0800
-Subject: [PATCH v3 1/3] configure: use AC_SYS_LARGEFILE
-
-The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
-where necessary to ensure that off_t and all interfaces using off_t
-are 64bit, even on 32bit systems.
-
-Pass -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=66 via CFLAGS
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-erofs/20221215064758.93821-1-raj.khem@gmail.com/T/#t]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index a736ff0..e8bb003 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -13,6 +13,8 @@ AC_CONFIG_MACRO_DIR([m4])
- AC_CONFIG_AUX_DIR(config)
- AM_INIT_AUTOMAKE([foreign -Wall])
- 
-+AC_SYS_LARGEFILE
-+
- # Checks for programs.
- AM_PROG_AR
- AC_PROG_CC
-@@ -319,6 +321,9 @@ if test "x$enable_lzma" = "xyes"; then
-   CPPFLAGS="${saved_CPPFLAGS}"
- fi
- 
-+# Enable 64-bit off_t
-+CFLAGS+=" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-+
- # Set up needed symbols, conditionals and compiler/linker flags
- AM_CONDITIONAL([ENABLE_LZ4], [test "x${have_lz4}" = "xyes"])
- AM_CONDITIONAL([ENABLE_LZ4HC], [test "x${have_lz4hc}" = "xyes"])
--- 
-2.39.0
-
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0002-erofs-replace-l-stat64-by-equivalent-l-stat.patch b/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0002-erofs-replace-l-stat64-by-equivalent-l-stat.patch
deleted file mode 100644
index d12bebb..0000000
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0002-erofs-replace-l-stat64-by-equivalent-l-stat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 856189c324834b838f0e9cfc0d2e05f12518f264 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 7 Dec 2022 22:17:35 -0800
-Subject: [PATCH v3 2/3] erofs: replace [l]stat64 by equivalent [l]stat
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-erofs/20221215064758.93821-2-raj.khem@gmail.com/T/#u]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/inode.c | 10 +++++-----
- lib/xattr.c |  4 ++--
- mkfs/main.c |  4 ++--
- 3 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/lib/inode.c b/lib/inode.c
-index f192510..38003fc 100644
---- a/lib/inode.c
-+++ b/lib/inode.c
-@@ -773,7 +773,7 @@ static u32 erofs_new_encode_dev(dev_t dev)
- 
- #ifdef WITH_ANDROID
- int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
--			       struct stat64 *st,
-+			       struct stat *st,
- 			       const char *path)
- {
- 	/* filesystem_config does not preserve file type bits */
-@@ -818,7 +818,7 @@ int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
- }
- #else
- static int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
--				      struct stat64 *st,
-+				      struct stat *st,
- 				      const char *path)
- {
- 	return 0;
-@@ -826,7 +826,7 @@ static int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
- #endif
- 
- static int erofs_fill_inode(struct erofs_inode *inode,
--			    struct stat64 *st,
-+			    struct stat *st,
- 			    const char *path)
- {
- 	int err = erofs_droid_inode_fsconfig(inode, st, path);
-@@ -910,7 +910,7 @@ static struct erofs_inode *erofs_new_inode(void)
- /* get the inode from the (source) path */
- static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
- {
--	struct stat64 st;
-+	struct stat st;
- 	struct erofs_inode *inode;
- 	int ret;
- 
-@@ -918,7 +918,7 @@ static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
- 	if (!is_src)
- 		return ERR_PTR(-EINVAL);
- 
--	ret = lstat64(path, &st);
-+	ret = lstat(path, &st);
- 	if (ret)
- 		return ERR_PTR(-errno);
- 
-diff --git a/lib/xattr.c b/lib/xattr.c
-index 71ffe3e..fd0e728 100644
---- a/lib/xattr.c
-+++ b/lib/xattr.c
-@@ -467,7 +467,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
- {
- 	int ret;
- 	DIR *_dir;
--	struct stat64 st;
-+	struct stat st;
- 
- 	_dir = opendir(path);
- 	if (!_dir) {
-@@ -502,7 +502,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
- 			goto fail;
- 		}
- 
--		ret = lstat64(buf, &st);
-+		ret = lstat(buf, &st);
- 		if (ret) {
- 			ret = -errno;
- 			goto fail;
-diff --git a/mkfs/main.c b/mkfs/main.c
-index d2c9830..5279805 100644
---- a/mkfs/main.c
-+++ b/mkfs/main.c
-@@ -581,7 +581,7 @@ int main(int argc, char **argv)
- 	struct erofs_buffer_head *sb_bh;
- 	struct erofs_inode *root_inode;
- 	erofs_nid_t root_nid;
--	struct stat64 st;
-+	struct stat st;
- 	erofs_blk_t nblocks;
- 	struct timeval t;
- 	char uuid_str[37] = "not available";
-@@ -609,7 +609,7 @@ int main(int argc, char **argv)
- 			return 1;
- 	}
- 
--	err = lstat64(cfg.c_src_path, &st);
-+	err = lstat(cfg.c_src_path, &st);
- 	if (err)
- 		return 1;
- 	if (!S_ISDIR(st.st_mode)) {
--- 
-2.39.0
-
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0003-internal.h-Make-LFS-mandatory-for-all-usecases.patch b/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0003-internal.h-Make-LFS-mandatory-for-all-usecases.patch
deleted file mode 100644
index 97faa5d..0000000
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0003-internal.h-Make-LFS-mandatory-for-all-usecases.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8f8cbc7b773da63bce8226249784ba6824635c9c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 7 Dec 2022 20:19:27 -0800
-Subject: [PATCH v3 3/3] internal.h: Make LFS mandatory for all usecases
-
-erosfs depend on the consistent use of a 64bit offset
-type, force downstreams to use transparent LFS (_FILE_OFFSET_BITS=64),
-so that it becomes impossible for them to use 32bit interfaces.
-
-Upstream-Status: Submitted [https://lore.kernel.org/linux-erofs/20221215064758.93821-3-raj.khem@gmail.com/T/#u]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- include/erofs/internal.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/include/erofs/internal.h b/include/erofs/internal.h
-index 6a70f11..d3b2986 100644
---- a/include/erofs/internal.h
-+++ b/include/erofs/internal.h
-@@ -21,6 +21,7 @@ typedef unsigned short umode_t;
- 
- #include "erofs_fs.h"
- #include <fcntl.h>
-+#include <sys/types.h> /* for off_t definition */
- 
- #ifndef PATH_MAX
- #define PATH_MAX        4096    /* # chars in a path name including nul */
-@@ -104,6 +105,10 @@ struct erofs_sb_info {
- 	};
- };
- 
-+
-+/* make sure that any user of the erofs headers has atleast 64bit off_t type */
-+extern int erofs_assert_largefile[sizeof(off_t)-8];
-+
- /* global sbi */
- extern struct erofs_sb_info sbi;
- 
--- 
-2.39.0
-
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.5.bb b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.6.bb
similarity index 62%
rename from poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.5.bb
rename to poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.6.bb
index 2b58618..43643e0 100644
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.5.bb
+++ b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.6.bb
@@ -5,12 +5,8 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=73001d804ea1e3d84365f652242cca20"
 HOMEPAGE = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README"
 
-SRCREV = "a2821a66b42aee5430bccee82c280e38d1e9ab29"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git;branch=master;protocol=https \
-           file://0001-configure-use-AC_SYS_LARGEFILE.patch \
-           file://0002-erofs-replace-l-stat64-by-equivalent-l-stat.patch \
-           file://0003-internal.h-Make-LFS-mandatory-for-all-usecases.patch \
-           "
+SRCREV = "21710612d35cd952490959bfa6ea9fe87aaa52dd"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git;branch=master;protocol=https"
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
 
@@ -23,7 +19,7 @@
 PACKAGECONFIG ??= "lz4"
 PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
 
-EXTRA_OECONF = "${PACKAGECONFIG_CONFARGS} --disable-fuse --enable-largefile"
+EXTRA_OECONF = "${PACKAGECONFIG_CONFARGS} --disable-fuse"
 
 CFLAGS:append:powerpc64le = " -D__SANE_USERSPACE_TYPES__"
 
diff --git a/poky/meta/recipes-devtools/expect/expect/run-ptest b/poky/meta/recipes-devtools/expect/expect/run-ptest
new file mode 100755
index 0000000..856c314
--- /dev/null
+++ b/poky/meta/recipes-devtools/expect/expect/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+out_put=`tclsh tests/all.tcl -verbose bpse`
+echo
+echo "${out_put}" | awk '/PASSED|FAILED|SKIPPED/{gsub(/PASSED/,"PASS"); gsub(/FAILED/,"FAIL"); gsub(/SKIPPED/,"SKIP"); if ($NF=="PASS"){print $NF": "$(NF-1)}else{print $NF": "$2}}' | uniq
+
diff --git a/poky/meta/recipes-devtools/expect/expect_5.45.4.bb b/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
index 6cb46f3..7b610b1 100644
--- a/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -16,7 +16,7 @@
 DEPENDS += "tcl"
 RDEPENDS:${PN} = "tcl"
 
-inherit autotools update-alternatives
+inherit autotools update-alternatives ptest
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
            file://0001-configure.in.patch \
@@ -27,6 +27,7 @@
            file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
            file://0001-fixline1-fix-line-1.patch \
            file://0001-Add-prototype-to-function-definitions.patch \
+           file://run-ptest \
            "
 SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
 SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
@@ -44,6 +45,11 @@
         sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
 }
 
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}
+    cp -r ${S}/tests ${D}${PTEST_PATH}
+}
+
 # Apparently the public Tcl headers are only in /usr/include/tcl8.6
 # when building for the target and nativesdk.
 TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-12.2.inc b/poky/meta/recipes-devtools/gcc/gcc-13.1.inc
similarity index 84%
rename from poky/meta/recipes-devtools/gcc/gcc-12.2.inc
rename to poky/meta/recipes-devtools/gcc/gcc-13.1.inc
index 0dbbeca..d361b68 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-12.2.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-13.1.inc
@@ -2,11 +2,11 @@
 
 # Third digit in PV should be incremented after a minor release
 
-PV = "12.2.0"
+PV = "13.1.0"
 
 # BINV should be incremented to a revision after a minor gcc release
 
-BINV = "12.2.0"
+BINV = "13.1.0"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
@@ -22,13 +22,15 @@
     file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
     file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
 "
-# from git
-#RELEASE ?= "7092b7aea122a91824d048aeb23834cf1d19b1a1"
+# snapshot from git
+#RELEASE ?= "9b6bf076c11cba0f9ccdace63e8b4044b1a858ea"
+#BASEURI ?= "https://git.linaro.org/toolchain/gcc.git/snapshot/gcc-${RELEASE}.tar.gz"
+#SOURCEDIR = "gcc-${RELEASE}"
 #BASEURI ?= "https://repo.or.cz/official-gcc.git/snapshot/${RELEASE}.tar.gz;downloadfilename=gcc-${PV}-${RELEASE}.tar.gz"
 #SOURCEDIR ?= "official-gcc-${@'${RELEASE}'[0:7]}"
 
 # from snapshot
-#RELEASE ?= "12.1.0-RC-20220429"
+#RELEASE ?= "13.1.0-RC-20230421"
 #SOURCEDIR ?= "gcc-${RELEASE}"
 #BASEURI ?= "https://gcc.gnu.org/pub/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.xz"
 
@@ -48,7 +50,8 @@
            file://0008-libtool.patch \
            file://0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
            file://0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
-           file://0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+           file://0011-aarch64-Fix-include-paths-when-S-B.patch \
+           file://0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
            file://0013-Ensure-target-gcc-headers-can-be-included.patch \
            file://0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
            file://0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
@@ -58,13 +61,11 @@
            file://0019-Re-introduce-spe-commandline-options.patch \
            file://0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
            file://0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
-           file://0023-libatomic-Do-not-enforce-march-on-aarch64.patch \
-           file://0024-Fix-install-path-of-linux64.h.patch \
-           file://0026-rust-recursion-limit.patch \
-           file://prefix-map-realpath.patch \
-           file://hardcoded-paths.patch \
+           file://0022-libatomic-Do-not-enforce-march-on-aarch64.patch \
+           file://0023-Fix-install-path-of-linux64.h.patch \
+           file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
 "
-SRC_URI[sha256sum] = "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"
+SRC_URI[sha256sum] = "61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86"
 
 S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}"
 B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-cross-canadian_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-cross_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-cross_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-cross_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-crosssdk_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-crosssdk_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-runtime_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-runtime_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-runtime_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 9881afa..9016f7f 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -86,6 +86,7 @@
 FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*"
 FILES:libasan-dev += "\
     ${libdir}/libasan_preinit.o \
+    ${libdir}/libhwasan_preinit.o \
     ${libdir}/libasan.so \
     ${libdir}/libhwasan.so \
     ${libdir}/libasan.la \
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-sanitizers_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-sanitizers_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-source_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc-source_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-source_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc-source_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 66e582c..0f13404 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -1,4 +1,4 @@
-From 31f94ef5b43a984a98f0eebd2dcf1b53aa1d7bce Mon Sep 17 00:00:00 2001
+From 3875ab692a7d7ee796a6d5d2ece6daa3db81d5c4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 08:37:11 +0400
 Subject: [PATCH] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
@@ -12,10 +12,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 5dcaab14ae9..f76310a36bb 100755
+index 85883099410..044315af1da 100755
 --- a/configure
 +++ b/configure
-@@ -10165,7 +10165,7 @@ fi
+@@ -10183,7 +10183,7 @@ fi
  # for target_alias and gcc doesn't manage it consistently.
  target_configargs="--cache-file=./config.cache ${target_configargs}"
  
@@ -25,10 +25,10 @@
   *" newlib "*)
    case " $target_configargs " in
 diff --git a/configure.ac b/configure.ac
-index 85977482aee..8b9097c7a45 100644
+index 2b612dce6e9..f26fffd4f62 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -3346,7 +3346,7 @@ fi
+@@ -3339,7 +3339,7 @@ fi
  # for target_alias and gcc doesn't manage it consistently.
  target_configargs="--cache-file=./config.cache ${target_configargs}"
  
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
index 5aa635b..6fa5494 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
@@ -1,4 +1,4 @@
-From 99f1e61b2957226254a116fde7fd73bf07034012 Mon Sep 17 00:00:00 2001
+From e09aa9c3565585390328dd514cc286c20b74e76a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 8 Mar 2021 16:04:20 -0800
 Subject: [PATCH] gcc: poison-system-directories
@@ -20,15 +20,15 @@
  gcc/configure       | 19 +++++++++++++++++++
  gcc/configure.ac    | 16 ++++++++++++++++
  gcc/doc/invoke.texi |  9 +++++++++
- gcc/gcc.cc          | 15 ++++++++++++---
+ gcc/gcc.cc          |  9 +++++++--
  gcc/incpath.cc      | 21 +++++++++++++++++++++
- 7 files changed, 91 insertions(+), 3 deletions(-)
+ 7 files changed, 86 insertions(+), 2 deletions(-)
 
 diff --git a/gcc/common.opt b/gcc/common.opt
-index 8a0dafc52..0357868e2 100644
+index 862c474d3c8..64c4277c991 100644
 --- a/gcc/common.opt
 +++ b/gcc/common.opt
-@@ -710,6 +710,10 @@ Wreturn-local-addr
+@@ -711,6 +711,10 @@ Wreturn-local-addr
  Common Var(warn_return_local_addr) Init(1) Warning
  Warn about returning a pointer/reference to a local or temporary variable.
  
@@ -40,10 +40,10 @@
  Common Var(warn_shadow) Warning
  Warn when one variable shadows another.  Same as -Wshadow=global.
 diff --git a/gcc/config.in b/gcc/config.in
-index 64c27c9cf..a693cb8a8 100644
+index 4cad077bfbe..80e832fdb84 100644
 --- a/gcc/config.in
 +++ b/gcc/config.in
-@@ -230,6 +230,16 @@
+@@ -236,6 +236,16 @@
  #endif
  
  
@@ -61,10 +61,10 @@
     optimizer and back end) to be checked for dynamic type safety at runtime.
     This is quite expensive. */
 diff --git a/gcc/configure b/gcc/configure
-index 2b83acfb0..8bb97578c 100755
+index c7b26d1927d..3508be7b439 100755
 --- a/gcc/configure
 +++ b/gcc/configure
-@@ -1023,6 +1023,7 @@ enable_maintainer_mode
+@@ -1026,6 +1026,7 @@ enable_maintainer_mode
  enable_link_mutex
  enable_link_serialization
  enable_version_specific_runtime_libs
@@ -72,7 +72,7 @@
  enable_plugin
  enable_host_shared
  enable_libquadmath_support
-@@ -1785,6 +1786,8 @@ Optional Features:
+@@ -1788,6 +1789,8 @@ Optional Features:
    --enable-version-specific-runtime-libs
                            specify that runtime libraries should be installed
                            in a compiler-specific directory
@@ -81,7 +81,7 @@
    --enable-plugin         enable plugin support
    --enable-host-shared    build host code as shared libraries
    --disable-libquadmath-support
-@@ -31996,6 +31999,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -31753,6 +31756,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
  fi
  
  
@@ -105,10 +105,10 @@
  
  
 diff --git a/gcc/configure.ac b/gcc/configure.ac
-index daf2a708c..6155b83a7 100644
+index 09082e8ccae..6cd01a8966b 100644
 --- a/gcc/configure.ac
 +++ b/gcc/configure.ac
-@@ -7435,6 +7435,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -7292,6 +7292,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
                  [specify that runtime libraries should be
                   installed in a compiler-specific directory])])
  
@@ -132,37 +132,37 @@
  AC_SUBST(subdirs)
  AC_SUBST(srcdir)
 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ff6c338be..a8ebfa59a 100644
+index c9482886c5a..f302c637908 100644
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
-@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wpacked  -Wno-packed-bitfield-compat  -Wpacked-not-aligned  -Wpadded @gol
- -Wparentheses  -Wno-pedantic-ms-format @gol
- -Wpointer-arith  -Wno-pointer-compare  -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls @gol
- -Wrestrict  -Wno-return-local-addr  -Wreturn-type @gol
- -Wno-scalar-storage-order  -Wsequence-point @gol
-@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment.  But, for
+@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wpacked  -Wno-packed-bitfield-compat  -Wpacked-not-aligned  -Wpadded
+ -Wparentheses  -Wno-pedantic-ms-format
+ -Wpointer-arith  -Wno-pointer-compare  -Wno-pointer-to-int-cast
++-Wno-poison-system-directories
+ -Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls
+ -Wrestrict  -Wno-return-local-addr  -Wreturn-type
+ -Wno-scalar-storage-order  -Wsequence-point
+@@ -8422,6 +8423,14 @@ made up of data only and thus requires no special treatment.  But, for
  most targets, it is made up of code and thus requires the stack to be
  made executable in order for the program to work properly.
  
-+@item -Wno-poison-system-directories
 +@opindex Wno-poison-system-directories
++@item -Wno-poison-system-directories
 +Do not warn for @option{-I} or @option{-L} options using system
 +directories such as @file{/usr/include} when cross compiling.  This
 +option is intended for use in chroot environments when such
 +directories contain the correct headers and libraries for the target
 +system rather than the host.
 +
- @item -Wfloat-equal
  @opindex Wfloat-equal
  @opindex Wno-float-equal
+ @item -Wfloat-equal
 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
-index beefde7f6..4e6557b3c 100644
+index 16bb07f2cdc..5feae021545 100644
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -1162,6 +1162,8 @@ proper position among the other output files.  */
+@@ -1146,6 +1146,8 @@ proper position among the other output files.  */
     "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
     "%X %{o*} %{e*} %{N} %{n} %{r}\
      %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -171,7 +171,7 @@
      %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
      VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
      %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-@@ -1257,8 +1259,11 @@ static const char *cpp_unique_options =
+@@ -1241,8 +1243,11 @@ static const char *cpp_unique_options =
  static const char *cpp_options =
  "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
   %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
@@ -179,27 +179,14 @@
 - %{undef} %{save-temps*:-fpch-preprocess}";
 + %{!fno-working-directory:-fworking-directory}}} %{O*}"
 +#ifdef POISON_BY_DEFAULT
-+ " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}"
++ " -Werror=poison-system-directories"
 +#endif
 + " %{undef} %{save-temps*:-fpch-preprocess}";
  
  /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
  
-@@ -1287,7 +1292,11 @@ static const char *cc1_options =
-  %{coverage:-fprofile-arcs -ftest-coverage}\
-  %{fprofile-arcs|fprofile-generate*|coverage:\
-    %{!fprofile-update=single:\
--     %{pthread:-fprofile-update=prefer-atomic}}}";
-+     %{pthread:-fprofile-update=prefer-atomic}}}"
-+#ifdef POISON_BY_DEFAULT
-+ " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}"
-+#endif
-+  ;
- 
- static const char *asm_options =
- "%{-target-help:%:print-asm-header()} "
 diff --git a/gcc/incpath.cc b/gcc/incpath.cc
-index 622204a38..5ac03c086 100644
+index 4d44321183f..46c0d543205 100644
 --- a/gcc/incpath.cc
 +++ b/gcc/incpath.cc
 @@ -26,6 +26,7 @@
@@ -221,17 +208,17 @@
 +       struct cpp_dir *p;
 +
 +       for (p = heads[INC_QUOTE]; p; p = p->next)
-+         {
-+          if ((!strncmp (p->name, "/usr/include", 12))
-+              || (!strncmp (p->name, "/usr/local/include", 18))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+              || (!strncmp (p->name, "/sw/include", 11))
-+              || (!strncmp (p->name, "/opt/include", 12)))
-+            warning (OPT_Wpoison_system_directories,
-+                     "include location \"%s\" is unsafe for "
-+                     "cross-compilation",
-+                     p->name);
-+         }
++	 {
++	  if ((!strncmp (p->name, "/usr/include", 12))
++	      || (!strncmp (p->name, "/usr/local/include", 18))
++	      || (!strncmp (p->name, "/usr/X11R6/include", 18))
++	      || (!strncmp (p->name, "/sw/include", 11))
++	      || (!strncmp (p->name, "/opt/include", 12)))
++	    warning (OPT_Wpoison_system_directories,
++		     "include location \"%s\" is unsafe for "
++		     "cross-compilation",
++		     p->name);
++	 }
 +    }
 +#endif
  }
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
index e83f05b..d547d7e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
@@ -1,7 +1,7 @@
-From 34b861e7a4cfd7b1f0d2c0f8cf9bb0b0b81eb61a Mon Sep 17 00:00:00 2001
+From 86664e09670efa5a8662ef59590e01707f8e0cc3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH] 64-bit multilib hack.
+Subject: [PATCH] 64-bit multilib hack
 
 GCC has internal multilib handling code but it assumes a very specific rigid directory
 layout. The build system implementation of multilib layout is very generic and allows
@@ -28,18 +28,17 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  gcc/config/aarch64/t-aarch64-linux |  8 ++++----
  gcc/config/arc/t-multilib-linux    |  4 ++--
  gcc/config/i386/t-linux64          |  6 ++----
- gcc/config/mips/t-linux64          | 10 +++-------
- gcc/config/riscv/t-linux           |  6 ++++--
+ gcc/config/mips/t-linux64          | 28 ++--------------------------
+ gcc/config/riscv/t-linux           |  4 ++--
  gcc/config/rs6000/t-linux64        |  5 ++---
- 6 files changed, 17 insertions(+), 22 deletions(-)
+ 6 files changed, 14 insertions(+), 41 deletions(-)
 
 diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index d0cd546002a..f4056d68372 100644
+index 57bf4100fcd..aaef5da8059 100644
 --- a/gcc/config/aarch64/t-aarch64-linux
 +++ b/gcc/config/aarch64/t-aarch64-linux
 @@ -21,8 +21,8 @@
@@ -56,7 +55,7 @@
 -MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
 +#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
 diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux
-index ecb9ae6859f..12a164028d4 100644
+index a839e4ea67c..f92664573a9 100644
 --- a/gcc/config/arc/t-multilib-linux
 +++ b/gcc/config/arc/t-multilib-linux
 @@ -16,9 +16,9 @@
@@ -72,7 +71,7 @@
  # Aliases:
  MULTILIB_MATCHES += mcpu?arc700=mA7
 diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index 5526ad0e6cc..fa51c88912b 100644
+index 138956b0962..d6e0cdc4342 100644
 --- a/gcc/config/i386/t-linux64
 +++ b/gcc/config/i386/t-linux64
 @@ -32,7 +32,5 @@
@@ -86,37 +85,53 @@
 +MULTILIB_DIRNAMES = . .
 +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
 diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 2fdd8e00407..04f2099250f 100644
+index 176091cabb6..8258ef40559 100644
 --- a/gcc/config/mips/t-linux64
 +++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
+@@ -17,29 +17,5 @@
  # <http://www.gnu.org/licenses/>.
  
  MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
 -MULTILIB_DIRNAMES = n32 32 64
 -MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
 -MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
+-ifeq (yes,$(enable_multiarch))
+-  ifneq (,$(findstring gnuabi64,$(target)))
+-    MULTILIB_OSDIRNAMES = \
+-	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+-  else ifneq (,$(findstring gnuabin32,$(target)))
+-    MULTILIB_OSDIRNAMES = \
+-	../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+-  else
+-    MULTILIB_OSDIRNAMES = \
 -	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
 -	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
 -	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+-  endif
+-else
+-  MULTILIB_OSDIRNAMES = \
+-	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+-endif
 +MULTILIB_DIRNAMES = . . .
 +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
 diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
-index 216d2776a18..e4d817621fc 100644
+index 216d2776a18..e3c520f4bf6 100644
 --- a/gcc/config/riscv/t-linux
 +++ b/gcc/config/riscv/t-linux
-@@ -1,3 +1,5 @@
+@@ -1,3 +1,3 @@
  # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
 -MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
 -MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
 +#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
-+MULTILIB_DIRNAMES := . .
 +#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
 diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index 47e0efd5764..05f5a3f188e 100644
+index 01a94242308..1429eceaebf 100644
 --- a/gcc/config/rs6000/t-linux64
 +++ b/gcc/config/rs6000/t-linux64
 @@ -26,10 +26,9 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
index e8f2163..d749ff1 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch
@@ -1,4 +1,4 @@
-From 7f40f8321fb999e9b34d948724517d3fb0d26820 Mon Sep 17 00:00:00 2001
+From 2a1336d2e2ba08747acd7368264fc5813a37b049 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Thu, 28 Oct 2021 11:33:40 +0100
 Subject: [PATCH] Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these
@@ -23,30 +23,10 @@
  2 files changed, 4 insertions(+)
 
 diff --git a/Makefile.in b/Makefile.in
-index 593495e1650..1d9c83cc566 100644
+index 06a9398e172..4b0069b257c 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
- 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
- 
- # This is the list of directories to built for the host system.
-@@ -207,6 +208,7 @@ HOST_EXPORTS = \
- 	CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
- 	CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
- 	CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
-+	CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
- 	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- 	DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
- 	LD="$(LD)"; export LD; \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index ef58fac2b9a..bab04f335c2 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -179,6 +179,7 @@ BUILD_EXPORTS = \
+@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
  # built for the build system to override those in BASE_FLAGS_TO_PASS.
  EXTRA_BUILD_FLAGS = \
  	CFLAGS="$(CFLAGS_FOR_BUILD)" \
@@ -62,3 +42,23 @@
  	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
  	DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
  	LD="$(LD)"; export LD; \
+diff --git a/Makefile.tpl b/Makefile.tpl
+index dfbd74b68f8..419b332953b 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -181,6 +181,7 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -213,6 +214,7 @@ HOST_EXPORTS = \
+ 	CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
+ 	CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
+ 	CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
++	CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
+ 	DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ 	DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
+ 	LD="$(LD)"; export LD; \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index e34eb2c..2eba38e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,4 +1,4 @@
-From 5455fc1de74897a27c1199dc5611ec02243e24af Mon Sep 17 00:00:00 2001
+From 6cce395992a1b573e6795fdad2f9086db921e924 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:17:25 +0400
 Subject: [PATCH] Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}
@@ -7,16 +7,16 @@
 the source can be shared between gcc-cross-initial,
 gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
 While compiling gcc-crosssdk-initial-x86_64 on some host, there is
 occasionally failure that test the existance of default.h doesn't
 work, the reason is tm_include_list='** defaults.h' rather than
 tm_include_list='** ./defaults.h'
 
 So we add the test condition for this situation.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
  gcc/Makefile.in  | 2 +-
@@ -26,10 +26,10 @@
  4 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 31ff95500c9..a8277254696 100644
+index ad9a5d94cd0..fe636af3f63 100644
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -553,7 +553,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+@@ -561,7 +561,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
  TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
  
  xmake_file=@xmake_file@
@@ -39,10 +39,10 @@
  TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
  TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
 diff --git a/gcc/configure b/gcc/configure
-index dc2d59701ad..3fc0e2f5813 100755
+index 3508be7b439..cf773a8b854 100755
 --- a/gcc/configure
 +++ b/gcc/configure
-@@ -13381,8 +13381,8 @@ for f in $tm_file; do
+@@ -13507,8 +13507,8 @@ for f in $tm_file; do
         tm_include_list="${tm_include_list} $f"
         ;;
      defaults.h )
@@ -54,10 +54,10 @@
      * )
         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
 diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 36ce78924de..46de496b256 100644
+index 6cd01a8966b..22591478b72 100644
 --- a/gcc/configure.ac
 +++ b/gcc/configure.ac
-@@ -2332,8 +2332,8 @@ for f in $tm_file; do
+@@ -2357,8 +2357,8 @@ for f in $tm_file; do
         tm_include_list="${tm_include_list} $f"
         ;;
      defaults.h )
@@ -69,7 +69,7 @@
      * )
         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
 diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 91cc43f69ff..8de33713cd8 100644
+index 054ede89647..3b2c2b9df37 100644
 --- a/gcc/mkconfig.sh
 +++ b/gcc/mkconfig.sh
 @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch b/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
index b08aecc..3887aa3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch
@@ -1,4 +1,4 @@
-From abc3b82ab24169277f2090e9df1ceac3573142be Mon Sep 17 00:00:00 2001
+From 223ff12852a8c8974f6e542ee3a8b276639d2452 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:22:00 +0400
 Subject: [PATCH] cpp: honor sysroot.
@@ -17,16 +17,16 @@
 
 RP 2012/04/13
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
 Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  gcc/cp/lang-specs.h | 2 +-
  gcc/gcc.cc          | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index f35c9fab76b..19ddc98ce7f 100644
+index c591d155cc1..61927869fe1 100644
 --- a/gcc/cp/lang-specs.h
 +++ b/gcc/cp/lang-specs.h
 @@ -116,7 +116,7 @@ along with GCC; see the file COPYING3.  If not see
@@ -39,11 +39,11 @@
        "    %{fmodule-only:%{!S:-o %g.s%V}}"
        "    %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
-index ce161d3c853..aa4cf92fb78 100644
+index 5feae021545..8af0c814c33 100644
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -1476,7 +1476,7 @@ static const struct compiler default_compilers[] =
- 					   %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
+@@ -1468,7 +1468,7 @@ static const struct compiler default_compilers[] =
+ 					   %W{o*:--output-pch %*}}%V}}}}}}}", 0, 0, 0},
    {".i", "@cpp-output", 0, 0, 0},
    {"@cpp-output",
 -   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index b59eed5..a42a044 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,4 +1,4 @@
-From 4de00af67b57b5440bdf61ab364ad959ad0aeee7 Mon Sep 17 00:00:00 2001
+From ba2e308f7993099708ef3d8cbf2db5f134f08941 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:24:50 +0400
 Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -12,8 +12,6 @@
 
 Removes the do_headerfix task in metadata
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
 Upstream-Status: Inappropriate [OE configuration]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
@@ -38,7 +36,7 @@
  18 files changed, 53 insertions(+), 58 deletions(-)
 
 diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5e4553d79f5..877e8841eb2 100644
+index 4277f03da2a..e4c92c03291 100644
 --- a/gcc/config/aarch64/aarch64-linux.h
 +++ b/gcc/config/aarch64/aarch64-linux.h
 @@ -21,10 +21,10 @@
@@ -55,7 +53,7 @@
  #undef  ASAN_CC1_SPEC
  #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
 diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index 17f16a55910..0a7be38fa63 100644
+index 03f783f2ad1..4fa02668aa7 100644
 --- a/gcc/config/alpha/linux-elf.h
 +++ b/gcc/config/alpha/linux-elf.h
 @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.  If not see
@@ -70,10 +68,10 @@
  #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
  #elif DEFAULT_LIBC == LIBC_GLIBC
 diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 50cc0bc6d08..17c18b27145 100644
+index a119875599d..dce7f59eeea 100644
 --- a/gcc/config/arm/linux-eabi.h
 +++ b/gcc/config/arm/linux-eabi.h
-@@ -65,8 +65,8 @@
+@@ -62,8 +62,8 @@
     GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
  
  #undef  GLIBC_DYNAMIC_LINKER
@@ -84,7 +82,7 @@
  #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
  
  #define GLIBC_DYNAMIC_LINKER \
-@@ -89,7 +89,7 @@
+@@ -86,7 +86,7 @@
  #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
  #endif
  #define MUSL_DYNAMIC_LINKER \
@@ -94,7 +92,7 @@
  /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
     use the GNU/Linux version, not the generic BPABI version.  */
 diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index df3da67c4f0..37456e9d5a4 100644
+index 7b7b7cbbe14..98ef2267117 100644
 --- a/gcc/config/arm/linux-elf.h
 +++ b/gcc/config/arm/linux-elf.h
 @@ -60,7 +60,7 @@
@@ -107,7 +105,7 @@
  #define LINUX_TARGET_LINK_SPEC  "%{h*} \
     %{static:-Bstatic} \
 diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 5d99ee56d5b..a76022c9ccc 100644
+index bbb7cc7115e..7d9272040ee 100644
 --- a/gcc/config/i386/linux.h
 +++ b/gcc/config/i386/linux.h
 @@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
@@ -121,7 +119,7 @@
 -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
 +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
 diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 8681e36f10d..ddce49b6b60 100644
+index 2bd9f48e271..dbbe7ca5440 100644
 --- a/gcc/config/i386/linux64.h
 +++ b/gcc/config/i386/linux64.h
 @@ -27,13 +27,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
@@ -145,10 +143,10 @@
 -#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
 +#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
 diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 74f70793d90..4ce173384ef 100644
+index e3aca79cccc..6491c6b84f5 100644
 --- a/gcc/config/linux.h
 +++ b/gcc/config/linux.h
-@@ -99,10 +99,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -86,10 +86,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
     GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
     GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
     supporting both 32-bit and 64-bit compilation.  */
@@ -164,7 +162,7 @@
  #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
  #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
 diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
-index 664dc9206ad..082bd7cfc6f 100644
+index aecaa02a199..62f88f7f9a2 100644
 --- a/gcc/config/loongarch/gnu-user.h
 +++ b/gcc/config/loongarch/gnu-user.h
 @@ -31,11 +31,11 @@ along with GCC; see the file COPYING3.  If not see
@@ -182,7 +180,7 @@
  #undef GNU_USER_TARGET_LINK_SPEC
  #define GNU_USER_TARGET_LINK_SPEC \
 diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
-index 5b1a365eda4..2e63df1ae9c 100644
+index e2e2c421c52..6f26480e3b5 100644
 --- a/gcc/config/microblaze/linux.h
 +++ b/gcc/config/microblaze/linux.h
 @@ -28,7 +28,7 @@
@@ -204,7 +202,7 @@
  #undef  SUBTARGET_EXTRA_SPECS
  #define SUBTARGET_EXTRA_SPECS \
 diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index 230b7789bb8..d96d134bfcf 100644
+index 5add34ea134..34692b433b8 100644
 --- a/gcc/config/mips/linux.h
 +++ b/gcc/config/mips/linux.h
 @@ -22,29 +22,29 @@ along with GCC; see the file COPYING3.  If not see
@@ -247,22 +245,24 @@
  #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
  #define GNU_USER_DYNAMIC_LINKERN32 \
 diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index f5dd813acad..7a13e1c9799 100644
+index 2ce097ebbce..1d45d7b4962 100644
 --- a/gcc/config/nios2/linux.h
 +++ b/gcc/config/nios2/linux.h
-@@ -29,8 +29,8 @@
+@@ -29,10 +29,10 @@
  #undef CPP_SPEC
  #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  
 -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
--#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-nios2.so.1"
 +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-nios2.so.1"
+ 
+ #undef MUSL_DYNAMIC_LINKER
+-#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-nios2.so.1"
 +#define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-nios2.so.1"
  
  #undef LINK_SPEC
  #define LINK_SPEC LINK_SPEC_ENDIAN \
 diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
-index 38803723ba9..d5ef8a96a19 100644
+index b9557a75dc7..e10ca1f97e7 100644
 --- a/gcc/config/riscv/linux.h
 +++ b/gcc/config/riscv/linux.h
 @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  If not see
@@ -284,7 +284,7 @@
  /* Because RISC-V only has word-sized atomics, it requries libatomic where
     others do not.  So link libatomic by default, as needed.  */
 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index b2a7afabc73..364c1a5b155 100644
+index 9e457033d11..2ddab7c99c1 100644
 --- a/gcc/config/rs6000/linux64.h
 +++ b/gcc/config/rs6000/linux64.h
 @@ -339,24 +339,19 @@ extern int dot_symbols;
@@ -318,10 +318,10 @@
  #undef  DEFAULT_ASM_ENDIAN
  #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
 diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index 7e2519de5d4..a73954d9de5 100644
+index ae932fc22f0..26db003cb3a 100644
 --- a/gcc/config/rs6000/sysv4.h
 +++ b/gcc/config/rs6000/sysv4.h
-@@ -779,10 +779,10 @@ GNU_USER_TARGET_CC1_SPEC
+@@ -771,10 +771,10 @@ GNU_USER_TARGET_CC1_SPEC
  
  #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
  
@@ -335,7 +335,7 @@
  #ifndef GNU_USER_DYNAMIC_LINKER
  #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
 diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
-index d7b7e7a7b02..0139b4d06ca 100644
+index 02aa1edaff8..fab268d61f4 100644
 --- a/gcc/config/s390/linux.h
 +++ b/gcc/config/s390/linux.h
 @@ -72,13 +72,13 @@ along with GCC; see the file COPYING3.  If not see
@@ -357,7 +357,7 @@
  #undef  LINK_SPEC
  #define LINK_SPEC \
 diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index d96d077c99e..7d27f9893ee 100644
+index 29f5902b98b..83d1e53e6e2 100644
 --- a/gcc/config/sh/linux.h
 +++ b/gcc/config/sh/linux.h
 @@ -61,10 +61,10 @@ along with GCC; see the file COPYING3.  If not see
@@ -374,7 +374,7 @@
  #undef SUBTARGET_LINK_EMUL_SUFFIX
  #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
 diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 6a809e9092d..60603765ad6 100644
+index 0e33b3cac2c..84f29adbb35 100644
 --- a/gcc/config/sparc/linux.h
 +++ b/gcc/config/sparc/linux.h
 @@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
@@ -387,7 +387,7 @@
  #undef  LINK_SPEC
  #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
 diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index d08a2ef96fe..e6955da0a5b 100644
+index f1cc0a19e49..94bc2032803 100644
 --- a/gcc/config/sparc/linux64.h
 +++ b/gcc/config/sparc/linux64.h
 @@ -78,8 +78,8 @@ along with GCC; see the file COPYING3.  If not see
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch b/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
index c9bc38c..72248e6 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0008-libtool.patch
@@ -1,4 +1,4 @@
-From 5117519c1897a49b09fe7fff213b9c2ea15d37f5 Mon Sep 17 00:00:00 2001
+From 5ce9e36a87974ce5c1c1adb6e4390350233d8770 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:29:11 +0400
 Subject: [PATCH] libtool
@@ -15,9 +15,8 @@
 
 RP 2012/8/24
 
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2023-04/msg00000.html]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
 ---
  ltmain.sh | 4 ++++
  1 file changed, 4 insertions(+)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index dd67b11..871a634 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -1,4 +1,4 @@
-From 32129f9682d0d27fc67af10f077ad2768935cbe6 Mon Sep 17 00:00:00 2001
+From 37c7471aa476dfc591a7123e39e38ef8b049f5c0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:30:32 +0400
 Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI.
@@ -11,18 +11,17 @@
 
 We might want to send it upstream.
 
+Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2023-April/615319.html]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
 ---
  gcc/config/arm/linux-eabi.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 17c18b27145..8eacb099317 100644
+index dce7f59eeea..27402c629c6 100644
 --- a/gcc/config/arm/linux-eabi.h
 +++ b/gcc/config/arm/linux-eabi.h
-@@ -91,10 +91,14 @@
+@@ -88,10 +88,14 @@
  #define MUSL_DYNAMIC_LINKER \
    SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
  
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index 45edc62..a88abc2 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -1,4 +1,4 @@
-From bf85b8bbcb4b77725d4c22c1bb25a29f6ff21038 Mon Sep 17 00:00:00 2001
+From 2be15956b4051680aa8da9df97ef032ac8616fb1 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:33:04 +0400
 Subject: [PATCH] Use the multilib config files from ${B} instead of using the
@@ -18,10 +18,10 @@
  2 files changed, 36 insertions(+), 8 deletions(-)
 
 diff --git a/gcc/configure b/gcc/configure
-index 3fc0e2f5813..2f0f0e057a9 100755
+index cf773a8b854..448a1ec093e 100755
 --- a/gcc/configure
 +++ b/gcc/configure
-@@ -13361,10 +13361,20 @@ done
+@@ -13487,10 +13487,20 @@ done
  tmake_file_=
  for f in ${tmake_file}
  do
@@ -46,7 +46,7 @@
  done
  tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
  
-@@ -13375,6 +13385,10 @@ tm_file_list="options.h"
+@@ -13501,6 +13511,10 @@ tm_file_list="options.h"
  tm_include_list="options.h insn-constants.h"
  for f in $tm_file; do
    case $f in
@@ -58,10 +58,10 @@
         f=`echo $f | sed 's/^..//'`
         tm_file_list="${tm_file_list} $f"
 diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 46de496b256..6155b83a732 100644
+index 22591478b72..b6e7f5149a7 100644
 --- a/gcc/configure.ac
 +++ b/gcc/configure.ac
-@@ -2312,10 +2312,20 @@ done
+@@ -2337,10 +2337,20 @@ done
  tmake_file_=
  for f in ${tmake_file}
  do
@@ -86,7 +86,7 @@
  done
  tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
  
-@@ -2326,6 +2336,10 @@ tm_file_list="options.h"
+@@ -2351,6 +2361,10 @@ tm_file_list="options.h"
  tm_include_list="options.h insn-constants.h"
  for f in $tm_file; do
    case $f in
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
new file mode 100644
index 0000000..f52e21e
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
@@ -0,0 +1,55 @@
+From 710d1325474e708e6b34eebe09f3f130420af293 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 31 Jan 2023 22:03:38 -0800
+Subject: [PATCH] aarch64: Fix include paths when S != B
+
+aarch64.h gets copied into build directory when built out of tree, in
+this case build uses this file but does not find the includes inside it
+since they are not found in any of include paths specified in compiler
+cmdline.
+
+Fixes build errors like
+
+% g++ -c   -isystem/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gcc-cross-aarch64/13.0.1-r0/recipe-sysroot-native/usr/include -O2 -pipe   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/build -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../include  -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../libcpp/include -o build/gencheck.o ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc
+In file included from ./tm.h:34,
+                 from ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc:23:
+./config/aarch64/aarch64.h:164:10: fatal error: aarch64-option-extensions.def: No such file or directory
+  164 | #include "aarch64-option-extensions.def"
+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+compilation terminated.
+
+See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105144
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
+index 155cace6afe..07d68958908 100644
+--- a/gcc/config/aarch64/aarch64.h
++++ b/gcc/config/aarch64/aarch64.h
+@@ -161,8 +161,8 @@
+ enum class aarch64_feature : unsigned char {
+ #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) IDENT,
+ #define AARCH64_ARCH(A, B, IDENT, D, E) IDENT,
+-#include "aarch64-option-extensions.def"
+-#include "aarch64-arches.def"
++#include "config/aarch64/aarch64-option-extensions.def"
++#include "config/aarch64/aarch64-arches.def"
+ };
+ 
+ /* Define unique flags for each of the above.  */
+@@ -171,8 +171,8 @@ enum class aarch64_feature : unsigned char {
+     = aarch64_feature_flags (1) << int (aarch64_feature::IDENT);
+ #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) HANDLE (IDENT)
+ #define AARCH64_ARCH(A, B, IDENT, D, E) HANDLE (IDENT)
+-#include "aarch64-option-extensions.def"
+-#include "aarch64-arches.def"
++#include "config/aarch64/aarch64-option-extensions.def"
++#include "config/aarch64/aarch64-arches.def"
+ #undef HANDLE
+ 
+ #endif
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
similarity index 92%
rename from poky/meta/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index 352c6ee..b05be59 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -1,4 +1,4 @@
-From e5463727ff028cee5e452da38f5b4c44d52e412e Mon Sep 17 00:00:00 2001
+From e8e8a0ab572cfceb9758f99599c0db4c962e49c0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 20 Feb 2015 09:39:38 +0000
 Subject: [PATCH] Avoid using libdir from .la which usually points to a host
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch b/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
index 61e61ec..b9a3f05 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch
@@ -1,4 +1,4 @@
-From 612801d426e75ff997cfabda380dbe52c2cbc532 Mon Sep 17 00:00:00 2001
+From 93ad7cf3ff92771451c2994cab45e34a0c8574a0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 20 Feb 2015 10:25:11 +0000
 Subject: [PATCH] Ensure target gcc headers can be included
@@ -25,10 +25,10 @@
  4 files changed, 22 insertions(+)
 
 diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index a8277254696..07fa63b6640 100644
+index fe636af3f63..065ce7e9a5b 100644
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -632,6 +632,7 @@ libexecdir = @libexecdir@
+@@ -640,6 +640,7 @@ libexecdir = @libexecdir@
  
  # Directory in which the compiler finds libraries etc.
  libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
@@ -36,7 +36,7 @@
  # Directory in which the compiler finds executables
  libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
  # Directory in which all plugin resources are installed
-@@ -3024,6 +3025,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+@@ -3059,6 +3060,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
  
  PREPROCESSOR_DEFINES = \
    -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
@@ -45,10 +45,10 @@
    -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
    -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
 diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 4ce173384ef..8a3cd4f2d34 100644
+index 6491c6b84f5..57496ff1f2f 100644
 --- a/gcc/config/linux.h
 +++ b/gcc/config/linux.h
-@@ -170,6 +170,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -157,6 +157,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  #define INCLUDE_DEFAULTS_MUSL_TOOL
  #endif
  
@@ -62,7 +62,7 @@
  #ifdef NATIVE_SYSTEM_HEADER_DIR
  #define INCLUDE_DEFAULTS_MUSL_NATIVE			\
      { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },	\
-@@ -196,6 +203,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -183,6 +190,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
      INCLUDE_DEFAULTS_MUSL_PREFIX			\
      INCLUDE_DEFAULTS_MUSL_CROSS				\
      INCLUDE_DEFAULTS_MUSL_TOOL				\
@@ -71,10 +71,10 @@
      { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
      { 0, 0, 0, 0, 0, 0 }				\
 diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index a73954d9de5..e5dd6538358 100644
+index 26db003cb3a..3a443abcf6b 100644
 --- a/gcc/config/rs6000/sysv4.h
 +++ b/gcc/config/rs6000/sysv4.h
-@@ -994,6 +994,13 @@ ncrtn.o%s"
+@@ -986,6 +986,13 @@ ncrtn.o%s"
  #define INCLUDE_DEFAULTS_MUSL_TOOL
  #endif
  
@@ -88,7 +88,7 @@
  #ifdef NATIVE_SYSTEM_HEADER_DIR
  #define INCLUDE_DEFAULTS_MUSL_NATIVE			\
      { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },	\
-@@ -1020,6 +1027,7 @@ ncrtn.o%s"
+@@ -1012,6 +1019,7 @@ ncrtn.o%s"
      INCLUDE_DEFAULTS_MUSL_PREFIX			\
      INCLUDE_DEFAULTS_MUSL_CROSS				\
      INCLUDE_DEFAULTS_MUSL_TOOL				\
@@ -97,7 +97,7 @@
      { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
      { 0, 0, 0, 0, 0, 0 }				\
 diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
-index 7888300f277..52cf14e92f8 100644
+index 141bb4d25f6..734590a7059 100644
 --- a/gcc/cppdefault.cc
 +++ b/gcc/cppdefault.cc
 @@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[]
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index 94308b2..5de0e3e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -1,4 +1,4 @@
-From 9ae49e7b88c208ab79ec9c2fc4a2fa8a3f1e85bb Mon Sep 17 00:00:00 2001
+From e0775b77b8d10066e27ab89d15441b39024a29fd Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 3 Mar 2015 08:21:19 +0000
 Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index ce9635c..f1eee4a 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -1,4 +1,4 @@
-From bf918db7117f41d3c04162095641165ca241707d Mon Sep 17 00:00:00 2001
+From 7776c630e2560bacff7d1e9b04e7916ed4c05d00 Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Sun, 5 Jul 2015 20:25:18 -0700
 Subject: [PATCH] libcc1: fix libcc1's install path and rpath
@@ -20,7 +20,7 @@
  2 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index 6e3a34ff7e2..3f3f6391aba 100644
+index 921a33fe236..938e6f964cd 100644
 --- a/libcc1/Makefile.am
 +++ b/libcc1/Makefile.am
 @@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
index 3b54719..e05fd4e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -1,4 +1,4 @@
-From 4fbbd40d7db89cdbeaf93df1e1da692b1f80a5bc Mon Sep 17 00:00:00 2001
+From 4f9c952ad5fa68260d6a40570b0fdb7359c85057 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 7 Dec 2015 23:39:54 +0000
 Subject: [PATCH] handle sysroot support for nativesdk-gcc
@@ -38,15 +38,15 @@
  gcc/c-family/c-opts.cc    |  4 +--
  gcc/config/linux.h        | 24 +++++++--------
  gcc/config/rs6000/sysv4.h | 24 +++++++--------
- gcc/cppdefault.cc         | 63 ++++++++++++++++++++++++---------------
- gcc/cppdefault.h          | 13 ++++----
- gcc/gcc.cc                | 20 +++++++++----
+ gcc/cppdefault.cc         | 65 ++++++++++++++++++++++++---------------
+ gcc/cppdefault.h          | 13 +++-----
+ gcc/gcc.cc                | 20 ++++++++----
  gcc/incpath.cc            | 12 ++++----
  gcc/prefix.cc             |  6 ++--
- 8 files changed, 94 insertions(+), 72 deletions(-)
+ 8 files changed, 95 insertions(+), 73 deletions(-)
 
 diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
-index a341a061758..83b0bef4dbb 100644
+index c68a2a27469..77e9b5eceaa 100644
 --- a/gcc/c-family/c-opts.cc
 +++ b/gcc/c-family/c-opts.cc
 @@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
@@ -61,10 +61,10 @@
    path = (char *) xmalloc (prefix_len + suffix_len + 1);
    memcpy (path, prefix, prefix_len);
 diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 8a3cd4f2d34..58143dff731 100644
+index 57496ff1f2f..c921cf6ef63 100644
 --- a/gcc/config/linux.h
 +++ b/gcc/config/linux.h
-@@ -134,53 +134,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -121,53 +121,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   * Unfortunately, this is mostly duplicated from cppdefault.cc */
  #if DEFAULT_LIBC == LIBC_MUSL
  #define INCLUDE_DEFAULTS_MUSL_GPP			\
@@ -129,7 +129,7 @@
  #else
  #define INCLUDE_DEFAULTS_MUSL_NATIVE
  #endif
-@@ -205,7 +205,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -192,7 +192,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
      INCLUDE_DEFAULTS_MUSL_TOOL				\
      INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET			\
      INCLUDE_DEFAULTS_MUSL_NATIVE			\
@@ -139,10 +139,10 @@
    }
  #endif
 diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index e5dd6538358..b496849b792 100644
+index 3a443abcf6b..ef83a5a432e 100644
 --- a/gcc/config/rs6000/sysv4.h
 +++ b/gcc/config/rs6000/sysv4.h
-@@ -958,53 +958,53 @@ ncrtn.o%s"
+@@ -950,53 +950,53 @@ ncrtn.o%s"
  /* Include order changes for musl, same as in generic linux.h.  */
  #if DEFAULT_LIBC == LIBC_MUSL
  #define INCLUDE_DEFAULTS_MUSL_GPP			\
@@ -207,7 +207,7 @@
  #else
  #define INCLUDE_DEFAULTS_MUSL_NATIVE
  #endif
-@@ -1029,7 +1029,7 @@ ncrtn.o%s"
+@@ -1021,7 +1021,7 @@ ncrtn.o%s"
      INCLUDE_DEFAULTS_MUSL_TOOL				\
      INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET			\
      INCLUDE_DEFAULTS_MUSL_NATIVE			\
@@ -217,7 +217,7 @@
    }
  #endif
 diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
-index 52cf14e92f8..d8977afc05e 100644
+index 734590a7059..b4a8fc29e4a 100644
 --- a/gcc/cppdefault.cc
 +++ b/gcc/cppdefault.cc
 @@ -35,6 +35,30 @@
@@ -272,7 +272,7 @@
        GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
  #endif
  #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR
-@@ -62,23 +86,23 @@ const struct default_include cpp_include_defaults[]
+@@ -62,26 +86,26 @@ const struct default_include cpp_include_defaults[]
  #endif
  #ifdef GCC_INCLUDE_DIR
      /* This is the dir for gcc's private headers.  */
@@ -297,12 +297,16 @@
  #endif
  #ifdef FIXED_INCLUDE_DIR
      /* This is the dir for fixincludes.  */
+ #ifndef SYSROOT_HEADERS_SUFFIX_SPEC
+-    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, 2 },
++    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 2 },
+ #endif
 -    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
 +    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
        /* A multilib suffix needs adding if different multilibs use
  	 different headers.  */
  #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -90,33 +114,24 @@ const struct default_include cpp_include_defaults[]
+@@ -93,33 +117,24 @@ const struct default_include cpp_include_defaults[]
  #endif
  #ifdef CROSS_INCLUDE_DIR
      /* One place the target system's headers might be.  */
@@ -343,7 +347,7 @@
  /* This value is set by cpp_relocated at runtime */
  const char *gcc_exec_prefix;
 diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index fb97c0b5814..6267150facc 100644
+index e26b424e99c..c9abb090dcd 100644
 --- a/gcc/cppdefault.h
 +++ b/gcc/cppdefault.h
 @@ -33,7 +33,8 @@
@@ -378,10 +382,10 @@
     subdirectory of the actual installation.  */
  extern const char *gcc_exec_prefix;
 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
-index aa4cf92fb78..5569a39a14a 100644
+index 8af0c814c33..605fe3b8c0d 100644
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL;
+@@ -255,6 +255,8 @@ FILE *report_times_to_file = NULL;
  #endif
  static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
  
@@ -390,7 +394,7 @@
  /* Nonzero means pass the updated target_system_root to the compiler.  */
  
  static int target_system_root_changed;
-@@ -575,6 +577,7 @@ or with constant text in a single argument.
+@@ -578,6 +580,7 @@ or with constant text in a single argument.
   %G     process LIBGCC_SPEC as a spec.
   %R     Output the concatenation of target_system_root and
          target_sysroot_suffix.
@@ -398,7 +402,7 @@
   %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
   %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
   %C     process CPP_SPEC as a spec.
-@@ -1627,10 +1630,10 @@ static const char *gcc_libexec_prefix;
+@@ -1619,10 +1622,10 @@ static const char *gcc_libexec_prefix;
     gcc_exec_prefix is set because, in that case, we know where the
     compiler has been installed, and use paths relative to that
     location instead.  */
@@ -413,7 +417,7 @@
  
  /* For native compilers, these are well-known paths containing
     components that may be provided by the system.  For cross
-@@ -1638,9 +1641,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+@@ -1630,9 +1633,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  static const char *md_exec_prefix = MD_EXEC_PREFIX;
  static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
  static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
@@ -425,7 +429,7 @@
    = STANDARD_STARTFILE_PREFIX_2;
  
  /* A relative path to be used in finding the location of tools
-@@ -6676,6 +6679,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+@@ -6652,6 +6655,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
  	      }
  	    break;
  
@@ -438,7 +442,7 @@
  	    value = do_spec_1 (startfile_spec, 0, NULL);
  	    if (value != 0)
 diff --git a/gcc/incpath.cc b/gcc/incpath.cc
-index c80f100f476..5ac03c08693 100644
+index 46c0d543205..d088dae7b04 100644
 --- a/gcc/incpath.cc
 +++ b/gcc/incpath.cc
 @@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
@@ -485,10 +489,10 @@
  	      str = update_path (ostr, p->component);
  	      free (ostr);
 diff --git a/gcc/prefix.cc b/gcc/prefix.cc
-index 096ed5afa3d..2526f0ecc39 100644
+index c2a37bde5ea..33944701ced 100644
 --- a/gcc/prefix.cc
 +++ b/gcc/prefix.cc
-@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3.  If not see
+@@ -73,7 +73,9 @@ License along with GCC; see the file COPYING3.  If not see
  #include "prefix.h"
  #include "common/common-target.h"
  
@@ -499,7 +503,7 @@
  
  static const char *get_key_value (char *);
  static char *translate_name (char *);
-@@ -212,7 +214,7 @@ translate_name (char *name)
+@@ -213,7 +215,7 @@ translate_name (char *name)
  	prefix = getenv (key);
  
        if (prefix == 0)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index 9b05da6..d0aeeb2 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -1,8 +1,7 @@
-From 33a1f07a4417247dc24819d4e583ca09f56d5a7b Mon Sep 17 00:00:00 2001
+From 0058f8a2233d9e96e39d09f4d994da3c96f9e030 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH] Search target sysroot gcc version specific dirs with
- multilib.
+Subject: [PATCH] Search target sysroot gcc version specific dirs with multilib.
 
 We install the gcc libraries (such as crtbegin.p) into
 <sysroot><libdir>/<target-sys>/5.2.0/
@@ -42,19 +41,20 @@
 <sysroot>/lib32/
 <sysroot>/usr/lib32/
 
-Upstream-Status: Pending
 RP 2015/7/31
 
+Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2023-April/615320.html]
+
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  gcc/gcc.cc | 29 ++++++++++++++++++++++++++++-
  1 file changed, 28 insertions(+), 1 deletion(-)
 
 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
-index 5569a39a14a..4598f6cd7c9 100644
+index 605fe3b8c0d..c3a1dab38c4 100644
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -2817,7 +2817,7 @@ for_each_path (const struct path_prefix *paths,
+@@ -2809,7 +2809,7 @@ for_each_path (const struct path_prefix *paths,
        if (path == NULL)
  	{
  	  len = paths->max_len + extra_space + 1;
@@ -63,7 +63,7 @@
  	  path = XNEWVEC (char, len);
  	}
  
-@@ -2829,6 +2829,33 @@ for_each_path (const struct path_prefix *paths,
+@@ -2821,6 +2821,33 @@ for_each_path (const struct path_prefix *paths,
  	  /* Look first in MACHINE/VERSION subdirectory.  */
  	  if (!skip_multi_dir)
  	    {
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
index 56793e0..9545e76 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
@@ -1,4 +1,4 @@
-From d7dc2861840e88a4592817a398a054a886c3f3ee Mon Sep 17 00:00:00 2001
+From 0a194b74f0f171b46527ff447c27fbf32406333d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 27 Jun 2017 18:10:54 -0700
 Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets
@@ -23,10 +23,10 @@
  3 files changed, 27 insertions(+)
 
 diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 58143dff731..d2409ccac26 100644
+index c921cf6ef63..32e1bc1ae2d 100644
 --- a/gcc/config/linux.h
 +++ b/gcc/config/linux.h
-@@ -208,6 +208,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -195,6 +195,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
      { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 },		\
      { 0, 0, 0, 0, 0, 0 }				\
    }
@@ -41,7 +41,7 @@
  
  #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
 diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
-index 8c9039ac1e5..259cd485973 100644
+index 5d21befe8e4..1248a68e4ca 100644
 --- a/gcc/config/rs6000/linux.h
 +++ b/gcc/config/rs6000/linux.h
 @@ -99,6 +99,16 @@
@@ -62,7 +62,7 @@
  #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
    %{!static-pie: \
 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 364c1a5b155..e33d9ae98e0 100644
+index 2ddab7c99c1..9641580fc83 100644
 --- a/gcc/config/rs6000/linux64.h
 +++ b/gcc/config/rs6000/linux64.h
 @@ -372,6 +372,16 @@ extern int dot_symbols;
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch b/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
index bb1699b..409dff3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch
@@ -1,4 +1,4 @@
-From bf0d7c463e1fab62804556099b56319fe94be1eb Mon Sep 17 00:00:00 2001
+From 0b83874fd8e767248adffd616bcd07aa438b6905 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 6 Jun 2018 12:10:22 -0700
 Subject: [PATCH] Re-introduce spe commandline options
@@ -14,10 +14,10 @@
  1 file changed, 13 insertions(+)
 
 diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
-index 4931d781c4e..3fb87b6f7d5 100644
+index bde6d3ff664..5af9640825c 100644
 --- a/gcc/config/rs6000/rs6000.opt
 +++ b/gcc/config/rs6000/rs6000.opt
-@@ -348,6 +348,19 @@ mdebug=
+@@ -344,6 +344,19 @@ mdebug=
  Target RejectNegative Joined
  -mdebug=	Enable debug output.
  
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index f370920..205fdb6 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -1,4 +1,4 @@
-From a32c75b37209d6836eaaa943dc6b1207acba5d27 Mon Sep 17 00:00:00 2001
+From d8b6f60d1206a67c640096bac3b348828914163c Mon Sep 17 00:00:00 2001
 From: Szabolcs Nagy <nsz@port70.net>
 Date: Sat, 24 Oct 2015 20:09:53 +0000
 Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of
@@ -39,10 +39,10 @@
  3 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
-index 68978ef8dc2..0c71f36b572 100644
+index 0d817fc3f3b..8d34d19d3f9 100644
 --- a/gcc/config/i386/i386-expand.cc
 +++ b/gcc/config/i386/i386-expand.cc
-@@ -12321,10 +12321,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
      {
      case IX86_BUILTIN_CPU_INIT:
        {
@@ -56,7 +56,7 @@
  	return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
        }
 diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index dab1d98060f..cf824b4114a 100644
+index 50b6d8248a2..724ced402a1 100644
 --- a/libgcc/config/i386/cpuinfo.c
 +++ b/libgcc/config/i386/cpuinfo.c
 @@ -63,7 +63,7 @@ __cpu_indicator_init (void)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
index f5f04ae..43df7fc 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
@@ -1,4 +1,4 @@
-From 4efc42b99c96b026f560b0918de7e237ac3dc8d1 Mon Sep 17 00:00:00 2001
+From 18f400d6c91b800361af633b6b93a9e5881bbb0f Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Tue, 10 Mar 2020 08:26:53 -0700
 Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining
@@ -17,10 +17,10 @@
  2 files changed, 19 insertions(+), 19 deletions(-)
 
 diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
-index 386ae1b0506..9762e914296 100644
+index 7763f40e9ab..4f0c1eb1508 100644
 --- a/gcc/gengtype.cc
 +++ b/gcc/gengtype.cc
-@@ -1006,7 +1006,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt,
+@@ -1005,7 +1005,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt,
  /* Create a fake field with the given type and name.  NEXT is the next
     field in the chain.  */
  #define create_field(next,type,name) \
@@ -29,7 +29,7 @@
  
  /* Like create_field, but the field is only valid when condition COND
     is true.  */
-@@ -1039,7 +1039,7 @@ create_optional_field_ (pair_p next, type_p type, const char *name,
+@@ -1038,7 +1038,7 @@ create_optional_field_ (pair_p next, type_p type, const char *name,
  }
  
  #define create_optional_field(next,type,name,cond)	\
@@ -38,7 +38,7 @@
  
  /* Reverse a linked list of 'struct pair's in place.  */
  pair_p
-@@ -5238,7 +5238,7 @@ main (int argc, char **argv)
+@@ -5223,7 +5223,7 @@ main (int argc, char **argv)
        /* These types are set up with #define or else outside of where
           we can see them.  We should initialize them before calling
           read_input_list.  */
@@ -48,10 +48,10 @@
        POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos));
        POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos));
 diff --git a/gcc/genmodes.cc b/gcc/genmodes.cc
-index 59850bb070a..e187f8542a1 100644
+index 715787b8f48..302adff28d5 100644
 --- a/gcc/genmodes.cc
 +++ b/gcc/genmodes.cc
-@@ -440,7 +440,7 @@ complete_all_modes (void)
+@@ -441,7 +441,7 @@ complete_all_modes (void)
  }
  
  /* For each mode in class CLASS, construct a corresponding complex mode.  */
@@ -60,7 +60,7 @@
  static void
  make_complex_modes (enum mode_class cl,
  		    const char *file, unsigned int line)
-@@ -499,7 +499,7 @@ make_complex_modes (enum mode_class cl,
+@@ -500,7 +500,7 @@ make_complex_modes (enum mode_class cl,
     having as many components as necessary.  ORDER is the sorting order
     of the mode, with smaller numbers indicating a higher priority.  */
  #define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER) \
@@ -69,7 +69,7 @@
  #define VECTOR_MODES(C, W) VECTOR_MODES_WITH_PREFIX (V, C, W, 0)
  static void ATTRIBUTE_UNUSED
  make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
-@@ -552,7 +552,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
+@@ -553,7 +553,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
     BYTESIZE bytes in total.  */
  #define VECTOR_BOOL_MODE(NAME, COUNT, COMPONENT, BYTESIZE)		\
    make_vector_bool_mode (#NAME, COUNT, #COMPONENT, BYTESIZE,		\
@@ -78,7 +78,7 @@
  static void ATTRIBUTE_UNUSED
  make_vector_bool_mode (const char *name, unsigned int count,
  		       const char *component, unsigned int bytesize,
-@@ -574,7 +574,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
+@@ -575,7 +575,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
  /* Input.  */
  
  #define _SPECIAL_MODE(C, N) \
@@ -87,7 +87,7 @@
  #define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N)
  #define CC_MODE(N) _SPECIAL_MODE (CC, N)
  
-@@ -587,7 +587,7 @@ make_special_mode (enum mode_class cl, const char *name,
+@@ -588,7 +588,7 @@ make_special_mode (enum mode_class cl, const char *name,
  
  #define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
  #define FRACTIONAL_INT_MODE(N, B, Y) \
@@ -96,7 +96,7 @@
  
  static void
  make_int_mode (const char *name,
-@@ -628,16 +628,16 @@ make_opaque_mode (const char *name,
+@@ -629,16 +629,16 @@ make_opaque_mode (const char *name,
  }
  
  #define FRACT_MODE(N, Y, F) \
@@ -117,7 +117,7 @@
  
  /* Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT,
     FILE, and LINE.  */
-@@ -658,7 +658,7 @@ make_fixed_point_mode (enum mode_class cl,
+@@ -659,7 +659,7 @@ make_fixed_point_mode (enum mode_class cl,
  
  #define FLOAT_MODE(N, Y, F)             FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
  #define FRACTIONAL_FLOAT_MODE(N, B, Y, F) \
@@ -126,7 +126,7 @@
  
  static void
  make_float_mode (const char *name,
-@@ -675,7 +675,7 @@ make_float_mode (const char *name,
+@@ -676,7 +676,7 @@ make_float_mode (const char *name,
  #define DECIMAL_FLOAT_MODE(N, Y, F)	\
  	FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)
  #define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F)	\
@@ -135,7 +135,7 @@
  
  static void
  make_decimal_float_mode (const char *name,
-@@ -690,7 +690,7 @@ make_decimal_float_mode (const char *name,
+@@ -691,7 +691,7 @@ make_decimal_float_mode (const char *name,
  }
  
  #define RESET_FLOAT_FORMAT(N, F) \
@@ -144,7 +144,7 @@
  static void ATTRIBUTE_UNUSED
  reset_float_format (const char *name, const char *format,
  		    const char *file, unsigned int line)
-@@ -711,7 +711,7 @@ reset_float_format (const char *name, const char *format,
+@@ -712,7 +712,7 @@ reset_float_format (const char *name, const char *format,
  
  /* __intN support.  */
  #define INT_N(M,PREC)				\
@@ -153,7 +153,7 @@
  static void ATTRIBUTE_UNUSED
  make_int_n (const char *m, int bitsize,
              const char *file, unsigned int line)
-@@ -740,7 +740,7 @@ make_int_n (const char *m, int bitsize,
+@@ -741,7 +741,7 @@ make_int_n (const char *m, int bitsize,
  /* Partial integer modes are specified by relation to a full integer
     mode.  */
  #define PARTIAL_INT_MODE(M,PREC,NAME)				\
@@ -162,7 +162,7 @@
  static void ATTRIBUTE_UNUSED
  make_partial_integer_mode (const char *base, const char *name,
  			   unsigned int precision,
-@@ -767,7 +767,7 @@ make_partial_integer_mode (const char *base, const char *name,
+@@ -768,7 +768,7 @@ make_partial_integer_mode (const char *base, const char *name,
  /* A single vector mode can be specified by naming its component
     mode and the number of components.  */
  #define VECTOR_MODE_WITH_PREFIX(PREFIX, C, M, N, ORDER) \
@@ -171,7 +171,7 @@
  #define VECTOR_MODE(C, M, N) VECTOR_MODE_WITH_PREFIX(V, C, M, N, 0);
  static void ATTRIBUTE_UNUSED
  make_vector_mode (enum mode_class bclass,
-@@ -814,7 +814,7 @@ make_vector_mode (enum mode_class bclass,
+@@ -815,7 +815,7 @@ make_vector_mode (enum mode_class bclass,
  
  /* Adjustability.  */
  #define _ADD_ADJUST(A, M, X, C1, C2) \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch b/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
similarity index 81%
rename from poky/meta/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
index 2f01659..cb8969b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
@@ -1,4 +1,4 @@
-From 52931ec7a708b58d68e69ce9eb99001ae9f099dd Mon Sep 17 00:00:00 2001
+From c3870d073eb9e5d82f9d3067d0fa15038b69713a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 13 May 2020 15:10:38 -0700
 Subject: [PATCH] libatomic: Do not enforce march on aarch64
@@ -17,7 +17,7 @@
  2 files changed, 2 deletions(-)
 
 diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index d88515e4a03..e0e2f8b442a 100644
+index c6c8d81c56a..d959a5d040e 100644
 --- a/libatomic/Makefile.am
 +++ b/libatomic/Makefile.am
 @@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
@@ -26,16 +26,16 @@
  if ARCH_AARCH64_LINUX
 -IFUNC_OPTIONS	     = -march=armv8-a+lse
  libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
- endif
- if ARCH_ARM_LINUX
+ libatomic_la_SOURCES += atomic_16.S
+ 
 diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index 80d25653dc7..7377689ab34 100644
+index a0fa3dfc8cc..e70d389874a 100644
 --- a/libatomic/Makefile.in
 +++ b/libatomic/Makefile.in
-@@ -434,7 +434,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
+@@ -447,7 +447,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
  libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
- 	_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
- 	$(am__append_3) $(am__append_4)
+ 	_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_3) \
+ 	$(am__append_4) $(am__append_5)
 -@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
  @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
  @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch b/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
similarity index 85%
rename from poky/meta/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
index 555be62..11f42c5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch
@@ -1,4 +1,4 @@
-From 3e67c9c77e46132c252911bf1e5e4222dfd3aa34 Mon Sep 17 00:00:00 2001
+From 7bd6e631e4a5273f5ecc41a5a48830a1342e5926 Mon Sep 17 00:00:00 2001
 From: Andrei Gherzan <andrei.gherzan@huawei.com>
 Date: Wed, 22 Dec 2021 12:49:25 +0100
 Subject: [PATCH] Fix install path of linux64.h
@@ -17,10 +17,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 07fa63b6640..0def7394454 100644
+index 065ce7e9a5b..d4c723968aa 100644
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -3706,6 +3706,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+@@ -3738,6 +3738,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
  	  "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
  	  | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
  	    base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
new file mode 100644
index 0000000..ad82690
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
@@ -0,0 +1,28 @@
+From 4623d87d779853a2862ee92a15a41fded81eddb8 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Sat, 20 Aug 2022 09:04:14 -0700
+Subject: [PATCH] Avoid hardcoded build paths into ppc libgcc
+
+Avoid encoding build paths into sources used for floating point on powerpc.
+(MACHINE=qemuppc bitbake libgcc).
+
+Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/config/rs6000/t-float128 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
+index b09b5664af0..513e63748f1 100644
+--- a/libgcc/config/rs6000/t-float128
++++ b/libgcc/config/rs6000/t-float128
+@@ -103,7 +103,7 @@ $(ibm128_dec_objs)	: INTERNAL_CFLAGS += $(IBM128_CFLAGS_DECIMAL)
+ $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
+ 	@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
+ 	echo "Create $@"; \
+-	(echo "/* file created from $$src */"; \
++	(echo "/* file created from `basename $$src` */"; \
+ 	 echo; \
+ 	 sed -f $(fp128_sed) < $$src) > $@
+ 
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch b/poky/meta/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch
deleted file mode 100644
index bbe2f18..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 9234cdca6ee88badfc00297e72f13dac4e540c79 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Fri, 1 Jul 2022 15:58:52 +0100
-Subject: [PATCH] Add a recursion limit to the demangle_const function in the
- Rust demangler.
-
-libiberty/
-	PR demangler/105039
-	* rust-demangle.c (demangle_const): Add recursion limit.
-
-Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9234cdca6ee88badfc00297e72f13dac4e540c79]
----
- libiberty/rust-demangle.c | 29 ++++++++++++++++++++---------
- 1 file changed, 20 insertions(+), 9 deletions(-)
-
-diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
-index bb58d900e27..36afcfae278 100644
---- a/libiberty/rust-demangle.c
-+++ b/libiberty/rust-demangle.c
-@@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm)
-     return 0;
- 
-   x = 0;
--  while (!eat (rdm, '_'))
-+  while (!eat (rdm, '_') && !rdm->errored)
-     {
-       c = next (rdm);
-       x *= 62;
-@@ -1148,6 +1148,15 @@ demangle_const (struct rust_demangler *rdm)
-   if (rdm->errored)
-     return;
- 
-+  if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
-+    {
-+      ++ rdm->recursion;
-+      if (rdm->recursion > RUST_MAX_RECURSION_COUNT)
-+	/* FIXME: There ought to be a way to report
-+	   that the recursion limit has been reached.  */
-+	goto fail_return;
-+    }
-+
-   if (eat (rdm, 'B'))
-     {
-       backref = parse_integer_62 (rdm);
-@@ -1158,7 +1167,7 @@ demangle_const (struct rust_demangler *rdm)
-           demangle_const (rdm);
-           rdm->next = old_next;
-         }
--      return;
-+      goto pass_return;
-     }
- 
-   ty_tag = next (rdm);
-@@ -1167,7 +1176,7 @@ demangle_const (struct rust_demangler *rdm)
-     /* Placeholder. */
-     case 'p':
-       PRINT ("_");
--      return;
-+      goto pass_return;
- 
-     /* Unsigned integer types. */
-     case 'h':
-@@ -1200,18 +1209,20 @@ demangle_const (struct rust_demangler *rdm)
-       break;
- 
-     default:
--      rdm->errored = 1;
--      return;
-+      goto fail_return;
-     }
- 
--  if (rdm->errored)
--    return;
--
--  if (rdm->verbose)
-+  if (!rdm->errored && rdm->verbose)
-     {
-       PRINT (": ");
-       PRINT (basic_type (ty_tag));
-     }
-+
-+ fail_return:
-+  rdm->errored = 1;
-+ pass_return:
-+  if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
-+    -- rdm->recursion;
- }
- 
- static void
--- 
-2.31.1
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/hardcoded-paths.patch b/poky/meta/recipes-devtools/gcc/gcc/hardcoded-paths.patch
deleted file mode 100644
index f348585..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/hardcoded-paths.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Avoid encoding build paths into sources used for floating point on powerpc.
-(MACHINE=qemuppc bitbake libgcc).
-
-Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html]
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Index: gcc-12.1.0/libgcc/config/rs6000/t-float128
-===================================================================
---- gcc-12.1.0.orig/libgcc/config/rs6000/t-float128
-+++ gcc-12.1.0/libgcc/config/rs6000/t-float128
-@@ -103,7 +103,7 @@ $(ibm128_dec_objs)	: INTERNAL_CFLAGS +=
- $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
- 	@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
- 	echo "Create $@"; \
--	(echo "/* file created from $$src */"; \
-+	(echo "/* file created from `basename $$src` */"; \
- 	 echo; \
- 	 sed -f $(fp128_sed) < $$src) > $@
- 
diff --git a/poky/meta/recipes-devtools/gcc/gcc/prefix-map-realpath.patch b/poky/meta/recipes-devtools/gcc/gcc/prefix-map-realpath.patch
deleted file mode 100644
index 7f1a2de..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/prefix-map-realpath.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Relative paths don't work with -fdebug-prefix-map and friends. This
-can lead to paths which the user wanted to be remapped being missed.
-Setting -fdebug-prefix-map to work with a relative path isn't practical
-either.
-
-Instead, call gcc's realpath function on the incomming path name before
-comparing it with the remapping. This means other issues like symlinks
-are also accounted for and leads to a more consistent remapping experience.
-
-Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599885.html]
-[Also https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599884.html]
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-
-Index: gcc-12.1.0/gcc/file-prefix-map.cc
-===================================================================
---- gcc-12.1.0.orig/gcc/file-prefix-map.cc
-+++ gcc-12.1.0/gcc/file-prefix-map.cc
-@@ -70,19 +70,28 @@ remap_filename (file_prefix_map *maps, c
-   file_prefix_map *map;
-   char *s;
-   const char *name;
-+  char *realname;
-   size_t name_len;
- 
-+  if (lbasename (filename) == filename)
-+    return filename;
-+
-+  realname = lrealpath (filename);
-+
-   for (map = maps; map; map = map->next)
--    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+    if (filename_ncmp (realname, map->old_prefix, map->old_len) == 0)
-       break;
--  if (!map)
-+  if (!map) {
-+    free (realname);
-     return filename;
--  name = filename + map->old_len;
-+  }
-+  name = realname + map->old_len;
-   name_len = strlen (name) + 1;
- 
-   s = (char *) ggc_alloc_atomic (name_len + map->new_len);
-   memcpy (s, map->new_prefix, map->new_len);
-   memcpy (s + map->new_len, name, name_len);
-+  free (realname);
-   return s;
- }
- 
-Index: gcc-12.1.0/libcpp/macro.cc
-===================================================================
---- gcc-12.1.0.orig/libcpp/macro.cc
-+++ gcc-12.1.0/libcpp/macro.cc
-@@ -563,7 +563,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
- 	    if (!name)
- 	      abort ();
- 	  }
--	if (pfile->cb.remap_filename)
-+	if (pfile->cb.remap_filename && !pfile->state.in_directive)
- 	  name = pfile->cb.remap_filename (name);
- 	len = strlen (name);
- 	buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
diff --git a/poky/meta/recipes-devtools/gcc/gcc_12.2.bb b/poky/meta/recipes-devtools/gcc/gcc_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc_12.2.bb
rename to poky/meta/recipes-devtools/gcc/gcc_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-initial_12.2.bb b/poky/meta/recipes-devtools/gcc/libgcc-initial_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgcc-initial_12.2.bb
rename to poky/meta/recipes-devtools/gcc/libgcc-initial_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc_12.2.bb b/poky/meta/recipes-devtools/gcc/libgcc_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgcc_12.2.bb
rename to poky/meta/recipes-devtools/gcc/libgcc_13.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran_12.2.bb b/poky/meta/recipes-devtools/gcc/libgfortran_13.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgfortran_12.2.bb
rename to poky/meta/recipes-devtools/gcc/libgfortran_13.1.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb-common.inc b/poky/meta/recipes-devtools/gdb/gdb-common.inc
index 9db61b7..12292f0 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -30,10 +30,10 @@
                 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
 "
 
-PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
+PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python"
 # Use --without-system-readline to compile with readline 5.
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs"
 PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 # ncurses is already a hard DEPENDS, but would be added here if it weren't
 PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
diff --git a/poky/meta/recipes-devtools/go/go-1.20.1.inc b/poky/meta/recipes-devtools/go/go-1.20.4.inc
similarity index 76%
rename from poky/meta/recipes-devtools/go/go-1.20.1.inc
rename to poky/meta/recipes-devtools/go/go-1.20.4.inc
index 179f0e2..05bc168 100644
--- a/poky/meta/recipes-devtools/go/go-1.20.1.inc
+++ b/poky/meta/recipes-devtools/go/go-1.20.4.inc
@@ -14,8 +14,5 @@
     file://0007-exec.go-do-not-write-linker-flags-into-buildids.patch \
     file://0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
     file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \
-    file://0010-cmd-compile-re-compile-instantiated-generic-methods-.patch \
-    file://CVE-2023-24532.patch \
-    file://CVE-2023-24537.patch \
 "
-SRC_URI[main.sha256sum] = "b5c1a3af52c385a6d1c76aed5361cf26459023980d0320de7658bae3915831a2"
+SRC_URI[main.sha256sum] = "9f34ace128764b7a3a4b238b805856cc1b2184304df9e5690825b0710f4202d6"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.20.1.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.20.4.bb
similarity index 78%
rename from poky/meta/recipes-devtools/go/go-binary-native_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-binary-native_1.20.4.bb
index 2393345..87ce8a5 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.20.1.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.20.4.bb
@@ -9,9 +9,9 @@
 
 # Checksums available at https://go.dev/dl/
 SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
-SRC_URI[go_linux_amd64.sha256sum] = "000a5b1fca4f75895f78befeb2eecf10bfff3c428597f3f1e69133b63b911b02"
-SRC_URI[go_linux_arm64.sha256sum] = "5e5e2926733595e6f3c5b5ad1089afac11c1490351855e87849d0e7702b1ec2e"
-SRC_URI[go_linux_ppc64le.sha256sum] = "85cfd4b89b48c94030783b6e9e619e35557862358b846064636361421d0b0c52"
+SRC_URI[go_linux_amd64.sha256sum] = "698ef3243972a51ddb4028e4a1ac63dc6d60821bf18e59a807e051fee0a385bd"
+SRC_URI[go_linux_arm64.sha256sum] = "105889992ee4b1d40c7c108555222ca70ae43fccb42e20fbf1eebb822f5e72c6"
+SRC_URI[go_linux_ppc64le.sha256sum] = "8c6f44b96c2719c90eebabe2dd866f9c39538648f7897a212cac448587e9a408"
 
 UPSTREAM_CHECK_URI = "https://golang.org/dl/"
 UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.20.1.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.20.4.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross-canadian_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-cross-canadian_1.20.4.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.20.1.bb b/poky/meta/recipes-devtools/go/go-cross_1.20.4.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-cross_1.20.4.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.20.1.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.20.4.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-crosssdk_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-crosssdk_1.20.4.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.20.1.bb b/poky/meta/recipes-devtools/go/go-native_1.20.4.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-native_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-native_1.20.4.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.20.1.bb b/poky/meta/recipes-devtools/go/go-runtime_1.20.4.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-runtime_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go-runtime_1.20.4.bb
diff --git a/poky/meta/recipes-devtools/go/go/0010-cmd-compile-re-compile-instantiated-generic-methods-.patch b/poky/meta/recipes-devtools/go/go/0010-cmd-compile-re-compile-instantiated-generic-methods-.patch
deleted file mode 100644
index f9ac202..0000000
--- a/poky/meta/recipes-devtools/go/go/0010-cmd-compile-re-compile-instantiated-generic-methods-.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 7a3bb16b43efba73674629eae4369f9004e37f22 Mon Sep 17 00:00:00 2001
-From: Cuong Manh Le <cuong.manhle.vn@gmail.com>
-Date: Sat, 18 Mar 2023 00:53:07 +0700
-Subject: [PATCH] cmd/compile: re-compile instantiated generic methods in
- linkshared mode
-
-For G[T] that was seen and compiled in imported package, it is not added
-to typecheck.Target.Decls, prevent wasting compile time re-creating
-DUPOKS symbols. However, the linker do not support a type symbol
-referencing a method symbol across DSO boundary. That causes unreachable
-sym error when building under -linkshared mode.
-
-To fix it, always re-compile generic methods in linkshared mode.
-
-Fixes #58966
-
-Change-Id: I894b417cfe8234ae1fe809cc975889345df22cef
-Reviewed-on: https://go-review.googlesource.com/c/go/+/477375
-Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
-Reviewed-by: Cherry Mui <cherryyz@google.com>
-Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-TryBot-Result: Gopher Robot <gobot@golang.org>
-
-Upstream-Status: Backport [https://github.com/golang/go/commit/bcd82125f85c7c552493e863fa1bb14e6c444557]
-
-Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
----
- misc/cgo/testshared/shared_test.go              |  7 ++++++-
- misc/cgo/testshared/testdata/issue58966/main.go | 15 +++++++++++++++
- src/cmd/compile/internal/noder/unified.go       |  6 +++++-
- 3 files changed, 26 insertions(+), 2 deletions(-)
- create mode 100644 misc/cgo/testshared/testdata/issue58966/main.go
-
-diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go
-index b14fb1cb3a..03da8f9435 100644
---- a/misc/cgo/testshared/shared_test.go
-+++ b/misc/cgo/testshared/shared_test.go
-@@ -1112,8 +1112,13 @@ func TestStd(t *testing.T) {
- 		t.Skip("skip in short mode")
- 	}
- 	t.Parallel()
-+	tmpDir := t.TempDir()
- 	// Use a temporary pkgdir to not interfere with other tests, and not write to GOROOT.
- 	// Cannot use goCmd as it runs with cloned GOROOT which is incomplete.
- 	runWithEnv(t, "building std", []string{"GOROOT=" + oldGOROOT},
--		filepath.Join(oldGOROOT, "bin", "go"), "install", "-buildmode=shared", "-pkgdir="+t.TempDir(), "std")
-+		filepath.Join(oldGOROOT, "bin", "go"), "install", "-buildmode=shared", "-pkgdir="+tmpDir, "std")
-+
-+	// Issue #58966.
-+	runWithEnv(t, "testing issue #58966", []string{"GOROOT=" + oldGOROOT},
-+		filepath.Join(oldGOROOT, "bin", "go"), "run", "-linkshared", "-pkgdir="+tmpDir, "./issue58966/main.go")
- }
-diff --git a/misc/cgo/testshared/testdata/issue58966/main.go b/misc/cgo/testshared/testdata/issue58966/main.go
-new file mode 100644
-index 0000000000..2d923c3607
---- /dev/null
-+++ b/misc/cgo/testshared/testdata/issue58966/main.go
-@@ -0,0 +1,15 @@
-+// Copyright 2023 The Go Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style
-+// license that can be found in the LICENSE file.
-+
-+package main
-+
-+import "crypto/elliptic"
-+
-+var curve elliptic.Curve
-+
-+func main() {
-+	switch curve {
-+	case elliptic.P224():
-+	}
-+}
-diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go
-index ed97a09302..25136e6aad 100644
---- a/src/cmd/compile/internal/noder/unified.go
-+++ b/src/cmd/compile/internal/noder/unified.go
-@@ -158,7 +158,11 @@ func readBodies(target *ir.Package, duringInlining bool) {
- 			// Instantiated generic function: add to Decls for typechecking
- 			// and compilation.
- 			if fn.OClosure == nil && len(pri.dict.targs) != 0 {
--				if duringInlining {
-+				// cmd/link does not support a type symbol referencing a method symbol
-+				// across DSO boundary, so force re-compiling methods on a generic type
-+				// even it was seen from imported package in linkshared mode, see #58966.
-+				canSkipNonGenericMethod := !(base.Ctxt.Flag_linkshared && ir.IsMethod(fn))
-+				if duringInlining && canSkipNonGenericMethod {
- 					inlDecls = append(inlDecls, fn)
- 				} else {
- 					target.Decls = append(target.Decls, fn)
diff --git a/poky/meta/recipes-devtools/go/go/CVE-2023-24532.patch b/poky/meta/recipes-devtools/go/go/CVE-2023-24532.patch
deleted file mode 100644
index 22f080d..0000000
--- a/poky/meta/recipes-devtools/go/go/CVE-2023-24532.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From 602eeaab387f24a4b28c5eccbb50fa934f3bc3c4 Mon Sep 17 00:00:00 2001
-From: Filippo Valsorda <filippo@golang.org>
-Date: Mon, 13 Feb 2023 15:16:27 +0100
-Subject: [PATCH] [release-branch.go1.20] crypto/internal/nistec: reduce P-256
- scalar
-
-Unlike the rest of nistec, the P-256 assembly doesn't use complete
-addition formulas, meaning that p256PointAdd[Affine]Asm won't return the
-correct value if the two inputs are equal.
-
-This was (undocumentedly) ignored in the scalar multiplication loops
-because as long as the input point is not the identity and the scalar is
-lower than the order of the group, the addition inputs can't be the same.
-
-As part of the math/big rewrite, we went however from always reducing
-the scalar to only checking its length, under the incorrect assumption
-that the scalar multiplication loop didn't require reduction.
-
-Added a reduction, and while at it added it in P256OrdInverse, too, to
-enforce a universal reduction invariant on p256OrdElement values.
-
-Note that if the input point is the infinity, the code currently still
-relies on undefined behavior, but that's easily tested to behave
-acceptably, and will be addressed in a future CL.
-
-Updates #58647
-Fixes #58720
-Fixes CVE-2023-24532
-
-(Filed with the "safe APIs like complete addition formulas are good" dept.)
-
-Change-Id: I7b2c75238440e6852be2710fad66ff1fdc4e2b24
-Reviewed-on: https://go-review.googlesource.com/c/go/+/471255
-TryBot-Result: Gopher Robot <gobot@golang.org>
-Reviewed-by: Roland Shoemaker <roland@golang.org>
-Run-TryBot: Filippo Valsorda <filippo@golang.org>
-Auto-Submit: Filippo Valsorda <filippo@golang.org>
-Reviewed-by: Damien Neil <dneil@google.com>
-(cherry picked from commit 203e59ad41bd288e1d92b6f617c2f55e70d3c8e3)
-Reviewed-on: https://go-review.googlesource.com/c/go/+/471695
-Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
-Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
-Reviewed-by: Filippo Valsorda <filippo@golang.org>
-Run-TryBot: Roland Shoemaker <roland@golang.org>
-
-CVE: CVE-2023-24532
-Upstream-Status: Backport [602eeaab387f24a4b28c5eccbb50fa934f3bc3c4]
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
----
- src/crypto/internal/nistec/nistec_test.go | 81 +++++++++++++++++++++++
- src/crypto/internal/nistec/p256_asm.go    | 17 +++++
- src/crypto/internal/nistec/p256_ordinv.go |  1 +
- 3 files changed, 99 insertions(+)
-
-diff --git a/src/crypto/internal/nistec/nistec_test.go b/src/crypto/internal/nistec/nistec_test.go
-index 309f68be16a9f..9103608c18a0f 100644
---- a/src/crypto/internal/nistec/nistec_test.go
-+++ b/src/crypto/internal/nistec/nistec_test.go
-@@ -8,6 +8,7 @@ import (
- 	"bytes"
- 	"crypto/elliptic"
- 	"crypto/internal/nistec"
-+	"fmt"
- 	"internal/testenv"
- 	"math/big"
- 	"math/rand"
-@@ -165,6 +166,86 @@ func testEquivalents[P nistPoint[P]](t *testing.T, newPoint func() P, c elliptic
- 	}
- }
- 
-+func TestScalarMult(t *testing.T) {
-+	t.Run("P224", func(t *testing.T) {
-+		testScalarMult(t, nistec.NewP224Point, elliptic.P224())
-+	})
-+	t.Run("P256", func(t *testing.T) {
-+		testScalarMult(t, nistec.NewP256Point, elliptic.P256())
-+	})
-+	t.Run("P384", func(t *testing.T) {
-+		testScalarMult(t, nistec.NewP384Point, elliptic.P384())
-+	})
-+	t.Run("P521", func(t *testing.T) {
-+		testScalarMult(t, nistec.NewP521Point, elliptic.P521())
-+	})
-+}
-+
-+func testScalarMult[P nistPoint[P]](t *testing.T, newPoint func() P, c elliptic.Curve) {
-+	G := newPoint().SetGenerator()
-+	checkScalar := func(t *testing.T, scalar []byte) {
-+		p1, err := newPoint().ScalarBaseMult(scalar)
-+		fatalIfErr(t, err)
-+		p2, err := newPoint().ScalarMult(G, scalar)
-+		fatalIfErr(t, err)
-+		if !bytes.Equal(p1.Bytes(), p2.Bytes()) {
-+			t.Error("[k]G != ScalarBaseMult(k)")
-+		}
-+
-+		d := new(big.Int).SetBytes(scalar)
-+		d.Sub(c.Params().N, d)
-+		d.Mod(d, c.Params().N)
-+		g1, err := newPoint().ScalarBaseMult(d.FillBytes(make([]byte, len(scalar))))
-+		fatalIfErr(t, err)
-+		g1.Add(g1, p1)
-+		if !bytes.Equal(g1.Bytes(), newPoint().Bytes()) {
-+			t.Error("[N - k]G + [k]G != ∞")
-+		}
-+	}
-+
-+	byteLen := len(c.Params().N.Bytes())
-+	bitLen := c.Params().N.BitLen()
-+	t.Run("0", func(t *testing.T) { checkScalar(t, make([]byte, byteLen)) })
-+	t.Run("1", func(t *testing.T) {
-+		checkScalar(t, big.NewInt(1).FillBytes(make([]byte, byteLen)))
-+	})
-+	t.Run("N-1", func(t *testing.T) {
-+		checkScalar(t, new(big.Int).Sub(c.Params().N, big.NewInt(1)).Bytes())
-+	})
-+	t.Run("N", func(t *testing.T) { checkScalar(t, c.Params().N.Bytes()) })
-+	t.Run("N+1", func(t *testing.T) {
-+		checkScalar(t, new(big.Int).Add(c.Params().N, big.NewInt(1)).Bytes())
-+	})
-+	t.Run("all1s", func(t *testing.T) {
-+		s := new(big.Int).Lsh(big.NewInt(1), uint(bitLen))
-+		s.Sub(s, big.NewInt(1))
-+		checkScalar(t, s.Bytes())
-+	})
-+	if testing.Short() {
-+		return
-+	}
-+	for i := 0; i < bitLen; i++ {
-+		t.Run(fmt.Sprintf("1<<%d", i), func(t *testing.T) {
-+			s := new(big.Int).Lsh(big.NewInt(1), uint(i))
-+			checkScalar(t, s.FillBytes(make([]byte, byteLen)))
-+		})
-+	}
-+	// Test N+1...N+32 since they risk overlapping with precomputed table values
-+	// in the final additions.
-+	for i := int64(2); i <= 32; i++ {
-+		t.Run(fmt.Sprintf("N+%d", i), func(t *testing.T) {
-+			checkScalar(t, new(big.Int).Add(c.Params().N, big.NewInt(i)).Bytes())
-+		})
-+	}
-+}
-+
-+func fatalIfErr(t *testing.T, err error) {
-+	t.Helper()
-+	if err != nil {
-+		t.Fatal(err)
-+	}
-+}
-+
- func BenchmarkScalarMult(b *testing.B) {
- 	b.Run("P224", func(b *testing.B) {
- 		benchmarkScalarMult(b, nistec.NewP224Point().SetGenerator(), 28)
-diff --git a/src/crypto/internal/nistec/p256_asm.go b/src/crypto/internal/nistec/p256_asm.go
-index 6ea161eb49953..99a22b833f028 100644
---- a/src/crypto/internal/nistec/p256_asm.go
-+++ b/src/crypto/internal/nistec/p256_asm.go
-@@ -364,6 +364,21 @@ func p256PointDoubleAsm(res, in *P256Point)
- // Montgomery domain (with R 2²⁵⁶) as four uint64 limbs in little-endian order.
- type p256OrdElement [4]uint64
- 
-+// p256OrdReduce ensures s is in the range [0, ord(G)-1].
-+func p256OrdReduce(s *p256OrdElement) {
-+	// Since 2 * ord(G) > 2²⁵⁶, we can just conditionally subtract ord(G),
-+	// keeping the result if it doesn't underflow.
-+	t0, b := bits.Sub64(s[0], 0xf3b9cac2fc632551, 0)
-+	t1, b := bits.Sub64(s[1], 0xbce6faada7179e84, b)
-+	t2, b := bits.Sub64(s[2], 0xffffffffffffffff, b)
-+	t3, b := bits.Sub64(s[3], 0xffffffff00000000, b)
-+	tMask := b - 1 // zero if subtraction underflowed
-+	s[0] ^= (t0 ^ s[0]) & tMask
-+	s[1] ^= (t1 ^ s[1]) & tMask
-+	s[2] ^= (t2 ^ s[2]) & tMask
-+	s[3] ^= (t3 ^ s[3]) & tMask
-+}
-+
- // Add sets q = p1 + p2, and returns q. The points may overlap.
- func (q *P256Point) Add(r1, r2 *P256Point) *P256Point {
- 	var sum, double P256Point
-@@ -393,6 +408,7 @@ func (r *P256Point) ScalarBaseMult(scalar []byte) (*P256Point, error) {
- 	}
- 	scalarReversed := new(p256OrdElement)
- 	p256OrdBigToLittle(scalarReversed, (*[32]byte)(scalar))
-+	p256OrdReduce(scalarReversed)
- 
- 	r.p256BaseMult(scalarReversed)
- 	return r, nil
-@@ -407,6 +423,7 @@ func (r *P256Point) ScalarMult(q *P256Point, scalar []byte) (*P256Point, error)
- 	}
- 	scalarReversed := new(p256OrdElement)
- 	p256OrdBigToLittle(scalarReversed, (*[32]byte)(scalar))
-+	p256OrdReduce(scalarReversed)
- 
- 	r.Set(q).p256ScalarMult(scalarReversed)
- 	return r, nil
-diff --git a/src/crypto/internal/nistec/p256_ordinv.go b/src/crypto/internal/nistec/p256_ordinv.go
-index 86a7a230bdce8..1274fb7fd3f5c 100644
---- a/src/crypto/internal/nistec/p256_ordinv.go
-+++ b/src/crypto/internal/nistec/p256_ordinv.go
-@@ -25,6 +25,7 @@ func P256OrdInverse(k []byte) ([]byte, error) {
- 
- 	x := new(p256OrdElement)
- 	p256OrdBigToLittle(x, (*[32]byte)(k))
-+	p256OrdReduce(x)
- 
- 	// Inversion is implemented as exponentiation by n - 2, per Fermat's little theorem.
- 	//
diff --git a/poky/meta/recipes-devtools/go/go/CVE-2023-24537.patch b/poky/meta/recipes-devtools/go/go/CVE-2023-24537.patch
deleted file mode 100644
index 6b5dc2c..0000000
--- a/poky/meta/recipes-devtools/go/go/CVE-2023-24537.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 110e4fb1c2e3a21631704bbfaf672230b9ba2492 Mon Sep 17 00:00:00 2001
-From: Damien Neil <dneil@google.com>
-Date: Wed, 22 Mar 2023 09:33:22 -0700
-Subject: [PATCH] go/scanner: reject large line and column numbers in //line
- directives
-
-Setting a large line or column number using a //line directive can cause
-integer overflow even in small source files.
-
-Limit line and column numbers in //line directives to 2^30-1, which
-is small enough to avoid int32 overflow on all reasonbly-sized files.
-
-For #59180
-Fixes CVE-2023-24537
-
-Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802456
-Reviewed-by: Julie Qiu <julieqiu@google.com>
-Reviewed-by: Roland Shoemaker <bracewell@google.com>
-Run-TryBot: Damien Neil <dneil@google.com>
-Change-Id: I149bf34deca532af7994203fa1e6aca3c890ea14
-Reviewed-on: https://go-review.googlesource.com/c/go/+/482078
-Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
-Run-TryBot: Michael Knyszek <mknyszek@google.com>
-Auto-Submit: Michael Knyszek <mknyszek@google.com>
-
-CVE: CVE-2023-24537
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
----
- src/go/parser/parser_test.go | 16 ++++++++++++++++
- src/go/scanner/scanner.go    |  7 +++++--
- 2 files changed, 21 insertions(+), 2 deletions(-)
-
-diff --git a/src/go/parser/parser_test.go b/src/go/parser/parser_test.go
-index 153562df75068..22b11a0cc4535 100644
---- a/src/go/parser/parser_test.go
-+++ b/src/go/parser/parser_test.go
-@@ -764,3 +764,19 @@ func TestRangePos(t *testing.T) {
- 		})
- 	}
- }
-+
-+// TestIssue59180 tests that line number overflow doesn't cause an infinite loop.
-+func TestIssue59180(t *testing.T) {
-+	testcases := []string{
-+		"package p\n//line :9223372036854775806\n\n//",
-+		"package p\n//line :1:9223372036854775806\n\n//",
-+		"package p\n//line file:9223372036854775806\n\n//",
-+	}
-+
-+	for _, src := range testcases {
-+		_, err := ParseFile(token.NewFileSet(), "", src, ParseComments)
-+		if err == nil {
-+			t.Errorf("ParseFile(%s) succeeded unexpectedly", src)
-+		}
-+	}
-+}
-diff --git a/src/go/scanner/scanner.go b/src/go/scanner/scanner.go
-index 16958d22ce299..0cd9f5901d0bb 100644
---- a/src/go/scanner/scanner.go
-+++ b/src/go/scanner/scanner.go
-@@ -253,13 +253,16 @@ func (s *Scanner) updateLineInfo(next, offs int, text []byte) {
- 		return
- 	}
- 
-+	// Put a cap on the maximum size of line and column numbers.
-+	// 30 bits allows for some additional space before wrapping an int32.
-+	const maxLineCol = 1<<30 - 1
- 	var line, col int
- 	i2, n2, ok2 := trailingDigits(text[:i-1])
- 	if ok2 {
- 		//line filename:line:col
- 		i, i2 = i2, i
- 		line, col = n2, n
--		if col == 0 {
-+		if col == 0 || col > maxLineCol {
- 			s.error(offs+i2, "invalid column number: "+string(text[i2:]))
- 			return
- 		}
-@@ -269,7 +272,7 @@ func (s *Scanner) updateLineInfo(next, offs int, text []byte) {
- 		line = n
- 	}
- 
--	if line == 0 {
-+	if line == 0 || line > maxLineCol {
- 		s.error(offs+i, "invalid line number: "+string(text[i:]))
- 		return
- 	}
diff --git a/poky/meta/recipes-devtools/go/go_1.20.1.bb b/poky/meta/recipes-devtools/go/go_1.20.4.bb
similarity index 91%
rename from poky/meta/recipes-devtools/go/go_1.20.1.bb
rename to poky/meta/recipes-devtools/go/go_1.20.4.bb
index 587ee55..46f5fbc 100644
--- a/poky/meta/recipes-devtools/go/go_1.20.1.bb
+++ b/poky/meta/recipes-devtools/go/go_1.20.4.bb
@@ -3,7 +3,7 @@
 
 inherit linuxloader
 
-CGO_LDFLAGS:append:mips = " -no-pie"
+CGO_LDFLAGS:append = " -no-pie"
 
 export GO_LDSO = "${@get_linuxloader(d)}"
 export CC_FOR_TARGET = "gcc"
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.19.bb b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.19.bb
index f8063d9..e362e8e 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.19.bb
+++ b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.19.bb
@@ -15,10 +15,12 @@
 
 inherit cmake setuptools3-base
 
-DEPENDS += "libxml2 expat libcheck"
+DEPENDS = "expat libxml2 zlib"
 
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+EXTRA_OECMAKE = "-DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \
+                 -DENABLE_DOCS=OFF \
+                 -DENABLE_TESTS=OFF"
+
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
 BBCLASSEXTEND = "native nativesdk"
-
diff --git a/poky/meta/recipes-devtools/llvm/llvm/0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch b/poky/meta/recipes-devtools/llvm/llvm/0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch
deleted file mode 100644
index fe98e3e..0000000
--- a/poky/meta/recipes-devtools/llvm/llvm/0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From cd2fa12d715929642513fc441287c402f4560096 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 25 Dec 2022 15:13:41 -0800
-Subject: [PATCH] build: Enable 64bit off_t on 32bit glibc systems
-
-Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based
-systems. This will make sure that 64bit versions of LFS functions are
-used e.g. lseek will behave same as lseek64. Also revert [1] partially
-because this added a cmake test to detect lseek64 but then forgot to
-pass the needed macro during actual compile, this test was incomplete too
-since libc implementations like musl has 64-bit off_t by default on 32-bit
-systems and does not bundle -D_LARGEFILE64_SOURCE [2] under -D_GNU_SOURCE
-like glibc, which means the compile now fails on musl because the cmake
-check passes but we do not have _LARGEFILE64_SOURCE defined. Moreover,
-Using the *64 function was transitional anyways so use
--D_FILE_OFFSET_BITS=64 instead
-
-[1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b
-[2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc
-
-Upstream-Status: Submitted [https://reviews.llvm.org/D139752]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- llvm/cmake/config-ix.cmake                                | 8 +++++---
- llvm/include/llvm/Config/config.h.cmake                   | 3 ---
- llvm/lib/Support/raw_ostream.cpp                          | 2 --
- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn | 2 --
- utils/bazel/llvm-project-overlay/llvm/config.bzl          | 1 -
- .../llvm/include/llvm/Config/config.h                     | 3 ---
- utils/bazel/llvm_configs/config.h.cmake                   | 3 ---
- 7 files changed, 5 insertions(+), 17 deletions(-)
-
---- a/llvm/cmake/config-ix.cmake
-+++ b/llvm/cmake/config-ix.cmake
-@@ -284,9 +284,6 @@ check_symbol_exists(futimes sys/time.h H
- if( HAVE_SIGNAL_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*" AND NOT APPLE )
-   check_symbol_exists(sigaltstack signal.h HAVE_SIGALTSTACK)
- endif()
--set(CMAKE_REQUIRED_DEFINITIONS "-D_LARGEFILE64_SOURCE")
--check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64)
--set(CMAKE_REQUIRED_DEFINITIONS "")
- check_symbol_exists(mallctl malloc_np.h HAVE_MALLCTL)
- check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
- check_symbol_exists(mallinfo2 malloc.h HAVE_MALLINFO2)
-@@ -350,6 +347,11 @@ check_symbol_exists(__GLIBC__ stdio.h LL
- if( LLVM_USING_GLIBC )
-   add_definitions( -D_GNU_SOURCE )
-   list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
-+# enable 64bit off_t on 32bit systems using glibc
-+  if (CMAKE_SIZEOF_VOID_P EQUAL 4)
-+    add_compile_definitions(_FILE_OFFSET_BITS=64)
-+    list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
-+  endif()
- endif()
- # This check requires _GNU_SOURCE
- if (NOT PURE_WINDOWS)
---- a/llvm/include/llvm/Config/config.h.cmake
-+++ b/llvm/include/llvm/Config/config.h.cmake
-@@ -128,9 +128,6 @@
- /* Define to 1 if you have the <link.h> header file. */
- #cmakedefine HAVE_LINK_H ${HAVE_LINK_H}
- 
--/* Define to 1 if you have the `lseek64' function. */
--#cmakedefine HAVE_LSEEK64 ${HAVE_LSEEK64}
--
- /* Define to 1 if you have the <mach/mach.h> header file. */
- #cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
- 
---- a/llvm/lib/Support/raw_ostream.cpp
-+++ b/llvm/lib/Support/raw_ostream.cpp
-@@ -804,8 +804,6 @@ uint64_t raw_fd_ostream::seek(uint64_t o
-   flush();
- #ifdef _WIN32
-   pos = ::_lseeki64(FD, off, SEEK_SET);
--#elif defined(HAVE_LSEEK64)
--  pos = ::lseek64(FD, off, SEEK_SET);
- #else
-   pos = ::lseek(FD, off, SEEK_SET);
- #endif
diff --git a/poky/meta/recipes-devtools/llvm/llvm_git.bb b/poky/meta/recipes-devtools/llvm/llvm_git.bb
index acf7f4c..a499656 100644
--- a/poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -10,27 +10,21 @@
 
 DEPENDS = "libffi libxml2 zlib zstd libedit ninja-native llvm-native"
 
-COMPATIBLE_HOST:riscv64 = "null"
-COMPATIBLE_HOST:riscv32 = "null"
-
 RDEPENDS:${PN}:append:class-target = " ncurses-terminfo"
 
 inherit cmake pkgconfig
 
-PROVIDES += "llvm${PV}"
-
-PV = "15.0.7"
+PV = "16.0.3"
 
 MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}"
 
 LLVM_RELEASE = "${PV}"
 
 BRANCH = "release/${MAJOR_VERSION}.x"
-SRCREV = "8dfdcc7b7bf66834a761bd8de445840ef68e4d1a"
+SRCREV = "da3cd333bea572fb10470f610a27f22bcb84b08c"
 SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \
            file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
            file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
-           file://0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch;striplevel=2 \
            file://llvm-config \
            "
 
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch b/poky/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch
deleted file mode 100644
index 58fa119..0000000
--- a/poky/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8739e1c3bef653415ad4b9b9c318ccfa76c43da6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Mar 2022 15:00:24 -0700
-Subject: [PATCH] Check for clang before guessing gcc or lcc
-
-clang --version can yield a string like below when its installed into
-such a directory
-
-clang version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9)
-Target: aarch64-yoe-linux
-Thread model: posix
-InstalledDir: /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux
-
-as you can see InstallDir has 'xt-' subtring and this trips the check to
-guess gcc
-
-if 'Free Software Foundation' in out or 'xt-' in out:
-
-Therefore, check if compiler is clang then there is no point of running
-this check anyway.
-
-Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/10218]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- mesonbuild/compilers/detect.py | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
-index 53948b01a..ba335cf39 100644
---- a/mesonbuild/compilers/detect.py
-+++ b/mesonbuild/compilers/detect.py
-@@ -427,13 +427,14 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
-         version = search_version(out)
- 
-         guess_gcc_or_lcc: T.Optional[str] = None
--        if 'Free Software Foundation' in out or 'xt-' in out:
--            guess_gcc_or_lcc = 'gcc'
--        if 'e2k' in out and 'lcc' in out:
--            guess_gcc_or_lcc = 'lcc'
--        if 'Microchip Technology' in out:
--            # this output has "Free Software Foundation" in its version
--            guess_gcc_or_lcc = None
-+        if not 'clang' in compiler_name:
-+            if 'Free Software Foundation' in out or 'xt-' in out:
-+                guess_gcc_or_lcc = 'gcc'
-+            if 'e2k' in out and 'lcc' in out:
-+                guess_gcc_or_lcc = 'lcc'
-+            if 'Microchip Technology' in out:
-+                # this output has "Free Software Foundation" in its version
-+                guess_gcc_or_lcc = None
- 
-         if guess_gcc_or_lcc:
-             defines = _get_gnu_compiler_defines(compiler)
--- 
-2.35.1
-
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index f01a667..19502fa 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,4 +1,4 @@
-From 2e9582167bf9d3273004edb2637310531f0155ab Mon Sep 17 00:00:00 2001
+From a97dba12cff6c4c9181909141a1a9f38d7c900bf Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 19 Nov 2018 14:24:26 +0100
 Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -8,30 +8,30 @@
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
- mesonbuild/modules/python.py | 6 +-----
+ mesonbuild/dependencies/python.py | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
 
-diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index 3bbccd1..fda7a25 100644
---- a/mesonbuild/modules/python.py
-+++ b/mesonbuild/modules/python.py
-@@ -277,9 +277,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
-                 # there is no LIBPC, so we can't search in it
-                 return NotFoundDependency('python', env)
+diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
+index 14386f9..118a15f 100644
+--- a/mesonbuild/dependencies/python.py
++++ b/mesonbuild/dependencies/python.py
+@@ -354,9 +354,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+                     empty.name = 'python'
+                     return empty
  
--            old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None)
--            old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None)
--            os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
-             try:
-                 return PythonPkgConfigDependency(name, env, kwargs, installation, True)
-             finally:
-@@ -288,8 +285,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
-                         os.environ[name] = value
-                     elif name in os.environ:
-                         del os.environ[name]
--                set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir)
--                set_env('PKG_CONFIG_PATH', old_pkg_path)
-+                pass
+-                old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None)
+-                old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None)
+-                os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+                 try:
+                     return PythonPkgConfigDependency(name, env, kwargs, installation, True)
+                 finally:
+@@ -365,8 +362,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+                             os.environ[name] = value
+                         elif name in os.environ:
+                             del os.environ[name]
+-                    set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir)
+-                    set_env('PKG_CONFIG_PATH', old_pkg_path)
++                    pass
  
-         candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation))
-         # We only need to check both, if a python install has a LIBPC. It might point to the wrong location,
+             candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation))
+             # We only need to check both, if a python install has a LIBPC. It might point to the wrong location,
diff --git a/poky/meta/recipes-devtools/meson/meson_1.0.1.bb b/poky/meta/recipes-devtools/meson/meson_1.1.0.bb
similarity index 96%
rename from poky/meta/recipes-devtools/meson/meson_1.0.1.bb
rename to poky/meta/recipes-devtools/meson/meson_1.1.0.bb
index fd478b2..1190d5c 100644
--- a/poky/meta/recipes-devtools/meson/meson_1.0.1.bb
+++ b/poky/meta/recipes-devtools/meson/meson_1.1.0.bb
@@ -14,9 +14,8 @@
            file://0001-python-module-do-not-manipulate-the-environment-when.patch \
            file://0001-Make-CPU-family-warnings-fatal.patch \
            file://0002-Support-building-allarch-recipes-again.patch \
-           file://0001-Check-for-clang-before-guessing-gcc-or-lcc.patch \
            "
-SRC_URI[sha256sum] = "d926b730de6f518728cc7c57bc5e701667bae0c3522f9e369427b2cc7839d3c1"
+SRC_URI[sha256sum] = "d9616c44cd6c53689ff8f05fc6958a693f2e17c3472a8daf83cee55dabff829f"
 
 inherit python_setuptools_build_meta github-releases
 
diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-configure_func.sh-Add-_GNU_SOURCE-define-and-functio.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_func.sh-Add-_GNU_SOURCE-define-and-functio.patch
deleted file mode 100644
index 893b55e..0000000
--- a/poky/meta/recipes-devtools/perl-cross/files/0001-configure_func.sh-Add-_GNU_SOURCE-define-and-functio.patch
+++ /dev/null
@@ -1,485 +0,0 @@
-From 65db86f0161c393fd5b082c10837b278adadbff2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 7 Aug 2022 23:57:20 -0700
-Subject: [PATCH] configure_func.sh: Add _GNU_SOURCE define and function
- signatures
-
-Modern compilers are getting stricter about include paths and function
-signature being known duting compilation e.g. clang-15 now errors out if
-a function signature is not found
-
-try.c:1:18: error: call to undeclared function 'getspnam'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
-
-This causes the test of function to fail even though the function is
-available in libc. Therefore try to add proper include headers which
-define these functions and also define _GNU_SOURCE in every test
-since some of GNU/Linux funtions e.g. accept4 are guarged by this define
-
-Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/137]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- cnf/configure_func.sh | 41 +++++++++++++++++++++--------------------
- 1 file changed, 21 insertions(+), 20 deletions(-)
-
---- a/cnf/configure_func.sh
-+++ b/cnf/configure_func.sh
-@@ -5,6 +5,7 @@ checkfunc() {
- 	mstart "Checking for $2"
- 	if not hinted $1 'found' 'missing'; then
- 		try_start
-+    try_add '#define _GNU_SOURCE'
- 		funcincludes "$3" "$4" "$includes"
- 		try_add "int main(void) { $2($3); return 0; }"
- 		try_link -O0 -fno-builtin
-@@ -42,115 +43,115 @@ checkfunc d_chroot 'chroot' "NULL" 'unis
- checkfunc d_chsize 'chsize' "0,0"
- checkfunc d_class 'class'
- checkfunc d_clearenv 'clearenv' "" 'stdlib.h'
--checkfunc d_closedir 'closedir' "NULL"
--checkfunc d_crypt 'crypt'
-+checkfunc d_closedir 'closedir' "NULL" 'dirent.h sys/types.h'
-+checkfunc d_crypt 'crypt' "NULL,NULL" 'crypt.h'
- checkfunc d_ctermid 'ctermid'
- checkfunc d_ctime64 'ctime64'
- checkfunc d_cuserid 'cuserid'
--checkfunc d_difftime 'difftime' "0,0"
-+checkfunc d_difftime 'difftime' "0,0" 'time.h'
- checkfunc d_difftime64 'difftime64'
--checkfunc d_dirfd 'dirfd'
-+checkfunc d_dirfd 'dirfd' "NULL" 'dirent.h sys/types.h'
- checkfunc d_dladdr 'dladdr' 'NULL, NULL' 'dlfcn.h'
--checkfunc d_dlerror 'dlerror'
--checkfunc d_dlopen 'dlopen'
--checkfunc d_drand48 'drand48'
-+checkfunc d_dlerror 'dlerror' "" 'dlfcn.h'
-+checkfunc d_dlopen 'dlopen' "NULL,0" "dlfcn.h"
-+checkfunc d_drand48 'drand48' "" 'stdlib.h'
- checkfunc d_dup2 'dup2' "0,0" 'unistd.h'
- checkfunc d_dup3 'dup3' "0,0,0" 'fcntl.h unistd.h'
- checkfunc d_duplocale 'duplocale' '0' 'locale.h'
--checkfunc d_eaccess 'eaccess'
--checkfunc d_endgrent 'endgrent'
--checkfunc d_endhent 'endhostent'
--checkfunc d_endnent 'endnetent'
--checkfunc d_endpent 'endprotoent'
--checkfunc d_endpwent 'endpwent'
--checkfunc d_endservent 'endservent'
-+checkfunc d_eaccess 'eaccess' "NULL,0" 'unistd.h'
-+checkfunc d_endgrent 'endgrent' '' 'grp.h sys/types.h'
-+checkfunc d_endhent 'endhostent' "" 'netdb.h'
-+checkfunc d_endnent 'endnetent' "" 'netdb.h'
-+checkfunc d_endpent 'endprotoent' "" 'netdb.h'
-+checkfunc d_endpwent 'endpwent' "" 'sys/types.h pwd.h'
-+checkfunc d_endservent 'endservent' "" 'netdb.h'
- checkfunc d_fchdir 'fchdir' "0" 'unistd.h'
--checkfunc d_fchmod 'fchmod' "0,0" 'unistd.h'
--checkfunc d_fchmodat 'fchmodat' "0,NULL,0,0" 'unistd.h'
-+checkfunc d_fchmod 'fchmod' "0,0" 'unistd.h sys/stat.h'
-+checkfunc d_fchmodat 'fchmodat' "0,NULL,0,0" 'unistd.h sys/stat.h'
- checkfunc d_fchown 'fchown' "0,0,0" 'unistd.h'
- checkfunc d_fcntl 'fcntl' "0,0" 'unistd.h fcntl.h'
- checkfunc d_fdclose 'fdclose'
--checkfunc d_ffs 'ffs' 'strings.h'
--checkfunc d_ffsl 'ffsl' 'strings.h'
-+checkfunc d_ffs 'ffs' "0" 'strings.h'
-+checkfunc d_ffsl 'ffsl' "0" 'strings.h'
- checkfunc d_fgetpos 'fgetpos' "NULL, 0" 'stdio.h'
--checkfunc d_flock 'flock' "0,0" 'unistd.h'
-+checkfunc d_flock 'flock' "0,0" 'sys/file.h'
- checkfunc d_fork 'fork' "" 'unistd.h'
- checkfunc d_fp_class 'fp_class'
- checkfunc d_fpathconf 'fpathconf' "0,0" 'unistd.h'
--checkfunc d_freelocale 'freelocale' '0' 'locale.h'
--checkfunc d_fseeko 'fseeko' 'NULL,0,0'
--checkfunc d_fsetpos 'fsetpos' 'NULL,0'
--checkfunc d_fstatfs 'fstatfs'
--checkfunc d_fstatvfs 'fstatvfs'
--checkfunc d_fsync 'fsync'
--checkfunc d_ftello 'ftello'
--checkfunc d_futimes 'futimes'
-+checkfunc d_freelocale 'freelocale' "0" 'locale.h'
-+checkfunc d_fseeko 'fseeko' "NULL,0,0" 'stdio.h'
-+checkfunc d_fsetpos 'fsetpos' "NULL,0" 'stdio.h'
-+checkfunc d_fstatfs 'fstatfs' "0,NULL" 'sys/vfs.h'
-+checkfunc d_fstatvfs 'fstatvfs' "0,NULL" 'sys/statvfs.h'
-+checkfunc d_fsync 'fsync' "0" 'unistd.h'
-+checkfunc d_ftello 'ftello' "NULL" 'stdio.h'
-+checkfunc d_futimes 'futimes' '0,0' 'sys/time.h'
- checkfunc d_gai_strerror 'gai_strerror' '0' 'sys/types.h sys/socket.h netdb.h'
--checkfunc d_getaddrinfo 'getaddrinfo'
--checkfunc d_get_current_dir_name 'get_current_dir_name'
--checkfunc d_getcwd 'getcwd' 'NULL,0'
-+checkfunc d_getaddrinfo 'getaddrinfo' "NULL,NULL,NULL,NULL" 'sys/types.h sys/socket.h netdb.h'
-+checkfunc d_get_current_dir_name 'get_current_dir_name' "" 'unistd.h'
-+checkfunc d_getcwd 'getcwd' 'NULL,0' 'unistd.h'
- checkfunc d_getespwnam 'getespwnam'
- checkfunc d_getfsstat 'getfsstat'
--checkfunc d_getgrent 'getgrent'
--checkfunc d_getgrps 'getgroups'
--checkfunc d_gethbyaddr 'gethostbyaddr'
--checkfunc d_gethbyname 'gethostbyname'
-+checkfunc d_getgrent 'getgrent' "" 'sys/types.h grp.h'
-+checkfunc d_getgrps 'getgroups' "0,NULL" 'unistd.h'
-+checkfunc d_gethbyaddr 'gethostbyaddr' "NULL,0,0" 'netdb.h'
-+checkfunc d_gethbyname 'gethostbyname' "NULL" 'netdb.h'
- checkfunc d_getnbyaddr 'getnetbyaddr' '0,0' 'netdb.h'
- checkfunc d_getnbyname 'getnetbyname' 'NULL' 'netdb.h'
--checkfunc d_gethent 'gethostent'
--checkfunc d_gethname 'gethostname'
--checkfunc d_getitimer 'getitimer'
--checkfunc d_getlogin 'getlogin'
-+checkfunc d_gethent 'gethostent' "" 'netdb.h'
-+checkfunc d_gethname 'gethostname' "NULL,0" 'unistd.h'
-+checkfunc d_getitimer 'getitimer' "0,NULL" 'sys/time.h'
-+checkfunc d_getlogin 'getlogin' "" 'unistd.h'
- checkfunc d_getmnt 'getmnt'
--checkfunc d_getmntent 'getmntent'
--checkfunc d_getnameinfo 'getnameinfo'
--checkfunc d_getnent 'getnetent'
--checkfunc d_getnetbyaddr 'getnetbyaddr'
--checkfunc d_getnetbyname 'getnetbyname'
--checkfunc d_getpagsz 'getpagesize'
-+checkfunc d_getmntent 'getmntent' "NULL" 'stdio.h mntent.h'
-+checkfunc d_getnameinfo 'getnameinfo' "NULL,0,NULL,0,NULL,0,0" 'sys/socket.h netdb.h'
-+checkfunc d_getnent 'getnetent' "" 'netdb.h'
-+checkfunc d_getnetbyaddr 'getnetbyaddr' "0,0" 'netdb.h'
-+checkfunc d_getnetbyname 'getnetbyname' "NULL" 'netdb.h'
-+checkfunc d_getpagsz 'getpagesize' "" 'unistd.h'
- checkfunc d_getpbyaddr 'getprotobyaddr'
--checkfunc d_getpbyname 'getprotobyname'
--checkfunc d_getpbynumber 'getprotobynumber'
--checkfunc d_getpent 'getprotoent'
--checkfunc d_getpgid 'getpgid'
-+checkfunc d_getpbyname 'getprotobyname' "NULL" 'netdb.h'
-+checkfunc d_getpbynumber 'getprotobynumber' "0" 'netdb.h'
-+checkfunc d_getpent 'getprotoent' "" 'netdb.h'
-+checkfunc d_getpgid 'getpgid' "0" 'unistd.h'
- checkfunc d_getpgrp 'getpgrp' "" 'unistd.h'
- checkfunc d_getpgrp2 'getpgrp2'
--checkfunc d_getppid 'getppid'
-+checkfunc d_getppid 'getppid' "" 'unistd.h'
- checkfunc d_getprior 'getpriority' "0,0" 'sys/time.h sys/resource.h'
- checkfunc d_getprpwnam 'getprpwnam'
--checkfunc d_getpwent 'getpwent'
-+checkfunc d_getpwent 'getpwent' "" 'sys/types.h pwd.h'
- checkfunc d_getsbyaddr 'getservbyaddr'
--checkfunc d_getsbyname 'getservbyname'
--checkfunc d_getsbyport 'getservbyport'
--checkfunc d_getsent 'getservent'
--checkfunc d_setsent 'setservent'
--checkfunc d_endsent 'endservent'
--checkfunc d_getspnam 'getspnam'
--checkfunc d_gettimeod 'gettimeofday' 'NULL,NULL'
-+checkfunc d_getsbyname 'getservbyname' "NULL,NULL" 'netdb.h'
-+checkfunc d_getsbyport 'getservbyport' "0,NULL" 'netdb.h'
-+checkfunc d_getsent 'getservent' "" 'netdb.h'
-+checkfunc d_setsent 'setservent' "0" 'netdb.h'
-+checkfunc d_endsent 'endservent' "" 'netdb.h'
-+checkfunc d_getspnam 'getspnam' "NULL" 'shadow.h'
-+checkfunc d_gettimeod 'gettimeofday' 'NULL,NULL' 'sys/time.h'
- checkfunc d_gmtime64 'gmtime64'
--checkfunc d_hasmntopt 'hasmntopt'
-+checkfunc d_hasmntopt 'hasmntopt' "NULL,NULL" 'stdio.h mntent.h'
- checkfunc d_htonl 'htonl' "0" 'stdio.h sys/types.h netinet/in.h arpa/inet.h'
--checkfunc d_ilogbl 'ilogbl'
-+checkfunc d_ilogbl 'ilogbl' "0.0" 'math.h'
- checkfunc d_index 'index' "NULL,0" 'string.h strings.h'
--checkfunc d_inetaton 'inet_aton'
--checkfunc d_inetntop 'inet_ntop'
--checkfunc d_inetpton 'inet_pton'
-+checkfunc d_inetaton 'inet_aton' "NULL,NULL" 'sys/socket.h netinet/in.h arpa/inet.h'
-+checkfunc d_inetntop 'inet_ntop' "0,NULL,NULL,0" 'arpa/inet.h'
-+checkfunc d_inetpton 'inet_pton' "0,NULL,NULL" 'arpa/inet.h'
- checkfunc d_isascii 'isascii' "'A'" 'stdio.h ctype.h'
- checkfunc d_isblank 'isblank' "' '" 'stdio.h ctype.h'
--checkfunc d_killpg 'killpg'
-+checkfunc d_killpg 'killpg' "0,0" 'signal.h'
- checkfunc d_lchown 'lchown' "NULL, 0, 0" 'unistd.h'
--checkfunc d_link 'link' 'NULL,NULL'
--checkfunc d_linkat 'linkat' '0,NULL,0,NULL,0'
-+checkfunc d_link 'link' 'NULL,NULL' 'unistd.h'
-+checkfunc d_linkat 'linkat' '0,NULL,0,NULL,0' 'unistd.h'
- checkfunc d_localtime64 'localtime64'
- checkfunc d_localeconv_l 'localeconv_l' 'NULL' 'locale.h'
--checkfunc d_locconv 'localeconv'
--checkfunc d_lockf 'lockf'
--checkfunc d_lstat 'lstat'
--checkfunc d_madvise 'madvise'
-+checkfunc d_locconv 'localeconv' "" 'locale.h'
-+checkfunc d_lockf 'lockf' "0,0,0" 'unistd.h'
-+checkfunc d_lstat 'lstat' "NULL, NULL" 'sys/stat.h'
-+checkfunc d_madvise 'madvise' "NULL,0,0" 'sys/mman.h'
- checkfunc d_malloc_good_size 'malloc_good_size'
- checkfunc d_malloc_size 'malloc_size'
- checkfunc d_mblen 'mblen' '"", 0' 'stdlib.h'
--checkfunc d_mbstowcs 'mbstowcs'
-+checkfunc d_mbstowcs 'mbstowcs' "NULL,NULL,0"
- checkfunc d_mbtowc 'mbtowc' 'NULL, NULL, 0' 'stdlib.h'
- checkfunc d_mbrlen 'mbrlen' 'NULL, 0, NULL' 'wchar.h'
- checkfunc d_mbrtowc 'mbrtowc' 'NULL, NULL, 0, NULL' 'wchar.h'
-@@ -161,152 +162,152 @@ checkfunc d_memmem 'memmem' "NULL, 0, NU
- checkfunc d_memmove 'memmove' "NULL, NULL, 0" 'string.h'
- checkfunc d_memrchr 'memrchr' "NULL, 0, 0" 'string.h'
- checkfunc d_memset 'memset' "NULL, 0, 0" 'string.h'
--checkfunc d_mkdir 'mkdir' 'NULL, 0'
--checkfunc d_mkdtemp 'mkdtemp'
--checkfunc d_mkfifo 'mkfifo'
-+checkfunc d_mkdir 'mkdir' 'NULL, 0' 'sys/stat.h'
-+checkfunc d_mkdtemp 'mkdtemp' 'NULL'
-+checkfunc d_mkfifo 'mkfifo' 'NULL,0' 'sys/types.h sys/stat.h'
- checkfunc d_mkostemp 'mkostemp' 'NULL,0' 'stdlib.h'
- checkfunc d_mkstemp 'mkstemp' 'NULL'
--checkfunc d_mkstemps 'mkstemps'
--checkfunc d_mktime 'mktime' 'NULL'
-+checkfunc d_mkstemps 'mkstemps' 'NULL,0'
-+checkfunc d_mktime 'mktime' 'NULL' 'time.h'
- checkfunc d_mktime64 'mktime64'
--checkfunc d_mmap 'mmap'
--checkfunc d_mprotect 'mprotect'
--checkfunc d_msgctl 'msgctl'
--checkfunc d_msgget 'msgget'
--checkfunc d_msgrcv 'msgrcv'
--checkfunc d_msgsnd 'msgsnd'
--checkfunc d_msync 'msync'
--checkfunc d_munmap 'munmap'
-+checkfunc d_mmap 'mmap' 'NULL,0,0,0,0,0' 'sys/mman.h'
-+checkfunc d_mprotect 'mprotect' 'NULL,0,0' 'sys/mman.h'
-+checkfunc d_msgctl 'msgctl' '0,0,NULL' 'sys/msg.h'
-+checkfunc d_msgget 'msgget' '0,0' 'sys/msg.h'
-+checkfunc d_msgrcv 'msgrcv' '0,NULL,0,0,0' 'sys/msg.h'
-+checkfunc d_msgsnd 'msgsnd' '0,NULL,0,0' 'sys/msg.h'
-+checkfunc d_msync 'msync' 'NULL,0,0' 'sys/mman.h'
-+checkfunc d_munmap 'munmap' 'NULL,0' 'sys/mman.h'
- checkfunc d_newlocale 'newlocale' '0,NULL,0' 'locale.h'
--checkfunc d_nice 'nice' '0'
--checkfunc d_nl_langinfo 'nl_langinfo'
--checkfunc d_nl_langinfo_l 'nl_langinfo_l'
-+checkfunc d_nice 'nice' '0' 'unistd.h'
-+checkfunc d_nl_langinfo 'nl_langinfo' '0' 'langinfo.h'
-+checkfunc d_nl_langinfo_l 'nl_langinfo_l' '0,0' 'langinfo.h'
- checkfunc d_open 'open' "NULL,0,0" 'sys/types.h sys/stat.h fcntl.h'
- checkfunc d_openat 'openat' "0,NULL,0,0" 'sys/types.h sys/stat.h fcntl.h'
--checkfunc d_pathconf 'pathconf'
--checkfunc d_pause 'pause'
-+checkfunc d_pathconf 'pathconf' 'NULL,0' 'unistd.h'
-+checkfunc d_pause 'pause' '' 'unistd.h'
- checkfunc d_pipe 'pipe' 'NULL' 'fcntl.h unistd.h'
- checkfunc d_pipe2 'pipe' 'NULL,0' 'fcntl.h unistd.h'
--checkfunc d_poll 'poll'
--checkfunc d_prctl 'prctl'
--checkfunc d_pthread_atfork 'pthread_atfork'
--checkfunc d_pthread_attr_setscope 'pthread_attr_setscope'
--checkfunc d_pthread_yield 'pthread_yield'
-+checkfunc d_poll 'poll' 'NULL,0,0' 'poll.h'
-+checkfunc d_prctl 'prctl' '0,0,0,0,0' 'sys/prctl.h'
-+checkfunc d_pthread_atfork 'pthread_atfork' 'NULL,NULL,NULL' 'pthread.h'
-+checkfunc d_pthread_attr_setscope 'pthread_attr_setscope' 'NULL,0' 'pthread.h'
-+checkfunc d_pthread_yield 'pthread_yield' '' 'pthread.h'
- checkfunc d_querylocale 'querylocale'
- checkfunc d_qgcvt 'qgcvt' '1.0,1,NULL'
--checkfunc d_rand 'rand'
--checkfunc d_random 'random'
--checkfunc d_re_comp 're_comp'
--checkfunc d_readdir 'readdir' 'NULL'
--checkfunc d_readlink 'readlink'
--checkfunc d_realpath 'realpath'
--checkfunc d_readv 'readv'
--checkfunc d_recvmsg 'recvmsg'
-+checkfunc d_rand 'rand' '' 'stdlib.h'
-+checkfunc d_random 'random' '' 'stdlib.h'
-+checkfunc d_re_comp 're_comp' 'NULL' 'sys/types.h regex.h'
-+checkfunc d_readdir 'readdir' 'NULL' 'dirent.h'
-+checkfunc d_readlink 'readlink' 'NULL,NULL,0' 'unistd.h'
-+checkfunc d_realpath 'realpath' 'NULL,NULL' 'limits.h stdlib.h'
-+checkfunc d_readv 'readv' '0,NULL,0' 'sys/uio.h'
-+checkfunc d_recvmsg 'recvmsg' '0,NULL,0' 'sys/socket.h'
- checkfunc d_regcmp 'regcmp'
--checkfunc d_regcomp 'regcomp'
--checkfunc d_rename 'rename' 'NULL,NULL'
--checkfunc d_renameat 'renameat' '0,NULL,0,NULL'
--checkfunc d_rewinddir 'rewinddir'
--checkfunc d_rmdir 'rmdir' 'NULL'
--checkfunc d_sched_yield 'sched_yield'
--checkfunc d_seekdir 'seekdir'
--checkfunc d_select 'select' '0,NULL,NULL,NULL,NULL'
--checkfunc d_semctl 'semctl'
--checkfunc d_semget 'semget'
--checkfunc d_semop 'semop'
--checkfunc d_sendmsg 'sendmsg'
--checkfunc d_setegid 'setegid'
--checkfunc d_setent 'setservent'
--checkfunc d_setenv 'setenv'
--checkfunc d_seteuid 'seteuid'
--checkfunc d_setgrent 'setgrent'
--checkfunc d_setgrps 'setgroups'
--checkfunc d_sethent 'sethostent'
--checkfunc d_setitimer 'setitimer'
--checkfunc d_setlinebuf 'setlinebuf'
-+checkfunc d_regcomp 'regcomp' 'NULL,NULL,0' 'regex.h'
-+checkfunc d_rename 'rename' 'NULL,NULL' 'stdio.h'
-+checkfunc d_renameat 'renameat' '0,NULL,0,NULL' 'fcntl.h stdio.h'
-+checkfunc d_rewinddir 'rewinddir' 'NULL' 'sys/types.h dirent.h'
-+checkfunc d_rmdir 'rmdir' 'NULL' 'unistd.h'
-+checkfunc d_sched_yield 'sched_yield' '' 'sched.h'
-+checkfunc d_seekdir 'seekdir' 'NULL,0' 'dirent.h'
-+checkfunc d_select 'select' '0,NULL,NULL,NULL,NULL' 'sys/select.h'
-+checkfunc d_semctl 'semctl' '0,0,0, NULL' 'sys/sem.h'
-+checkfunc d_semget 'semget' '0,0,0' 'sys/sem.h'
-+checkfunc d_semop 'semop' '0,NULL,0' 'sys/sem.h'
-+checkfunc d_sendmsg 'sendmsg' '0,NULL,0' 'sys/socket.h'
-+checkfunc d_setegid 'setegid' '0' 'unistd.h'
-+checkfunc d_setent 'setservent' '0' 'netdb.h'
-+checkfunc d_setenv 'setenv' 'NULL,NULL,0'
-+checkfunc d_seteuid 'seteuid' '0' 'unistd.h'
-+checkfunc d_setgrent 'setgrent' '' 'sys/types.h grp.h'
-+checkfunc d_setgrps 'setgroups' '0,NULL' 'unistd.h grp.h'
-+checkfunc d_sethent 'sethostent' '0' 'netdb.h'
-+checkfunc d_setitimer 'setitimer' '0,NULL,NULL' 'sys/time.h'
-+checkfunc d_setlinebuf 'setlinebuf' 'NULL' 'stdio.h'
- checkfunc d_setlocale 'setlocale' "0,NULL" 'locale.h'
--checkfunc d_setnent 'setnetent'
--checkfunc d_setpent 'setprotoent'
--checkfunc d_setpgid 'setpgid'
--checkfunc d_setpgrp 'setpgrp'
-+checkfunc d_setnent 'setnetent' '0' 'netdb.h'
-+checkfunc d_setpent 'setprotoent' '0' 'netdb.h'
-+checkfunc d_setpgid 'setpgid' '0,0' 'unistd.h'
-+checkfunc d_setpgrp 'setpgrp' '' 'unistd.h'
- checkfunc d_setpgrp2 'setpgrp2'
--checkfunc d_setprior 'setpriority'
--checkfunc d_setproctitle 'setproctitle'
--checkfunc d_setpwent 'setpwent'
--checkfunc d_setregid 'setregid'
--checkfunc d_setresgid 'setresgid'
--checkfunc d_setresuid 'setresuid'
--checkfunc d_setreuid 'setreuid'
--checkfunc d_setrgid 'setrgid'
-+checkfunc d_setprior 'setpriority' '0,0,0' 'sys/resource.h'
-+checkfunc d_setproctitle 'setproctitle' 'NULL,NULL' 'sys/types.h unistd.h'
-+checkfunc d_setpwent 'setpwent' '' 'sys/types.h pwd.h'
-+checkfunc d_setregid 'setregid' '0,0' 'unistd.h'
-+checkfunc d_setresgid 'setresgid' '0,0,0' 'unistd.h'
-+checkfunc d_setresuid 'setresuid' '0,0,0' 'unistd.h'
-+checkfunc d_setreuid 'setreuid' '0,0' 'unistd.h'
-+checkfunc d_setrgid 'setrgid' ''
- checkfunc d_setruid 'setruid'
--checkfunc d_setsid 'setsid'
--checkfunc d_setvbuf 'setvbuf' 'NULL,NULL,0,0'
-+checkfunc d_setsid 'setsid' '' 'unistd.h'
-+checkfunc d_setvbuf 'setvbuf' 'NULL,NULL,0,0' 'stdio.h'
- checkfunc d_sfreserve 'sfreserve' "" 'sfio.h'
--checkfunc d_shmat 'shmat'
--checkfunc d_shmctl 'shmctl'
--checkfunc d_shmdt 'shmdt'
--checkfunc d_shmget 'shmget'
--checkfunc d_sigaction 'sigaction'
--checkfunc d_sigprocmask 'sigprocmask'
-+checkfunc d_shmat 'shmat' '0,NULL,0' 'sys/shm.h'
-+checkfunc d_shmctl 'shmctl' '0,0,NULL' 'sys/shm.h'
-+checkfunc d_shmdt 'shmdt' 'NULL' 'sys/shm.h'
-+checkfunc d_shmget 'shmget' '0,0,0' 'sys/shm.h'
-+checkfunc d_sigaction 'sigaction' '0,NULL,NULL' 'signal.h'
-+checkfunc d_sigprocmask 'sigprocmask' '0,NULL,NULL' 'signal.h'
- checkfunc d_sigsetjmp 'sigsetjmp' "NULL,0" 'setjmp.h'
--checkfunc d_snprintf 'snprintf'
--checkfunc d_sockatmark 'sockatmark'
-+checkfunc d_snprintf 'snprintf' 'NULL,0,NULL' 'stdio.h'
-+checkfunc d_sockatmark 'sockatmark' '0' 'sys/socket.h'
- checkfunc d_socket 'socket' "0,0,0" 'sys/types.h sys/socket.h'
--checkfunc d_sockpair 'socketpair'
-+checkfunc d_sockpair 'socketpair' '0,0,0,NULL' 'sys/socket.h'
- checkfunc d_socks5_init 'socks5_init'
--checkfunc d_stat 'stat'
--checkfunc d_statvfs 'statvfs'
-+checkfunc d_stat 'stat' 'NULL,NULL' 'sys/stat.h'
-+checkfunc d_statvfs 'statvfs' 'NULL,NULL' 'sys/statvfs.h'
- checkfunc d_strchr 'strchr' "NULL,0" 'string.h strings.h'
- checkfunc d_strcoll 'strcoll' "NULL,NULL" 'string.h'
- checkfunc d_strerror 'strerror' "0" 'string.h stdlib.h'
--checkfunc d_strerror_l 'strerror_l'
-+checkfunc d_strerror_l 'strerror_l' '0,NULL' 'string.h'
- checkfunc d_strftime 'strftime' "NULL,0,NULL,NULL" 'time.h'
--checkfunc d_strlcat 'strlcat'
--checkfunc d_strlcpy 'strlcpy'
-+checkfunc d_strlcat 'strlcat' 'NULL,NULL,0' 'string.h'
-+checkfunc d_strlcpy 'strlcpy' 'NULL,NULL,0' 'string.h'
- checkfunc d_strnlen 'strnlen' '"",0' 'string.h'
- checkfunc d_strtod 'strtod' 'NULL,NULL'
- checkfunc d_strtod_l 'strtod_l'
- checkfunc d_strtol 'strtol' 'NULL,NULL,0'
--checkfunc d_strtold 'strtold'
-+checkfunc d_strtold 'strtold' 'NULL,NULL'
- checkfunc d_strtold_l 'strtold_l'
--checkfunc d_strtoll 'strtoll'
--checkfunc d_strtoq 'strtoq'
-+checkfunc d_strtoll 'strtoll' 'NULL,NULL,0'
-+checkfunc d_strtoq 'strtoq' 'NULL,NULL,0'
- checkfunc d_strtoul 'strtoul' 'NULL,NULL,0'
- checkfunc d_strtoull 'strtoull' 'NULL,NULL,0'
--checkfunc d_strtouq 'strtouq'
--checkfunc d_strxfrm 'strxfrm'
--checkfunc d_strxfrm_l 'strxfrm_l'
--checkfunc d_symlink 'symlink'
--checkfunc d_syscall 'syscall'
--checkfunc d_sysconf 'sysconf' '0'
-+checkfunc d_strtouq 'strtouq' 'NULL,NULL,0'
-+checkfunc d_strxfrm 'strxfrm' 'NULL,NULL,0' 'string.h'
-+checkfunc d_strxfrm_l 'strxfrm_l' 'NULL,NULL,0,NULL' 'string.h'
-+checkfunc d_symlink 'symlink' 'NULL,NULL' 'unistd.h'
-+checkfunc d_syscall 'syscall' '0,NULL' 'sys/syscall.h unistd.h'
-+checkfunc d_sysconf 'sysconf' '0' 'unistd.h'
- checkfunc d_system 'system' 'NULL'
--checkfunc d_tcgetpgrp 'tcgetpgrp'
--checkfunc d_tcsetpgrp 'tcsetpgrp'
--checkfunc d_telldir 'telldir'
--checkfunc d_time 'time' 'NULL'
--checkfunc d_timegm 'timegm'
--checkfunc d_times 'times' 'NULL'
-+checkfunc d_tcgetpgrp 'tcgetpgrp' '0' 'unistd.h'
-+checkfunc d_tcsetpgrp 'tcsetpgrp' '0,0' 'unistd.h'
-+checkfunc d_telldir 'telldir' 'NULL' 'dirent.h'
-+checkfunc d_time 'time' 'NULL' 'time.h'
-+checkfunc d_timegm 'timegm' 'NULL' 'time.h'
-+checkfunc d_times 'times' 'NULL' 'sys/times.h'
- checkfunc d_towlower 'towlower' '0' 'wctype.h'
- checkfunc d_towupper 'towupper' '0' 'wctype.h'
--checkfunc d_truncate 'truncate' 'NULL,0'
--checkfunc d_ualarm 'ualarm'
--checkfunc d_umask 'umask' '0'
--checkfunc d_uname 'uname'
--checkfunc d_unlinkat 'unlinkat' '0,NULL,0'
-+checkfunc d_truncate 'truncate' 'NULL,0' 'unistd.h'
-+checkfunc d_ualarm 'ualarm' 'NULL,NULL' 'unistd.h'
-+checkfunc d_umask 'umask' '0' 'sys/stat.h'
-+checkfunc d_uname 'uname' 'NULL' 'sys/utsname.h'
-+checkfunc d_unlinkat 'unlinkat' '0,NULL,0' 'unistd.h fcntl.h'
- checkfunc d_unordered 'unordered'
--checkfunc d_unsetenv 'unsetenv'
-+checkfunc d_unsetenv 'unsetenv' 'NULL'
- checkfunc d_uselocale 'uselocale' '0' 'locale.h'
--checkfunc d_usleep 'usleep'
--checkfunc d_ustat 'ustat'
-+checkfunc d_usleep 'usleep' '0' 'unistd.h'
-+checkfunc d_ustat 'ustat' '0,NULL' 'sys/types.h unistd.h'
- define d_vfork 'undef' # unnecessary
--checkfunc d_vprintf 'vprintf' 'NULL,0'
--checkfunc d_vsnprintf 'vsnprintf'
--checkfunc d_wait4 'wait4'
--checkfunc d_waitpid 'waitpid' '0,NULL,0'
--checkfunc d_wcrtomb 'wcrtomb'
--checkfunc d_wcscmp 'wcscmp'
--checkfunc d_wcstombs 'wcstombs' 'NULL,NULL,0'
--checkfunc d_wcsxfrm 'wcsxfrm'
--checkfunc d_wctomb 'wctomb'
--checkfunc d_writev 'writev'
-+checkfunc d_vprintf 'vprintf' 'NULL,0' 'stdio.h'
-+checkfunc d_vsnprintf 'vsnprintf' 'NULL,0,NULL,NULL' 'stdio.h'
-+checkfunc d_wait4 'wait4' '0,NULL,0,NULL' 'sys/wait.h'
-+checkfunc d_waitpid 'waitpid' '0,NULL,0' 'sys/wait.h'
-+checkfunc d_wcrtomb 'wcrtomb' 'NULL,0,NULL' 'wchar.h'
-+checkfunc d_wcscmp 'wcscmp' 'NULL,NULL' 'wchar.h'
-+checkfunc d_wcstombs 'wcstombs' 'NULL,NULL,0' 'wchar.h'
-+checkfunc d_wcsxfrm 'wcsxfrm' 'NULL,NULL,0' 'wchar.h'
-+checkfunc d_wctomb 'wctomb' 'NULL,NULL' 'wchar.h'
-+checkfunc d_writev 'writev' '0,NULL,0' 'sys/uio.h'
- unset includes
diff --git a/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.bb b/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.1.bb
similarity index 86%
rename from poky/meta/recipes-devtools/perl-cross/perlcross_1.4.bb
rename to poky/meta/recipes-devtools/perl-cross/perlcross_1.4.1.bb
index 98a8fa3..6bf056c 100644
--- a/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.bb
+++ b/poky/meta/recipes-devtools/perl-cross/perlcross_1.4.1.bb
@@ -15,11 +15,10 @@
            file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
            file://determinism.patch \
            file://0001-Makefile-check-the-file-if-patched-or-not.patch \
-           file://0001-configure_func.sh-Add-_GNU_SOURCE-define-and-functio.patch \
            "
 GITHUB_BASE_URI = "https://github.com/arsv/perl-cross/releases/"
 
-SRC_URI[perl-cross.sha256sum] = "be9d9f9f7148edff7a2f9695ba3cb7e3975eff6b25a9a81dd311725fd757aa91"
+SRC_URI[perl-cross.sha256sum] = "3e14bb4f28c83586c668c5f9f6b4e57b138b4ec2fae0271086e29d4e352670ca"
 
 S = "${WORKDIR}/perl-cross-${PV}"
 
diff --git a/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch b/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
deleted file mode 100644
index 1d98e13..0000000
--- a/poky/meta/recipes-devtools/perl/files/0001-Fix-build-with-gcc-12.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From ee957eb9e4ec29a462cdbb2f3bbe29d4270534ef Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Thu, 2 Jun 2022 13:01:37 +0800
-Subject: [PATCH] proto.h: Fix build with gcc-12
-
-Fixes:
-  In function 'dynprep',
-    inlined from 'S_sortsv_flags_impl' at pp_sort.c:358:20,
-    inlined from 'sortsv_amagic_i_ncmp' at pp_sort.c:572:5:
-    pp_sort.c:1232:1: error: inlining failed in call to 'always_inline' 'S_amagic_i_ncmp': function not considered for inlining
-  1232 | S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
-
-Upstream-Status: Submitted [https://github.com/Perl/perl5/pull/19808]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- proto.h | 42 ++++++++++++++----------------------------
- 1 file changed, 14 insertions(+), 28 deletions(-)
-
-diff --git a/proto.h b/proto.h
-index faca6d1..3a76c04 100644
---- a/proto.h
-+++ b/proto.h
-@@ -5606,50 +5606,43 @@ STATIC SSize_t	S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c
- #endif
- #if defined(PERL_IN_PP_SORT_C)
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP	\
- 	assert(str1); assert(str2)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC	\
- 	assert(str1); assert(str2)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_NCMP	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_cmp_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_CMP_DESC	\
- 	assert(str1); assert(str2)
- #endif
-@@ -5671,51 +5664,44 @@ PERL_STATIC_FORCE_INLINE void	S_sortsv_flags_impl(pTHX_ SV** array, size_t num_e
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_I_NCMP	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_I_NCMP_DESC	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_NCMP	\
- 	assert(a); assert(b)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b);
- #define PERL_ARGS_ASSERT_SV_NCMP_DESC	\
- 	assert(a); assert(b)
- #endif
- 
- #  if defined(USE_LOCALE_COLLATE)
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE	\
- 	assert(str1); assert(str2)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC	\
- 	assert(str1); assert(str2)
- #endif
- 
- #ifndef PERL_NO_INLINE_FUNCTIONS
--PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
--			__attribute__always_inline__;
-+PERL_STATIC_FORCE_INLINE I32	S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2);
- #define PERL_ARGS_ASSERT_CMP_LOCALE_DESC	\
- 	assert(str1); assert(str2)
- #endif
--- 
-2.25.1
-
diff --git a/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
index f80de88..7ca7c7d 100644
--- a/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
+++ b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
@@ -1,4 +1,4 @@
-From 055d4c31f41611b7d7fb6b0e38b3818a053de38d Mon Sep 17 00:00:00 2001
+From e789c1a0c9de5928a3b49f5b9d81b63636f5c7bb Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Sun, 27 May 2007 21:04:11 +0000
 Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
diff --git a/poky/meta/recipes-devtools/perl/perl_5.36.0.bb b/poky/meta/recipes-devtools/perl/perl_5.36.1.bb
similarity index 98%
rename from poky/meta/recipes-devtools/perl/perl_5.36.0.bb
rename to poky/meta/recipes-devtools/perl/perl_5.36.1.bb
index b8dba00..f7d66e6 100644
--- a/poky/meta/recipes-devtools/perl/perl_5.36.0.bb
+++ b/poky/meta/recipes-devtools/perl/perl_5.36.1.bb
@@ -17,7 +17,6 @@
            file://0002-Constant-Fix-up-shebang.patch \
            file://determinism.patch \
            file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
-           file://0001-Fix-build-with-gcc-12.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
@@ -26,7 +25,7 @@
            file://encodefix.patch \
 "
 
-SRC_URI[perl.sha256sum] = "e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a"
+SRC_URI[perl.sha256sum] = "68203665d8ece02988fc77dc92fccbb297a83a4bb4b8d07558442f978da54cc1"
 
 B = "${WORKDIR}/perl-${PV}-build"
 
diff --git a/poky/meta/recipes-devtools/python/python-async.inc b/poky/meta/recipes-devtools/python/python-async.inc
deleted file mode 100644
index fde8646..0000000
--- a/poky/meta/recipes-devtools/python/python-async.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
-HOMEPAGE = "http://github.com/gitpython-developers/async"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
-
-inherit pypi
-
-SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
-SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
-
-RDEPENDS:${PN} += "${PYTHON_PN}-threading"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc
deleted file mode 100644
index d92d645..0000000
--- a/poky/meta/recipes-devtools/python/python-gitdb.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "A pure-Python git object database"
-HOMEPAGE = "http://github.com/gitpython-developers/gitdb"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
-
-inherit pypi
-
-PYPI_PACKAGE = "gitdb"
-
-SRC_URI[sha256sum] = "6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a"
-
-DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
-
-RDEPENDS:${PN} += "${PYTHON_PN}-async \
-                   ${PYTHON_PN}-compression \
-                   ${PYTHON_PN}-crypt \
-                   ${PYTHON_PN}-io \
-                   ${PYTHON_PN}-mmap \
-                   ${PYTHON_PN}-shell \
-                   ${PYTHON_PN}-smmap \
-"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python-pycryptodome.inc b/poky/meta/recipes-devtools/python/python-pycryptodome.inc
index 29fe80d..8d9b6d9 100644
--- a/poky/meta/recipes-devtools/python/python-pycryptodome.inc
+++ b/poky/meta/recipes-devtools/python/python-pycryptodome.inc
@@ -10,12 +10,14 @@
 PYPI_PACKAGE_EXT = "tar.gz"
 
 RDEPENDS:${PN} += " \
-    ${PYTHON_PN}-io \
-    ${PYTHON_PN}-math \
+    python3-cffi \
+    python3-ctypes \
+    python3-io \
+    python3-math \
 "
 
 RDEPENDS:${PN}-tests += " \
-    ${PYTHON_PN}-unittest \
+    python3-unittest \
 "
 
 PACKAGES =+ "${PN}-tests"
diff --git a/poky/meta/recipes-devtools/python/python3-async_0.6.2.bb b/poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
deleted file mode 100644
index 0da5fde..0000000
--- a/poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools3
-require python-async.inc
diff --git a/poky/meta/recipes-devtools/python/python3-attrs_23.1.0.bb b/poky/meta/recipes-devtools/python/python3-attrs_23.1.0.bb
index c8e2e51..314053d 100644
--- a/poky/meta/recipes-devtools/python/python3-attrs_23.1.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-attrs_23.1.0.bb
@@ -8,17 +8,14 @@
 inherit pypi python_hatchling
 
 DEPENDS += " \
-    ${PYTHON_PN}-hatch-vcs-native \
-    ${PYTHON_PN}-hatch-fancy-pypi-readme-native \
+    python3-hatch-vcs-native \
+    python3-hatch-fancy-pypi-readme-native \
 "
 
-RDEPENDS:${PN}:class-target += " \
-    ${PYTHON_PN}-crypt \
-    ${PYTHON_PN}-ctypes \
-"
-RDEPENDS:${PN}:class-nativesdk += " \
-    ${PYTHON_PN}-crypt \
-    ${PYTHON_PN}-ctypes \
+RDEPENDS:${PN}+= " \
+    python3-compression \
+    python3-ctypes \
+    python3-crypt \
 "
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-certifi_2022.12.7.bb b/poky/meta/recipes-devtools/python/python3-certifi_2022.12.7.bb
index dca3d26..b2e3ec1 100644
--- a/poky/meta/recipes-devtools/python/python3-certifi_2022.12.7.bb
+++ b/poky/meta/recipes-devtools/python/python3-certifi_2022.12.7.bb
@@ -12,3 +12,5 @@
 inherit pypi setuptools3
 
 BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN} += "python3-io"
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.10.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.10.bb
index 2dcd9c8..3a430c3 100644
--- a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.10.bb
+++ b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.10.bb
@@ -1,3 +1,22 @@
-inherit setuptools3
-require python-gitdb.inc
+SUMMARY = "A pure-Python git object database"
+HOMEPAGE = "http://github.com/gitpython-developers/gitdb"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
 
+DEPENDS = "python3-smmap"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "gitdb"
+
+SRC_URI[sha256sum] = "6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a"
+
+RDEPENDS:${PN} += "python3-compression \
+                   python3-crypt \
+                   python3-io \
+                   python3-mmap \
+                   python3-shell \
+                   python3-smmap \
+"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-hatchling_1.14.1.bb b/poky/meta/recipes-devtools/python/python3-hatchling_1.17.0.bb
similarity index 85%
rename from poky/meta/recipes-devtools/python/python3-hatchling_1.14.1.bb
rename to poky/meta/recipes-devtools/python/python3-hatchling_1.17.0.bb
index a3d2b74..05a86f0 100644
--- a/poky/meta/recipes-devtools/python/python3-hatchling_1.14.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-hatchling_1.17.0.bb
@@ -8,7 +8,7 @@
 DEPENDS += "python3-pluggy-native python3-pathspec-native python3-packaging-native python3-editables-native python3-trove-classifiers-native"
 DEPENDS:remove:class-native = "python3-hatchling-native"
 
-SRC_URI[sha256sum] = "55fbc88cbd0d96c09c3e9392b51db513fd4cb4caf47615d65f935a5ef1756133"
+SRC_URI[sha256sum] = "b1244db3f45b4ef5a00106a46612da107cdfaf85f1580b8e1c059fefc98b0930"
 
 do_compile:prepend() {
     export PYTHONPATH=src
diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_6.71.0.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_6.71.0.bb
index 8ec885f..15f4090 100644
--- a/poky/meta/recipes-devtools/python/python3-hypothesis_6.71.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-hypothesis_6.71.0.bb
@@ -20,13 +20,13 @@
     python3-compression \
     python3-core \
     python3-json \
+    python3-pytest \
     python3-sortedcontainers \
     python3-statistics \
     python3-unittest \
     "
 
 RDEPENDS:${PN}-ptest += " \
-    ${PYTHON_PN}-pytest \
     ${PYTHON_PN}-unittest-automake-output \
     "
 
diff --git a/poky/meta/recipes-devtools/python/python3-installer_0.7.0.bb b/poky/meta/recipes-devtools/python/python3-installer_0.7.0.bb
index d7f1e79..9429705 100644
--- a/poky/meta/recipes-devtools/python/python3-installer_0.7.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-installer_0.7.0.bb
@@ -15,6 +15,12 @@
 # Bootstrap the native build
 DEPENDS:remove:class-native = "python3-build-native python3-installer-native"
 
+RDEPENDS:${PN} += " \
+    python3-compile \
+    python3-compression \
+    python3-netclient \
+"
+
 INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode"
 
 do_compile:class-native () {
diff --git a/poky/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb b/poky/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb
index f49bf08..79f03da 100644
--- a/poky/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb
@@ -9,3 +9,5 @@
 inherit pypi setuptools3
 
 BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN} += "python3-profile"
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
index 8bfff43..6f7d9a0 100644
--- a/poky/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb
@@ -8,9 +8,11 @@
 GNOMEBASEBUILDCLASS = "meson"
 GIR_MESON_OPTION = ""
 
-inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even
+inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even features_check
 
-DEPENDS += "python3 glib-2.0 gobject-introspection"
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+
+DEPENDS += "python3 glib-2.0"
 
 SRCNAME="pygobject"
 
@@ -24,7 +26,10 @@
 
 PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
 
-RDEPENDS:${PN} += "python3-pkgutil"
+RDEPENDS:${PN} += " \
+    python3-io \
+    python3-pkgutil \
+"
 
 # python3-pycairo is checked on configuration -> DEPENDS
 # we don't link against python3-pycairo -> RDEPENDS
diff --git a/poky/meta/recipes-devtools/python/python3-pyproject-hooks_1.0.0.bb b/poky/meta/recipes-devtools/python/python3-pyproject-hooks_1.0.0.bb
index e3893d5..c3f1fb7 100644
--- a/poky/meta/recipes-devtools/python/python3-pyproject-hooks_1.0.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pyproject-hooks_1.0.0.bb
@@ -14,7 +14,10 @@
 # Bootstrap the native build
 DEPENDS:remove:class-native = "python3-build-native"
 
-RDEPENDS:${PN} += "python3-json"
+RDEPENDS:${PN} += " \
+    python3-io \
+    python3-json \
+"
 
 do_compile:class-native () {
     python_flit_core_do_manual_build
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.5.2.bb b/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.5.2.bb
index 502967f..01e29cc 100644
--- a/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.5.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-setuptools-rust_1.5.2.bb
@@ -18,13 +18,16 @@
 
 DEPENDS += "python3-setuptools-scm-native python3-wheel-native"
 
-RDEPENDS:${PN}:class-native += " \
-    python3-semantic-version-native \
-    python3-setuptools-native \
-    python3-setuptools-scm-native \
-    python3-toml-native \
-    python3-typing-extensions-native \
-    python3-wheel-native \
+RDEPENDS:${PN} += " \
+    python3-distutils \
+    python3-json \
+    python3-semantic-version \
+    python3-setuptools \
+    python3-setuptools-scm \
+    python3-shell \
+    python3-toml \
+    python3-typing-extensions \
+    python3-wheel \
 "
 
 BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-sphinx-rtd-theme_1.2.0.bb b/poky/meta/recipes-devtools/python/python3-sphinx-rtd-theme_1.2.0.bb
index e8a422b..d9cd18e 100644
--- a/poky/meta/recipes-devtools/python/python3-sphinx-rtd-theme_1.2.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-sphinx-rtd-theme_1.2.0.bb
@@ -6,7 +6,10 @@
                     file://OFL-License.txt;md5=4534c22e0147eadb6828bd9fe86d4868 \
                     file://Apache-License-2.0.txt;md5=8a75796f0ef19c3f601d69857f5a9a5b"
 
-DEPENDS = "python3-sphinx"
+RDEPENDS:${PN} += " \
+    python3-compile \
+    python3-sphinx \
+"
 
 PYPI_PACKAGE = "sphinx_rtd_theme"
 
diff --git a/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb b/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb
index 6118a6a..9401ed8 100644
--- a/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-tomli_2.0.1.bb
@@ -11,3 +11,8 @@
 SRC_URI[sha256sum] = "de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
 
 BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN} += " \
+    python3-datetime \
+    python3-stringold \
+"
diff --git a/poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.4.29.bb b/poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.5.2.bb
similarity index 86%
rename from poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.4.29.bb
rename to poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.5.2.bb
index 4bbcea5..78057fe 100644
--- a/poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.4.29.bb
+++ b/poky/meta/recipes-devtools/python/python3-trove-classifiers_2023.5.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-SRC_URI[sha256sum] = "8adcc06f1eb7c495f0bdceb698bd9c044b3e57b0d5767d99ec4b6b17c9bbe957"
+SRC_URI[sha256sum] = "c46d6e40a9581599b16c712e0164fec3764872a4085c673c07559787caedb867"
 
 inherit pypi python_setuptools_build_meta ptest
 
diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index f278b18..766f083 100644
--- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -152,6 +152,23 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc"
         ]
     },
+    "cgitb": {
+        "summary": "Special exception handler for Python scripts",
+        "rdepends": [
+            "core",
+            "crypt",
+            "html",
+            "io",
+            "math",
+            "pydoc"
+        ],
+        "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/cgitb.py"
+        ],
+        "cached": [
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cgitb.*.pyc"
+        ]
+    },
     "codecs": {
         "summary": "Python codec",
         "rdepends": [
@@ -1219,6 +1236,18 @@
             "${libdir}/python${PYTHON_MAJMIN}/tomllib/_parser.*.pyc"
         ]
     },
+    "turtle": {
+        "summary": "Turtle graphics is a popular way for introducing programming to kids.",
+        "rdepends": [
+            "tkinter"
+        ],
+        "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/turtle.py"
+        ],
+        "cached": [
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/turtle.*.pyc"
+        ]
+     },
     "unittest": {
         "summary": "Python unit testing framework",
         "rdepends": [
@@ -1304,6 +1333,19 @@
         ],
         "cached": []
     },
+    "zipapp": {
+        "summary": "Tools to manage the creation of zip files containing Python code",
+        "rdepends": [
+            "compression",
+            "core"
+        ],
+        "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/zipapp.py"
+        ],
+        "cached": [
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc"
+        ]
+    },
     "zoneinfo": {
         "summary": "IANA time zone support",
         "rdepends": [
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index 394fa2a..a87dee5 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -224,6 +224,7 @@
 PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp"
 PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
 PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack,"
+PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils"
 
 INSANE_SKIP:${PN} = "arch"
 
diff --git a/poky/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch b/poky/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch
deleted file mode 100644
index abad1cf..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Avoid conflicts between sys/mount.h and linux/mount.h that are seen
-with glibc 2.36
-
-Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
-@@ -95,7 +95,25 @@
- #include <linux/soundcard.h>
- #include <linux/kd.h>
- #include <linux/mtio.h>
-+
-+#ifdef HAVE_SYS_MOUNT_FSCONFIG
-+/*
-+ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
-+ * which in turn prevents use of linux/fs.h. So we have to
-+ * define the constants ourselves for now.
-+ */
-+#define FS_IOC_GETFLAGS                _IOR('f', 1, long)
-+#define FS_IOC_SETFLAGS                _IOW('f', 2, long)
-+#define FS_IOC_GETVERSION              _IOR('v', 1, long)
-+#define FS_IOC_SETVERSION              _IOW('v', 2, long)
-+#define FS_IOC_FIEMAP                  _IOWR('f', 11, struct fiemap)
-+#define FS_IOC32_GETFLAGS              _IOR('f', 1, int)
-+#define FS_IOC32_SETFLAGS              _IOW('f', 2, int)
-+#define FS_IOC32_GETVERSION            _IOR('v', 1, int)
-+#define FS_IOC32_SETVERSION            _IOW('v', 2, int)
-+#else
- #include <linux/fs.h>
-+#endif
- #include <linux/fd.h>
- #if defined(CONFIG_FIEMAP)
- #include <linux/fiemap.h>
---- a/meson.build
-+++ b/meson.build
-@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET',
-                      cc.has_header_symbol('getopt.h', 'optreset'))
- config_host_data.set('HAVE_IPPROTO_MPTCP',
-                      cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
-+config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
-+                     cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
- 
- # has_member
- config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
index 9f5dde0..9fa486d 100644
--- a/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
+++ b/poky/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
@@ -1,4 +1,4 @@
-From 5492ac3c716020a27a25253bbffe810db43202bf Mon Sep 17 00:00:00 2001
+From 93f219df68f3741ff63a294a16bcbe8deba1112f Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 9 Mar 2017 18:54:02 +0200
 Subject: [PATCH] Add a color setting for mips64_n32 binaries
@@ -11,11 +11,11 @@
  rpmrc.in      | 2 ++
  2 files changed, 6 insertions(+)
 
-Index: git/build/rpmfc.c
-===================================================================
---- git.orig/build/rpmfc.c
-+++ git/build/rpmfc.c
-@@ -645,6 +645,7 @@ exit:
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index 26606378f..a16e3f4e9 100644
+--- a/build/rpmfc.c
++++ b/build/rpmfc.c
+@@ -646,6 +646,7 @@ exit:
  static const struct rpmfcTokens_s rpmfcTokens[] = {
    { "directory",		RPMFC_INCLUDE },
  
@@ -23,20 +23,20 @@
    { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
    { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
  
-@@ -1150,6 +1151,9 @@ static uint32_t getElfColor(const char *
+@@ -1151,6 +1152,9 @@ static uint32_t getElfColor(const char *fn)
  		color = RPMFC_ELF32;
  		break;
  	    }
 +            if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE)
 +                if (ehdr.e_flags & EF_MIPS_ABI2)
 +                    color = RPMFC_ELFMIPSN32;
- 	    elf_end(elf);
  	}
- 	close(fd);
-Index: git/rpmrc.in
-===================================================================
---- git.orig/rpmrc.in
-+++ git/rpmrc.in
+ 	if (elf)
+ 	    elf_end(elf);
+diff --git a/rpmrc.in b/rpmrc.in
+index 2975a3a0e..c7232b48b 100644
+--- a/rpmrc.in
++++ b/rpmrc.in
 @@ -139,6 +139,8 @@ archcolor: mipsr6el 1
  archcolor: mips64r6 2
  archcolor: mips64r6el 2
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 6f613d0..8fdc5ed 100644
--- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,4 +1,4 @@
-From 4ab6a4c5bbad65c3401016bb26b87214cdd0c59b Mon Sep 17 00:00:00 2001
+From 5fc560aaf1184d35d161f7d50dbb6323c90cc02d Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 27 Feb 2017 09:43:30 +0200
 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -13,10 +13,10 @@
  rpm.am       | 4 ++--
  3 files changed, 4 insertions(+), 4 deletions(-)
 
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
+diff --git a/configure.ac b/configure.ac
+index e6676c581..ec28db9b6 100644
+--- a/configure.ac
++++ b/configure.ac
 @@ -942,7 +942,7 @@ else
      usrprefix=$prefix
  fi
@@ -26,11 +26,11 @@
  AC_SUBST(RPMCONFIGDIR)
  
  AC_SUBST(OBJDUMP)
-Index: git/macros.in
-===================================================================
---- git.orig/macros.in
-+++ git/macros.in
-@@ -911,7 +911,7 @@ package or when debugging this package.\
+diff --git a/macros.in b/macros.in
+index a2411d784..735b74d99 100644
+--- a/macros.in
++++ b/macros.in
+@@ -930,7 +930,7 @@ package or when debugging this package.\
  %_sharedstatedir	%{_prefix}/com
  %_localstatedir		%{_prefix}/var
  %_lib			lib
@@ -39,10 +39,10 @@
  %_includedir		%{_prefix}/include
  %_infodir		%{_datadir}/info
  %_mandir		%{_datadir}/man
-Index: git/rpm.am
-===================================================================
---- git.orig/rpm.am
-+++ git/rpm.am
+diff --git a/rpm.am b/rpm.am
+index 55b5b3935..5a51f102b 100644
+--- a/rpm.am
++++ b/rpm.am
 @@ -1,10 +1,10 @@
  # Internal binaries
  ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
@@ -55,4 +55,4 @@
 +rpmconfigdir = $(libdir)/rpm
  
  # Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 12:0:3
+ rpm_version_info = 13:0:4
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch b/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
deleted file mode 100644
index 734e38b..0000000
--- a/poky/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 2d53d1e308a5bd15a16cc289fa7e1f264ea706be Mon Sep 17 00:00:00 2001
-From: Panu Matilainen <pmatilai@redhat.com>
-Date: Tue, 26 Jun 2018 10:46:14 +0300
-Subject: [PATCH] Rip out partial support for unused MD2 and RIPEMD160 digests
-
-Inspired by #453, adding configure-checks for unused digests algorithms
-seems nonsensical, at no point in rpm history have these algorithms been
-used for anything in rpm so there's not even backward compatibility to
-care about. So the question becomes why do we appear to have (some)
-support for those unused algorithms? So lets don't, problem solved...
-
-Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/ff4b9111aeba01dd025dd133ce617fb80f7398a0]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- rpmio/digest_beecrypt.c | 7 -------
- rpmio/digest_nss.c      | 2 --
- rpmio/digest_openssl.c  | 6 ------
- 3 files changed, 15 deletions(-)
-
-diff --git a/rpmio/digest_beecrypt.c b/rpmio/digest_beecrypt.c
-index 597027e25..653a39491 100644
---- a/rpmio/digest_beecrypt.c
-+++ b/rpmio/digest_beecrypt.c
-@@ -132,10 +132,6 @@ DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags)
- 	ctx->Digest = (void *) sha512Digest;
- 	break;
- #endif
--    case PGPHASHALGO_RIPEMD160:
--    case PGPHASHALGO_MD2:
--    case PGPHASHALGO_TIGER192:
--    case PGPHASHALGO_HAVAL_5_160:
-     default:
- 	free(ctx);
- 	return NULL;
-@@ -292,9 +288,6 @@ static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, si
-     case PGPHASHALGO_SHA1:
-         prefix = "3021300906052b0e03021a05000414";
-         break;
--    case PGPHASHALGO_MD2:
--        prefix = "3020300c06082a864886f70d020205000410";
--        break;
-     case PGPHASHALGO_SHA256:
-         prefix = "3031300d060960864801650304020105000420";
-         break;
-diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
-index e11920e3e..b3d2b5595 100644
---- a/rpmio/digest_nss.c
-+++ b/rpmio/digest_nss.c
-@@ -117,7 +117,6 @@ static HASH_HashType getHashType(int hashalgo)
- {
-     switch (hashalgo) {
-     case PGPHASHALGO_MD5:	return HASH_AlgMD5;
--    case PGPHASHALGO_MD2:	return HASH_AlgMD2;
-     case PGPHASHALGO_SHA1:	return HASH_AlgSHA1;
- #ifdef SHA224_LENGTH
-     case PGPHASHALGO_SHA224:	return HASH_AlgSHA224;
-@@ -217,7 +216,6 @@ static SECOidTag getHashAlg(unsigned int hashalgo)
- {
-     switch (hashalgo) {
-     case PGPHASHALGO_MD5:	return SEC_OID_MD5;
--    case PGPHASHALGO_MD2:	return SEC_OID_MD2;
-     case PGPHASHALGO_SHA1:	return SEC_OID_SHA1;
- #ifdef SHA224_LENGTH
-     case PGPHASHALGO_SHA224:	return SEC_OID_SHA224;
-diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c
-index 18e52a724..0ae48dd1d 100644
---- a/rpmio/digest_openssl.c
-+++ b/rpmio/digest_openssl.c
-@@ -172,12 +172,6 @@ static const EVP_MD *getEVPMD(int hashalgo)
-     case PGPHASHALGO_SHA1:
-         return EVP_sha1();
- 
--    case PGPHASHALGO_RIPEMD160:
--        return EVP_ripemd160();
--
--    case PGPHASHALGO_MD2:
--        return EVP_md2();
--
-     case PGPHASHALGO_SHA256:
-         return EVP_sha256();
- 
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch b/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
deleted file mode 100644
index d7137f1..0000000
--- a/poky/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 9bf1693092385eba9841614613313010221ca01f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 29 Jun 2021 20:11:26 +0200
-Subject: [PATCH] docs: do not build manpages (requires pandoc)
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- docs/Makefile.am | 2 --
- 1 file changed, 2 deletions(-)
-
-Index: git/docs/Makefile.am
-===================================================================
---- git.orig/docs/Makefile.am
-+++ git/docs/Makefile.am
-@@ -1,7 +1,5 @@
- ## Process this file with automake to produce Makefile.in
- 
--SUBDIRS = man
--
- EXTRA_DIST =
- 
- EXTRA_DIST += \
diff --git a/poky/meta/recipes-devtools/rpm/files/fifofix.patch b/poky/meta/recipes-devtools/rpm/files/fifofix.patch
deleted file mode 100644
index 71703d7..0000000
--- a/poky/meta/recipes-devtools/rpm/files/fifofix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Calling openat() on a fifo causes a pseudo hang for us (e.g. the fifo in psplash).
-Avoid calling openat for fifos.
-
-Introduced upstream with:
-
-https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/issues/2195]
-
-Index: git/lib/fsm.c
-===================================================================
---- git.orig/lib/fsm.c
-+++ git/lib/fsm.c
-@@ -1010,7 +1010,7 @@ int rpmPackageFilesInstall(rpmts ts, rpm
-                     rc = RPMERR_UNKNOWN_FILETYPE;
-             }
- 
--	    if (!rc && fd == -1 && !S_ISLNK(fp->sb.st_mode)) {
-+	    if (!rc && fd == -1 && !S_ISLNK(fp->sb.st_mode) && !S_ISFIFO(fp->sb.st_mode)) {
- 		/* Only follow safe symlinks, and never on temporary files */
- 		fd = fsmOpenat(di.dirfd, fp->fpath,
- 				fp->suffix ? AT_SYMLINK_NOFOLLOW : 0, 0);
diff --git a/poky/meta/recipes-devtools/rpm/files/fix-declaration.patch b/poky/meta/recipes-devtools/rpm/files/fix-declaration.patch
new file mode 100644
index 0000000..e5c84eb
--- /dev/null
+++ b/poky/meta/recipes-devtools/rpm/files/fix-declaration.patch
@@ -0,0 +1,39 @@
+From b960c0b43a080287a7c13533eeb2d9f288db1414 Mon Sep 17 00:00:00 2001
+From: Florian Festi <ffesti@redhat.com>
+Date: Thu, 16 Mar 2023 19:05:04 +0100
+Subject: [PATCH] Fix compiler error on clang
+
+Turns out variable declarations are not allowed after a label, even in
+C99. And while some compilers don't seem to care others do.
+
+Moving the declaration of mayopen to the start of the function to avoid
+this problem.
+
+Resolves: #2435
+Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b960c0b43a080287a7c13533eeb2d9f288db1414]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ lib/fsm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/fsm.c b/lib/fsm.c
+index 5671ac642d..183293edb0 100644
+--- a/lib/fsm.c
++++ b/lib/fsm.c
+@@ -879,6 +879,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
+     int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0;
+     int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0;
+     int firstlinkfile = -1;
++    int mayopen = 0;
+     char *tid = NULL;
+     struct filedata_s *fdata = xcalloc(fc, sizeof(*fdata));
+     struct filedata_s *firstlink = NULL;
+@@ -1016,7 +1017,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
+ 
+ setmeta:
+ 	    /* Special files require path-based ops */
+-	    int mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
++	    mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
+ 	    if (!rc && fd == -1 && mayopen) {
+ 		int flags = O_RDONLY;
+ 		/* Only follow safe symlinks, and never on temporary files */
diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.18.0.bb b/poky/meta/recipes-devtools/rpm/rpm_4.18.1.bb
similarity index 96%
rename from poky/meta/recipes-devtools/rpm/rpm_4.18.0.bb
rename to poky/meta/recipes-devtools/rpm/rpm_4.18.1.bb
index 7790db8..6da2edd 100644
--- a/poky/meta/recipes-devtools/rpm/rpm_4.18.0.bb
+++ b/poky/meta/recipes-devtools/rpm/rpm_4.18.1.bb
@@ -35,15 +35,14 @@
            file://0001-perl-disable-auto-reqs.patch \
            file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
            file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
-           file://0001-docs-do-not-build-manpages-requires-pandoc.patch \
            file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
            file://0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch \
-           file://fifofix.patch \
            file://0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch \
+           file://fix-declaration.patch \
            "
 
 PE = "1"
-SRCREV = "ea0d77c52e176e2876fdb1d07ad41e9e2635a93e"
+SRCREV = "4588bc3f994338502d2770ad24cbfcdaa6c335ec"
 
 S = "${WORKDIR}/git"
 
@@ -187,7 +186,7 @@
 
 PACKAGES += "python3-rpm"
 PROVIDES += "python3-rpm"
-FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info"
 
 RDEPENDS:${PN}-build = "bash perl python3-core debugedit"
 
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-Include-missing-cstdint.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-Include-missing-cstdint.patch
deleted file mode 100644
index fbee24a..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-Include-missing-cstdint.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 687d9fb9e3de832379680e9d5268331011c92afa Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 26 Jan 2023 08:53:26 -0800
-Subject: [PATCH] drd/tests: Include missing <cstdint>
-
-gcc 13 moved some includes around and as a result <cstdint> is no longer
-transitively included [1]. Explicitly include it for uint{32,64}_t.
-
-Fixes
-tsan_thread_wrappers_pthread.h:91:9: error: 'int64_t' does not name a type
-
-[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
-
-Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=464859]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- drd/tests/tsan_thread_wrappers_pthread.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drd/tests/tsan_thread_wrappers_pthread.h b/drd/tests/tsan_thread_wrappers_pthread.h
-index f15e6ad..4cc8062 100644
---- a/drd/tests/tsan_thread_wrappers_pthread.h
-+++ b/drd/tests/tsan_thread_wrappers_pthread.h
-@@ -55,6 +55,7 @@
- #define NO_TLS
- #endif
- 
-+#include <cstdint>
- #include <string>
- using namespace std;
- 
--- 
-2.39.1
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
deleted file mode 100644
index a48d7db..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:12:43 -0700
-Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined
-
-Helps compiling with musl where __THROW is not available
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- memcheck/tests/arm64-linux/scalar.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h
-index 9008816..8ef050f 100644
---- a/memcheck/tests/arm64-linux/scalar.h
-+++ b/memcheck/tests/arm64-linux/scalar.h
-@@ -12,6 +12,10 @@
- #include <sys/types.h>
- #include <sys/mman.h>
- 
-+#ifndef __THROW
-+#define __THROW
-+#endif
-+
- // Since we use vki_unistd.h, we can't include <unistd.h>.  So we have to
- // declare this ourselves.
- extern long int syscall (long int __sysno, ...) __THROW;
--- 
-2.13.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
new file mode 100644
index 0000000..5e36c28
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
@@ -0,0 +1,30 @@
+From 978d9ed7f857f2cdcd2a8632f3c2feb56b99c825 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Mon, 8 May 2023 11:56:35 +0200
+Subject: [PATCH] none/tests/x86-linux/seg_override.c: add missing include for
+ musl builds
+
+Otherwise SYS_modify_ldt is undefined.
+
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=382034]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
+---
+ none/tests/x86-linux/seg_override.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
+index ca8fbfe..4ef4394 100644
+--- a/none/tests/x86-linux/seg_override.c
++++ b/none/tests/x86-linux/seg_override.c
+@@ -3,6 +3,10 @@
+ #include <errno.h>
+ #include <string.h>
+ #include "../../../config.h"
++#if defined(MUSL_LIBC)
++#include <syscall.h>
++#include <unistd.h>
++#endif
+ 
+ 
+ /* Stuff from Wine. */
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
deleted file mode 100644
index 5433472..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:36:42 -0700
-Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined
-
-musl does not have __THROW, therefore make it null
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- memcheck/tests/x86-linux/scalar.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h
-index ef28b03..52f742e 100644
---- a/memcheck/tests/x86-linux/scalar.h
-+++ b/memcheck/tests/x86-linux/scalar.h
-@@ -11,6 +11,10 @@
- #include <sys/types.h>
- #include <sys/mman.h>
- 
-+#ifndef __THROW
-+#define __THROW
-+#endif
-+
- // Since we use vki_unistd.h, we can't include <unistd.h>.  So we have to
- // declare this ourselves.
- extern long int syscall (long int __sysno, ...) __THROW;
--- 
-2.13.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
deleted file mode 100644
index fa1344c..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:37:56 -0700
-Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall()
-
-__modify_ldt() is specific to glibc, replacing it with syscall()
-makes it more portable.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- none/tests/x86-linux/seg_override.c | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
-index b7619c9..c89874b 100644
---- a/none/tests/x86-linux/seg_override.c
-+++ b/none/tests/x86-linux/seg_override.c
-@@ -2,6 +2,8 @@
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
-+#include <unistd.h>
-+#include <syscall.h>
- 
- /* Stuff from Wine. */
- 
-@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
- /* our copy of the ldt */
- LDT_ENTRY ldt_copy[8192];
- 
--/* System call to set LDT entry.  */
--//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
--extern int __modify_ldt (int, void *, size_t);
--
- void print_ldt ( void )
- {
-    int res;
--   res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
-+   /* System call to set LDT entry.  */
-+   res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
-    printf("got %d bytes\n", res );   
-    perror("error is");
- }
-@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s
-   unsigned int empty:25;
- };
- 
--/* System call to set LDT entry.  */
--//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
--
- void set_ldt1 ( void* base )
- {
-   int stat;
-@@ -102,7 +98,8 @@ void set_ldt1 ( void* base )
-   ldt_entry.read_exec_only = 0;
-   ldt_entry.limit_in_pages = 0;
-   ldt_entry.seg_not_present = 0;
--  stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry));
-+  /* System call to set LDT entry.  */
-+  stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry));
-   printf("stat = %d\n", stat);
- }
- 
--- 
-2.13.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
index a3637ea..fea3b00 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
@@ -1,7 +1,7 @@
-From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001
+From e244a72c6f8803550f37e81f72bbae039651013b Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 15 Dec 2015 15:50:44 +0200
-Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats
+Subject: [PATCH] Modify vg_test wrapper to support PTEST formats
 
 Change the valgrind regression test script vg_regtest to
 support the yocto ptest stdout reporting format.  The commit adds
@@ -25,11 +25,11 @@
 
 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
 ---
- tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++--------------
+ tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++------------
  1 file changed, 55 insertions(+), 20 deletions(-)
 
 diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index a441f42..cb05b52 100755
+index ad18800..e4bd8cb 100755
 --- a/tests/vg_regtest.in
 +++ b/tests/vg_regtest.in
 @@ -47,6 +47,7 @@
@@ -49,7 +49,7 @@
       . "   Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n"
       . "\n";
  
-@@ -186,6 +187,7 @@ my $outer_args;
+@@ -187,6 +188,7 @@ my $run_outer_args = "";
  my $valgrind_lib = "$tests_dir/.in_place";
  my $keepunfiltered = 0;
  my $looptillfail = 0;
@@ -57,7 +57,7 @@
  
  # default filter is the one named "filter_stderr" in the test's directory
  my $default_stderr_filter = "filter_stderr";
-@@ -244,6 +246,8 @@ sub process_command_line()
+@@ -245,6 +247,8 @@ sub process_command_line()
                  $keepunfiltered = 1;
              } elsif ($arg =~ /^--loop-till-fail$/) {
                  $looptillfail = 1;
@@ -66,7 +66,7 @@
              } else {
                  die $usage;
              }
-@@ -365,13 +369,28 @@ sub read_vgtest_file($)
+@@ -376,13 +380,28 @@ sub read_vgtest_file($)
  #----------------------------------------------------------------------------
  # Since most of the program time is spent in system() calls, need this to
  # propagate a Ctrl-C enabling us to quit.
@@ -100,7 +100,7 @@
  # if $keepunfiltered, copies $1 to $1.unfiltered.out
  # renames $0 tp $1
  sub filtered_rename($$) 
-@@ -419,23 +438,25 @@ sub do_diffs($$$$)
+@@ -430,23 +449,25 @@ sub do_diffs($$$$)
                  # A match;  remove .out and any previously created .diff files.
                  unlink("$name.$mid.out");
                  unlink(<$name.$mid.diff*>);
@@ -128,7 +128,7 @@
      $vgtest =~ /^(.*)\.vgtest/;
      my $name = $1;
      my $fullname = "$dir/$name"; 
-@@ -454,7 +475,11 @@ sub do_one_test($$)
+@@ -465,7 +486,11 @@ sub do_one_test($$)
          } elsif (256 == $prereq_res) {
              # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
              # Prereq failed, skip.
@@ -141,7 +141,7 @@
              return;
          } else {
              # Bad prereq; abort.
-@@ -472,7 +497,7 @@ sub do_one_test($$)
+@@ -483,7 +508,7 @@ sub do_one_test($$)
          }
          # If there is a progB, let's start it in background:
          printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
@@ -150,7 +150,7 @@
          # progB.done used to detect child has finished. See below.
          # Note: redirection of stdout and stderr is before $progB to allow argsB
          # to e.g. redirect stdoutB to stderrB
-@@ -488,7 +513,8 @@ sub do_one_test($$)
+@@ -499,7 +524,8 @@ sub do_one_test($$)
                       . "touch progB.done)  &");
          }
      } else {
@@ -160,7 +160,7 @@
      }
  
      # Collect environment variables, if any.
-@@ -529,7 +555,7 @@ sub do_one_test($$)
+@@ -540,7 +566,7 @@ sub do_one_test($$)
      # Find all the .stdout.exp files.  If none, use /dev/null.
      my @stdout_exps = <$name.stdout.exp*>;
      @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
@@ -169,7 +169,7 @@
  
      # Filter stderr
      $stderr_filter_args = $name if (! defined $stderr_filter_args);
-@@ -538,7 +564,7 @@ sub do_one_test($$)
+@@ -549,7 +575,7 @@ sub do_one_test($$)
      # Find all the .stderr.exp files.  At least one must exist.
      my @stderr_exps = <$name.stderr.exp*>;
      (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
@@ -178,7 +178,7 @@
  
      if (defined $progB) {
          # wait for the child to be finished
-@@ -562,7 +588,7 @@ sub do_one_test($$)
+@@ -573,7 +599,7 @@ sub do_one_test($$)
          # Find all the .stdoutB.exp files.  If none, use /dev/null.
          my @stdoutB_exps = <$name.stdoutB.exp*>;
          @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
@@ -187,7 +187,7 @@
          
          # Filter stderr
          $stderrB_filter_args = $name if (! defined $stderrB_filter_args);
-@@ -571,7 +597,7 @@ sub do_one_test($$)
+@@ -582,7 +608,7 @@ sub do_one_test($$)
          # Find all the .stderrB.exp files.  At least one must exist.
          my @stderrB_exps = <$name.stderrB.exp*>;
          (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
@@ -196,7 +196,7 @@
      }
  
      # Maybe do post-test check
-@@ -583,7 +609,7 @@ sub do_one_test($$)
+@@ -594,7 +620,7 @@ sub do_one_test($$)
  	    # Find all the .post.exp files.  If none, use /dev/null.
  	    my @post_exps = <$name.post.exp*>;
  	    @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
@@ -205,7 +205,7 @@
  	}
      }
   
-@@ -592,6 +618,13 @@ sub do_one_test($$)
+@@ -603,6 +629,13 @@ sub do_one_test($$)
              print("(cleanup operation failed: $cleanup)\n");
      }
  
@@ -219,25 +219,25 @@
      $num_tests_done++;
  }
  
-@@ -631,7 +664,7 @@ sub test_one_dir($$)
-     my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
+@@ -643,7 +676,7 @@ sub test_one_dir($$)
  
+     my $tests_start_time = time;
      if ($found_tests) {
 -        print "-- Running  tests in $full_dir $dashes\n";
 +        print "-- Running  tests in $full_dir $dashes\n" if ($yoctoptest == 0);
      }
      foreach my $f (@fs) {
          if (-d $f) {
-@@ -641,7 +674,7 @@ sub test_one_dir($$)
-         }
-     }
-     if ($found_tests) {
--        print "-- Finished tests in $full_dir $dashes\n";
+@@ -657,7 +690,7 @@ sub test_one_dir($$)
+         my $end_time = "(in $tests_cost_time sec)";
+         my $end_dashes = "-" x (50 - (length $full_dir)
+                                    - (length $end_time) - 1);
+-        print "-- Finished tests in $full_dir $end_time $end_dashes\n";
 +        print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0);
      }
  
      chdir("..");
-@@ -667,10 +700,12 @@ sub summarise_results
+@@ -683,10 +716,12 @@ sub summarise_results
             $num_failures{"stdout"},   plural($num_failures{"stdout"}),
             $num_failures{"stderrB"},  plural($num_failures{"stderrB"}),
             $num_failures{"stdoutB"},  plural($num_failures{"stdoutB"}),
@@ -253,5 +253,5 @@
      print "\n";
  }
 -- 
-2.6.2
+2.30.2
 
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
index db6867f..b9804e7 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
@@ -1,4 +1,4 @@
-From d85cc45e0ddeda68adf594dead715964cb32d0e7 Mon Sep 17 00:00:00 2001
+From beaa5b64c60d501fa9cd59fdc563e5f5bccf6882 Mon Sep 17 00:00:00 2001
 From: Qing He <qing.he@intel.com>
 Date: Tue, 31 Aug 2010 22:51:58 +0800
 Subject: [PATCH] valgrind: fix perl scripts
@@ -17,34 +17,13 @@
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- cachegrind/cg_annotate.in | 2 +-
- cachegrind/cg_diff.in     | 2 +-
- massif/ms_print.in        | 2 +-
- perf/vg_perf.in           | 2 +-
- tests/vg_regtest.in       | 2 +-
- 5 files changed, 5 insertions(+), 5 deletions(-)
 
-diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in
-index fea114b..5e814fd 100644
---- a/cachegrind/cg_annotate.in
-+++ b/cachegrind/cg_annotate.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
- 
- ##--------------------------------------------------------------------##
- ##--- Cachegrind's annotator.                       cg_annotate.in ---##
-diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in
-index 9d9258e..d0f0ec7 100755
---- a/cachegrind/cg_diff.in
-+++ b/cachegrind/cg_diff.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
- 
- ##--------------------------------------------------------------------##
- ##--- Cachegrind's differencer.                         cg_diff.in ---##
+---
+ massif/ms_print.in  | 2 +-
+ perf/vg_perf.in     | 2 +-
+ tests/vg_regtest.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
 diff --git a/massif/ms_print.in b/massif/ms_print.in
 index a206ce4..df1bc31 100755
 --- a/massif/ms_print.in
@@ -66,7 +45,7 @@
  ##--- Valgrind performance testing script                  vg_perf ---##
  ##--------------------------------------------------------------------##
 diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index 0fe6341..1b45eb7 100755
+index 7152765..ad18800 100755
 --- a/tests/vg_regtest.in
 +++ b/tests/vg_regtest.in
 @@ -1,4 +1,4 @@
@@ -75,6 +54,3 @@
  ##--------------------------------------------------------------------##
  ##--- Valgrind regression testing script                vg_regtest ---##
  ##--------------------------------------------------------------------##
--- 
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
similarity index 92%
rename from poky/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
rename to poky/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
index 07e5042..717d828 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb
@@ -27,9 +27,6 @@
            file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
            file://0002-context-APIs-are-not-available-on-musl.patch \
            file://0003-correct-include-directive-path-for-config.h.patch \
-           file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
-           file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
-           file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
            file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
            file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
@@ -39,9 +36,9 @@
            file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
            file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
            file://0001-docs-Disable-manual-validation.patch \
-           file://0001-drd-tests-Include-missing-cstdint.patch \
+           file://0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch \
            "
-SRC_URI[sha256sum] = "8536c031dbe078d342f121fa881a9ecd205cb5a78e639005ad570011bdb9f3c6"
+SRC_URI[sha256sum] = "10ce1618bb3e33fad16eb79552b0a3e1211762448a0d7fce11c8a6243b9ac971"
 UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
 
 COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
@@ -208,13 +205,6 @@
 	\) \
         -exec rm {} \;
 
-    # These files need to be newer so touch them.
-    touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test
-
-    # find *_annotate in ${bindir} for yocto build
-    sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest
-    sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest
-
     sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
     sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
 
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 6ae2139..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: cpio-2.11/gnu/Makefile.am
-===================================================================
---- cpio-2.11.orig/gnu/Makefile.am
-+++ cpio-2.11/gnu/Makefile.am
-@@ -734,7 +734,7 @@ install-exec-localcharset: all-local
- 	  case '$(host_os)' in \
- 	    darwin[56]*) \
- 	      need_charset_alias=true ;; \
--	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- 	      need_charset_alias=false ;; \
- 	    *) \
- 	      need_charset_alias=true ;; \
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch
deleted file mode 100644
index d637e70..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Use-__alignof__-with-clang.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6e169bb5fadb73b4dd300b28e9cae1e1772855e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 15 Jan 2023 02:05:23 -0800
-Subject: [PATCH] Use __alignof__ with clang.
-
-For clang versions < 8, use the same
-workaround as for GCC versions < 4.9.
-
-Backport couple of gnulib patches squashed
-
-[1] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471
-[2] https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=2af490a4c4ce85567296e27be6a9528964ca851e
-
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stdalign.in.h?id=57caf9541d98314102a55dd1cd0b8dc2be747471]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gnu/stdalign.in.h | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/gnu/stdalign.in.h b/gnu/stdalign.in.h
-index 5f56eee..e6e6a65 100644
---- a/gnu/stdalign.in.h
-+++ b/gnu/stdalign.in.h
-@@ -53,9 +53,12 @@
- #undef _Alignof
- 
- /* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
--   <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
-+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
-+   clang versions < 8.0.0 have the same bug.  */
- #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
--     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
-+     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
-+         && !defined __clang__) \
-+     || (defined __clang__ && __clang_major__ < 8))
- # ifdef __cplusplus
- #  if 201103 <= __cplusplus
- #   define _Alignof(type) alignof (type)
--- 
-2.39.0
-
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch
deleted file mode 100644
index 4b96e43..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 77ff5f1be394eb2c786df561ff37dde7f982ec76 Mon Sep 17 00:00:00 2001
-From: Stefano Babic <sbabic@denx.de>
-Date: Fri, 28 Jul 2017 13:20:52 +0200
-Subject: [PATCH] Wrong CRC with ASCII CRC for large files
-
-Due to signedness, the checksum is not computed when filesize is bigger
-a 2GB.
-
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-cpio/2017-07/msg00004.html]
-Signed-off-by: Stefano Babic <sbabic@denx.de>
----
- src/copyout.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/copyout.c b/src/copyout.c
-index 1f0987a..727aeca 100644
---- a/src/copyout.c
-+++ b/src/copyout.c
-@@ -34,13 +34,13 @@
-    compute and return a checksum for them.  */
- 
- static uint32_t
--read_for_checksum (int in_file_des, int file_size, char *file_name)
-+read_for_checksum (int in_file_des, unsigned int file_size, char *file_name)
- {
-   uint32_t crc;
-   char buf[BUFSIZ];
--  int bytes_left;
--  int bytes_read;
--  int i;
-+  unsigned int bytes_left;
-+  unsigned int bytes_read;
-+  unsigned int i;
- 
-   crc = 0;
- 
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch
deleted file mode 100644
index 6f6e396..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/0001-obstack-Fix-a-clang-warning.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 02f1f63d3ff58f3473f1689a0322a234ce10b659 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 13 Jan 2023 22:13:45 -0800
-Subject: [PATCH] obstack: Fix a clang warning
-
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0cc39712803ade7b2d4b89c36b143dad72404063]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gnu/obstack.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gnu/obstack.c b/gnu/obstack.c
-index 54b675d..4d6a1d5 100644
---- a/gnu/obstack.c
-+++ b/gnu/obstack.c
-@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE;
- #   include <libio/iolibio.h>
- #  endif
- 
--static _Noreturn void
-+static __attribute_noreturn__ void
- print_and_abort (void)
- {
-   /* Don't change any of these strings.  Yes, it would be possible to add
--- 
-2.39.0
-
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch
deleted file mode 100644
index 478324c..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 33e6cb5a28fab3d99bd6818f8c01e6f33805390f Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Mon, 20 Jan 2020 07:45:39 +0200
-Subject: [PATCH] src/global.c: Remove superfluous declaration of program_name
-
-Upstream-Status: Backport (commit 641d3f4)
-Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
----
- src/global.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/src/global.c b/src/global.c
-index fb3abe9..acf92bc 100644
---- a/src/global.c
-+++ b/src/global.c
-@@ -184,9 +184,6 @@ unsigned int warn_option = 0;
- /* Extract to standard output? */
- bool to_stdout_option = false;
- 
--/* The name this program was run with.  */
--char *program_name;
--
- /* A pointer to either lstat or stat, depending on whether
-    dereferencing of symlinks is done for input files.  */
- int (*xstat) ();
--- 
-2.26.2
-
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/CVE-2021-38185.patch b/poky/meta/recipes-extended/cpio/cpio-2.13/CVE-2021-38185.patch
deleted file mode 100644
index 6ceafee..0000000
--- a/poky/meta/recipes-extended/cpio/cpio-2.13/CVE-2021-38185.patch
+++ /dev/null
@@ -1,581 +0,0 @@
-GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted
-pattern file, because of a dstring.c ds_fgetstr integer overflow that triggers
-an out-of-bounds heap write.
-
-CVE: CVE-2021-38185
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From e494c68a3a0951b1eaba77e2db93f71a890e15d8 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Sat, 7 Aug 2021 12:52:21 +0300
-Subject: [PATCH 1/3] Rewrite dynamic string support.
-
-* src/dstring.c (ds_init): Take a single argument.
-(ds_free): New function.
-(ds_resize): Take a single argument.  Use x2nrealloc to expand
-the storage.
-(ds_reset,ds_append,ds_concat,ds_endswith): New function.
-(ds_fgetstr): Rewrite.  In particular, this fixes integer overflow.
-* src/dstring.h (dynamic_string): Keep both the allocated length
-(ds_size) and index of the next free byte in the string (ds_idx).
-(ds_init,ds_resize): Change signature.
-(ds_len): New macro.
-(ds_free,ds_reset,ds_append,ds_concat,ds_endswith): New protos.
-* src/copyin.c: Use new ds_ functions.
-* src/copyout.c: Likewise.
-* src/copypass.c: Likewise.
-* src/util.c: Likewise.
----
- src/copyin.c   | 40 +++++++++++------------
- src/copyout.c  | 16 ++++-----
- src/copypass.c | 34 +++++++++----------
- src/dstring.c  | 88 ++++++++++++++++++++++++++++++++++++--------------
- src/dstring.h  | 31 +++++++++---------
- src/util.c     |  6 ++--
- 6 files changed, 123 insertions(+), 92 deletions(-)
-
-diff --git a/src/copyin.c b/src/copyin.c
-index b29f348..37e503a 100644
---- a/src/copyin.c
-+++ b/src/copyin.c
-@@ -55,11 +55,12 @@ query_rename(struct cpio_file_stat* file_hdr, FILE *tty_in, FILE *tty_out,
-   char *str_res;		/* Result for string function.  */
-   static dynamic_string new_name;	/* New file name for rename option.  */
-   static int initialized_new_name = false;
-+
-   if (!initialized_new_name)
--  {
--    ds_init (&new_name, 128);
--    initialized_new_name = true;
--  }
-+    {
-+      ds_init (&new_name);
-+      initialized_new_name = true;
-+    }
- 
-   if (rename_flag)
-     {
-@@ -779,37 +780,36 @@ long_format (struct cpio_file_stat *file_hdr, char const *link_name)
-    already in `save_patterns' (from the command line) are preserved.  */
- 
- static void
--read_pattern_file ()
-+read_pattern_file (void)
- {
--  int max_new_patterns;
--  char **new_save_patterns;
--  int new_num_patterns;
-+  char **new_save_patterns = NULL;
-+  size_t max_new_patterns;
-+  size_t new_num_patterns;
-   int i;
--  dynamic_string pattern_name;
-+  dynamic_string pattern_name = DYNAMIC_STRING_INITIALIZER;
-   FILE *pattern_fp;
- 
-   if (num_patterns < 0)
-     num_patterns = 0;
--  max_new_patterns = 1 + num_patterns;
--  new_save_patterns = (char **) xmalloc (max_new_patterns * sizeof (char *));
-   new_num_patterns = num_patterns;
--  ds_init (&pattern_name, 128);
-+  max_new_patterns = num_patterns;
-+  new_save_patterns = xcalloc (max_new_patterns, sizeof (new_save_patterns[0]));
- 
-   pattern_fp = fopen (pattern_file_name, "r");
-   if (pattern_fp == NULL)
-     open_fatal (pattern_file_name);
-   while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
-     {
--      if (new_num_patterns >= max_new_patterns)
--	{
--	  max_new_patterns += 1;
--	  new_save_patterns = (char **)
--	    xrealloc ((char *) new_save_patterns,
--		      max_new_patterns * sizeof (char *));
--	}
-+      if (new_num_patterns == max_new_patterns)
-+	new_save_patterns = x2nrealloc (new_save_patterns,
-+					&max_new_patterns,
-+					sizeof (new_save_patterns[0]));
-       new_save_patterns[new_num_patterns] = xstrdup (pattern_name.ds_string);
-       ++new_num_patterns;
-     }
-+
-+  ds_free (&pattern_name);
-+  
-   if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
-     close_error (pattern_file_name);
- 
-@@ -1196,7 +1196,7 @@ swab_array (char *ptr, int count)
-    in the file system.  */
- 
- void
--process_copy_in ()
-+process_copy_in (void)
- {
-   char done = false;		/* True if trailer reached.  */
-   FILE *tty_in = NULL;		/* Interactive file for rename option.  */
-diff --git a/src/copyout.c b/src/copyout.c
-index 8b0beb6..26e3dda 100644
---- a/src/copyout.c
-+++ b/src/copyout.c
-@@ -594,9 +594,10 @@ assign_string (char **pvar, char *value)
-    The format of the header depends on the compatibility (-c) flag.  */
- 
- void
--process_copy_out ()
-+process_copy_out (void)
- {
--  dynamic_string input_name;	/* Name of file read from stdin.  */
-+  dynamic_string input_name = DYNAMIC_STRING_INITIALIZER;
-+                                /* Name of file read from stdin.  */
-   struct stat file_stat;	/* Stat record for file.  */
-   struct cpio_file_stat file_hdr = CPIO_FILE_STAT_INITIALIZER;
-                                 /* Output header information.  */
-@@ -605,7 +606,6 @@ process_copy_out ()
-   char *orig_file_name = NULL;
- 
-   /* Initialize the copy out.  */
--  ds_init (&input_name, 128);
-   file_hdr.c_magic = 070707;
- 
-   /* Check whether the output file might be a tape.  */
-@@ -657,14 +657,9 @@ process_copy_out ()
- 	    {
- 	      if (file_hdr.c_mode & CP_IFDIR)
- 		{
--		  int len = strlen (input_name.ds_string);
- 		  /* Make sure the name ends with a slash */
--		  if (input_name.ds_string[len-1] != '/')
--		    {
--		      ds_resize (&input_name, len + 2);
--		      input_name.ds_string[len] = '/';
--		      input_name.ds_string[len+1] = 0;
--		    }
-+		  if (!ds_endswith (&input_name, '/'))
-+		    ds_append (&input_name, '/');
- 		}
- 	    }
- 	  
-@@ -875,6 +870,7 @@ process_copy_out ()
- 			 (unsigned long) blocks), (unsigned long) blocks);
-     }
-   cpio_file_stat_free (&file_hdr);
-+  ds_free (&input_name);
- }
- 
- 
-diff --git a/src/copypass.c b/src/copypass.c
-index dc13b5b..62f31c6 100644
---- a/src/copypass.c
-+++ b/src/copypass.c
-@@ -48,10 +48,12 @@ set_copypass_perms (int fd, const char *name, struct stat *st)
-    If `link_flag', link instead of copying.  */
- 
- void
--process_copy_pass ()
-+process_copy_pass (void)
- {
--  dynamic_string input_name;	/* Name of file from stdin.  */
--  dynamic_string output_name;	/* Name of new file.  */
-+  dynamic_string input_name = DYNAMIC_STRING_INITIALIZER;
-+                                /* Name of file from stdin.  */
-+  dynamic_string output_name = DYNAMIC_STRING_INITIALIZER;
-+                                /* Name of new file.  */
-   size_t dirname_len;		/* Length of `directory_name'.  */
-   int res;			/* Result of functions.  */
-   char *slash;			/* For moving past slashes in input name.  */
-@@ -65,25 +67,18 @@ process_copy_pass ()
- 				   created files  */
- 
-   /* Initialize the copy pass.  */
--  ds_init (&input_name, 128);
-   
-   dirname_len = strlen (directory_name);
-   if (change_directory_option && !ISSLASH (directory_name[0]))
-     {
-       char *pwd = xgetcwd ();
--
--      dirname_len += strlen (pwd) + 1;
--      ds_init (&output_name, dirname_len + 2);
--      strcpy (output_name.ds_string, pwd);
--      strcat (output_name.ds_string, "/");
--      strcat (output_name.ds_string, directory_name);
-+      
-+      ds_concat (&output_name, pwd);
-+      ds_append (&output_name, '/');
-     }
--  else
--    {
--      ds_init (&output_name, dirname_len + 2);
--      strcpy (output_name.ds_string, directory_name);
--    }
--  output_name.ds_string[dirname_len] = '/';
-+  ds_concat (&output_name, directory_name);
-+  ds_append (&output_name, '/');
-+  dirname_len = ds_len (&output_name);
-   output_is_seekable = true;
- 
-   change_dir ();
-@@ -116,8 +111,8 @@ process_copy_pass ()
-       /* Make the name of the new file.  */
-       for (slash = input_name.ds_string; *slash == '/'; ++slash)
- 	;
--      ds_resize (&output_name, dirname_len + strlen (slash) + 2);
--      strcpy (output_name.ds_string + dirname_len + 1, slash);
-+      ds_reset (&output_name, dirname_len);
-+      ds_concat (&output_name, slash);
- 
-       existing_dir = false;
-       if (lstat (output_name.ds_string, &out_file_stat) == 0)
-@@ -333,6 +328,9 @@ process_copy_pass ()
- 			 (unsigned long) blocks),
- 	       (unsigned long) blocks);
-     }
-+
-+  ds_free (&input_name);
-+  ds_free (&output_name);
- }
- 
- /* Try and create a hard link from FILE_NAME to another file 
-diff --git a/src/dstring.c b/src/dstring.c
-index e9c063f..358f356 100644
---- a/src/dstring.c
-+++ b/src/dstring.c
-@@ -20,8 +20,8 @@
- #if defined(HAVE_CONFIG_H)
- # include <config.h>
- #endif
--
- #include <stdio.h>
-+#include <stdlib.h>
- #if defined(HAVE_STRING_H) || defined(STDC_HEADERS)
- #include <string.h>
- #else
-@@ -33,24 +33,41 @@
- /* Initialiaze dynamic string STRING with space for SIZE characters.  */
- 
- void
--ds_init (dynamic_string *string, int size)
-+ds_init (dynamic_string *string)
-+{
-+  memset (string, 0, sizeof *string);
-+}
-+
-+/* Free the dynamic string storage. */
-+
-+void
-+ds_free (dynamic_string *string)
- {
--  string->ds_length = size;
--  string->ds_string = (char *) xmalloc (size);
-+  free (string->ds_string);
- }
- 
--/* Expand dynamic string STRING, if necessary, to hold SIZE characters.  */
-+/* Expand dynamic string STRING, if necessary.  */
- 
- void
--ds_resize (dynamic_string *string, int size)
-+ds_resize (dynamic_string *string)
- {
--  if (size > string->ds_length)
-+  if (string->ds_idx == string->ds_size)
-     {
--      string->ds_length = size;
--      string->ds_string = (char *) xrealloc ((char *) string->ds_string, size);
-+      string->ds_string = x2nrealloc (string->ds_string, &string->ds_size,
-+				      1);
-     }
- }
- 
-+/* Reset the index of the dynamic string S to LEN. */
-+
-+void
-+ds_reset (dynamic_string *s, size_t len)
-+{
-+  while (len > s->ds_size)
-+    ds_resize (s);
-+  s->ds_idx = len;
-+}
-+
- /* Dynamic string S gets a string terminated by the EOS character
-    (which is removed) from file F.  S will increase
-    in size during the function if the string from F is longer than
-@@ -61,34 +78,50 @@ ds_resize (dynamic_string *string, int size)
- char *
- ds_fgetstr (FILE *f, dynamic_string *s, char eos)
- {
--  int insize;			/* Amount needed for line.  */
--  int strsize;			/* Amount allocated for S.  */
-   int next_ch;
- 
-   /* Initialize.  */
--  insize = 0;
--  strsize = s->ds_length;
-+  s->ds_idx = 0;
- 
-   /* Read the input string.  */
--  next_ch = getc (f);
--  while (next_ch != eos && next_ch != EOF)
-+  while ((next_ch = getc (f)) != eos && next_ch != EOF)
-     {
--      if (insize >= strsize - 1)
--	{
--	  ds_resize (s, strsize * 2 + 2);
--	  strsize = s->ds_length;
--	}
--      s->ds_string[insize++] = next_ch;
--      next_ch = getc (f);
-+      ds_resize (s);
-+      s->ds_string[s->ds_idx++] = next_ch;
-     }
--  s->ds_string[insize++] = '\0';
-+  ds_resize (s);
-+  s->ds_string[s->ds_idx] = '\0';
- 
--  if (insize == 1 && next_ch == EOF)
-+  if (s->ds_idx == 0 && next_ch == EOF)
-     return NULL;
-   else
-     return s->ds_string;
- }
- 
-+void
-+ds_append (dynamic_string *s, int c)
-+{
-+  ds_resize (s);
-+  s->ds_string[s->ds_idx] = c;
-+  if (c)
-+    {
-+      s->ds_idx++;
-+      ds_resize (s);
-+      s->ds_string[s->ds_idx] = 0;
-+    }      
-+}
-+
-+void
-+ds_concat (dynamic_string *s, char const *str)
-+{
-+  size_t len = strlen (str);
-+  while (len + 1 > s->ds_size)
-+    ds_resize (s);
-+  memcpy (s->ds_string + s->ds_idx, str, len);
-+  s->ds_idx += len;
-+  s->ds_string[s->ds_idx] = 0;
-+}
-+
- char *
- ds_fgets (FILE *f, dynamic_string *s)
- {
-@@ -100,3 +133,10 @@ ds_fgetname (FILE *f, dynamic_string *s)
- {
-   return ds_fgetstr (f, s, '\0');
- }
-+
-+/* Return true if the dynamic string S ends with character C. */
-+int
-+ds_endswith (dynamic_string *s, int c)
-+{
-+  return (s->ds_idx > 0 && s->ds_string[s->ds_idx - 1] == c);
-+}
-diff --git a/src/dstring.h b/src/dstring.h
-index b5135fe..f5b04ef 100644
---- a/src/dstring.h
-+++ b/src/dstring.h
-@@ -17,10 +17,6 @@
-    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301 USA.  */
- 
--#ifndef NULL
--#define NULL 0
--#endif
--
- /* A dynamic string consists of record that records the size of an
-    allocated string and the pointer to that string.  The actual string
-    is a normal zero byte terminated string that can be used with the
-@@ -30,22 +26,25 @@
- 
- typedef struct
- {
--  int ds_length;		/* Actual amount of storage allocated.  */
--  char *ds_string;		/* String.  */
-+  size_t ds_size;   /* Actual amount of storage allocated.  */
-+  size_t ds_idx;    /* Index of the next free byte in the string. */
-+  char *ds_string;  /* String storage. */
- } dynamic_string;
- 
-+#define DYNAMIC_STRING_INITIALIZER { 0, 0, NULL }
- 
--/* Macros that look similar to the original string functions.
--   WARNING:  These macros work only on pointers to dynamic string records.
--   If used with a real record, an "&" must be used to get the pointer.  */
--#define ds_strlen(s)		strlen ((s)->ds_string)
--#define ds_strcmp(s1, s2)	strcmp ((s1)->ds_string, (s2)->ds_string)
--#define ds_strncmp(s1, s2, n)	strncmp ((s1)->ds_string, (s2)->ds_string, n)
--#define ds_index(s, c)		index ((s)->ds_string, c)
--#define ds_rindex(s, c)		rindex ((s)->ds_string, c)
-+void ds_init (dynamic_string *string);
-+void ds_free (dynamic_string *string);
-+void ds_reset (dynamic_string *s, size_t len);
- 
--void ds_init (dynamic_string *string, int size);
--void ds_resize (dynamic_string *string, int size);
-+/* All functions below guarantee that s->ds_string[s->ds_idx] == '\0' */
- char *ds_fgetname (FILE *f, dynamic_string *s);
- char *ds_fgets (FILE *f, dynamic_string *s);
- char *ds_fgetstr (FILE *f, dynamic_string *s, char eos);
-+void ds_append (dynamic_string *s, int c);
-+void ds_concat (dynamic_string *s, char const *str);
-+
-+#define ds_len(s) ((s)->ds_idx)
-+
-+int ds_endswith (dynamic_string *s, int c);
-+
-diff --git a/src/util.c b/src/util.c
-index 4421b20..6d6bbaa 100644
---- a/src/util.c
-+++ b/src/util.c
-@@ -846,11 +846,9 @@ get_next_reel (int tape_des)
-   FILE *tty_out;		/* File for interacting with user.  */
-   int old_tape_des;
-   char *next_archive_name;
--  dynamic_string new_name;
-+  dynamic_string new_name = DYNAMIC_STRING_INITIALIZER;
-   char *str_res;
- 
--  ds_init (&new_name, 128);
--
-   /* Open files for interactive communication.  */
-   tty_in = fopen (TTY_NAME, "r");
-   if (tty_in == NULL)
-@@ -925,7 +923,7 @@ get_next_reel (int tape_des)
-     error (PAXEXIT_FAILURE, 0, _("internal error: tape descriptor changed from %d to %d"),
- 	   old_tape_des, tape_des);
- 
--  free (new_name.ds_string);
-+  ds_free (&new_name);
-   fclose (tty_in);
-   fclose (tty_out);
- }
--- 
-2.25.1
-
-
-From fb7a51bf85b8e6f045cacb4fb783db4a414741bf Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Wed, 11 Aug 2021 18:10:38 +0300
-Subject: [PATCH 2/3] Fix previous commit
-
-* src/dstring.c (ds_reset,ds_concat): Don't call ds_resize in a
-loop.
----
- src/dstring.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/dstring.c b/src/dstring.c
-index 358f356..90c691c 100644
---- a/src/dstring.c
-+++ b/src/dstring.c
-@@ -64,7 +64,7 @@ void
- ds_reset (dynamic_string *s, size_t len)
- {
-   while (len > s->ds_size)
--    ds_resize (s);
-+    s->ds_string = x2nrealloc (s->ds_string, &s->ds_size, 1);
-   s->ds_idx = len;
- }
- 
-@@ -116,7 +116,7 @@ ds_concat (dynamic_string *s, char const *str)
- {
-   size_t len = strlen (str);
-   while (len + 1 > s->ds_size)
--    ds_resize (s);
-+    s->ds_string = x2nrealloc (s->ds_string, &s->ds_size, 1);
-   memcpy (s->ds_string + s->ds_idx, str, len);
-   s->ds_idx += len;
-   s->ds_string[s->ds_idx] = 0;
--- 
-2.25.1
-
-
-From 86b37d74b15f9bb5fe62fd1642cc126d3ace0189 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Wed, 18 Aug 2021 09:41:39 +0300
-Subject: [PATCH 3/3] Fix dynamic string reallocations
-
-* src/dstring.c (ds_resize): Take additional argument: number of
-bytes to leave available after ds_idx.  All uses changed.
----
- src/dstring.c | 18 ++++++++----------
- 1 file changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/src/dstring.c b/src/dstring.c
-index 90c691c..0f597cc 100644
---- a/src/dstring.c
-+++ b/src/dstring.c
-@@ -49,9 +49,9 @@ ds_free (dynamic_string *string)
- /* Expand dynamic string STRING, if necessary.  */
- 
- void
--ds_resize (dynamic_string *string)
-+ds_resize (dynamic_string *string, size_t len)
- {
--  if (string->ds_idx == string->ds_size)
-+  while (len + string->ds_idx >= string->ds_size)
-     {
-       string->ds_string = x2nrealloc (string->ds_string, &string->ds_size,
- 				      1);
-@@ -63,8 +63,7 @@ ds_resize (dynamic_string *string)
- void
- ds_reset (dynamic_string *s, size_t len)
- {
--  while (len > s->ds_size)
--    s->ds_string = x2nrealloc (s->ds_string, &s->ds_size, 1);
-+  ds_resize (s, len);
-   s->ds_idx = len;
- }
- 
-@@ -86,10 +85,10 @@ ds_fgetstr (FILE *f, dynamic_string *s, char eos)
-   /* Read the input string.  */
-   while ((next_ch = getc (f)) != eos && next_ch != EOF)
-     {
--      ds_resize (s);
-+      ds_resize (s, 0);
-       s->ds_string[s->ds_idx++] = next_ch;
-     }
--  ds_resize (s);
-+  ds_resize (s, 0);
-   s->ds_string[s->ds_idx] = '\0';
- 
-   if (s->ds_idx == 0 && next_ch == EOF)
-@@ -101,12 +100,12 @@ ds_fgetstr (FILE *f, dynamic_string *s, char eos)
- void
- ds_append (dynamic_string *s, int c)
- {
--  ds_resize (s);
-+  ds_resize (s, 0);
-   s->ds_string[s->ds_idx] = c;
-   if (c)
-     {
-       s->ds_idx++;
--      ds_resize (s);
-+      ds_resize (s, 0);
-       s->ds_string[s->ds_idx] = 0;
-     }      
- }
-@@ -115,8 +114,7 @@ void
- ds_concat (dynamic_string *s, char const *str)
- {
-   size_t len = strlen (str);
--  while (len + 1 > s->ds_size)
--    s->ds_string = x2nrealloc (s->ds_string, &s->ds_size, 1);
-+  ds_resize (s, len);
-   memcpy (s->ds_string + s->ds_idx, str, len);
-   s->ds_idx += len;
-   s->ds_string[s->ds_idx] = 0;
--- 
-2.25.1
-
diff --git a/poky/meta/recipes-extended/cpio/cpio_2.13.bb b/poky/meta/recipes-extended/cpio/cpio_2.14.bb
similarity index 83%
rename from poky/meta/recipes-extended/cpio/cpio_2.13.bb
rename to poky/meta/recipes-extended/cpio/cpio_2.14.bb
index 55bcc60..e55fb70 100644
--- a/poky/meta/recipes-extended/cpio/cpio_2.13.bb
+++ b/poky/meta/recipes-extended/cpio/cpio_2.14.bb
@@ -7,18 +7,12 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
 
 SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \
-           file://0001-obstack-Fix-a-clang-warning.patch \
-           file://CVE-2021-38185.patch \
-           file://0001-Use-__alignof__-with-clang.patch \
-           file://0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch \
+           file://0001-configure-Include-needed-header-for-major-minor-macr.patch \
            file://run-ptest \
            file://test.sh \
            "
 
-SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
-SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88"
+SRC_URI[sha256sum] = "145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454"
 
 inherit autotools gettext texinfo ptest
 
diff --git a/poky/meta/recipes-extended/cpio/files/0001-configure-Include-needed-header-for-major-minor-macr.patch b/poky/meta/recipes-extended/cpio/files/0001-configure-Include-needed-header-for-major-minor-macr.patch
new file mode 100644
index 0000000..95ece0b
--- /dev/null
+++ b/poky/meta/recipes-extended/cpio/files/0001-configure-Include-needed-header-for-major-minor-macr.patch
@@ -0,0 +1,48 @@
+From 8179be21e664cedb2e9d238cc2f6d04965e97275 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Thu, 11 May 2023 10:18:44 +0300
+Subject: [PATCH] configure: Include needed header for major/minor macros
+
+This helps in avoiding the warning about implicit function declaration
+which is elevated as error with newer compilers e.g. clang 16
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ configure.ac | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index de479e7..c601029 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,8 +43,22 @@ AC_TYPE_UID_T
+ AC_CHECK_TYPE(gid_t, int)
+ 
+ AC_HEADER_DIRENT
+-AX_COMPILE_CHECK_RETTYPE([major], [0])
+-AX_COMPILE_CHECK_RETTYPE([minor], [0])
++AX_COMPILE_CHECK_RETTYPE([major], [0], [
++#include <sys/types.h>
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif])
++AX_COMPILE_CHECK_RETTYPE([minor], [0], [
++#include <sys/types.h>
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif])
+ 
+ AC_CHECK_FUNCS([fchmod fchown])
+ # This is needed for mingw build
+-- 
+2.34.1
+
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/run-ptest b/poky/meta/recipes-extended/cpio/files/run-ptest
similarity index 100%
rename from poky/meta/recipes-extended/cpio/cpio-2.13/run-ptest
rename to poky/meta/recipes-extended/cpio/files/run-ptest
diff --git a/poky/meta/recipes-extended/cpio/cpio-2.13/test.sh b/poky/meta/recipes-extended/cpio/files/test.sh
similarity index 100%
rename from poky/meta/recipes-extended/cpio/cpio-2.13/test.sh
rename to poky/meta/recipes-extended/cpio/files/test.sh
diff --git a/poky/meta/recipes-extended/grep/grep_3.10.bb b/poky/meta/recipes-extended/grep/grep_3.11.bb
similarity index 93%
rename from poky/meta/recipes-extended/grep/grep_3.10.bb
rename to poky/meta/recipes-extended/grep/grep_3.11.bb
index 33fd64d..cb3105d 100644
--- a/poky/meta/recipes-extended/grep/grep_3.10.bb
+++ b/poky/meta/recipes-extended/grep/grep_3.11.bb
@@ -8,7 +8,7 @@
 
 SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
 
-SRC_URI[sha256sum] = "24efa5b595fb5a7100879b51b8868a0bb87a71c183d02c4c602633b88af6855b"
+SRC_URI[sha256sum] = "1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab"
 
 inherit autotools gettext texinfo pkgconfig
 
diff --git a/poky/meta/recipes-extended/less/files/CVE-2022-46663.patch b/poky/meta/recipes-extended/less/files/CVE-2022-46663.patch
deleted file mode 100644
index 20f9d89..0000000
--- a/poky/meta/recipes-extended/less/files/CVE-2022-46663.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-CVE: CVE-2022-46663
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From a78e1351113cef564d790a730d657a321624d79c Mon Sep 17 00:00:00 2001
-From: Mark Nudelman <markn@greenwoodsoftware.com>
-Date: Fri, 7 Oct 2022 19:25:46 -0700
-Subject: [PATCH] End OSC8 hyperlink on invalid embedded escape sequence.
-
----
- line.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/line.c b/line.c
-index 236c49ae..cba7bdd1 100644
---- a/line.c
-+++ b/line.c
-@@ -633,8 +633,8 @@ ansi_step(pansi, ch)
- 		/* Hyperlink ends with \7 or ESC-backslash. */
- 		if (ch == '\7')
- 			return ANSI_END;
--		if (pansi->prev_esc && ch == '\\')
--			return ANSI_END;
-+		if (pansi->prev_esc)
-+            return (ch == '\\') ? ANSI_END : ANSI_ERR;
- 		pansi->prev_esc = (ch == ESC);
- 		return ANSI_MID;
- 	}
diff --git a/poky/meta/recipes-extended/less/less_608.bb b/poky/meta/recipes-extended/less/less_633.bb
similarity index 83%
rename from poky/meta/recipes-extended/less/less_608.bb
rename to poky/meta/recipes-extended/less/less_633.bb
index f907a81..2defb5c 100644
--- a/poky/meta/recipes-extended/less/less_608.bb
+++ b/poky/meta/recipes-extended/less/less_633.bb
@@ -21,15 +21,13 @@
 
 LICENSE = "GPL-3.0-or-later | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
-                    file://LICENSE;md5=38fc26d78ca8d284a2a5a4bbc263d29b \
+                    file://LICENSE;md5=1b2446f5c8632bf63a97d7a49750e1c6 \
                     "
 DEPENDS = "ncurses"
 
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
-           file://CVE-2022-46663.patch \
-	  "
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
 
-SRC_URI[sha256sum] = "a69abe2e0a126777e021d3b73aa3222e1b261f10e64624d41ec079685a6ac209"
+SRC_URI[sha256sum] = "2f201d64b828b88af36dfe6cfdba3e0819ece2e446ebe6224813209aaefed04f"
 
 UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
 
diff --git a/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
deleted file mode 100644
index 01b2389..0000000
--- a/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
-Date: Mon, 3 Feb 2020 13:18:13 +0100
-Subject: [PATCH 1/3] Drop superfluous global variable definitions
-
-The file minicom.c, by including the minicom.h header, already defines
-the global variables 'dial_user' and 'dial_pass'. The object file
-minicom.o is always linked to dial.o. Thus the definitions in dial.c
-can be dropped.
-
-This fixes linking with gcc 10 which uses -fno-common by default,
-disallowing multiple global variable definitions.
-
-Upstream-Status: Backport [https://salsa.debian.org/minicom-team/minicom/-/commit/db269bba2a68fde03f5df45ac8372a8f1248ca96]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/dial.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/dial.c b/src/dial.c
-index eada5ee..d9d481f 100644
---- a/src/dial.c
-+++ b/src/dial.c
-@@ -146,8 +146,6 @@ static int newtype;
- /* Access to ".dialdir" denied? */
- static int dendd = 0;
- static char *tagged;
--char *dial_user;
--char *dial_pass;
- 
- /* Change the baud rate.  Treat all characters in the given array as if
-  * they were key presses within the comm parameters dialog (C-A P) and
--- 
-2.24.1
-
diff --git a/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
deleted file mode 100644
index e86b470..0000000
--- a/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
-Date: Mon, 3 Feb 2020 13:18:33 +0100
-Subject: [PATCH 2/3] Drop superfluous global variable definitions
-
-The only place where the EXTERN macro mechanism is used to define the
-global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining
-an empty EXTERN macro and including the minicom.h header). The file
-vt100.c already defines these variables. The vt100.o object file is
-always linked to minicom.o. Thus it is safe not to define the
-variables in minicom.c and only declare them in the minicom.h header.
-
-This fixes linking with gcc 10 which uses -fno-common by default,
-disallowing multiple global variable definitions.
-
-Upstream-Status: Backport [https://salsa.debian.org/minicom-team/minicom/-/commit/c69cad5b5dda85d361a3a0c1fddc65e933f26d11]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/minicom.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/minicom.h b/src/minicom.h
-index 061c013..0f9693b 100644
---- a/src/minicom.h
-+++ b/src/minicom.h
-@@ -141,7 +141,7 @@ EXTERN int sbcolor;     /* Status Bar Background Color */
- EXTERN int st_attr;	/* Status Bar attributes. */
- 
- /* jl 04.09.97 conversion tables */
--EXTERN unsigned char vt_outmap[256], vt_inmap[256];
-+extern unsigned char vt_outmap[256], vt_inmap[256];
- 
- /* MARK updated 02/17/95 - history buffer */
- EXTERN int num_hist_lines;  /* History buffer size */
--- 
-2.24.1
-
diff --git a/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
deleted file mode 100644
index 3225a0c..0000000
--- a/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From a4fc603b3641d2efe31479116eb7ba66932901c7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
-Date: Mon, 3 Feb 2020 13:21:41 +0100
-Subject: [PATCH 3/3] Drop superfluous global variable definitions
-
-The only place where the EXTERN macro mechanism is used to define the
-global variables 'portfd_is_socket', 'portfd_is_connected' and
-'portfd_sock_addr' is minicom.c (by defining an empty EXTERN macro and
-including the minicom.h header). The source file sysdep1_s.c already
-defines these variables. The sysdep1_s.o object file is always linked
-to minicom.o. Thus it is safe to drop the definitions from minicom.c
-and only declare the variables in the minicom.h header.
-
-This fixes linking with gcc 10 which uses -fno-common by default,
-disallowing multiple global variable definitions.
-
-Upstream-Status: Backport [https://salsa.debian.org/minicom-team/minicom/-/commit/c8382374c5d340aa4115d527aed76e876ee5456b]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/minicom.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/minicom.h b/src/minicom.h
-index 0f9693b..1e7cb8c 100644
---- a/src/minicom.h
-+++ b/src/minicom.h
-@@ -113,9 +113,9 @@ EXTERN char *dial_user;     /* Our username there */
- EXTERN char *dial_pass;     /* Our password */
- 
- #ifdef USE_SOCKET
--EXTERN int portfd_is_socket;	/* File descriptor is a unix socket */
--EXTERN int portfd_is_connected;	/* 1 if the socket is connected */
--EXTERN struct sockaddr_un portfd_sock_addr;	/* the unix socket address */
-+extern int portfd_is_socket;	/* File descriptor is a unix socket */
-+extern int portfd_is_connected;	/* 1 if the socket is connected */
-+extern struct sockaddr_un portfd_sock_addr;	/* the unix socket address */
- #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \
-                            ? -1 : portfd)
- #else
--- 
-2.24.1
-
diff --git a/poky/meta/recipes-extended/psmisc/psmisc.inc b/poky/meta/recipes-extended/psmisc/psmisc.inc
index a429c2e..23e98d2 100644
--- a/poky/meta/recipes-extended/psmisc/psmisc.inc
+++ b/poky/meta/recipes-extended/psmisc/psmisc.inc
@@ -55,3 +55,5 @@
 ALTERNATIVE:killall = "killall"
 
 ALTERNATIVE:fuser = "fuser"
+
+ALTERNATIVE:pstree = "pstree"
diff --git a/poky/meta/recipes-extended/wget/wget.inc b/poky/meta/recipes-extended/wget/wget.inc
index 58cb5ca..d31756d 100644
--- a/poky/meta/recipes-extended/wget/wget.inc
+++ b/poky/meta/recipes-extended/wget/wget.inc
@@ -11,7 +11,7 @@
 
 inherit autotools gettext texinfo update-alternatives pkgconfig
 
-DEPENDS += "autoconf-archive"
+DEPENDS += "autoconf-archive-native"
 
 EXTRA_OECONF = "--without-libgnutls-prefix --without-libssl-prefix \
                 --disable-rpath"
diff --git a/poky/meta/recipes-extended/xz/xz_5.4.2.bb b/poky/meta/recipes-extended/xz/xz_5.4.3.bb
similarity index 95%
rename from poky/meta/recipes-extended/xz/xz_5.4.2.bb
rename to poky/meta/recipes-extended/xz/xz_5.4.3.bb
index 87f9602..e1cdac3 100644
--- a/poky/meta/recipes-extended/xz/xz_5.4.2.bb
+++ b/poky/meta/recipes-extended/xz/xz_5.4.3.bb
@@ -25,7 +25,7 @@
                     "
 
 SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[sha256sum] = "87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05"
+SRC_URI[sha256sum] = "1c382e0bc2e4e0af58398a903dd62fff7e510171d2de47a1ebe06d1528e9b7e9"
 UPSTREAM_CHECK_REGEX = "xz-(?P<pver>\d+(\.\d+)+)\.tar"
 
 CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh"
diff --git a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index e712e47..4930aeb 100644
--- a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -7,7 +7,7 @@
 LICENSE = "LGPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
-DEPENDS = "glib-2.0 glib-2.0-native gobject-introspection dbus dbus-glib libxml2 intltool-native"
+DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib libxml2 intltool-native"
 
 inherit gnomebase gtk-doc gettext gobject-introspection gio-module-cache
 
diff --git a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.74.0.bb b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.74.0.bb
index 781ed65..d3a7ce2 100644
--- a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.74.0.bb
+++ b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.74.0.bb
@@ -27,7 +27,7 @@
 
 MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
 
-DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive"
+DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive-native"
 
 # target build needs qemu to run temporary introspection binaries created
 # on the fly by g-ir-scanner and a native version of itself to run
diff --git a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_43.0.bb b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_44.0.bb
similarity index 85%
rename from poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_43.0.bb
rename to poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_44.0.bb
index 966a67f..8e30d5e 100644
--- a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_43.0.bb
+++ b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_44.0.bb
@@ -13,4 +13,4 @@
 
 inherit gnomebase gsettings gobject-introspection gettext
 
-SRC_URI[archive.sha256sum] = "5d5568282ab38b95759d425401f7476e56f8cbf2629885587439f43bd0b84bbe"
+SRC_URI[archive.sha256sum] = "eb2de45cad905994849e642a623adeb75d41b21b0626d40d2a07b8ea281fec0e"
diff --git a/poky/meta/recipes-gnome/librsvg/librsvg-crates.inc b/poky/meta/recipes-gnome/librsvg/librsvg-crates.inc
new file mode 100644
index 0000000..d73d1ae
--- /dev/null
+++ b/poky/meta/recipes-gnome/librsvg/librsvg-crates.inc
@@ -0,0 +1,594 @@
+# Autogenerated with 'bitbake -c update_crates librsvg'
+
+# from Cargo.lock
+SRC_URI += " \
+    crate://crates.io/adler/1.0.2 \
+    crate://crates.io/aho-corasick/0.7.20 \
+    crate://crates.io/android_system_properties/0.1.5 \
+    crate://crates.io/anes/0.1.6 \
+    crate://crates.io/anstyle/0.3.4 \
+    crate://crates.io/anyhow/1.0.69 \
+    crate://crates.io/approx/0.5.1 \
+    crate://crates.io/assert_cmd/2.0.10 \
+    crate://crates.io/atty/0.2.14 \
+    crate://crates.io/autocfg/1.1.0 \
+    crate://crates.io/base-x/0.2.11 \
+    crate://crates.io/bit-set/0.5.3 \
+    crate://crates.io/bit-vec/0.6.3 \
+    crate://crates.io/bitflags/1.3.2 \
+    crate://crates.io/block/0.1.6 \
+    crate://crates.io/bstr/1.3.0 \
+    crate://crates.io/bumpalo/3.12.0 \
+    crate://crates.io/bytemuck/1.13.1 \
+    crate://crates.io/byteorder/1.4.3 \
+    crate://crates.io/cairo-rs/0.17.0 \
+    crate://crates.io/cairo-sys-rs/0.17.0 \
+    crate://crates.io/cast/0.3.0 \
+    crate://crates.io/cc/1.0.79 \
+    crate://crates.io/cfg-expr/0.11.0 \
+    crate://crates.io/cfg-if/1.0.0 \
+    crate://crates.io/chrono/0.4.24 \
+    crate://crates.io/ciborium/0.2.0 \
+    crate://crates.io/ciborium-io/0.2.0 \
+    crate://crates.io/ciborium-ll/0.2.0 \
+    crate://crates.io/clap/3.2.23 \
+    crate://crates.io/clap/4.1.9 \
+    crate://crates.io/clap_complete/4.1.5 \
+    crate://crates.io/clap_derive/4.1.9 \
+    crate://crates.io/clap_lex/0.2.4 \
+    crate://crates.io/clap_lex/0.3.3 \
+    crate://crates.io/codespan-reporting/0.11.1 \
+    crate://crates.io/const-cstr/0.3.0 \
+    crate://crates.io/const_fn/0.4.9 \
+    crate://crates.io/convert_case/0.4.0 \
+    crate://crates.io/core-foundation-sys/0.8.3 \
+    crate://crates.io/crc32fast/1.3.2 \
+    crate://crates.io/criterion/0.4.0 \
+    crate://crates.io/criterion-plot/0.5.0 \
+    crate://crates.io/crossbeam-channel/0.5.7 \
+    crate://crates.io/crossbeam-deque/0.8.3 \
+    crate://crates.io/crossbeam-epoch/0.9.14 \
+    crate://crates.io/crossbeam-utils/0.8.15 \
+    crate://crates.io/cssparser/0.29.6 \
+    crate://crates.io/cssparser-macros/0.6.0 \
+    crate://crates.io/cxx/1.0.92 \
+    crate://crates.io/cxx-build/1.0.92 \
+    crate://crates.io/cxxbridge-flags/1.0.92 \
+    crate://crates.io/cxxbridge-macro/1.0.92 \
+    crate://crates.io/data-url/0.2.0 \
+    crate://crates.io/derive_more/0.99.17 \
+    crate://crates.io/difflib/0.4.0 \
+    crate://crates.io/discard/1.0.4 \
+    crate://crates.io/dlib/0.5.0 \
+    crate://crates.io/doc-comment/0.3.3 \
+    crate://crates.io/dtoa/0.4.8 \
+    crate://crates.io/dtoa-short/0.3.3 \
+    crate://crates.io/either/1.8.1 \
+    crate://crates.io/encoding/0.2.33 \
+    crate://crates.io/encoding-index-japanese/1.20141219.5 \
+    crate://crates.io/encoding-index-korean/1.20141219.5 \
+    crate://crates.io/encoding-index-simpchinese/1.20141219.5 \
+    crate://crates.io/encoding-index-singlebyte/1.20141219.5 \
+    crate://crates.io/encoding-index-tradchinese/1.20141219.5 \
+    crate://crates.io/encoding_index_tests/0.1.4 \
+    crate://crates.io/errno/0.2.8 \
+    crate://crates.io/errno-dragonfly/0.1.2 \
+    crate://crates.io/fastrand/1.9.0 \
+    crate://crates.io/flate2/1.0.25 \
+    crate://crates.io/float-cmp/0.9.0 \
+    crate://crates.io/fnv/1.0.7 \
+    crate://crates.io/form_urlencoded/1.1.0 \
+    crate://crates.io/futf/0.1.5 \
+    crate://crates.io/futures-channel/0.3.27 \
+    crate://crates.io/futures-core/0.3.27 \
+    crate://crates.io/futures-executor/0.3.27 \
+    crate://crates.io/futures-io/0.3.27 \
+    crate://crates.io/futures-macro/0.3.27 \
+    crate://crates.io/futures-task/0.3.27 \
+    crate://crates.io/futures-util/0.3.27 \
+    crate://crates.io/fxhash/0.2.1 \
+    crate://crates.io/gdk-pixbuf/0.17.0 \
+    crate://crates.io/gdk-pixbuf-sys/0.17.0 \
+    crate://crates.io/getrandom/0.1.16 \
+    crate://crates.io/getrandom/0.2.8 \
+    crate://crates.io/gio/0.17.4 \
+    crate://crates.io/gio-sys/0.17.4 \
+    crate://crates.io/glib/0.17.5 \
+    crate://crates.io/glib-macros/0.17.5 \
+    crate://crates.io/glib-sys/0.17.4 \
+    crate://crates.io/gobject-sys/0.17.4 \
+    crate://crates.io/half/1.8.2 \
+    crate://crates.io/hashbrown/0.12.3 \
+    crate://crates.io/heck/0.4.1 \
+    crate://crates.io/hermit-abi/0.1.19 \
+    crate://crates.io/hermit-abi/0.2.6 \
+    crate://crates.io/hermit-abi/0.3.1 \
+    crate://crates.io/iana-time-zone/0.1.53 \
+    crate://crates.io/iana-time-zone-haiku/0.1.1 \
+    crate://crates.io/idna/0.3.0 \
+    crate://crates.io/indexmap/1.9.2 \
+    crate://crates.io/instant/0.1.12 \
+    crate://crates.io/io-lifetimes/1.0.7 \
+    crate://crates.io/is-terminal/0.4.4 \
+    crate://crates.io/itertools/0.10.5 \
+    crate://crates.io/itoa/1.0.6 \
+    crate://crates.io/js-sys/0.3.61 \
+    crate://crates.io/language-tags/0.3.2 \
+    crate://crates.io/lazy_static/1.4.0 \
+    crate://crates.io/libc/0.2.140 \
+    crate://crates.io/libloading/0.7.4 \
+    crate://crates.io/libm/0.2.6 \
+    crate://crates.io/link-cplusplus/1.0.8 \
+    crate://crates.io/linked-hash-map/0.5.6 \
+    crate://crates.io/linux-raw-sys/0.1.4 \
+    crate://crates.io/locale_config/0.3.0 \
+    crate://crates.io/lock_api/0.4.9 \
+    crate://crates.io/log/0.4.17 \
+    crate://crates.io/lopdf/0.29.0 \
+    crate://crates.io/mac/0.1.1 \
+    crate://crates.io/malloc_buf/0.0.6 \
+    crate://crates.io/markup5ever/0.11.0 \
+    crate://crates.io/matches/0.1.10 \
+    crate://crates.io/matrixmultiply/0.3.2 \
+    crate://crates.io/memchr/2.5.0 \
+    crate://crates.io/memoffset/0.8.0 \
+    crate://crates.io/miniz_oxide/0.6.2 \
+    crate://crates.io/nalgebra/0.32.2 \
+    crate://crates.io/nalgebra-macros/0.2.0 \
+    crate://crates.io/new_debug_unreachable/1.0.4 \
+    crate://crates.io/nodrop/0.1.14 \
+    crate://crates.io/normalize-line-endings/0.3.0 \
+    crate://crates.io/num-complex/0.4.3 \
+    crate://crates.io/num-integer/0.1.45 \
+    crate://crates.io/num-rational/0.4.1 \
+    crate://crates.io/num-traits/0.2.15 \
+    crate://crates.io/num_cpus/1.15.0 \
+    crate://crates.io/objc/0.2.7 \
+    crate://crates.io/objc-foundation/0.1.1 \
+    crate://crates.io/objc_id/0.1.1 \
+    crate://crates.io/once_cell/1.17.1 \
+    crate://crates.io/oorandom/11.1.3 \
+    crate://crates.io/os_str_bytes/6.4.1 \
+    crate://crates.io/pango/0.17.4 \
+    crate://crates.io/pango-sys/0.17.0 \
+    crate://crates.io/pangocairo/0.17.0 \
+    crate://crates.io/pangocairo-sys/0.17.3 \
+    crate://crates.io/parking_lot/0.12.1 \
+    crate://crates.io/parking_lot_core/0.9.7 \
+    crate://crates.io/paste/1.0.12 \
+    crate://crates.io/percent-encoding/2.2.0 \
+    crate://crates.io/phf/0.8.0 \
+    crate://crates.io/phf/0.10.1 \
+    crate://crates.io/phf_codegen/0.8.0 \
+    crate://crates.io/phf_codegen/0.10.0 \
+    crate://crates.io/phf_generator/0.8.0 \
+    crate://crates.io/phf_generator/0.10.0 \
+    crate://crates.io/phf_macros/0.10.0 \
+    crate://crates.io/phf_shared/0.8.0 \
+    crate://crates.io/phf_shared/0.10.0 \
+    crate://crates.io/pin-project-lite/0.2.9 \
+    crate://crates.io/pin-utils/0.1.0 \
+    crate://crates.io/pkg-config/0.3.26 \
+    crate://crates.io/plotters/0.3.4 \
+    crate://crates.io/plotters-backend/0.3.4 \
+    crate://crates.io/plotters-svg/0.3.3 \
+    crate://crates.io/png/0.17.7 \
+    crate://crates.io/pom/3.2.0 \
+    crate://crates.io/ppv-lite86/0.2.17 \
+    crate://crates.io/precomputed-hash/0.1.1 \
+    crate://crates.io/predicates/2.1.5 \
+    crate://crates.io/predicates/3.0.1 \
+    crate://crates.io/predicates-core/1.0.6 \
+    crate://crates.io/predicates-tree/1.0.9 \
+    crate://crates.io/proc-macro-crate/1.3.1 \
+    crate://crates.io/proc-macro-error/1.0.4 \
+    crate://crates.io/proc-macro-error-attr/1.0.4 \
+    crate://crates.io/proc-macro-hack/0.5.20+deprecated \
+    crate://crates.io/proc-macro2/1.0.52 \
+    crate://crates.io/proptest/1.1.0 \
+    crate://crates.io/quick-error/1.2.3 \
+    crate://crates.io/quick-error/2.0.1 \
+    crate://crates.io/quote/1.0.26 \
+    crate://crates.io/rand/0.7.3 \
+    crate://crates.io/rand/0.8.5 \
+    crate://crates.io/rand_chacha/0.2.2 \
+    crate://crates.io/rand_chacha/0.3.1 \
+    crate://crates.io/rand_core/0.5.1 \
+    crate://crates.io/rand_core/0.6.4 \
+    crate://crates.io/rand_hc/0.2.0 \
+    crate://crates.io/rand_pcg/0.2.1 \
+    crate://crates.io/rand_xorshift/0.3.0 \
+    crate://crates.io/rawpointer/0.2.1 \
+    crate://crates.io/rayon/1.7.0 \
+    crate://crates.io/rayon-core/1.11.0 \
+    crate://crates.io/rctree/0.5.0 \
+    crate://crates.io/redox_syscall/0.2.16 \
+    crate://crates.io/regex/1.7.1 \
+    crate://crates.io/regex-automata/0.1.10 \
+    crate://crates.io/regex-syntax/0.6.28 \
+    crate://crates.io/rgb/0.8.36 \
+    crate://crates.io/rustc_version/0.2.3 \
+    crate://crates.io/rustc_version/0.4.0 \
+    crate://crates.io/rustix/0.36.9 \
+    crate://crates.io/rusty-fork/0.3.0 \
+    crate://crates.io/ryu/1.0.13 \
+    crate://crates.io/safe_arch/0.6.0 \
+    crate://crates.io/same-file/1.0.6 \
+    crate://crates.io/scopeguard/1.1.0 \
+    crate://crates.io/scratch/1.0.5 \
+    crate://crates.io/selectors/0.24.0 \
+    crate://crates.io/semver/0.9.0 \
+    crate://crates.io/semver/1.0.17 \
+    crate://crates.io/semver-parser/0.7.0 \
+    crate://crates.io/serde/1.0.156 \
+    crate://crates.io/serde_derive/1.0.156 \
+    crate://crates.io/serde_json/1.0.94 \
+    crate://crates.io/servo_arc/0.2.0 \
+    crate://crates.io/sha1/0.6.1 \
+    crate://crates.io/sha1_smol/1.0.0 \
+    crate://crates.io/simba/0.8.0 \
+    crate://crates.io/siphasher/0.3.10 \
+    crate://crates.io/slab/0.4.8 \
+    crate://crates.io/smallvec/1.10.0 \
+    crate://crates.io/stable_deref_trait/1.2.0 \
+    crate://crates.io/standback/0.2.17 \
+    crate://crates.io/stdweb/0.4.20 \
+    crate://crates.io/stdweb-derive/0.5.3 \
+    crate://crates.io/stdweb-internal-macros/0.2.9 \
+    crate://crates.io/stdweb-internal-runtime/0.1.5 \
+    crate://crates.io/string_cache/0.8.7 \
+    crate://crates.io/string_cache_codegen/0.5.2 \
+    crate://crates.io/strsim/0.10.0 \
+    crate://crates.io/syn/1.0.109 \
+    crate://crates.io/system-deps/6.0.3 \
+    crate://crates.io/tempfile/3.4.0 \
+    crate://crates.io/tendril/0.4.3 \
+    crate://crates.io/termcolor/1.2.0 \
+    crate://crates.io/termtree/0.4.1 \
+    crate://crates.io/textwrap/0.16.0 \
+    crate://crates.io/thiserror/1.0.39 \
+    crate://crates.io/thiserror-impl/1.0.39 \
+    crate://crates.io/time/0.2.27 \
+    crate://crates.io/time-macros/0.1.1 \
+    crate://crates.io/time-macros-impl/0.1.2 \
+    crate://crates.io/tinytemplate/1.2.1 \
+    crate://crates.io/tinyvec/1.6.0 \
+    crate://crates.io/tinyvec_macros/0.1.1 \
+    crate://crates.io/toml/0.5.11 \
+    crate://crates.io/toml_datetime/0.6.1 \
+    crate://crates.io/toml_edit/0.19.7 \
+    crate://crates.io/typenum/1.16.0 \
+    crate://crates.io/unarray/0.1.4 \
+    crate://crates.io/unicode-bidi/0.3.11 \
+    crate://crates.io/unicode-ident/1.0.8 \
+    crate://crates.io/unicode-normalization/0.1.22 \
+    crate://crates.io/unicode-width/0.1.10 \
+    crate://crates.io/url/2.3.1 \
+    crate://crates.io/utf-8/0.7.6 \
+    crate://crates.io/version-compare/0.1.1 \
+    crate://crates.io/version_check/0.9.4 \
+    crate://crates.io/wait-timeout/0.2.0 \
+    crate://crates.io/walkdir/2.3.3 \
+    crate://crates.io/wasi/0.9.0+wasi-snapshot-preview1 \
+    crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \
+    crate://crates.io/wasm-bindgen/0.2.84 \
+    crate://crates.io/wasm-bindgen-backend/0.2.84 \
+    crate://crates.io/wasm-bindgen-macro/0.2.84 \
+    crate://crates.io/wasm-bindgen-macro-support/0.2.84 \
+    crate://crates.io/wasm-bindgen-shared/0.2.84 \
+    crate://crates.io/web-sys/0.3.61 \
+    crate://crates.io/weezl/0.1.7 \
+    crate://crates.io/wide/0.7.8 \
+    crate://crates.io/winapi/0.3.9 \
+    crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi-util/0.1.5 \
+    crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+    crate://crates.io/windows-sys/0.42.0 \
+    crate://crates.io/windows-sys/0.45.0 \
+    crate://crates.io/windows-targets/0.42.2 \
+    crate://crates.io/windows_aarch64_gnullvm/0.42.2 \
+    crate://crates.io/windows_aarch64_msvc/0.42.2 \
+    crate://crates.io/windows_i686_gnu/0.42.2 \
+    crate://crates.io/windows_i686_msvc/0.42.2 \
+    crate://crates.io/windows_x86_64_gnu/0.42.2 \
+    crate://crates.io/windows_x86_64_gnullvm/0.42.2 \
+    crate://crates.io/windows_x86_64_msvc/0.42.2 \
+    crate://crates.io/winnow/0.3.6 \
+    crate://crates.io/xml5ever/0.17.0 \
+    crate://crates.io/yeslogic-fontconfig-sys/4.0.1 \
+"
+
+SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+SRC_URI[aho-corasick-0.7.20.sha256sum] = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
+SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+SRC_URI[anes-0.1.6.sha256sum] = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+SRC_URI[anstyle-0.3.4.sha256sum] = "1ba0b55c2201aa802adb684e7963ce2c3191675629e7df899774331e3ac747cf"
+SRC_URI[anyhow-1.0.69.sha256sum] = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
+SRC_URI[approx-0.5.1.sha256sum] = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
+SRC_URI[assert_cmd-2.0.10.sha256sum] = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd"
+SRC_URI[atty-0.2.14.sha256sum] = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+SRC_URI[base-x-0.2.11.sha256sum] = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270"
+SRC_URI[bit-set-0.5.3.sha256sum] = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+SRC_URI[bit-vec-0.6.3.sha256sum] = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+SRC_URI[block-0.1.6.sha256sum] = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+SRC_URI[bstr-1.3.0.sha256sum] = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1"
+SRC_URI[bumpalo-3.12.0.sha256sum] = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
+SRC_URI[bytemuck-1.13.1.sha256sum] = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
+SRC_URI[byteorder-1.4.3.sha256sum] = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+SRC_URI[cairo-rs-0.17.0.sha256sum] = "a8af54f5d48af1226928adc1f57edd22f5df1349e7da1fc96ae15cf43db0e871"
+SRC_URI[cairo-sys-rs-0.17.0.sha256sum] = "f55382a01d30e5e53f185eee269124f5e21ab526595b872751278dfbb463594e"
+SRC_URI[cast-0.3.0.sha256sum] = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+SRC_URI[cc-1.0.79.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+SRC_URI[cfg-expr-0.11.0.sha256sum] = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa"
+SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+SRC_URI[chrono-0.4.24.sha256sum] = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
+SRC_URI[ciborium-0.2.0.sha256sum] = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+SRC_URI[ciborium-io-0.2.0.sha256sum] = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+SRC_URI[ciborium-ll-0.2.0.sha256sum] = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+SRC_URI[clap-3.2.23.sha256sum] = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+SRC_URI[clap-4.1.9.sha256sum] = "9a9d6ada83c1edcce028902ea27dd929069c70df4c7600b131b4d9a1ad2879cc"
+SRC_URI[clap_complete-4.1.5.sha256sum] = "37686beaba5ac9f3ab01ee3172f792fc6ffdd685bfb9e63cfef02c0571a4e8e1"
+SRC_URI[clap_derive-4.1.9.sha256sum] = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644"
+SRC_URI[clap_lex-0.2.4.sha256sum] = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+SRC_URI[clap_lex-0.3.3.sha256sum] = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646"
+SRC_URI[codespan-reporting-0.11.1.sha256sum] = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+SRC_URI[const-cstr-0.3.0.sha256sum] = "ed3d0b5ff30645a68f35ece8cea4556ca14ef8a1651455f789a099a0513532a6"
+SRC_URI[const_fn-0.4.9.sha256sum] = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935"
+SRC_URI[convert_case-0.4.0.sha256sum] = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+SRC_URI[core-foundation-sys-0.8.3.sha256sum] = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+SRC_URI[crc32fast-1.3.2.sha256sum] = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+SRC_URI[criterion-0.4.0.sha256sum] = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
+SRC_URI[criterion-plot-0.5.0.sha256sum] = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+SRC_URI[crossbeam-channel-0.5.7.sha256sum] = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c"
+SRC_URI[crossbeam-deque-0.8.3.sha256sum] = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+SRC_URI[crossbeam-epoch-0.9.14.sha256sum] = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
+SRC_URI[crossbeam-utils-0.8.15.sha256sum] = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
+SRC_URI[cssparser-0.29.6.sha256sum] = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
+SRC_URI[cssparser-macros-0.6.0.sha256sum] = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
+SRC_URI[cxx-1.0.92.sha256sum] = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72"
+SRC_URI[cxx-build-1.0.92.sha256sum] = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613"
+SRC_URI[cxxbridge-flags-1.0.92.sha256sum] = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97"
+SRC_URI[cxxbridge-macro-1.0.92.sha256sum] = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
+SRC_URI[data-url-0.2.0.sha256sum] = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5"
+SRC_URI[derive_more-0.99.17.sha256sum] = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
+SRC_URI[difflib-0.4.0.sha256sum] = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
+SRC_URI[discard-1.0.4.sha256sum] = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
+SRC_URI[dlib-0.5.0.sha256sum] = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794"
+SRC_URI[doc-comment-0.3.3.sha256sum] = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+SRC_URI[dtoa-0.4.8.sha256sum] = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
+SRC_URI[dtoa-short-0.3.3.sha256sum] = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6"
+SRC_URI[either-1.8.1.sha256sum] = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+SRC_URI[encoding-0.2.33.sha256sum] = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
+SRC_URI[encoding-index-japanese-1.20141219.5.sha256sum] = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
+SRC_URI[encoding-index-korean-1.20141219.5.sha256sum] = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
+SRC_URI[encoding-index-simpchinese-1.20141219.5.sha256sum] = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
+SRC_URI[encoding-index-singlebyte-1.20141219.5.sha256sum] = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
+SRC_URI[encoding-index-tradchinese-1.20141219.5.sha256sum] = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
+SRC_URI[encoding_index_tests-0.1.4.sha256sum] = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
+SRC_URI[errno-0.2.8.sha256sum] = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+SRC_URI[errno-dragonfly-0.1.2.sha256sum] = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+SRC_URI[fastrand-1.9.0.sha256sum] = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
+SRC_URI[flate2-1.0.25.sha256sum] = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
+SRC_URI[float-cmp-0.9.0.sha256sum] = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
+SRC_URI[fnv-1.0.7.sha256sum] = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+SRC_URI[form_urlencoded-1.1.0.sha256sum] = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+SRC_URI[futf-0.1.5.sha256sum] = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+SRC_URI[futures-channel-0.3.27.sha256sum] = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac"
+SRC_URI[futures-core-0.3.27.sha256sum] = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd"
+SRC_URI[futures-executor-0.3.27.sha256sum] = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83"
+SRC_URI[futures-io-0.3.27.sha256sum] = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91"
+SRC_URI[futures-macro-0.3.27.sha256sum] = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6"
+SRC_URI[futures-task-0.3.27.sha256sum] = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879"
+SRC_URI[futures-util-0.3.27.sha256sum] = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab"
+SRC_URI[fxhash-0.2.1.sha256sum] = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+SRC_URI[gdk-pixbuf-0.17.0.sha256sum] = "b023fbe0c6b407bd3d9805d107d9800da3829dc5a676653210f1d5f16d7f59bf"
+SRC_URI[gdk-pixbuf-sys-0.17.0.sha256sum] = "7b41bd2b44ed49d99277d3925652a163038bd5ed943ec9809338ffb2f4391e3b"
+SRC_URI[getrandom-0.1.16.sha256sum] = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+SRC_URI[getrandom-0.2.8.sha256sum] = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
+SRC_URI[gio-0.17.4.sha256sum] = "2261a3b4e922ec676d1c27ac466218c38cf5dcb49a759129e54bb5046e442125"
+SRC_URI[gio-sys-0.17.4.sha256sum] = "6b1d43b0d7968b48455244ecafe41192871257f5740aa6b095eb19db78e362a5"
+SRC_URI[glib-0.17.5.sha256sum] = "cfb53061756195d76969292c2d2e329e01259276524a9bae6c9b73af62854773"
+SRC_URI[glib-macros-0.17.5.sha256sum] = "454924cafe58d9174dc32972261fe271d6cd3c10f5e9ff505522a28dcf601a40"
+SRC_URI[glib-sys-0.17.4.sha256sum] = "49f00ad0a1bf548e61adfff15d83430941d9e1bb620e334f779edd1c745680a5"
+SRC_URI[gobject-sys-0.17.4.sha256sum] = "15e75b0000a64632b2d8ca3cf856af9308e3a970844f6e9659bd197f026793d0"
+SRC_URI[half-1.8.2.sha256sum] = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+SRC_URI[hashbrown-0.12.3.sha256sum] = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+SRC_URI[hermit-abi-0.1.19.sha256sum] = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+SRC_URI[hermit-abi-0.2.6.sha256sum] = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+SRC_URI[hermit-abi-0.3.1.sha256sum] = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+SRC_URI[iana-time-zone-0.1.53.sha256sum] = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
+SRC_URI[iana-time-zone-haiku-0.1.1.sha256sum] = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+SRC_URI[idna-0.3.0.sha256sum] = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+SRC_URI[indexmap-1.9.2.sha256sum] = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
+SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+SRC_URI[io-lifetimes-1.0.7.sha256sum] = "76e86b86ae312accbf05ade23ce76b625e0e47a255712b7414037385a1c05380"
+SRC_URI[is-terminal-0.4.4.sha256sum] = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
+SRC_URI[itertools-0.10.5.sha256sum] = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+SRC_URI[itoa-1.0.6.sha256sum] = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+SRC_URI[js-sys-0.3.61.sha256sum] = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+SRC_URI[language-tags-0.3.2.sha256sum] = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
+SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+SRC_URI[libc-0.2.140.sha256sum] = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+SRC_URI[libloading-0.7.4.sha256sum] = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+SRC_URI[libm-0.2.6.sha256sum] = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
+SRC_URI[link-cplusplus-1.0.8.sha256sum] = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
+SRC_URI[linked-hash-map-0.5.6.sha256sum] = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
+SRC_URI[linux-raw-sys-0.1.4.sha256sum] = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
+SRC_URI[locale_config-0.3.0.sha256sum] = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934"
+SRC_URI[lock_api-0.4.9.sha256sum] = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+SRC_URI[log-0.4.17.sha256sum] = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+SRC_URI[lopdf-0.29.0.sha256sum] = "de0f69c40d6dbc68ebac4bf5aec3d9978e094e22e29fcabd045acd9cec74a9dc"
+SRC_URI[mac-0.1.1.sha256sum] = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+SRC_URI[malloc_buf-0.0.6.sha256sum] = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+SRC_URI[markup5ever-0.11.0.sha256sum] = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+SRC_URI[matches-0.1.10.sha256sum] = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+SRC_URI[matrixmultiply-0.3.2.sha256sum] = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84"
+SRC_URI[memchr-2.5.0.sha256sum] = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+SRC_URI[memoffset-0.8.0.sha256sum] = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
+SRC_URI[miniz_oxide-0.6.2.sha256sum] = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
+SRC_URI[nalgebra-0.32.2.sha256sum] = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511"
+SRC_URI[nalgebra-macros-0.2.0.sha256sum] = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766"
+SRC_URI[new_debug_unreachable-1.0.4.sha256sum] = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+SRC_URI[nodrop-0.1.14.sha256sum] = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+SRC_URI[normalize-line-endings-0.3.0.sha256sum] = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
+SRC_URI[num-complex-0.4.3.sha256sum] = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
+SRC_URI[num-integer-0.1.45.sha256sum] = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+SRC_URI[num-rational-0.4.1.sha256sum] = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+SRC_URI[num-traits-0.2.15.sha256sum] = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+SRC_URI[num_cpus-1.15.0.sha256sum] = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+SRC_URI[objc-0.2.7.sha256sum] = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+SRC_URI[objc-foundation-0.1.1.sha256sum] = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
+SRC_URI[objc_id-0.1.1.sha256sum] = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
+SRC_URI[once_cell-1.17.1.sha256sum] = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+SRC_URI[oorandom-11.1.3.sha256sum] = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+SRC_URI[os_str_bytes-6.4.1.sha256sum] = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
+SRC_URI[pango-0.17.4.sha256sum] = "52c280b82a881e4208afb3359a8e7fde27a1b272280981f1f34610bed5770d37"
+SRC_URI[pango-sys-0.17.0.sha256sum] = "4293d0f0b5525eb5c24734d30b0ed02cd02aa734f216883f376b54de49625de8"
+SRC_URI[pangocairo-0.17.0.sha256sum] = "2feeb7ea7874507f83f5e7ba869c54e321959431c8fbd70d4b735c8b15d90506"
+SRC_URI[pangocairo-sys-0.17.3.sha256sum] = "f60f1be8ef08087ddcbdcc1350e06073bff11113d425d12b622b716d96b9611c"
+SRC_URI[parking_lot-0.12.1.sha256sum] = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+SRC_URI[parking_lot_core-0.9.7.sha256sum] = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+SRC_URI[paste-1.0.12.sha256sum] = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
+SRC_URI[percent-encoding-2.2.0.sha256sum] = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+SRC_URI[phf-0.8.0.sha256sum] = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
+SRC_URI[phf-0.10.1.sha256sum] = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+SRC_URI[phf_codegen-0.8.0.sha256sum] = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
+SRC_URI[phf_codegen-0.10.0.sha256sum] = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+SRC_URI[phf_generator-0.8.0.sha256sum] = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
+SRC_URI[phf_generator-0.10.0.sha256sum] = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+SRC_URI[phf_macros-0.10.0.sha256sum] = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
+SRC_URI[phf_shared-0.8.0.sha256sum] = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
+SRC_URI[phf_shared-0.10.0.sha256sum] = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+SRC_URI[pin-project-lite-0.2.9.sha256sum] = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+SRC_URI[pkg-config-0.3.26.sha256sum] = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
+SRC_URI[plotters-0.3.4.sha256sum] = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+SRC_URI[plotters-backend-0.3.4.sha256sum] = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+SRC_URI[plotters-svg-0.3.3.sha256sum] = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+SRC_URI[png-0.17.7.sha256sum] = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638"
+SRC_URI[pom-3.2.0.sha256sum] = "07e2192780e9f8e282049ff9bffcaa28171e1cb0844f49ed5374e518ae6024ec"
+SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+SRC_URI[precomputed-hash-0.1.1.sha256sum] = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+SRC_URI[predicates-2.1.5.sha256sum] = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd"
+SRC_URI[predicates-3.0.1.sha256sum] = "1ba7d6ead3e3966038f68caa9fc1f860185d95a793180bbcfe0d0da47b3961ed"
+SRC_URI[predicates-core-1.0.6.sha256sum] = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
+SRC_URI[predicates-tree-1.0.9.sha256sum] = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
+SRC_URI[proc-macro-crate-1.3.1.sha256sum] = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+SRC_URI[proc-macro-error-1.0.4.sha256sum] = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+SRC_URI[proc-macro-error-attr-1.0.4.sha256sum] = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+SRC_URI[proc-macro-hack-0.5.20+deprecated.sha256sum] = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+SRC_URI[proc-macro2-1.0.52.sha256sum] = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224"
+SRC_URI[proptest-1.1.0.sha256sum] = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70"
+SRC_URI[quick-error-1.2.3.sha256sum] = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+SRC_URI[quick-error-2.0.1.sha256sum] = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
+SRC_URI[quote-1.0.26.sha256sum] = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+SRC_URI[rand-0.7.3.sha256sum] = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+SRC_URI[rand_chacha-0.2.2.sha256sum] = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+SRC_URI[rand_core-0.5.1.sha256sum] = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+SRC_URI[rand_hc-0.2.0.sha256sum] = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+SRC_URI[rand_pcg-0.2.1.sha256sum] = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
+SRC_URI[rand_xorshift-0.3.0.sha256sum] = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+SRC_URI[rawpointer-0.2.1.sha256sum] = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
+SRC_URI[rayon-1.7.0.sha256sum] = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+SRC_URI[rayon-core-1.11.0.sha256sum] = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+SRC_URI[rctree-0.5.0.sha256sum] = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f"
+SRC_URI[redox_syscall-0.2.16.sha256sum] = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+SRC_URI[regex-1.7.1.sha256sum] = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
+SRC_URI[regex-automata-0.1.10.sha256sum] = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+SRC_URI[regex-syntax-0.6.28.sha256sum] = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
+SRC_URI[rgb-0.8.36.sha256sum] = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59"
+SRC_URI[rustc_version-0.2.3.sha256sum] = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
+SRC_URI[rustc_version-0.4.0.sha256sum] = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+SRC_URI[rustix-0.36.9.sha256sum] = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
+SRC_URI[rusty-fork-0.3.0.sha256sum] = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+SRC_URI[ryu-1.0.13.sha256sum] = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+SRC_URI[safe_arch-0.6.0.sha256sum] = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529"
+SRC_URI[same-file-1.0.6.sha256sum] = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+SRC_URI[scopeguard-1.1.0.sha256sum] = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+SRC_URI[scratch-1.0.5.sha256sum] = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
+SRC_URI[selectors-0.24.0.sha256sum] = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416"
+SRC_URI[semver-0.9.0.sha256sum] = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
+SRC_URI[semver-1.0.17.sha256sum] = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+SRC_URI[semver-parser-0.7.0.sha256sum] = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
+SRC_URI[serde-1.0.156.sha256sum] = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4"
+SRC_URI[serde_derive-1.0.156.sha256sum] = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d"
+SRC_URI[serde_json-1.0.94.sha256sum] = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
+SRC_URI[servo_arc-0.2.0.sha256sum] = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741"
+SRC_URI[sha1-0.6.1.sha256sum] = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
+SRC_URI[sha1_smol-1.0.0.sha256sum] = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
+SRC_URI[simba-0.8.0.sha256sum] = "50582927ed6f77e4ac020c057f37a268fc6aebc29225050365aacbb9deeeddc4"
+SRC_URI[siphasher-0.3.10.sha256sum] = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
+SRC_URI[slab-0.4.8.sha256sum] = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+SRC_URI[smallvec-1.10.0.sha256sum] = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+SRC_URI[stable_deref_trait-1.2.0.sha256sum] = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+SRC_URI[standback-0.2.17.sha256sum] = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff"
+SRC_URI[stdweb-0.4.20.sha256sum] = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
+SRC_URI[stdweb-derive-0.5.3.sha256sum] = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
+SRC_URI[stdweb-internal-macros-0.2.9.sha256sum] = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
+SRC_URI[stdweb-internal-runtime-0.1.5.sha256sum] = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
+SRC_URI[string_cache-0.8.7.sha256sum] = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+SRC_URI[string_cache_codegen-0.5.2.sha256sum] = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+SRC_URI[system-deps-6.0.3.sha256sum] = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff"
+SRC_URI[tempfile-3.4.0.sha256sum] = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
+SRC_URI[tendril-0.4.3.sha256sum] = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+SRC_URI[termcolor-1.2.0.sha256sum] = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+SRC_URI[termtree-0.4.1.sha256sum] = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+SRC_URI[textwrap-0.16.0.sha256sum] = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+SRC_URI[thiserror-1.0.39.sha256sum] = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c"
+SRC_URI[thiserror-impl-1.0.39.sha256sum] = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e"
+SRC_URI[time-0.2.27.sha256sum] = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242"
+SRC_URI[time-macros-0.1.1.sha256sum] = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1"
+SRC_URI[time-macros-impl-0.1.2.sha256sum] = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f"
+SRC_URI[tinytemplate-1.2.1.sha256sum] = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+SRC_URI[tinyvec-1.6.0.sha256sum] = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+SRC_URI[tinyvec_macros-0.1.1.sha256sum] = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+SRC_URI[toml-0.5.11.sha256sum] = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+SRC_URI[toml_datetime-0.6.1.sha256sum] = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+SRC_URI[toml_edit-0.19.7.sha256sum] = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274"
+SRC_URI[typenum-1.16.0.sha256sum] = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+SRC_URI[unarray-0.1.4.sha256sum] = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+SRC_URI[unicode-bidi-0.3.11.sha256sum] = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c"
+SRC_URI[unicode-ident-1.0.8.sha256sum] = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+SRC_URI[unicode-normalization-0.1.22.sha256sum] = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+SRC_URI[unicode-width-0.1.10.sha256sum] = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+SRC_URI[url-2.3.1.sha256sum] = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+SRC_URI[utf-8-0.7.6.sha256sum] = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+SRC_URI[version-compare-0.1.1.sha256sum] = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29"
+SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+SRC_URI[wait-timeout-0.2.0.sha256sum] = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+SRC_URI[walkdir-2.3.3.sha256sum] = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+SRC_URI[wasi-0.9.0+wasi-snapshot-preview1.sha256sum] = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+SRC_URI[wasm-bindgen-0.2.84.sha256sum] = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+SRC_URI[wasm-bindgen-backend-0.2.84.sha256sum] = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+SRC_URI[wasm-bindgen-macro-0.2.84.sha256sum] = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+SRC_URI[wasm-bindgen-macro-support-0.2.84.sha256sum] = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+SRC_URI[wasm-bindgen-shared-0.2.84.sha256sum] = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+SRC_URI[web-sys-0.3.61.sha256sum] = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
+SRC_URI[weezl-0.1.7.sha256sum] = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+SRC_URI[wide-0.7.8.sha256sum] = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223"
+SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+SRC_URI[winapi-util-0.1.5.sha256sum] = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+SRC_URI[windows-sys-0.42.0.sha256sum] = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+SRC_URI[windows-sys-0.45.0.sha256sum] = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+SRC_URI[windows-targets-0.42.2.sha256sum] = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+SRC_URI[windows_aarch64_gnullvm-0.42.2.sha256sum] = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+SRC_URI[windows_aarch64_msvc-0.42.2.sha256sum] = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+SRC_URI[windows_i686_gnu-0.42.2.sha256sum] = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+SRC_URI[windows_i686_msvc-0.42.2.sha256sum] = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+SRC_URI[windows_x86_64_gnu-0.42.2.sha256sum] = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+SRC_URI[windows_x86_64_gnullvm-0.42.2.sha256sum] = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+SRC_URI[windows_x86_64_msvc-0.42.2.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+SRC_URI[winnow-0.3.6.sha256sum] = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966"
+SRC_URI[xml5ever-0.17.0.sha256sum] = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650"
+SRC_URI[yeslogic-fontconfig-sys-4.0.1.sha256sum] = "ec657fd32bbcbeaef5c7bc8e10b3db95b143fab8db0a50079773dbf936fd4f73"
diff --git a/poky/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch b/poky/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch
index 992ff8d..15d5abe 100644
--- a/poky/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch
+++ b/poky/meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch
@@ -10,22 +10,13 @@
 Signed-off-by: Alexander Kanavin <alex@linutronix.de>
 
 ---
- vendor/system-deps/.cargo-checksum.json |  2 +-
- vendor/system-deps/src/lib.rs           | 16 +---------------
+ system-deps-6.0.3/src/lib.rs           | 16 +---------------
  2 files changed, 2 insertions(+), 16 deletions(-)
 
-diff --git a/vendor/system-deps/.cargo-checksum.json b/vendor/system-deps/.cargo-checksum.json
-index 862df8b..931748e 100644
---- a/vendor/system-deps/.cargo-checksum.json
-+++ b/vendor/system-deps/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"c38fd96ca3233ebee3bb7e37ca8f8a7a2685cdd7fcccf0210eaa879aa91dc684","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"534efc2f977d8c67d5be3a4c3e81093a6c00ab2de1102404166b1573ad96dbd2","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"}
-diff --git a/vendor/system-deps/src/lib.rs b/vendor/system-deps/src/lib.rs
+diff --git a/system-deps-6.0.3/src/lib.rs b/system-deps-6.0.3/src/lib.rs
 index 45ab1ce..f87d1ec 100644
---- a/vendor/system-deps/src/lib.rs
-+++ b/vendor/system-deps/src/lib.rs
+--- a/system-deps-6.0.3/src/lib.rs
++++ b/system-deps-6.0.3/src/lib.rs
 @@ -800,21 +800,7 @@ impl Config {
      }
  
diff --git a/poky/meta/recipes-gnome/librsvg/librsvg_2.54.5.bb b/poky/meta/recipes-gnome/librsvg/librsvg_2.56.0.bb
similarity index 89%
rename from poky/meta/recipes-gnome/librsvg/librsvg_2.54.5.bb
rename to poky/meta/recipes-gnome/librsvg/librsvg_2.56.0.bb
index 59278d1..1a5d8a6 100644
--- a/poky/meta/recipes-gnome/librsvg/librsvg_2.54.5.bb
+++ b/poky/meta/recipes-gnome/librsvg/librsvg_2.56.0.bb
@@ -14,13 +14,15 @@
 DEPENDS = "cairo gdk-pixbuf glib-2.0 libxml2 pango python3-docutils-native"
 BBCLASSEXTEND = "native nativesdk"
 
-inherit cargo_common gnomebase pixbufcache upstream-version-is-even gobject-introspection rust vala gi-docgen
+inherit cargo_common gnomebase pixbufcache upstream-version-is-even gobject-introspection rust vala gi-docgen cargo-update-recipe-crates
+
+require ${BPN}-crates.inc
 
 SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \
-           file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \
+            file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch;patchdir=${CARGO_VENDORING_DIRECTORY} \
            "
 
-SRC_URI[archive.sha256sum] = "4f03190f45324d1fa1f52a79dfcded1f64eaf49b3ae2f88eedab0c07617cae6e"
+SRC_URI[archive.sha256sum] = "194b5097d9cd107495f49c291cf0da65ec2b4bb55e5628369751a3f44ba222b3"
 
 # librsvg is still autotools-based, but is calling cargo from its automake-driven makefiles
 # so we cannot use cargo class directly, but still need bits and pieces from it 
@@ -37,7 +39,6 @@
 RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64"
 RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64"
 
-CARGO_DISABLE_BITBAKE_VENDORING = "1"
 do_configure[postfuncs] += "cargo_common_do_configure"
 
 inherit rust-target-config
diff --git a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.1.0.bb b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.3.0.bb
similarity index 95%
rename from poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.1.0.bb
rename to poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.3.0.bb
index 71c92c6..7ecbb04 100644
--- a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.1.0.bb
+++ b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_7.3.0.bb
@@ -9,7 +9,7 @@
                     "
 
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "f135a61cd464c9ed6bc9823764c188f276c3850a8dc904628de2a87966b7077b"
+SRC_URI[sha256sum] = "20770789749ac9ba846df33983dbda22db836c70d9f5d050cb9aa5347094a8fb"
 
 DEPENDS += "glib-2.0-native"
 
diff --git a/poky/meta/recipes-graphics/kmscube/kmscube_git.bb b/poky/meta/recipes-graphics/kmscube/kmscube_git.bb
index b2c10e0..67ac97b 100644
--- a/poky/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/poky/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -6,7 +6,7 @@
 HOMEPAGE = "https://cgit.freedesktop.org/mesa/kmscube/"
 LICENSE = "MIT"
 SECTION = "graphics"
-DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm"
+DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm virtual/libgbm"
 
 LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
 
@@ -19,7 +19,6 @@
 inherit meson pkgconfig features_check
 
 REQUIRED_DISTRO_FEATURES = "opengl"
-DEPENDS = "virtual/libgbm"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
diff --git a/poky/meta/recipes-graphics/libva/libva-initial_2.16.0.bb b/poky/meta/recipes-graphics/libva/libva-initial_2.18.0.bb
similarity index 100%
rename from poky/meta/recipes-graphics/libva/libva-initial_2.16.0.bb
rename to poky/meta/recipes-graphics/libva/libva-initial_2.18.0.bb
diff --git a/poky/meta/recipes-graphics/libva/libva-utils_2.17.1.bb b/poky/meta/recipes-graphics/libva/libva-utils_2.18.2.bb
similarity index 90%
rename from poky/meta/recipes-graphics/libva/libva-utils_2.17.1.bb
rename to poky/meta/recipes-graphics/libva/libva-utils_2.18.2.bb
index 1e475e8..c7bf360 100644
--- a/poky/meta/recipes-graphics/libva/libva-utils_2.17.1.bb
+++ b/poky/meta/recipes-graphics/libva/libva-utils_2.18.2.bb
@@ -14,8 +14,8 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
 
-SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.17-branch;protocol=https"
-SRCREV = "3a291be22cfe70e41bad8a376fa278efa651fdff"
+SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.18-branch;protocol=https"
+SRCREV = "76993ae8d0fbd17e5bfff80ed495c71e727f0d06"
 S = "${WORKDIR}/git"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))$"
diff --git a/poky/meta/recipes-graphics/libva/libva.inc b/poky/meta/recipes-graphics/libva/libva.inc
index 0f16dac..7ed0c9e 100644
--- a/poky/meta/recipes-graphics/libva/libva.inc
+++ b/poky/meta/recipes-graphics/libva/libva.inc
@@ -18,7 +18,7 @@
 
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libva-${PV}.tar.bz2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
-SRC_URI[sha256sum] = "115faca0db2c417a37da49830870e260450fa13066f5e24e252a20c36d920a1c"
+SRC_URI[sha256sum] = "a3577eeba0c23924686c7e2f2030073736c8282a80f27b5473e33ea94ccd4982"
 
 S = "${WORKDIR}/libva-${PV}"
 
diff --git a/poky/meta/recipes-graphics/libva/libva_2.16.0.bb b/poky/meta/recipes-graphics/libva/libva_2.18.0.bb
similarity index 100%
rename from poky/meta/recipes-graphics/libva/libva_2.16.0.bb
rename to poky/meta/recipes-graphics/libva/libva_2.18.0.bb
diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc
index 10efff9..439389f 100644
--- a/poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/poky/meta/recipes-graphics/mesa/mesa.inc
@@ -52,8 +52,6 @@
 
 PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
 
-MESA_LLVM_RELEASE ?= ""
-
 # set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
 # by default the upstream mesa sources build a debug release
 # here we assume the user will want a release build by default
@@ -178,8 +176,7 @@
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
 
 PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
-PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm${MESA_LLVM_RELEASE} llvm-native \
-                               elfutils"
+PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
 PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
 PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
 
diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb
index 116d2f5..6264483 100644
--- a/poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -41,7 +41,7 @@
 PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
 PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd"
 PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
-PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
+PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang"
 
 export PIGLIT_BUILD_DIR = "../../../../git"
 
diff --git a/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
index 74ec57a..21b499e 100644
--- a/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
+++ b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -13,8 +13,7 @@
 PV = "2.99.917+git${SRCPV}"
 S = "${WORKDIR}/git"
 
-SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel;branch=master \
-"
+SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel;protocol=https;branch=master"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch b/poky/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch
deleted file mode 100644
index 722116c..0000000
--- a/poky/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-CVE: CVE-2022-3554
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <dickey@invisible-island.net>
-Date: Tue, 4 Oct 2022 18:26:17 -0400
-Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
-
-Analysis:
-
-    _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
-    the internal function pointers, but the internal close function does
-    not free the pointer to the XIM (this would be done in XCloseIM()).
-
-Report/patch:
-
-    Date: Mon, 03 Oct 2022 18:47:32 +0800
-    From: Po Lu <luangruo@yahoo.com>
-    To: xorg-devel@lists.x.org
-    Subject: Re: Yet another leak in Xlib
-
-    For reference, here's how I'm calling XRegisterIMInstantiateCallback:
-
-    XSetLocaleModifiers ("");
-    XRegisterIMInstantiateCallback (compositor.display,
-                                    XrmGetDatabase (compositor.display),
-                                    (char *) compositor.resource_name,
-                                    (char *) compositor.app_name,
-                                    IMInstantiateCallback, NULL);
-
-    and XMODIFIERS is:
-
-        @im=ibus
-
-Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
----
- modules/im/ximcp/imInsClbk.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
-index 95b379cb..c10e347f 100644
---- a/modules/im/ximcp/imInsClbk.c
-+++ b/modules/im/ximcp/imInsClbk.c
-@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
-     if( xim ) {
- 	lock = True;
- 	xim->methods->close( (XIM)xim );
-+	/* XIMs must be freed manually after being opened; close just
-+	   does the protocol to deinitialize the IM.  */
-+	XFree( xim );
- 	lock = False;
- 	icb->call = True;
- 	callback( display, client_data, NULL );
--- 
-2.34.1
-
diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb b/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb
index 1b95cfb..9058c18 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb
@@ -13,19 +13,17 @@
             xtrans \
             libxcb \
             xorgproto-native \
-            autoconf-archive \
+            autoconf-archive-native \
             "
 
 PROVIDES = "virtual/libx11"
 
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-
 PE = "1"
 
 XORG_PN = "libX11"
 
-SRC_URI += "file://disable_tests.patch \
-            "
+SRC_URI += "file://disable_tests.patch"
+
 SRC_URI[sha256sum] = "c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518"
 
 inherit gettext
diff --git a/poky/meta/recipes-graphics/xorg-lib/libxi_1.8.bb b/poky/meta/recipes-graphics/xorg-lib/libxi_1.8.1.bb
similarity index 85%
rename from poky/meta/recipes-graphics/xorg-lib/libxi_1.8.bb
rename to poky/meta/recipes-graphics/xorg-lib/libxi_1.8.1.bb
index a6cf9b3..00bd46e 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libxi_1.8.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libxi_1.8.1.bb
@@ -16,8 +16,8 @@
 PE = "1"
 
 XORG_PN = "libXi"
-XORG_EXT = "tar.bz2"
+XORG_EXT = "tar.xz"
 
-SRC_URI[sha256sum] = "2ed181446a61c7337576467870bc5336fc9e222a281122d96c4d39a3298bba00"
+SRC_URI[sha256sum] = "89bfc0e814f288f784202e6e5f9b362b788ccecdeb078670145eacd8749656a7"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.13.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.13.bb
index c541478..458ad8e 100644
--- a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.13.bb
+++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.13.bb
@@ -5,14 +5,13 @@
 DEPENDS += "openssl"
 
 SRC_URI += " \
-file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
-file://0001-tests-Makefile-do-not-use-Werror.patch \
-"
+           file://0001-tests-Makefile-do-not-use-Werror.patch \
+           "
 
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
 
 do_compile() {
-	oe_runmake testprogs
+	oe_runmake tests
 }
 
 do_install() {
diff --git a/poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
deleted file mode 100644
index 8c40e62..0000000
--- a/poky/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 3ba8ba9410464d0986bc6cc5ddb1819745af1eb2 Mon Sep 17 00:00:00 2001
-From: Yu Zongchun <b40527@freescale.com>
-Date: Sun, 28 Apr 2013 14:39:22 +0800
-Subject: [PATCH] Add the compile and install rules for cryptodev tests folder
-
-This is required to install the cryptodev tests folder to rootfs
-
-Signed-off-by: Yu Zongchun <b40527@freescale.com>
-
-Upstream-Status: Pending
-
----
- Makefile       | 6 ++++++
- tests/Makefile | 8 ++++++++
- 2 files changed, 14 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index d83aee6..3a750a1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -41,6 +41,9 @@ modules_install:
- install_tests: tests
- 	$(MAKE) -C tests install DESTDIR=$(PREFIX)
- 
-+install_tests:
-+	make -C tests install DESTDIR=$(PREFIX)
-+
- clean:
- 	$(MAKE) $(KERNEL_MAKE_OPTS) clean
- 	CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests clean
-@@ -54,6 +57,9 @@ tests:
- 
- .PHONY: install modules_install tests install_tests
- 
-+testprogs:
-+	KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
-+
- CPOPTS =
- ifneq ($(SHOW_TYPES),)
- CPOPTS += --show-types
-diff --git a/tests/Makefile b/tests/Makefile
-index 2502f32..2fb7a9a 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin
- 
- all: $(hostprogs)
- 
-+install:
-+	install -d  $(DESTDIR)/usr/bin/tests_cryptodev
-+	for bin in $(hostprogs); do \
-+		install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \
-+	done
-+
- check: $(hostprogs)
- 	./cipher
- 	./hmac
-@@ -38,6 +44,8 @@ install:
- 		install -m 755 $$prog $(DESTDIR)/$(bindir); \
- 	done
- 
-+testprogs: $(hostprogs)
-+
- clean:
- 	rm -f *.o *~ $(hostprogs)
- 
diff --git a/poky/meta/recipes-kernel/kmod/kmod/ptest.patch b/poky/meta/recipes-kernel/kmod/kmod/ptest.patch
deleted file mode 100644
index 831dbcb..0000000
--- a/poky/meta/recipes-kernel/kmod/kmod/ptest.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Add 'install-ptest' rule.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
-
-diff -ruN a/Makefile.am b/Makefile.am
---- a/Makefile.am	2013-07-12 17:11:05.278331557 +0200
-+++ b/Makefile.am	2013-07-12 17:14:27.033788016 +0200
-@@ -204,6 +204,16 @@
- 
- distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
- 
-+install-ptest:
-+	@$(MKDIR_P) $(DESTDIR)/testsuite
-+	@for file in $(TESTSUITE); do \
-+		install $$file $(DESTDIR)/testsuite; \
-+	done;
-+	@sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
-+	@$(MKDIR_P) $(DESTDIR)/tools
-+	@cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools
-+	@cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite
-+
- # ------------------------------------------------------------------------------
- # custom release helpers
- # ------------------------------------------------------------------------------
diff --git a/meta-openembedded/meta-oe/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/poky/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
similarity index 100%
rename from meta-openembedded/meta-oe/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
rename to poky/meta/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
diff --git a/meta-openembedded/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb b/poky/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
similarity index 96%
rename from meta-openembedded/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
rename to poky/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
index 089b681..b5c0834 100644
--- a/meta-openembedded/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
+++ b/poky/meta/recipes-kernel/libtraceevent/libtraceevent_1.7.2.bb
@@ -14,6 +14,8 @@
 
 S = "${WORKDIR}/git"
 
+export EXTRA_CFLAGS = "${CFLAGS}"
+
 inherit pkgconfig
 
 do_install() {
diff --git a/poky/meta/recipes-kernel/linux/files/0001-perf-cpumap-Make-counter-as-unsigned-ints.patch b/poky/meta/recipes-kernel/linux/files/0001-perf-cpumap-Make-counter-as-unsigned-ints.patch
new file mode 100644
index 0000000..2bfc40f
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/files/0001-perf-cpumap-Make-counter-as-unsigned-ints.patch
@@ -0,0 +1,69 @@
+From d14450f9e0f05ea7177c5404a7a9289352caab77 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Jan 2023 13:04:10 -0800
+Subject: [PATCH] perf cpumap: Make counter as unsigned ints
+
+These are loop counters which is inherently unsigned. Therefore make
+them unsigned. Moreover it also fixes alloc-size-larger-than
+error with gcc-13, where malloc can be called with (-1) due to tmp_len
+being an int type.
+
+Fixes
+| cpumap.c:366:20: error: argument 1 range [18446744065119617024, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
+|   366 |         tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu));
+|       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+
+Upstream-Status: Submitted [https://lore.kernel.org/linux-perf-users/20230123211310.127532-1-raj.khem@gmail.com/T/#u]
+---
+ tools/lib/perf/cpumap.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tools/lib/perf/cpumap.c b/tools/lib/perf/cpumap.c
+index 6cd0be7c1bb4..d960880dd903 100644
+--- a/tools/lib/perf/cpumap.c
++++ b/tools/lib/perf/cpumap.c
+@@ -351,8 +351,8 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
+ 					 struct perf_cpu_map *other)
+ {
+ 	struct perf_cpu *tmp_cpus;
+-	int tmp_len;
+-	int i, j, k;
++	unsigned int tmp_len;
++	unsigned int i, j, k;
+ 	struct perf_cpu_map *merged;
+ 
+ 	if (perf_cpu_map__is_subset(orig, other))
+@@ -369,7 +369,7 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
+ 
+ 	/* Standard merge algorithm from wikipedia */
+ 	i = j = k = 0;
+-	while (i < orig->nr && j < other->nr) {
++	while (i < (unsigned int)orig->nr && j < (unsigned int)other->nr) {
+ 		if (orig->map[i].cpu <= other->map[j].cpu) {
+ 			if (orig->map[i].cpu == other->map[j].cpu)
+ 				j++;
+@@ -378,10 +378,10 @@ struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig,
+ 			tmp_cpus[k++] = other->map[j++];
+ 	}
+ 
+-	while (i < orig->nr)
++	while (i < (unsigned int)orig->nr)
+ 		tmp_cpus[k++] = orig->map[i++];
+ 
+-	while (j < other->nr)
++	while (j < (unsigned int)other->nr)
+ 		tmp_cpus[k++] = other->map[j++];
+ 	assert(k <= tmp_len);
+ 
+-- 
+2.39.1
+
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
deleted file mode 100644
index 475fe34..0000000
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-KBRANCH ?= "v5.15/standard/preempt-rt/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
-# to build multiple virtual/kernel providers, e.g. as dependency of
-# core-image-rt-sdk, core-image-rt.
-python () {
-    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
-        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
-}
-
-SRCREV_machine ?= "8e0611e36c848a07f9cdd778903c9e51bb90b319"
-SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA};protocol=https"
-
-LINUX_VERSION ?= "5.15.108"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-
-DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "1"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
-
-KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
-KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
-KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
deleted file mode 100644
index 365d01d..0000000
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-KBRANCH ?= "v5.15/standard/tiny/base"
-
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "5.15.108"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-
-DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "3d762b85647844790979dd1e17a762003aaa7476"
-SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA};protocol=https"
-
-COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5)$"
-
-# Functionality flags
-KERNEL_FEATURES = ""
-
-KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.15.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.15.bb
deleted file mode 100644
index 54c8e12..0000000
--- a/poky/meta/recipes-kernel/linux/linux-yocto_5.15.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-KBRANCH ?= "v5.15/standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH:qemuarm  ?= "v5.15/standard/arm-versatile-926ejs"
-KBRANCH:qemuarm64 ?= "v5.15/standard/qemuarm64"
-KBRANCH:qemumips ?= "v5.15/standard/mti-malta32"
-KBRANCH:qemuppc  ?= "v5.15/standard/qemuppc"
-KBRANCH:qemuriscv64  ?= "v5.15/standard/base"
-KBRANCH:qemuriscv32  ?= "v5.15/standard/base"
-KBRANCH:qemux86  ?= "v5.15/standard/base"
-KBRANCH:qemux86-64 ?= "v5.15/standard/base"
-KBRANCH:qemumips64 ?= "v5.15/standard/mti-malta64"
-
-SRCREV_machine:qemuarm ?= "80421c525a12141d31bf1592b0d8c176defe3010"
-SRCREV_machine:qemuarm64 ?= "9d140dbc3171bf272f51b524edeeb2f22783aca5"
-SRCREV_machine:qemumips ?= "b29a8fa62d88db512f1fa5d60e430a851d7e3aaf"
-SRCREV_machine:qemuppc ?= "7ee6b7fc4b57933114376cf012218c2ae3d23558"
-SRCREV_machine:qemuriscv64 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
-SRCREV_machine:qemuriscv32 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
-SRCREV_machine:qemux86 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
-SRCREV_machine:qemux86-64 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
-SRCREV_machine:qemumips64 ?= "5c900befc90365f6daa80989e8de0ccc546ff0f5"
-SRCREV_machine ?= "e8c818cce43dd720c366d831aeb102c20c237652"
-SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
-
-# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
-# get the <version>/base branch, which is pure upstream -stable, and the same
-# meta SRCREV as the linux-yocto-standard builds. Select your version using the
-# normal PREFERRED_VERSION settings.
-BBCLASSEXTEND = "devupstream:target"
-SRCREV_machine:class-devupstream ?= "3299fb36854fdc288bddc2c4d265f8a2e5105944"
-PN:class-devupstream = "linux-yocto-upstream"
-KBRANCH:class-devupstream = "v5.15/base"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA};protocol=https"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-LINUX_VERSION ?= "5.15.108"
-
-DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
-DEPENDS += "gmp-native libmpc-native"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "1"
-
-KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
-
-COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
-KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
-KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
-KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"
-KERNEL_FEATURES:append:powerpc =" arch/powerpc/powerpc-debug.scc"
-KERNEL_FEATURES:append:powerpc64 =" arch/powerpc/powerpc-debug.scc"
-KERNEL_FEATURES:append:powerpc64le =" arch/powerpc/powerpc-debug.scc"
-
-INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
-
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_6.1.bb b/poky/meta/recipes-kernel/linux/linux-yocto_6.1.bb
index 36f7ed8..bf172eb 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_6.1.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_6.1.bb
@@ -41,6 +41,7 @@
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.1;destsuffix=${KMETA};protocol=https"
+SRC_URI += "file://0001-perf-cpumap-Make-counter-as-unsigned-ints.patch"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 LINUX_VERSION ?= "6.1.25"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch
new file mode 100644
index 0000000..e338eaf
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch
@@ -0,0 +1,48 @@
+From 40b2a4a793c81221a28f822d07135069456ea021 Mon Sep 17 00:00:00 2001
+From: Olivier Dion <odion@efficios.com>
+Date: Fri, 10 Mar 2023 13:17:46 -0500
+Subject: [PATCH] Tests: fix: parse-callback reports missing addr2line
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+addr2line from binutils is required for this script to work correctly.
+However, it silently fails. Fix this by using `subprocess.run' with
+`check=True' instead of `subprocess.getoutput'. That way, an exception
+is raised if an error occurs.
+
+Fix the shebang by not assuming where python is installed while at it.
+
+Change-Id: I5157b3dbccf6bfbe08a6b6840b38f5db9010fe96
+Signed-off-by: Olivier Dion <odion@efficios.com>
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+---
+ tests/utils/parse-callstack.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
+index 3bfddd9ef..c3f0e2e9b 100755
+--- a/tests/utils/parse-callstack.py
++++ b/tests/utils/parse-callstack.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/env python3
+ #
+ # Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
+ #
+@@ -24,7 +24,9 @@ def addr2line(executable, addr):
+     # Expand inlined functions
+     cmd += ['--addresses', addr]
+ 
+-    addr2line_output = subprocess.getoutput(' '.join(cmd))
++    status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
++
++    addr2line_output = status.stdout.decode("utf-8")
+ 
+     # Omit the last 2 lines as the caller of main can not be determine
+     fcts = [addr2line_output.split()[-2]]
+-- 
+2.34.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch
new file mode 100644
index 0000000..52c4ec9
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch
@@ -0,0 +1,107 @@
+From 844be4dc46deeec83199da80e9e2a6058e9f5a53 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
+ <jeremie.galarneau@efficios.com>
+Date: Thu, 25 May 2023 19:15:20 -0400
+Subject: [PATCH] Tests fix: test_callstack: output of addr2line incorrectly
+ parsed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+Issue observed
+--------------
+
+The test_callstack test fails with GCC 13.1 with the following output:
+
+  Traceback (most recent call last):
+  File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 160, in <module>
+  main()
+  File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 155, in main
+  raise Exception('Expected function name not found in recorded callstack')
+  Exception: Expected function name not found in recorded callstack
+  ok 10 - Destroy session callstack
+  PASS: kernel/test_callstack 10 - Destroy session callstack
+  not ok 11 - Validate userspace callstack
+  FAIL: kernel/test_callstack 11 - Validate userspace callstack
+
+Cause
+-----
+
+parse-callstack.py uses 'split()' to split the lines of addr2line's
+output. By default, 'split()' splits a string on any whitespace.
+Typically this was fine as addr2line's output doesn't contain spaces and
+the function then splits on new lines.
+
+Typical output of addr2line:
+
+  $ addr2line -e ./tests/regression/kernel//../../utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack --functions --addresses 0x40124B
+  0x000000000040124b
+  my_gettid
+  /tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:40
+
+However, with the test app compiled using gcc 13.1, a "discriminator"
+annotation is present:
+
+  0x0000000000401279
+  fct_b
+  /tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:58 (discriminator 1)
+
+Hence, by selecting the second to last element (-2, with negative
+indexing), the addr2line function returns '(discriminator' as the
+function name.
+
+Solution
+--------
+
+The parsing code is changed to simply iterate on groups of 3 lines,
+following addr2line's output format.
+
+Fixes #1377
+
+Change-Id: I8c1eab97e84ca7cad171904bed6660540061cf08
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+---
+ tests/utils/parse-callstack.py | 25 +++++++++++++++++--------
+ 1 file changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
+index c3f0e2e9bc..029100b618 100755
+--- a/tests/utils/parse-callstack.py
++++ b/tests/utils/parse-callstack.py
+@@ -26,14 +26,23 @@ def addr2line(executable, addr):
+ 
+     status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
+ 
+-    addr2line_output = status.stdout.decode("utf-8")
+-
+-    # Omit the last 2 lines as the caller of main can not be determine
+-    fcts = [addr2line_output.split()[-2]]
+-
+-    fcts = [ f for f in fcts if '??' not in f]
+-
+-    return fcts
++    addr2line_output = status.stdout.decode("utf-8").splitlines()
++    # addr2line's output is made of 3-tuples:
++    #   - address
++    #   - function name
++    #   - source location
++    if len(addr2line_output) % 3 != 0:
++        raise Exception('Unexpected addr2line output:\n\t{}'.format('\n\t'.join(addr2line_output)))
++
++    function_names = []
++    for address_line_number in range(0, len(addr2line_output), 3):
++        function_name = addr2line_output[address_line_number + 1]
++
++        # Filter-out unresolved functions
++        if "??" not in function_name:
++            function_names.append(addr2line_output[address_line_number + 1])
++
++    return function_names
+ 
+ def extract_user_func_names(executable, raw_callstack):
+     """
+-- 
+2.34.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
index 58c0378..113720c 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
@@ -37,6 +37,8 @@
            file://lttng-sessiond.service \
            file://disable-tests.patch \
            file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
+           file://40b2a4a793c81221a28f822d07135069456ea021.patch \
+           file://gcc13-ptest-fix.patch \
            "
 
 SRC_URI[sha256sum] = "8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337"
diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb
index e41fcc4..67b01a7 100644
--- a/poky/meta/recipes-kernel/perf/perf.bb
+++ b/poky/meta/recipes-kernel/perf/perf.bb
@@ -11,7 +11,7 @@
 
 PR = "r9"
 
-PACKAGECONFIG ??= "scripting tui libunwind"
+PACKAGECONFIG ??= "scripting tui libunwind libtraceevent"
 PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
 PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native"
 # gui support was added with kernel 3.6.35
@@ -27,6 +27,7 @@
 PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
 PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
 PACKAGECONFIG[cap] = ",,libcap"
+PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent"
 # Arm CoreSight
 PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
 
@@ -87,6 +88,7 @@
     perfexecdir=${libexecdir} \
     NO_GTK2=1 \
     ${PACKAGECONFIG_CONFARGS} \
+    PKG_CONFIG=pkg-config \
     TMPDIR="${B}" \
     LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
 '
@@ -297,6 +299,7 @@
         sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
         sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
         sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
+        sed -i 's,PKG_CONFIG = $(CROSS_COMPILE)pkg-config,#PKG_CONFIG,' ${S}/tools/perf/Makefile.perf
     fi
     if [ -e "${S}/tools/lib/api/Makefile" ]; then
         sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
diff --git a/poky/meta/recipes-kernel/powertop/powertop_2.15.bb b/poky/meta/recipes-kernel/powertop/powertop_2.15.bb
index 0aae4c9..65c6d0f 100644
--- a/poky/meta/recipes-kernel/powertop/powertop_2.15.bb
+++ b/poky/meta/recipes-kernel/powertop/powertop_2.15.bb
@@ -2,7 +2,7 @@
 DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
 HOMEPAGE = "https://01.org/powertop/"
 BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
-DEPENDS = "ncurses libnl pciutils autoconf-archive"
+DEPENDS = "ncurses libnl pciutils autoconf-archive-native"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.2.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.2.bb
index 52d987e..ab1600d 100644
--- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.2.bb
+++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.2.bb
@@ -23,6 +23,8 @@
     -Dlibpython-dir=${libdir} \
 "
 
-inherit meson pkgconfig setuptools3-base upstream-version-is-even
+inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check
 
 FILES:${PN} += "${libdir}/gstreamer-1.0"
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
diff --git a/poky/meta/recipes-multimedia/webp/libwebp_1.3.0.bb b/poky/meta/recipes-multimedia/webp/libwebp_1.3.0.bb
index 7b4d138..6939cd3 100644
--- a/poky/meta/recipes-multimedia/webp/libwebp_1.3.0.bb
+++ b/poky/meta/recipes-multimedia/webp/libwebp_1.3.0.bb
@@ -53,3 +53,5 @@
 
 DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
 FILES:${PN}-gif2webp = "${bindir}/gif2webp"
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/poky/meta/recipes-support/curl/curl_8.0.1.bb b/poky/meta/recipes-support/curl/curl_8.1.0.bb
similarity index 97%
rename from poky/meta/recipes-support/curl/curl_8.0.1.bb
rename to poky/meta/recipes-support/curl/curl_8.1.0.bb
index 5cf0446..0efd0de 100644
--- a/poky/meta/recipes-support/curl/curl_8.0.1.bb
+++ b/poky/meta/recipes-support/curl/curl_8.1.0.bb
@@ -14,7 +14,7 @@
     file://run-ptest \
     file://disable-tests \
 "
-SRC_URI[sha256sum] = "0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0"
+SRC_URI[sha256sum] = "6bd80ad4f07187015911216ee7185b90d285ac5162aed1bded144f9f93232a3c"
 
 # Curl has used many names over the years...
 CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
diff --git a/poky/meta/recipes-support/gdbm/files/run-ptest b/poky/meta/recipes-support/gdbm/files/run-ptest
index 615da84..8d64811 100755
--- a/poky/meta/recipes-support/gdbm/files/run-ptest
+++ b/poky/meta/recipes-support/gdbm/files/run-ptest
@@ -4,4 +4,4 @@
 
 cd tests
 
-./testsuite AUTOTEST_PATH=$PWD abs_builddir=$PWD COMPAT=1 | sed 's/^[^0-9]*\([0-9]\+\): \(.*\)\(ok\|pass\|skipped\|fail\|FAILED\)\(.*\)$/\3: \2 \4/;s/ \+/ /g;s/^ok/PASS/;s/^skipped/SKIP/;s/^fail/FAIL/;s/^FAILED/FAIL/'
+./testsuite --am-fmt AUTOTEST_PATH=$PWD abs_builddir=$PWD COMPAT=1
diff --git a/poky/meta/recipes-support/gnutls/gnutls_3.8.0.bb b/poky/meta/recipes-support/gnutls/gnutls_3.8.0.bb
index 7ddd242..1e3f34b 100644
--- a/poky/meta/recipes-support/gnutls/gnutls_3.8.0.bb
+++ b/poky/meta/recipes-support/gnutls/gnutls_3.8.0.bb
@@ -15,7 +15,6 @@
                     file://doc/COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c"
 
 DEPENDS = "nettle gmp virtual/libiconv libunistring"
-DEPENDS:append:libc-musl = " argp-standalone"
 
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
@@ -30,20 +29,24 @@
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest
 
-PACKAGECONFIG ??= "libidn  ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
+PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
 
 # You must also have CONFIG_SECCOMP enabled in the kernel for
 # seccomp to work.
 PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp"
 PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
-PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
+PACKAGECONFIG[libtasn1] = "--without-included-libtasn1,--with-included-libtasn1,libtasn1"
 PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
 PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
 PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}"
+PACKAGECONFIG[dane] = "--enable-libdane,--disable-libdane,unbound"
+# Certificate compression
+PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
 
 EXTRA_OECONF = " \
     --enable-doc \
-    --disable-libdane \
     --disable-rpath \
     --enable-openssl-compatibility \
     --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
@@ -54,14 +57,16 @@
 # Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell.
 export POSIX_SHELL="${base_bindir}/sh"
 
-LDFLAGS:append:libc-musl = " -largp"
-
 do_configure:prepend() {
 	for dir in . lib; do
 		rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
 	done
 }
 
+do_compile_ptest() {
+    oe_runmake -C tests buildtest-TESTS
+}
+
 do_install:append:class-target() {
         if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
           install -d ${D}${bindir}/bin
@@ -69,13 +74,11 @@
         fi
 }
 
-do_compile:append() {
-        oe_runmake ${PARALLEL_MAKE} -C tests buildtest-TESTS
-}
-
-PACKAGES =+ "${PN}-openssl ${PN}-xx ${PN}-fips"
+PACKAGES =+ "${PN}-dane ${PN}-openssl ${PN}-xx ${PN}-fips"
 
 FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
+
+FILES:${PN}-dane = "${libdir}/libgnutls-dane.so.*"
 FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
 FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*"
 FILES:${PN}-fips = "${bindir}/fipshmac"
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch b/poky/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
index 0c15cc7..8ed3928 100644
--- a/poky/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
+++ b/poky/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
@@ -1,4 +1,4 @@
-From a001b3c23bf80fd752044615b9bba6b926ff9666 Mon Sep 17 00:00:00 2001
+From ee1421f7a7a9f31400ba992a5be52b88d20170c9 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 10 May 2019 14:18:04 +0800
 Subject: [PATCH] Revert "build: Make gpgme.m4 use gpgrt-config with *.pc."
@@ -10,36 +10,21 @@
 Upstream-Status: Inappropriate [oe-core specific]
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
 ---
- src/gpgme.m4 | 58 +++++++++-------------------------------------------
- 1 file changed, 10 insertions(+), 48 deletions(-)
+ src/gpgme.m4 | 54 ++++++++--------------------------------------------
+ 1 file changed, 8 insertions(+), 46 deletions(-)
 
 diff --git a/src/gpgme.m4 b/src/gpgme.m4
-index c749a5d..8579146 100644
+index f2906c1..8cc2898 100644
 --- a/src/gpgme.m4
 +++ b/src/gpgme.m4
-@@ -1,5 +1,5 @@
- # gpgme.m4 - autoconf macro to detect GPGME.
--# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH
-+# Copyright (C) 2002, 2003, 2004, 2014 g10 Code GmbH
- #
- # This file is free software; as a special exception the author gives
- # unlimited permission to copy and/or distribute it, with or without
-@@ -9,7 +9,7 @@
- # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
- # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- #
--# Last-changed: 2020-11-20
-+# Last-changed: 2014-10-02
- 
- 
- AC_DEFUN([_AM_PATH_GPGME_CONFIG],
-@@ -36,24 +36,10 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+@@ -125,24 +125,10 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
       fi
    fi
  
 -  use_gpgrt_config=""
--  if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+-  if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
 -    if $GPGRT_CONFIG gpgme --exists; then
 -      GPGME_CONFIG="$GPGRT_CONFIG gpgme"
 -      AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
@@ -61,7 +46,7 @@
    fi
    gpgme_version_major=`echo $gpgme_version | \
                 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-@@ -66,16 +52,12 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+@@ -155,16 +141,12 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
  
  AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
  [
@@ -80,7 +65,7 @@
  *** built for $gpgme_config_host and thus may not match the
  *** used host $host.
  *** You may want to use the configure option --with-gpgme-prefix
-@@ -136,11 +118,7 @@ AC_DEFUN([AM_PATH_GPGME],
+@@ -225,11 +207,7 @@ AC_DEFUN([AM_PATH_GPGME],
       # If we have a recent GPGME, we should also check that the
       # API is compatible.
       if test "$req_gpgme_api" -gt 0 ; then
@@ -93,7 +78,7 @@
          if test "$tmp" -gt 0 ; then
             if test "$req_gpgme_api" -ne "$tmp" ; then
               ok=no
-@@ -280,11 +258,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+@@ -372,11 +350,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
       # If we have a recent GPGME, we should also check that the
       # API is compatible.
       if test "$req_gpgme_api" -gt 0 ; then
@@ -106,7 +91,7 @@
          if test "$tmp" -gt 0 ; then
             if test "$req_gpgme_api" -ne "$tmp" ; then
               ok=no
-@@ -293,20 +267,8 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+@@ -385,20 +359,8 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
       fi
    fi
    if test $ok = yes; then
@@ -129,6 +114,3 @@
      AC_MSG_RESULT(yes)
      ifelse([$2], , :, [$2])
      _AM_PATH_GPGME_CONFIG_HOST_CHECK
--- 
-2.25.1
-
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
index 3b2f59c..738b23c 100644
--- a/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
+++ b/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
@@ -1,4 +1,4 @@
-From 0d7ec5b98dc6cbd35f56deaecec5ecfdaa944aee Mon Sep 17 00:00:00 2001
+From f8221238d51066b7a1a5f2917cce2791876ea8b0 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Fri, 10 May 2019 14:23:55 +0800
 Subject: [PATCH] pkgconfig
@@ -19,17 +19,17 @@
 ---
  configure.ac            |   1 +
  src/Makefile.am         |   4 +-
- src/gpgme-pthread.pc.in |  15 ++++++
- src/gpgme.m4            | 114 +++-------------------------------------
+ src/gpgme-pthread.pc.in |  15 +++++
+ src/gpgme.m4            | 119 +++-------------------------------------
  src/gpgme.pc.in         |   4 +-
- 5 files changed, 28 insertions(+), 110 deletions(-)
+ 5 files changed, 29 insertions(+), 114 deletions(-)
  create mode 100644 src/gpgme-pthread.pc.in
 
 diff --git a/configure.ac b/configure.ac
-index 9d696b9..5b4e730 100644
+index d1b9aca..9c4f97c 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -926,6 +926,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
+@@ -1043,6 +1043,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
                  src/gpgme-glib.pc
                  src/gpgme.h)
  AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
@@ -77,10 +77,10 @@
 +Cflags: -I${includedir}
 +Requires: libassuan gpg-error
 diff --git a/src/gpgme.m4 b/src/gpgme.m4
-index 71b0010..5821895 100644
+index 8cc2898..0ff550e 100644
 --- a/src/gpgme.m4
 +++ b/src/gpgme.m4
-@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script
+@@ -168,7 +168,7 @@ dnl config script does not match the host specification the script
  dnl is added to the gpg_config_script_warn variable.
  dnl
  AC_DEFUN([AM_PATH_GPGME],
@@ -89,7 +89,7 @@
    tmp=ifelse([$1], ,1:0.4.2,$1)
    if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
       req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME],
+@@ -178,36 +178,12 @@ AC_DEFUN([AM_PATH_GPGME],
       min_gpgme_version="$tmp"
    fi
  
@@ -128,7 +128,7 @@
          if test "$tmp" -gt 0 ; then
             if test "$req_gpgme_api" -ne "$tmp" ; then
               ok=no
-@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME],
+@@ -216,19 +192,11 @@ AC_DEFUN([AM_PATH_GPGME],
       fi
    fi
    if test $ok = yes; then
@@ -148,44 +148,45 @@
  ])
  
  dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
-@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
+@@ -236,9 +204,8 @@ dnl                       [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
  dnl  and GPGME_PTHREAD_LIBS.
  dnl
- AC_DEFUN([AM_PATH_GPGME_PTHREAD],
--[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
+-AC_DEFUN([AM_PATH_GPGME_PTHREAD],[
+-  AC_OBSOLETE([$0], [; use AM_PATH_GPGME instead to use GPGME_CFLAGS and GPGME_LIBS])dnl
+-  AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
++AC_DEFUN([AM_PATH_GPGME_PTHREAD],
 +[
    tmp=ifelse([$1], ,1:0.4.2,$1)
    if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
       req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+@@ -248,40 +215,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],[
       min_gpgme_version="$tmp"
    fi
  
 -  AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
 -  ok=no
 -  if test "$GPGME_CONFIG" != "no" ; then
--    if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
--      req_major=`echo $min_gpgme_version | \
+-    req_major=`echo $min_gpgme_version | \
 -               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
--      req_minor=`echo $min_gpgme_version | \
+-    req_minor=`echo $min_gpgme_version | \
 -               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
--      req_micro=`echo $min_gpgme_version | \
+-    req_micro=`echo $min_gpgme_version | \
 -               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
--      if test "$gpgme_version_major" -gt "$req_major"; then
+-    if test "$gpgme_version_major" -gt "$req_major"; then
 -        ok=yes
--      else
+-    else
 -        if test "$gpgme_version_major" -eq "$req_major"; then
--          if test "$gpgme_version_minor" -gt "$req_minor"; then
--            ok=yes
--          else
--            if test "$gpgme_version_minor" -eq "$req_minor"; then
--              if test "$gpgme_version_micro" -ge "$req_micro"; then
--                ok=yes
--              fi
+-            if test "$gpgme_version_minor" -gt "$req_minor"; then
+-               ok=yes
+-            else
+-               if test "$gpgme_version_minor" -eq "$req_minor"; then
+-                   if test "$gpgme_version_micro" -ge "$req_micro"; then
+-                     ok=yes
+-                   fi
+-               fi
 -            fi
--          fi
 -        fi
--      fi
 -    fi
 -  fi
 +  PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no])
@@ -193,17 +194,21 @@
       # If we have a recent GPGME, we should also check that the
       # API is compatible.
       if test "$req_gpgme_api" -gt 0 ; then
--        tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+-        if test -z "$use_gpgrt_config"; then
+-          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
+-        else
+-          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
+-        fi
 +        tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0`
          if test "$tmp" -gt 0 ; then
             if test "$req_gpgme_api" -ne "$tmp" ; then
               ok=no
-@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+@@ -290,19 +229,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],[
       fi
    fi
    if test $ok = yes; then
--    GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
--    GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
+-    GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --cflags`
+-    GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --libs`
 -    AC_MSG_RESULT(yes)
      ifelse([$2], , :, [$2])
      _AM_PATH_GPGME_CONFIG_HOST_CHECK
@@ -218,7 +223,7 @@
  ])
  
  
-@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+@@ -321,36 +252,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
       min_gpgme_version="$tmp"
    fi
  
@@ -257,7 +262,7 @@
          if test "$tmp" -gt 0 ; then
             if test "$req_gpgme_api" -ne "$tmp" ; then
               ok=no
-@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+@@ -359,17 +266,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
       fi
    fi
    if test $ok = yes; then
@@ -276,15 +281,15 @@
 -  AC_SUBST(GPGME_GLIB_LIBS)
  ])
 diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in
-index 80d59de..932645b 100644
+index 9ddef5c..932645b 100644
 --- a/src/gpgme.pc.in
 +++ b/src/gpgme.pc.in
 @@ -9,6 +9,6 @@ Name: gpgme
  Description: GnuPG Made Easy to access GnuPG
  Requires.private: gpg-error, libassuan
  Version: @PACKAGE_VERSION@
--Cflags: -I${includedir} @GPGME_CONFIG_CFLAGS@
--Libs: -L${libdir} @GPGME_CONFIG_LIBS@
+-Cflags: @GPGME_CONFIG_CFLAGS@
+-Libs: @GPGME_CONFIG_LIBS@
 +Cflags: -I${includedir}
 +Libs: -L${libdir} -lgpgme
  URL: https://www.gnupg.org/software/gpgme/index.html
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
index ecd1793..0d26929 100644
--- a/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
+++ b/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
@@ -1,7 +1,7 @@
-From 52f8fd2010b900c7d382a7c4e6c1a317d8160585 Mon Sep 17 00:00:00 2001
+From 9fce0689bc04506e5758444efa24ea99fe1ff5ef Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 10 May 2019 14:30:36 +0800
-Subject: [PATCH 2/7] gpgme/lang/python: gpg-error-config should not be used
+Subject: [PATCH] gpgme/lang/python: gpg-error-config should not be used
 
 gpg-error-config was modified by OE to always return an error.
 So we want to find an alternative way to retrieve whatever it
@@ -14,39 +14,23 @@
 Rebase to 1.13.0
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
 ---
- lang/python/setup.py.in | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
+ lang/python/setup.py.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
-index 9785a28..006216d 100755
+index 6f36861..1d9058b 100755
 --- a/lang/python/setup.py.in
 +++ b/lang/python/setup.py.in
-@@ -30,7 +30,6 @@ import subprocess
- import sys
- 
- # Out-of-tree build of the gpg bindings.
--gpg_error_config = ['gpg-error-config']
- gpgme_config_flags = ['--thread=pthread']
- gpgme_config = ['gpgme-config'] + gpgme_config_flags
- gpgme_h = ''
-@@ -182,15 +181,9 @@ class BuildExtFirstHack(build):
+@@ -169,9 +169,8 @@ class BuildExtFirstHack(build):
  
      def _generate_errors_i(self):
  
--        try:
--            subprocess.check_call(
--                gpg_error_config + ['--version'], stdout=devnull)
--        except:
--            sys.exit('Could not find gpg-error-config.  ' +
--                     'Please install the libgpg-error development package.')
- 
+-        ge_cflags='@GPG_ERROR_CFLAGS@'
          gpg_error_content = self._read_header(
--            'gpg-error.h', getconfig('cflags', config=gpg_error_config))
+-            'gpg-error.h', ge_cflags.split(' ') if ge_cflags else [])
 +            "gpg-error.h", os.environ.get('CFLAGS').split())
  
          filter_re = re.compile(r'GPG_ERR_[^ ]* =')
          rewrite_re = re.compile(r' *(.*) = .*')
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch b/poky/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
index dfea1bf..214cf34 100644
--- a/poky/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
+++ b/poky/meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
@@ -1,4 +1,4 @@
-From 5bbf7a048b6d81d23186340e839f9f65b5b514b6 Mon Sep 17 00:00:00 2001
+From 94cf9f8fc79c0d1d4529cebdd74328927fda36a2 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 10 May 2019 16:19:54 +0800
 Subject: [PATCH] do not auto check var-PYTHON
@@ -14,18 +14,19 @@
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 
 ---
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ configure.ac | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 5ef00c0..bbcff93 100644
+index df218ec..6a619ef 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -425,8 +425,8 @@ if test "$found_py" = "1"; then
+@@ -521,9 +521,8 @@ if test "$found_py" = "1"; then
  	if test "$found_py" = "1" -o "$found_py3" = "1"; then
  	  # Reset everything, so that we can look for another Python.
            m4_foreach([mym4pythonver],
--                     [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[3.9],[all]],
+-                     [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[3.9],[3.10],
+-                      [3.11],[3.12],[all]],
 -           [unset PYTHON
 +                     [[2.7],[3.7]],
 +           [
diff --git a/poky/meta/recipes-support/gpgme/gpgme_1.18.0.bb b/poky/meta/recipes-support/gpgme/gpgme_1.20.0.bb
similarity index 97%
rename from poky/meta/recipes-support/gpgme/gpgme_1.18.0.bb
rename to poky/meta/recipes-support/gpgme/gpgme_1.20.0.bb
index deea6f3..dc5b58d 100644
--- a/poky/meta/recipes-support/gpgme/gpgme_1.18.0.bb
+++ b/poky/meta/recipes-support/gpgme/gpgme_1.20.0.bb
@@ -25,7 +25,7 @@
            file://0001-autogen.sh-remove-unknown-in-version.patch \
            "
 
-SRC_URI[sha256sum] = "361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e"
+SRC_URI[sha256sum] = "25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750"
 
 PYTHON_DEPS = "${@bb.utils.contains('LANGUAGES', 'python', 'swig-native', '', d)}"
 
diff --git a/poky/meta/recipes-support/icu/icu_72-1.bb b/poky/meta/recipes-support/icu/icu_72-1.bb
index 2b20bdd..c2eae52 100644
--- a/poky/meta/recipes-support/icu/icu_72-1.bb
+++ b/poky/meta/recipes-support/icu/icu_72-1.bb
@@ -6,8 +6,7 @@
 HOMEPAGE = "http://site.icu-project.org/"
 
 LICENSE = "ICU"
-DEPENDS = "icu-native autoconf-archive"
-DEPENDS:class-native = "autoconf-archive-native"
+DEPENDS = "icu-native autoconf-archive-native"
 
 CVE_PRODUCT = "international_components_for_unicode"
 
diff --git a/poky/meta/recipes-support/iso-codes/iso-codes_4.13.0.bb b/poky/meta/recipes-support/iso-codes/iso-codes_4.15.0.bb
similarity index 93%
rename from poky/meta/recipes-support/iso-codes/iso-codes_4.13.0.bb
rename to poky/meta/recipes-support/iso-codes/iso-codes_4.15.0.bb
index 1950583..6ae6fdf 100644
--- a/poky/meta/recipes-support/iso-codes/iso-codes_4.13.0.bb
+++ b/poky/meta/recipes-support/iso-codes/iso-codes_4.15.0.bb
@@ -9,7 +9,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = "git://salsa.debian.org/iso-codes-team/iso-codes.git;protocol=https;branch=main;"
-SRCREV = "ab6b01d5b56af7da9f0d2d1619a3cf84e43ed76a"
+SRCREV = "69ba16daef3c5c5e3c18f2d919e25296a4b946be"
 
 # inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
 # are inhibited by allarch
diff --git a/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.8.0.bb
similarity index 80%
rename from poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb
rename to poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.8.0.bb
index fbfbdac..d4b77f6 100644
--- a/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb
+++ b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.8.0.bb
@@ -5,13 +5,13 @@
 PROVIDES += "libatomics-ops"
 LICENSE = "GPL-2.0-only & MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://doc/LICENSING.txt;md5=dfc50c7cea7b66935844587a0f7389e7 \
+                    file://LICENSE;md5=5700d28353dfa2f191ca9b1bd707865e \
                     "
 
 SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libatomic_ops-${PV}.tar.gz"
 GITHUB_BASE_URI = "https://github.com/ivmai/libatomic_ops/releases"
 
-SRC_URI[sha256sum] = "390f244d424714735b7050d056567615b3b8f29008a663c262fb548f1802d292"
+SRC_URI[sha256sum] = "15676e7674e11bda5a7e50a73f4d9e7d60452271b8acf6fd39a71fefdf89fa31"
 
 S = "${WORKDIR}/libatomic_ops-${PV}"
 
diff --git a/poky/meta/recipes-support/libcheck/libcheck/automake-output.patch b/poky/meta/recipes-support/libcheck/libcheck/automake-output.patch
new file mode 100644
index 0000000..c860f0c
--- /dev/null
+++ b/poky/meta/recipes-support/libcheck/libcheck/automake-output.patch
@@ -0,0 +1,82 @@
+Add optional output in automake style, for integration with ptest.
+Export CK_AUTOMAKE=1 when running a test suite and you'll get
+PASS/FAIL lines on standard output.
+
+Marking this as Inappropriate right now as it's a little rough on the
+edges. Filed https://github.com/libcheck/check/issues/349 to discuss
+with upstream.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/src/check_log.c b/src/check_log.c
+index 0844661..ad23c65 100644
+--- a/src/check_log.c
++++ b/src/check_log.c
+@@ -26,6 +26,7 @@
+ #if ENABLE_SUBUNIT
+ #include <subunit/child.h>
+ #endif
++#include <libgen.h>
+ 
+ #include "check_error.h"
+ #include "check_list.h"
+@@ -381,6 +382,34 @@ void tap_lfun(SRunner * sr CK_ATTRIBUTE_UNUSED, FILE * file,
+     }
+ }
+ 
++void am_lfun(SRunner * sr CK_ATTRIBUTE_UNUSED, FILE * file,
++             enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj,
++             enum cl_event evt)
++{
++    TestResult *tr;
++    const char* types[] = { "INVALID", "PASS", "FAIL", "ERROR"};
++
++    switch (evt)
++    {
++        case CLINITLOG_SR:
++        case CLENDLOG_SR:
++        case CLSTART_SR:
++        case CLSTART_S:
++        case CLEND_SR:
++        case CLEND_S:
++        case CLSTART_T:
++            break;
++        case CLEND_T:
++            tr = (TestResult *)obj;
++            fprintf(file, "%s: %s:%s:%s %s\n",
++                    types[tr->rtype], basename(tr->file), tr->tcname, tr->tname, tr->msg);
++            fflush(file);
++            break;
++        default:
++            eprintf("Bad event type received in am_lfun", __FILE__, __LINE__);
++    }
++}
++
+ #if ENABLE_SUBUNIT
+ void subunit_lfun(SRunner * sr, FILE * file, enum print_output printmode,
+                   void *obj, enum cl_event evt)
+@@ -527,6 +556,9 @@ void srunner_init_logging(SRunner * sr, enum print_output print_mode)
+     {
+         srunner_register_lfun(sr, f, f != stdout, tap_lfun, print_mode);
+     }
++    if (getenv("CK_AUTOMAKE"))
++        srunner_register_lfun(sr, stdout, 0, am_lfun, print_mode);
++
+     srunner_send_evt(sr, NULL, CLINITLOG_SR);
+ }
+ 
+diff --git a/src/check_log.h b/src/check_log.h
+index 7223b98..bfe1de3 100644
+--- a/src/check_log.h
++++ b/src/check_log.h
+@@ -40,6 +40,9 @@ void xml_lfun(SRunner * sr, FILE * file, enum print_output,
+ void tap_lfun(SRunner * sr, FILE * file, enum print_output,
+               void *obj, enum cl_event evt);
+ 
++void am_lfun(SRunner * sr, FILE * file, enum print_output,
++             void *obj, enum cl_event evt);
++
+ void subunit_lfun(SRunner * sr, FILE * file, enum print_output,
+                   void *obj, enum cl_event evt);
+ 
diff --git a/poky/meta/recipes-support/libcheck/libcheck_0.15.2.bb b/poky/meta/recipes-support/libcheck/libcheck_0.15.2.bb
index 83f3c3f..5ab67b8 100644
--- a/poky/meta/recipes-support/libcheck/libcheck_0.15.2.bb
+++ b/poky/meta/recipes-support/libcheck/libcheck_0.15.2.bb
@@ -11,6 +11,7 @@
 LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/check-${PV}.tar.gz \
+           file://automake-output.patch \
            file://not-echo-compiler-info-to-check_stdint.h.patch"
 SRC_URI[sha256sum] = "a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a"
 GITHUB_BASE_URI = "https://github.com/libcheck/check/releases/"
@@ -33,4 +34,3 @@
 FILES:checkmk = "${bindir}/checkmk"
 
 RDEPENDS:checkmk = "gawk"
-
diff --git a/poky/meta/recipes-support/libevdev/libevdev_1.13.0.bb b/poky/meta/recipes-support/libevdev/libevdev_1.13.1.bb
similarity index 86%
rename from poky/meta/recipes-support/libevdev/libevdev_1.13.0.bb
rename to poky/meta/recipes-support/libevdev/libevdev_1.13.1.bb
index ddcc4b6..85cfd78 100644
--- a/poky/meta/recipes-support/libevdev/libevdev_1.13.0.bb
+++ b/poky/meta/recipes-support/libevdev/libevdev_1.13.1.bb
@@ -10,7 +10,7 @@
                     "
 
 SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-SRC_URI[sha256sum] = "9edf2006cc86a5055279647c38ec923d11a821ee4dc2c3033e8d20e8ee237cd9"
+SRC_URI[sha256sum] = "06a77bf2ac5c993305882bc1641017f5bec1592d6d1b64787bad492ab34f2f36"
 
 inherit autotools pkgconfig
 
diff --git a/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch b/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
index c873e24..cbfa30f 100644
--- a/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
+++ b/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
@@ -1,4 +1,4 @@
-From 839f38e5ecc22b7f1b837284bbbffac8cb32ab1e Mon Sep 17 00:00:00 2001
+From bcfd89abdb5110b93314297120412d4c7f2da313 Mon Sep 17 00:00:00 2001
 From: Trevor Gamblin <trevor.gamblin@windriver.com>
 Date: Tue, 29 Oct 2019 14:08:32 -0400
 Subject: [PATCH] libgcrypt: fix m4 file for oe-core
@@ -17,7 +17,7 @@
  1 file changed, 4 insertions(+), 86 deletions(-)
 
 diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
-index 19d514f..21125c7 100644
+index cd4249e..e53a36f 100644
 --- a/src/libgcrypt.m4
 +++ b/src/libgcrypt.m4
 @@ -29,41 +29,6 @@ dnl is added to the gpg_config_script_warn variable.
@@ -35,7 +35,7 @@
 -  fi
 -
 -  use_gpgrt_config=""
--  if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+-  if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
 -    if $GPGRT_CONFIG libgcrypt --exists; then
 -      LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt"
 -      AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config])
diff --git a/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
index f9c3624..cf9ebfb 100644
--- a/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
+++ b/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
@@ -1,4 +1,4 @@
-From 3c6c10eae0993c8ca60879494c6650f7b8f54ebe Mon Sep 17 00:00:00 2001
+From 0f66e796a8522e1043dda03b88d5f6feae839d16 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Wed, 16 Aug 2017 10:44:41 +0800
 Subject: [PATCH] libgcrypt: fix building error with '-O2' in sysroot path
@@ -25,15 +25,15 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/cipher/Makefile.am b/cipher/Makefile.am
-index d644005..1cf5072 100644
+index c3d642b..88c883a 100644
 --- a/cipher/Makefile.am
 +++ b/cipher/Makefile.am
-@@ -147,7 +147,7 @@ gost-s-box: gost-s-box.c
+@@ -153,7 +153,7 @@ gost-s-box: gost-s-box.c
  
  
  if ENABLE_O_FLAG_MUNGING
--o_flag_munging = sed -e 's/-O\([2-9sg][2-9sg]*\)/-O1/' -e 's/-Ofast/-O1/g'
-+o_flag_munging = sed -e 's/ -O\([2-9sg][2-9sg]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
+-o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g'
++o_flag_munging = sed -e 's/ -O\([2-9sgz][2-9sgz]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
  else
  o_flag_munging = cat
  endif
diff --git a/poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.2.bb
similarity index 95%
rename from poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb
rename to poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.2.bb
index bf9d7cb..58f07a1 100644
--- a/poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb
+++ b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.10.2.bb
@@ -27,7 +27,7 @@
            file://no-bench-slope.patch \
            file://run-ptest \
            "
-SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de"
+SRC_URI[sha256sum] = "3b9c02a004b68c256add99701de00b383accccf37177e0d6c58289664cce0c03"
 
 # Below whitelisted CVEs are disputed and not affecting crypto libraries for any distro.
 CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438"
diff --git a/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
index 75c1feb..3d886bc 100644
--- a/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
+++ b/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
@@ -1,4 +1,4 @@
-From e10f93167c76c477a7b97286cfac603795bf28d8 Mon Sep 17 00:00:00 2001
+From b0df1cb468264a9bb9113524f0e1318c456b2348 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Thu, 29 Mar 2018 15:12:17 +0800
 Subject: [PATCH] support pkgconfig
@@ -14,17 +14,19 @@
 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
 
 ---
- src/gpg-error.m4 | 165 +----------------------------------------------
- 1 file changed, 3 insertions(+), 162 deletions(-)
+ src/gpg-error.m4 | 192 ++---------------------------------------------
+ 1 file changed, 5 insertions(+), 187 deletions(-)
 
 diff --git a/src/gpg-error.m4 b/src/gpg-error.m4
-index a975e53..af4bf2f 100644
+index 7fa52b1..15a0859 100644
 --- a/src/gpg-error.m4
 +++ b/src/gpg-error.m4
-@@ -27,162 +27,12 @@ dnl is added to the gpg_config_script_warn variable.
+@@ -15,187 +15,14 @@
  dnl
- AC_DEFUN([AM_PATH_GPG_ERROR],
- [ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl Find gpg-error-config, for backward compatibility
+ dnl
+-dnl _AM_PATH_POSSIBLE_GPG_ERROR_CONFIG
+-AC_DEFUN([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG],[dnl
 -  gpg_error_config_prefix=""
 -  dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
 -  dnl since that is consistent with how our three siblings use the directory/
@@ -60,9 +62,14 @@
 -  fi
 -
 -  AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
--  min_gpg_error_version=ifelse([$1], ,1.33,$1)
--  ok=no
+-])
 -
+-dnl
+-dnl Find gpgrt-config, which uses .pc file
+-dnl (minimum pkg-config functionality, supporting cross build)
+-dnl
+-dnl _AM_PATH_GPGRT_CONFIG
+-AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl
 -  AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH])
 -  if test "$GPGRT_CONFIG" != "no"; then
 -    # Determine gpgrt_libdir
@@ -118,12 +125,9 @@
 -        fi
 -        if test -n "$gpgrt_libdir"; then break; fi
 -      done
--      if test -z "$libdir_candidates"; then
--        # No valid pkgconfig dir in any of the system directories, fallback
--        gpgrt_libdir=${possible_libdir1}
--      fi
--    else
--      # When we cannot determine system libdir-format, use this:
+-    fi
+-    if test -z "$gpgrt_libdir"; then
+-      # No valid pkgconfig dir in any of the system directories, fallback
 -      gpgrt_libdir=${possible_libdir1}
 -    fi
 -  else
@@ -137,12 +141,33 @@
 -      AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
 -      gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
 -    else
+-      gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
 -      unset GPGRT_CONFIG
 -    fi
 -  elif test "$GPG_ERROR_CONFIG" != "no"; then
 -    gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
 -    unset GPGRT_CONFIG
 -  fi
+-])
+-
+-dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
+-dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+-dnl
+-dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS,
+-dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS.  The _MT_ variants are
+-dnl used for programs requireing real multi thread support.
+-dnl
+-dnl If a prefix option is not used, the config script is first
+-dnl searched in $SYSROOT/bin and then along $PATH.  If the used
+-dnl config script does not match the host specification the script
+-dnl is added to the gpg_config_script_warn variable.
+-dnl
+-AC_DEFUN([AM_PATH_GPG_ERROR],[dnl
+-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+-AC_REQUIRE([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG])dnl
+-AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
+-  min_gpg_error_version=ifelse([$1], ,1.33,$1)
+-  ok=no
 -  if test "$GPG_ERROR_CONFIG" != "no"; then
 -    req_major=`echo $min_gpg_error_version | \
 -               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
@@ -163,6 +188,8 @@
 -    fi
 -  fi
 -  AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
++AC_DEFUN([AM_PATH_GPG_ERROR],
++[ AC_REQUIRE([AC_CANONICAL_HOST])
 +  min_gpg_error_version=ifelse([$1], ,0.0,$1)
 +  PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
    if test $ok = yes; then
@@ -187,7 +214,7 @@
      fi
      if test x"$gpg_error_config_host" != xnone ; then
        if test x"$gpg_error_config_host" != x"$host" ; then
-@@ -198,15 +48,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+@@ -211,15 +38,6 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
        fi
      fi
    else
diff --git a/poky/meta/recipes-support/libgpg-error/libgpg-error_1.46.bb b/poky/meta/recipes-support/libgpg-error/libgpg-error_1.47.bb
similarity index 92%
rename from poky/meta/recipes-support/libgpg-error/libgpg-error_1.46.bb
rename to poky/meta/recipes-support/libgpg-error/libgpg-error_1.47.bb
index e0f2d86..0f35fd9 100644
--- a/poky/meta/recipes-support/libgpg-error/libgpg-error_1.46.bb
+++ b/poky/meta/recipes-support/libgpg-error/libgpg-error_1.47.bb
@@ -6,7 +6,7 @@
 LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                     file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://src/gpg-error.h.in;beginline=2;endline=18;md5=d82591bc81561f617da71e00ff4a9d79 \
+                    file://src/gpg-error.h.in;beginline=2;endline=18;md5=20f4cf5d81ea2fad18f6297500018654 \
                     file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7 \
                     "
 
@@ -20,7 +20,7 @@
            file://run-ptest \
            "
 
-SRC_URI[sha256sum] = "b7e11a64246bbe5ef37748de43b245abd72cfcd53c9ae5e7fc5ca59f1c81268d"
+SRC_URI[sha256sum] = "9e3c670966b96ecc746c28c2c419541e3bcb787d1a73930f5e5f5e1bcbbb9bdb"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
diff --git a/poky/meta/recipes-support/libnl/files/enable-serial-tests.patch b/poky/meta/recipes-support/libnl/files/enable-serial-tests.patch
deleted file mode 100644
index db774ad..0000000
--- a/poky/meta/recipes-support/libnl/files/enable-serial-tests.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b1476d89bf7a0bc6062438731ee4e9026696328b Mon Sep 17 00:00:00 2001
-From: Eric Xu <chi.xu@windriver.com>
-Date: Fri, 9 Mar 2018 03:38:49 +0000
-Subject: [PATCH] Add ptest for libnl
-
-serial-tests is required to generate those targets.
-
-Upstream-Status: Inappropriate [oe-specific]
-Signed-off-by: Eric Xu <chi.xu@windriver.com>
----
- configure.ac | 2 +-
- 1 files changed, 1 insertion(+), 1 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index dfead98..2cc8257 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -46,7 +46,7 @@ AC_INIT(libnl, [libnl_version], [], [], [http://www.infradead.org/~tgr/libnl/])
- AC_CONFIG_HEADERS([lib/defs.h])
- AC_CONFIG_AUX_DIR([build-aux])
- AC_CONFIG_MACRO_DIR([m4])
--AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
-+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects serial-tests])
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], [])
- m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
- 
--- 
-2.13.3
-
diff --git a/poky/meta/recipes-support/libnl/files/run-ptest b/poky/meta/recipes-support/libnl/files/run-ptest
index e5c9eb0..0d0c665 100755
--- a/poky/meta/recipes-support/libnl/files/run-ptest
+++ b/poky/meta/recipes-support/libnl/files/run-ptest
@@ -1,16 +1,3 @@
-#!/bin/sh
+#! /bin/sh
 
-num_fail=0
-
-for test in check*
-do
-    ./"$test" \
-         && echo "PASS: $test" \
-         || {
-            echo "FAIL: $test"
-            num_fail=$(( ${num_fail} + 1))
-         }
-
-done
-
-exit $num_fail
+CK_AUTOMAKE=1 ./check-all
diff --git a/poky/meta/recipes-support/libnl/libnl_3.7.0.bb b/poky/meta/recipes-support/libnl/libnl_3.7.0.bb
index ef286a6..38d21ff 100644
--- a/poky/meta/recipes-support/libnl/libnl_3.7.0.bb
+++ b/poky/meta/recipes-support/libnl/libnl_3.7.0.bb
@@ -15,7 +15,6 @@
 DEPENDS = "flex-native bison-native"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
-           file://enable-serial-tests.patch \
            file://run-ptest \
            "
 
@@ -51,26 +50,15 @@
 RREPLACES:${PN}-genl = "libnl-genl2"
 RCONFLICTS:${PN}-genl = "libnl-genl2"
 
-RDEPENDS:${PN}-ptest += "libcheck"
-RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding"
 DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}"
-
-# make sure the tests don't link against wrong so file
-EXTRA_OECONF += "${@bb.utils.contains('PTEST_ENABLED', '1', '--disable-rpath', '', d)}"
+RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding"
 
 do_compile_ptest() {
-    # hack to remove the call to `make runtest-TESTS`
-    sed -i 's/$(MAKE) $(AM_MAKEFLAGS) runtest-TESTS//g' Makefile
-    oe_runmake check
+    oe_runmake ./tests/check-all
 }
 
-do_install_ptest(){
-    # legacy? tests are also installed, but ptest-runner will not run them
-    # upstream are not running these tests in their CI pipeline
-    # issue opened https://github.com/thom311/libnl/issues/270
-    install -m 0755 tests/.libs/* ${D}${PTEST_PATH}/
-    # contains build paths
-    rm ${D}${PTEST_PATH}/*.la
+do_install_ptest() {
+    ./libtool install install ./tests/check-all ${D}${PTEST_PATH}/
 }
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libsoup/libsoup_3.4.0.bb b/poky/meta/recipes-support/libsoup/libsoup_3.4.2.bb
similarity index 94%
rename from poky/meta/recipes-support/libsoup/libsoup_3.4.0.bb
rename to poky/meta/recipes-support/libsoup/libsoup_3.4.2.bb
index d35e4f2..37e54ab 100644
--- a/poky/meta/recipes-support/libsoup/libsoup_3.4.0.bb
+++ b/poky/meta/recipes-support/libsoup/libsoup_3.4.2.bb
@@ -12,7 +12,7 @@
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
 SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-SRC_URI[sha256sum] = "23efff6ac70f2c1e873507dac52649eec032c1597a4ae951762ce3123789acc9"
+SRC_URI[sha256sum] = "78c8fa37cb152d40ec8c4a148d6155e2f6947f3f1602a7cda3a31ad40f5ee2f3"
 
 PROVIDES = "libsoup-3.0"
 CVE_PRODUCT = "libsoup"
diff --git a/poky/meta/recipes-support/mpfr/mpfr_4.2.0.bb b/poky/meta/recipes-support/mpfr/mpfr_4.2.0.bb
index fead5c3..3180438 100644
--- a/poky/meta/recipes-support/mpfr/mpfr_4.2.0.bb
+++ b/poky/meta/recipes-support/mpfr/mpfr_4.2.0.bb
@@ -9,7 +9,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
                     file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \
                     "
-DEPENDS = "gmp autoconf-archive"
+DEPENDS = "gmp autoconf-archive-native"
 
 SRC_URI = "https://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz"
 SRC_URI[sha256sum] = "06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993"
diff --git a/poky/meta/recipes-support/vim/vim.inc b/poky/meta/recipes-support/vim/vim.inc
index 1e27415..e1d2563 100644
--- a/poky/meta/recipes-support/vim/vim.inc
+++ b/poky/meta/recipes-support/vim/vim.inc
@@ -19,8 +19,8 @@
            file://no-path-adjust.patch \
            "
 
-PV .= ".1429"
-SRCREV = "1a08a3e2a584889f19b84a27672134649b73da58"
+PV .= ".1527"
+SRCREV = "c28e7a2b2f23dbd246a1ad7ad7aaa6f7ab2e5887"
 
 # Remove when 8.3 is out
 UPSTREAM_VERSION_UNKNOWN = "1"
diff --git a/poky/scripts/lib/wic/ksparser.py b/poky/scripts/lib/wic/ksparser.py
index d1e546b..667b2ff 100644
--- a/poky/scripts/lib/wic/ksparser.py
+++ b/poky/scripts/lib/wic/ksparser.py
@@ -171,6 +171,7 @@
         part.add_argument('--rootfs-dir')
         part.add_argument('--type', default='primary',
                 choices = ('primary', 'logical'))
+        part.add_argument('--hidden', action='store_true')
 
         # --size and --fixed-size cannot be specified together; options
         # ----extra-space and --overhead-factor should also raise a parser
diff --git a/poky/scripts/lib/wic/partition.py b/poky/scripts/lib/wic/partition.py
index 382afa4..bda4aef 100644
--- a/poky/scripts/lib/wic/partition.py
+++ b/poky/scripts/lib/wic/partition.py
@@ -59,6 +59,7 @@
         self.updated_fstab_path = None
         self.has_fstab = False
         self.update_fstab_in_rootfs = False
+        self.hidden = args.hidden
 
         self.lineno = lineno
         self.source_file = ""
diff --git a/poky/scripts/lib/wic/plugins/imager/direct.py b/poky/scripts/lib/wic/plugins/imager/direct.py
index 7315d8f..55347f5 100644
--- a/poky/scripts/lib/wic/plugins/imager/direct.py
+++ b/poky/scripts/lib/wic/plugins/imager/direct.py
@@ -605,6 +605,13 @@
                                 (self.path, part.num, part.system_id),
                                 self.native_sysroot)
 
+            if part.hidden and self.ptable_format == "gpt":
+                logger.debug("Set hidden attribute for partition '%s' on disk '%s'",
+                             part.num, self.path)
+                exec_native_cmd("sfdisk --part-attrs %s %s RequiredPartition" % \
+                                (self.path, part.num),
+                                self.native_sysroot)
+
     def cleanup(self):
         pass
 
diff --git a/poky/scripts/oe-buildenv-internal b/poky/scripts/oe-buildenv-internal
index 485d4c5..f856e61 100755
--- a/poky/scripts/oe-buildenv-internal
+++ b/poky/scripts/oe-buildenv-internal
@@ -92,19 +92,20 @@
 PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH
 export PYTHONPATH
 
-# Make sure our paths are at the beginning of $PATH
-for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
-    # Remove any existences of $newpath from $PATH
-    PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##")
+# Remove any paths added by sourcing this script before
+[ -n "$OE_ADDED_PATHS" ] && PATH=$(echo $PATH | sed -e "s#$OE_ADDED_PATHS##") ||
+    PATH=$(echo $PATH | sed -e "s#$OEROOT/scripts:$BITBAKEDIR/bin:##")
 
-    # Add $newpath to $PATH
-    PATH="$newpath:$PATH"
-done
-unset BITBAKEDIR newpath
+# Make sure our paths are at the beginning of $PATH
+OE_ADDED_PATHS="$OEROOT/scripts:$BITBAKEDIR/bin:"
+PATH="$OE_ADDED_PATHS$PATH"
+export OE_ADDED_PATHS
+
+# This is not needed anymore
+unset BITBAKEDIR
 
 # Used by the runqemu script
 export BUILDDIR
-export PATH
 
 BB_ENV_PASSTHROUGH_ADDITIONS_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
 HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \