diff options
Diffstat (limited to 'poky/meta/recipes-kernel')
44 files changed, 390 insertions, 1593 deletions
diff --git a/poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb index d00b1bd0be..b108676df4 100644 --- a/poky/meta/recipes-kernel/blktrace/blktrace_git.bb +++ b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb @@ -14,7 +14,7 @@ SRCREV = "366d30b9cdb20345c5d064af850d686da79b89eb" PV = "1.3.0+git${SRCPV}" -SRC_URI = "git://git.kernel.dk/blktrace.git" +SRC_URI = "git://git.kernel.dk/blktrace.git;branch=master" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc index ae2c308911..6ada0b0295 100644 --- a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc +++ b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc @@ -8,7 +8,7 @@ API is compatible with OpenBSD's cryptodev userspace API (/dev/crypto)." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux \ +SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux;branch=master;protocol=https \ " SRCREV = "e0c25e289d6baf1d83c2b9cb523d3bc237d0c0c9" diff --git a/poky/meta/recipes-kernel/dtc/dtc.inc b/poky/meta/recipes-kernel/dtc/dtc.inc deleted file mode 100644 index bfdc9f8639..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc.inc +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Device Tree Compiler" -HOMEPAGE = "https://devicetree.org/" -DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." -SECTION = "bootloader" -LICENSE = "GPLv2 | BSD-2-Clause" -DEPENDS = "flex-native bison-native" - -SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ - file://make_install.patch \ - file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ - " - -UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" - -EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"' - -inherit pkgconfig - -S = "${WORKDIR}/git" - -do_install () { - oe_runmake install -} - -PACKAGES =+ "${PN}-misc" -FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" - -RDEPENDS:${PN}-misc += "bash diffutils" diff --git a/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch b/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch deleted file mode 100644 index a2deb12d4b..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001 -From: Oleksiy Obitotskyy <oobitots@cisco.com> -Date: Fri, 22 Jan 2021 09:12:48 +0200 -Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override - -Makefile override CFLAGS not extend them, so some of them -missing. Sources builds out of kernel tree and probably not all -options could be used (?). We need at least -fmacro-prefix-map/ -debug-prefix-map to eliminate absolute path in binaries. - -Upstream-Status: Pending -Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> ---- - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 35d936f..b5b13cf 100644 ---- a/Makefile -+++ b/Makefile -@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION = - # See libfdt_internal.h for details - ASSUME_MASK ?= 0 - --CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) -+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) - WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ - -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow --CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) -+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) - - BISON = bison - LEX = flex --- -2.25.1 - diff --git a/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch b/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch new file mode 100644 index 0000000000..4c3e34b1ff --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch @@ -0,0 +1,40 @@ +Fix the build of fdtdump with mingw. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> +Date: Wed, 25 Aug 2021 16:13:50 +0400 +Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With mingw64-gcc, the compiler complains with various warnings: +error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] + +Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> +Message-Id: <20210825121350.213551-1-marcandre.lureau@redhat.com> +Acked-by: Rob Herring <robh@kernel.org> +Signed-off-by: David Gibson <david@gibson.dropbear.id.au> +--- + fdtdump.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fdtdump.c b/fdtdump.c +index d9fb374..483f367 100644 +--- a/fdtdump.c ++++ b/fdtdump.c +@@ -21,7 +21,7 @@ + #define MAX_VERSION 17 + + #define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +-#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) ++#define PALIGN(p, a) ((void *)(ALIGN((uintptr_t)(p), (a)))) + #define GET_CELL(p) (p += 4, *((const fdt32_t *)(p-4))) + + static const char *tagname(uint32_t tag) +-- +2.25.1 + diff --git a/poky/meta/recipes-kernel/dtc/dtc/make_install.patch b/poky/meta/recipes-kernel/dtc/dtc/make_install.patch deleted file mode 100644 index ea9359e815..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc/make_install.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001 -From: Saul Wold <sgw@linux.intel.com> -Date: Thu, 3 Nov 2011 08:35:47 -0700 -Subject: [PATCH] dtc: Add patch to correctly install shared libraries and - -Upstream-Status: Inappropriate [configuration] - ---- - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index d8ebc4f..f5e01be 100644 ---- a/Makefile -+++ b/Makefile -@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS) - install-lib: all - @$(VECHO) INSTALL-LIB - $(INSTALL) -d $(DESTDIR)$(LIBDIR) -- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) -- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) - ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) - $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) - diff --git a/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb b/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb index de9a46d3ef..2610b26a94 100644 --- a/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb +++ b/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb @@ -1,10 +1,30 @@ -require dtc.inc +SUMMARY = "Device Tree Compiler" +HOMEPAGE = "https://devicetree.org/" +DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." +SECTION = "bootloader" +LICENSE = "GPLv2 | BSD-2-Clause" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" + file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" +SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ + file://0001-fdtdump-fix-Werror-int-to-pointer-cast.patch" SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" + S = "${WORKDIR}/git" +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" + +PACKAGECONFIG ??= "tools" +PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native" +PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml" + +PACKAGES =+ "${PN}-misc" +FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" +RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}" + BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate new file mode 100644 index 0000000000..2aa57851c7 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate @@ -0,0 +1,20 @@ +#!/bin/sh +# dt-doc-validate wrapper to allow kernel dt-validation to pass +# +# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com> +# License: MIT (see COPYING.MIT at the root of the repository for terms) + +for arg; do + case "$arg" in + --version) + echo "v2021.10" + ;; + esac +done + +# TBD: left for future consideration +# exec dt-doc-validate.real "$@" + +# we always succeed +exit 0 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema new file mode 100644 index 0000000000..24b89d8619 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema @@ -0,0 +1,20 @@ +#!/bin/sh +# dt-mk-schema wrapper to allow kernel dt-validation to pass +# +# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com> +# License: MIT (see COPYING.MIT at the root of the repository for terms) + +for arg; do + case "$arg" in + --version) + echo "v2021.10" + ;; + esac +done + +# TBD: left for future consideration +# exec dt-mk-schema.real "$@" + +# we always succeed +exit 0 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate new file mode 100644 index 0000000000..8a4710a7ed --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate @@ -0,0 +1,20 @@ +#!/bin/sh +# dt-validate wrapper to allow kernel dt-validation to pass +# +# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com> +# License: MIT (see COPYING.MIT at the root of the repository for terms) + +for arg; do + case "$arg" in + --version) + echo "v2021.10" + ;; + esac +done + +# TBD: left for future consideration +# exec dt-validate.real "$@" + +# we always succeed +exit 0 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb new file mode 100644 index 0000000000..c869274d09 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Wrapper for tooling for devicetree validation using YAML and jsonschema" +HOMEPAGE = "https://yoctoproject.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://dt-doc-validate \ + file://dt-mk-schema \ + file://dt-validate" + +do_install() { + install -d ${D}${bindir}/ + install -m 755 ${WORKDIR}/dt-doc-validate ${D}${bindir}/ + install -m 755 ${WORKDIR}/dt-mk-schema ${D}${bindir}/ + install -m 755 ${WORKDIR}/dt-validate ${D}${bindir}/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb index e967f485c1..74db9363a1 100644 --- a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +++ b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb @@ -8,15 +8,13 @@ LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249 DEPENDS = "git-native" -SRCREV = "d220b063852245fdd16b9731a395ace525f932d6" -PR = "r12" -PV = "0.2+git${SRCPV}" +SRCREV = "90598a5fae1172e3f7782a1b02f7b7518efd32c8" +PV = "0.3+git${SRCPV}" inherit native -SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git" +SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git;branch=master" S = "${WORKDIR}/git" -UPSTREAM_CHECK_COMMITS = "1" do_configure() { : diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch deleted file mode 100644 index 6aeebc3939..0000000000 --- a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch +++ /dev/null @@ -1,23 +0,0 @@ -From ba2fb5baf6b0a8c882ac32301dd7a8d16de0dcf6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Sun, 27 Dec 2020 23:39:29 +0100 -Subject: [PATCH] kexec/arch/ppc/kexec-ppc.c: correct double definition error - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - kexec/arch/ppc/kexec-ppc.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c -index 03bec36..5b3e244 100644 ---- a/kexec/arch/ppc/kexec-ppc.c -+++ b/kexec/arch/ppc/kexec-ppc.c -@@ -35,7 +35,6 @@ unsigned long long initrd_base = 0, initrd_size = 0; - unsigned long long ramdisk_base = 0, ramdisk_size = 0; - unsigned int rtas_base, rtas_size; - int max_memory_ranges; --const char *ramdisk; - - /* - * Reads the #address-cells and #size-cells on this platform. diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch b/poky/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch deleted file mode 100644 index 36b0845f4a..0000000000 --- a/poky/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bb6a26371d15473b380459ac4404bf330634b585 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 20 Dec 2019 17:21:08 +0100 -Subject: [PATCH] kexec: un-break the build on 32 bit x86 - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - kexec/arch/i386/Makefile | 1 + - kexec/arch/i386/kexec-x86.h | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile -index f486103..5d560be 100644 ---- a/kexec/arch/i386/Makefile -+++ b/kexec/arch/i386/Makefile -@@ -12,6 +12,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c - i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c - i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c -+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c - - dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \ - kexec/arch/i386/crashdump-x86.h \ -diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h -index 0f941df..c423171 100644 ---- a/kexec/arch/i386/kexec-x86.h -+++ b/kexec/arch/i386/kexec-x86.h -@@ -56,9 +56,13 @@ struct arch_options_t { - }; - - int multiboot_x86_probe(const char *buf, off_t len); -+int multiboot2_x86_probe(const char *buf, off_t len); - int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, - struct kexec_info *info); -+int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len, -+ struct kexec_info *info); - void multiboot_x86_usage(void); -+void multiboot2_x86_usage(void); - - int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len, - struct kexec_info *info); diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.22.bb b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb index 95ff5e6ef8..066de99fad 100644 --- a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.22.bb +++ b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb @@ -17,12 +17,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz file://0002-purgatory-Pass-r-directly-to-linker.patch \ file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ file://0005-Disable-PIE-during-link.patch \ - file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \ file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ - file://0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch \ " -SRC_URI[sha256sum] = "40623d4321be2865ef9ea2cd6ec998d31dcf93d0f74353cbd3aa06d8821e3e41" +SRC_URI[sha256sum] = "c7dcc59f5b66004d9d91264324e20e0387ea263dbb449708fbf84a4e5ff7decc" inherit autotools update-rc.d systemd diff --git a/poky/meta/recipes-kernel/kmod/kmod-native_git.bb b/poky/meta/recipes-kernel/kmod/kmod-native_git.bb deleted file mode 100644 index 4dd34b1c82..0000000000 --- a/poky/meta/recipes-kernel/kmod/kmod-native_git.bb +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -require kmod.inc - -DEPENDS += "zlib-native" - -inherit native - -do_install:append (){ - for tool in depmod insmod lsmod modinfo modprobe rmmod - do - ln -s kmod ${D}${bindir}/$tool - done -} diff --git a/poky/meta/recipes-kernel/kmod/kmod.inc b/poky/meta/recipes-kernel/kmod/kmod.inc deleted file mode 100644 index c2d550acaf..0000000000 --- a/poky/meta/recipes-kernel/kmod/kmod.inc +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Tools for managing Linux kernel modules" -DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ - insert, remove, list, check properties, resolve dependencies and aliases." -HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/" -LICENSE = "GPL-2.0+ & LGPL-2.1+" -LICENSE:libkmod = "LGPL-2.1+" -SECTION = "base" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ - " -inherit autotools gtk-doc pkgconfig manpages - -SRCREV = "b6ecfc916a17eab8f93be5b09f4e4f845aabd3d1" -# Lookout for PV bump too when SRCREV is changed -PV = "29" - -SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ - file://depmod-search.conf \ - file://avoid_parallel_tests.patch \ - " - -S = "${WORKDIR}/git" - -EXTRA_OECONF +=" --enable-tools --with-zlib" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" -PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" - -GTKDOC_DOCDIR = "${S}/libkmod/docs" diff --git a/poky/meta/recipes-kernel/kmod/kmod_git.bb b/poky/meta/recipes-kernel/kmod/kmod_29.bb index eb5d176ded..9ac5214df6 100644 --- a/poky/meta/recipes-kernel/kmod/kmod_git.bb +++ b/poky/meta/recipes-kernel/kmod/kmod_29.bb @@ -1,9 +1,42 @@ # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> # Released under the MIT license (see COPYING.MIT for the terms) -require kmod.inc +SUMMARY = "Tools for managing Linux kernel modules" +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/" +LICENSE = "GPL-2.0+ & LGPL-2.1+" +LICENSE:libkmod = "LGPL-2.1+" +SECTION = "base" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ + " +inherit autotools bash-completion gtk-doc pkgconfig manpages update-alternatives + +SRCREV = "b6ecfc916a17eab8f93be5b09f4e4f845aabd3d1" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master \ + file://depmod-search.conf \ + file://avoid_parallel_tests.patch \ + " + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "--enable-tools" + +PACKAGECONFIG ??= "zlib" +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" +PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" +PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" + +GTKDOC_DOCDIR = "${S}/libkmod/docs" -DEPENDS += "zlib" PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" @@ -13,15 +46,15 @@ RREPLACES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod mod RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" # autotools set prefix to /usr, however we want them in /bin and /sbin -EXTRA_OECONF += " --bindir=${base_bindir} --sbindir=${base_sbindir}" +EXTRA_OECONF += "--bindir=${base_bindir} --sbindir=${base_sbindir}" do_install:append () { install -dm755 ${D}${base_bindir} install -dm755 ${D}${base_sbindir} # add symlinks to kmod - lnr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod + ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod for tool in insmod rmmod depmod modinfo modprobe; do - lnr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} + ln -rs ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} done # configuration directories install -dm755 ${D}${nonarch_base_libdir}/depmod.d @@ -33,30 +66,21 @@ do_install:append () { install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf" } -do_compile:prepend() { - sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status -} - -inherit update-alternatives bash-completion - ALTERNATIVE_PRIORITY = "70" ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" +ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" - ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" -ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" - PACKAGES =+ "libkmod" - FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d" -BBCLASSEXTEND = "nativesdk" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210919.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20211216.bb index 48c01d99fe..65bfda1d9f 100644 --- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210919.bb +++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20211216.bb @@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ - file://WHENCE;md5=76f012f7e9b2260d34eccf5726374f08 \ + file://WHENCE;md5=79f477f9d53eedee5a65b45193785963 \ " # These are not common licenses, set NO_GENERIC_LICENSE for them @@ -205,7 +205,7 @@ PE = "1" SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "2fb22a5d7d23bf1f5800ab8152b39a00a445fbf4923de5a01b59d3f6253f0a9f" +SRC_URI[sha256sum] = "eeddb4e6bef31fd1a3757f12ccc324929bbad97855c0b9ec5ed780f74de1837d" inherit allarch diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.15.bb index 282c04d79c..588cc3acd1 100644 --- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb +++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.15.bb @@ -14,7 +14,7 @@ SRC_URI:append = "\ LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -SRC_URI[md5sum] = "a082ef5748b813abca0649dab8be5f52" -SRC_URI[sha256sum] = "7e068b5e0d26a62b10e5320b25dce57588cbbc6f781c090442138c9c9c3271b2" +SRC_URI[md5sum] = "071d49ff4e020d58c04f9f3f76d3b594" +SRC_URI[sha256sum] = "57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8" diff --git a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb index d39573965f..4ceb35f0d2 100644 --- a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb @@ -48,7 +48,7 @@ do_install() { mkdir -p ${D}/usr/src ( cd ${D}/usr/src - lnr ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel + ln -rs ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel ) # for on target purposes, we unify build and source @@ -109,8 +109,8 @@ do_install() { fi fi - if [ "${ARCH}" = "arm64" ]; then - cp -a --parents arch/arm64/kernel/vdso/vdso.lds $kerneldir/build/ + if [ "${ARCH}" = "arm64" -o "${ARCH}" = "riscv" ]; then + cp -a --parents arch/${ARCH}/kernel/vdso/vdso.lds $kerneldir/build/ fi if [ "${ARCH}" = "powerpc" ]; then cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || : @@ -185,6 +185,12 @@ do_install() { cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || : cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || : fi + if [ "${ARCH}" = "riscv" ]; then + cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/ + cp -a --parents arch/riscv/kernel/vdso/note.S $kerneldir/build/ + cp -a --parents arch/riscv/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/ + cp -a --parents arch/riscv/kernel/vdso/* $kerneldir/build/ 2>/dev/null || : + fi # include the machine specific headers for ARM variants, if available. if [ "${ARCH}" = "arm" ]; then diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb index 005b688778..0d94637352 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb @@ -16,7 +16,7 @@ inherit pkgconfig # provide this .inc to set specific revisions include recipes-kernel/linux/linux-yocto-dev-revisions.inc -KBRANCH = "standard/base" +KBRANCH = "v5.16/standard/base" KMETA = "kernel-meta" SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \ @@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' -LINUX_VERSION ?= "5.15+" +LINUX_VERSION ?= "5.16+" LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" PV = "${LINUX_VERSION}+git${SRCPV}" @@ -40,6 +40,16 @@ DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" DEPENDS += "gmp-native libmpc-native" +# yaml and dtschema are required for 5.16+ device tree validation, libyaml is checked +# via pkgconfig, so must always be present, but we can wrap the others to make them +# conditional +DEPENDS += "libyaml-native" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[dt-validation] = ",,python3-dtschema-native" +# we need the wrappers if validation isn't in the packageconfig +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-dtschema-wrapper-native', d)}" + COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64)" KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb index 2795887b92..420d67031e 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "1d0eb980c3f825c193b07e925090a1a3dd752dbc" -SRCREV_meta ?= "9ff1e75562075e35b5c8649b0a1aece50d8531b7" +SRCREV_machine ?= "85c14e209f1ab7cee673735c4561e656b4e65217" +SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.10.75" +LINUX_VERSION ?= "5.10.91" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb index e5dc3c30c4..4713e45c2f 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb @@ -1,4 +1,4 @@ -KBRANCH ?= "v5.14/standard/preempt-rt/base" +KBRANCH ?= "v5.15/standard/preempt-rt/base" require recipes-kernel/linux/linux-yocto.inc @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "725e45fd0b3b344905a44398b1d7ba64b76c6af2" -SRCREV_meta ?= "11430e73de6cbc577b69ab4844250346146eb3cf" +SRCREV_machine ?= "799919ec2113ffcec02207ea67abdc629f3bbebe" +SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.14.14" +LINUX_VERSION ?= "5.15.14" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb index 94d0473098..dabcb97a79 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.10.75" +LINUX_VERSION ?= "5.10.91" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine:qemuarm ?= "773ad5db722c1cbac17a944ab2fd4f1d9d72c55d" -SRCREV_machine ?= "b1ee56b4baf8a85fa02965b76dbc4ba7de898540" -SRCREV_meta ?= "9ff1e75562075e35b5c8649b0a1aece50d8531b7" +SRCREV_machine:qemuarm ?= "2227ab16358ca3193f03d0cd8509092076aeffbb" +SRCREV_machine ?= "b3fdab7a9f3c11a61565cead0445883a61081583" +SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb index 0da8ae5e69..b5397529ac 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb @@ -1,12 +1,12 @@ -KBRANCH ?= "v5.14/standard/tiny/base" -KBRANCH:qemuarm ?= "v5.14/standard/tiny/arm-versatile-926ejs" +KBRANCH ?= "v5.15/standard/tiny/base" +KBRANCH:qemuarm ?= "v5.15/standard/tiny/arm-versatile-926ejs" LINUX_KERNEL_TYPE = "tiny" KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.14.14" +LINUX_VERSION ?= "5.15.14" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,14 +15,14 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine:qemuarm ?= "bdbb56b345a04855091cbf667c70d761f417ddff" -SRCREV_machine ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_meta ?= "11430e73de6cbc577b69ab4844250346146eb3cf" +SRCREV_machine:qemuarm ?= "a499d1d7ad7cee5ddea8a737bfd0c44b109b63b6" +SRCREV_machine ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb" PV = "${LINUX_VERSION}+git${SRCPV}" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}" COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto.inc b/poky/meta/recipes-kernel/linux/linux-yocto.inc index 331727d62c..a3b2416367 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto.inc +++ b/poky/meta/recipes-kernel/linux/linux-yocto.inc @@ -46,6 +46,7 @@ LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}" # Pick up shared functions inherit kernel inherit kernel-yocto +inherit pkgconfig B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" @@ -57,3 +58,15 @@ do_install:append(){ # enable kernel-sample for oeqa/runtime/cases's ksample.py test KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" + +KERNEL_DEBUG_OPTIONS ?= "stack" +KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" + +do_devshell:prepend() { + # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) + d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig") + d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig") + d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}") + d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") + d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") +} diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb index e7f8cc188f..9c43738135 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb @@ -13,17 +13,17 @@ KBRANCH:qemux86 ?= "v5.10/standard/base" KBRANCH:qemux86-64 ?= "v5.10/standard/base" KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64" -SRCREV_machine:qemuarm ?= "eaf94169288a0cdaa7f919e81b9cde11637328a0" -SRCREV_machine:qemuarm64 ?= "0a2409ae4ca5c3efc6633891d807c189f8c2e6ec" -SRCREV_machine:qemumips ?= "73ca3b526488435d4f2a404642078b3b111879af" -SRCREV_machine:qemuppc ?= "14edaae440f2835071ffacced9f240cdd8cf7094" -SRCREV_machine:qemuriscv64 ?= "97699547a2625645320510db2237e8619a7954ef" -SRCREV_machine:qemuriscv32 ?= "97699547a2625645320510db2237e8619a7954ef" -SRCREV_machine:qemux86 ?= "97699547a2625645320510db2237e8619a7954ef" -SRCREV_machine:qemux86-64 ?= "97699547a2625645320510db2237e8619a7954ef" -SRCREV_machine:qemumips64 ?= "9e86c3417c2c6a61a52664ebcfdd541f6af7e099" -SRCREV_machine ?= "97699547a2625645320510db2237e8619a7954ef" -SRCREV_meta ?= "9ff1e75562075e35b5c8649b0a1aece50d8531b7" +SRCREV_machine:qemuarm ?= "fb570663823bd492e4c8d4339be825bda4210dc6" +SRCREV_machine:qemuarm64 ?= "5a52b700c1693a95b8efa54cb65bec7807a75cd2" +SRCREV_machine:qemumips ?= "8eb8a801f5f4764c362aefd5e97e704755cf740b" +SRCREV_machine:qemuppc ?= "21b014e385a6b54a2fd7d667a1b556c69cda77de" +SRCREV_machine:qemuriscv64 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a" +SRCREV_machine:qemuriscv32 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a" +SRCREV_machine:qemux86 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a" +SRCREV_machine:qemux86-64 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a" +SRCREV_machine:qemumips64 ?= "5468343e50389dba73b5d441289d5094bd0dc9f0" +SRCREV_machine ?= "77c8d144b066f69e009ce2ee540a593b11eb736a" +SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc" # remap qemuarm to qemuarma15 for the 5.8 kernel # KMACHINE:qemuarm ?= "qemuarma15" @@ -32,11 +32,11 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -LINUX_VERSION ?= "5.10.75" +LINUX_VERSION ?= "5.10.91" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" -DEPENDS += "gmp-native" +DEPENDS += "gmp-native libmpc-native" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.14.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.15.bb index ed20557183..daa83eb9fe 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto_5.14.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.15.bb @@ -1,29 +1,29 @@ -KBRANCH ?= "v5.14/standard/base" +KBRANCH ?= "v5.15/standard/base" require recipes-kernel/linux/linux-yocto.inc # board specific branches -KBRANCH:qemuarm ?= "v5.14/standard/arm-versatile-926ejs" -KBRANCH:qemuarm64 ?= "v5.14/standard/qemuarm64" -KBRANCH:qemumips ?= "v5.14/standard/mti-malta32" -KBRANCH:qemuppc ?= "v5.14/standard/qemuppc" -KBRANCH:qemuriscv64 ?= "v5.14/standard/base" -KBRANCH:qemuriscv32 ?= "v5.14/standard/base" -KBRANCH:qemux86 ?= "v5.14/standard/base" -KBRANCH:qemux86-64 ?= "v5.14/standard/base" -KBRANCH:qemumips64 ?= "v5.14/standard/mti-malta64" +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 ?= "3e04a89e8e89fe2f799cd201f6994ff515ca95c1" -SRCREV_machine:qemuarm64 ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemumips ?= "566b7915f715e00e4ebb2a4121239de4cb1f33b5" -SRCREV_machine:qemuppc ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemuriscv64 ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemuriscv32 ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemux86 ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemux86-64 ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_machine:qemumips64 ?= "13d9e1b6481efec1e72733134e83b981e0adf6bb" -SRCREV_machine ?= "28c011f5b095822798d2a8320f104abc0fc216cd" -SRCREV_meta ?= "11430e73de6cbc577b69ab4844250346146eb3cf" +SRCREV_machine:qemuarm ?= "03294d897ba8374d172b5c035e8c5698f676a1d7" +SRCREV_machine:qemuarm64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemumips ?= "84d8700593a35c850938994e080422bd354245ce" +SRCREV_machine:qemuppc ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemuriscv64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemuriscv32 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemux86 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemux86-64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_machine:qemumips64 ?= "4b8ef0714dd9fe90b5f92fab297926c482a58b88" +SRCREV_machine ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1" +SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb" # 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 @@ -31,18 +31,18 @@ SRCREV_meta ?= "11430e73de6cbc577b69ab4844250346146eb3cf" # normal PREFERRED_VERSION settings. BBCLASSEXTEND = "devupstream:target" DEFAULT_PREFERENCE:class-devupstream = "-1" -SRCREV_machine:class-devupstream ?= "fe024e004fa31dc64d18440c006b02cd8d722a03" +SRCREV_machine:class-devupstream ?= "d114b082bef784345bfac1e1d5c17257005284f2" PN:class-devupstream = "linux-yocto-upstream" -KBRANCH:class-devupstream = "v5.14/base" +KBRANCH:class-devupstream = "v5.15/base" # remap qemuarm to qemuarma15 for the 5.8 kernel # KMACHINE:qemuarm ?= "qemuarma15" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -LINUX_VERSION ?= "5.14.14" +LINUX_VERSION ?= "5.15.14" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch deleted file mode 100644 index 4e52e5f122..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch +++ /dev/null @@ -1,394 +0,0 @@ -From 8be4c8a38ee1e297578e094a6e4c143ec5259aba Mon Sep 17 00:00:00 2001 -From: Michael Jeanson <mjeanson@efficios.com> -Date: Mon, 13 Sep 2021 12:00:38 -0400 -Subject: [PATCH 1/2] fix: cpu/hotplug: Remove deprecated CPU-hotplug - functions. (v5.15) - -The CPU-hotplug functions get|put_online_cpus() were deprecated in v4.13 -and removed in v5.15. - -See upstream commits : - -commit 8c854303ce0e38e5bbedd725ff39da7e235865d8 -Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Tue Aug 3 16:16:21 2021 +0200 - - cpu/hotplug: Remove deprecated CPU-hotplug functions. - - No users in tree use the deprecated CPU-hotplug functions anymore. - - Remove them. - -Introduced in v4.13 : - - commit 8f553c498e1772cccb39a114da4a498d22992758 - Author: Thomas Gleixner <tglx@linutronix.de> - Date: Wed May 24 10:15:12 2017 +0200 - - cpu/hotplug: Provide cpus_read|write_[un]lock() - - The counting 'rwsem' hackery of get|put_online_cpus() is going to be - replaced by percpu rwsem. - - Rename the functions to make it clear that it's locking and not some - refcount style interface. These new functions will be used for the - preparatory patches which make the code ready for the percpu rwsem - conversion. - - Rename all instances in the cpu hotplug code while at it. - -Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=ffcc873470121ef1ebb110df3d9038a38d9cb7cb] - -Change-Id: I5a37cf5afc075a402b7347989fac637dfa60a1ed -Signed-off-by: Michael Jeanson <mjeanson@efficios.com> -Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> ---- - include/wrapper/cpu.h | 44 +++++++++++++++++++++++ - src/lib/ringbuffer/ring_buffer_backend.c | 8 ++--- - src/lib/ringbuffer/ring_buffer_frontend.c | 17 ++++----- - src/lib/ringbuffer/ring_buffer_iterator.c | 15 ++++---- - src/lttng-context-perf-counters.c | 11 +++--- - src/lttng-statedump-impl.c | 6 ++-- - 6 files changed, 74 insertions(+), 27 deletions(-) - create mode 100644 include/wrapper/cpu.h - -diff --git a/include/wrapper/cpu.h b/include/wrapper/cpu.h -new file mode 100644 -index 00000000..cbee1962 ---- /dev/null -+++ b/include/wrapper/cpu.h -@@ -0,0 +1,44 @@ -+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) -+ * -+ * wrapper/cpu.h -+ * -+ * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com> -+ */ -+ -+#ifndef _LTTNG_WRAPPER_CPU_H -+#define _LTTNG_WRAPPER_CPU_H -+ -+#include <linux/cpu.h> -+#include <lttng/kernel-version.h> -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0)) -+ -+static inline -+void lttng_cpus_read_lock(void) -+{ -+ cpus_read_lock(); -+} -+ -+static inline -+void lttng_cpus_read_unlock(void) -+{ -+ cpus_read_unlock(); -+} -+ -+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */ -+ -+static inline -+void lttng_cpus_read_lock(void) -+{ -+ get_online_cpus(); -+} -+ -+static inline -+void lttng_cpus_read_unlock(void) -+{ -+ put_online_cpus(); -+} -+ -+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */ -+ -+#endif /* _LTTNG_WRAPPER_CPU_H */ -diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c -index 26efb2bc..9a339be0 100644 ---- a/src/lib/ringbuffer/ring_buffer_backend.c -+++ b/src/lib/ringbuffer/ring_buffer_backend.c -@@ -12,10 +12,10 @@ - #include <linux/delay.h> - #include <linux/errno.h> - #include <linux/slab.h> --#include <linux/cpu.h> - #include <linux/mm.h> - #include <linux/vmalloc.h> - -+#include <wrapper/cpu.h> - #include <wrapper/mm.h> - #include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */ - #include <ringbuffer/config.h> -@@ -445,14 +445,14 @@ int channel_backend_init(struct channel_backend *chanb, - chanb->cpu_hp_notifier.priority = 5; - register_hotcpu_notifier(&chanb->cpu_hp_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(i) { - ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i), - chanb, i); - if (ret) - goto free_bufs; /* cpu hotplug locked */ - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(i) { - ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i), -@@ -485,7 +485,7 @@ free_bufs: - */ - #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ - #ifdef CONFIG_HOTPLUG_CPU -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - unregister_hotcpu_notifier(&chanb->cpu_hp_notifier); - #endif - #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ -diff --git a/src/lib/ringbuffer/ring_buffer_frontend.c b/src/lib/ringbuffer/ring_buffer_frontend.c -index e9056118..87a575d0 100644 ---- a/src/lib/ringbuffer/ring_buffer_frontend.c -+++ b/src/lib/ringbuffer/ring_buffer_frontend.c -@@ -48,6 +48,7 @@ - #include <ringbuffer/iterator.h> - #include <ringbuffer/nohz.h> - #include <wrapper/atomic.h> -+#include <wrapper/cpu.h> - #include <wrapper/kref.h> - #include <wrapper/percpu-defs.h> - #include <wrapper/timer.h> -@@ -724,7 +725,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel - int cpu; - - #ifdef CONFIG_HOTPLUG_CPU -- get_online_cpus(); -+ lttng_cpus_read_lock(); - chan->cpu_hp_enable = 0; - for_each_online_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, -@@ -732,7 +733,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel - lib_ring_buffer_stop_switch_timer(buf); - lib_ring_buffer_stop_read_timer(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - unregister_cpu_notifier(&chan->cpu_hp_notifier); - #else - for_each_possible_cpu(cpu) { -@@ -772,14 +773,14 @@ void lib_ring_buffer_set_quiescent_channel(struct lttng_kernel_ring_buffer_chann - const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); - - lib_ring_buffer_set_quiescent(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - struct lttng_kernel_ring_buffer *buf = chan->backend.buf; - -@@ -794,14 +795,14 @@ void lib_ring_buffer_clear_quiescent_channel(struct lttng_kernel_ring_buffer_cha - const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); - - lib_ring_buffer_clear_quiescent(buf); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - struct lttng_kernel_ring_buffer *buf = chan->backend.buf; - -@@ -899,7 +900,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne - chan->cpu_hp_notifier.priority = 6; - register_cpu_notifier(&chan->cpu_hp_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, - cpu); -@@ -909,7 +910,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne - spin_unlock(&per_cpu(ring_buffer_nohz_lock, cpu)); - } - chan->cpu_hp_enable = 1; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(cpu) { - struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, -diff --git a/src/lib/ringbuffer/ring_buffer_iterator.c b/src/lib/ringbuffer/ring_buffer_iterator.c -index 25839af6..60c95ca6 100644 ---- a/src/lib/ringbuffer/ring_buffer_iterator.c -+++ b/src/lib/ringbuffer/ring_buffer_iterator.c -@@ -10,6 +10,7 @@ - */ - - #include <ringbuffer/iterator.h> -+#include <wrapper/cpu.h> - #include <wrapper/file.h> - #include <wrapper/uaccess.h> - #include <linux/jiffies.h> -@@ -440,13 +441,13 @@ int channel_iterator_init(struct lttng_kernel_ring_buffer_channel *chan) - chan->hp_iter_notifier.priority = 10; - register_cpu_notifier(&chan->hp_iter_notifier); - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - buf = per_cpu_ptr(chan->backend.buf, cpu); - lib_ring_buffer_iterator_init(chan, buf); - } - chan->hp_iter_enable = 1; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #else - for_each_possible_cpu(cpu) { - buf = per_cpu_ptr(chan->backend.buf, cpu); -@@ -519,7 +520,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - CHAN_WARN_ON(chan, config->output != RING_BUFFER_ITERATOR); - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - /* Allow CPU hotplug to keep track of opened reader */ - chan->iter.read_open = 1; - for_each_channel_cpu(cpu, chan) { -@@ -529,7 +530,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - goto error; - buf->iter.read_open = 1; - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - buf = channel_get_ring_buffer(config, chan, 0); - ret = lib_ring_buffer_iterator_open(buf); -@@ -538,7 +539,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan) - error: - /* Error should always happen on CPU 0, hence no close is required. */ - CHAN_WARN_ON(chan, cpu != 0); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - return ret; - } - EXPORT_SYMBOL_GPL(channel_iterator_open); -@@ -550,7 +551,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan) - int cpu; - - if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_channel_cpu(cpu, chan) { - buf = channel_get_ring_buffer(config, chan, cpu); - if (buf->iter.read_open) { -@@ -559,7 +560,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan) - } - } - chan->iter.read_open = 0; -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - } else { - buf = channel_get_ring_buffer(config, chan, 0); - lib_ring_buffer_iterator_release(buf); -diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c -index b0227d47..372f05e0 100644 ---- a/src/lttng-context-perf-counters.c -+++ b/src/lttng-context-perf-counters.c -@@ -16,6 +16,7 @@ - #include <lttng/events.h> - #include <lttng/events-internal.h> - #include <ringbuffer/frontend_types.h> -+#include <wrapper/cpu.h> - #include <wrapper/vmalloc.h> - #include <wrapper/perf.h> - #include <lttng/tracer.h> -@@ -97,10 +98,10 @@ void lttng_destroy_perf_counter_ctx_field(void *priv) - { - int cpu; - -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) - perf_event_release_kernel(events[cpu]); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #ifdef CONFIG_HOTPLUG_CPU - unregister_cpu_notifier(&perf_field->nb); - #endif -@@ -304,7 +305,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, - perf_field->nb.priority = 0; - register_cpu_notifier(&perf_field->nb); - #endif -- get_online_cpus(); -+ lttng_cpus_read_lock(); - for_each_online_cpu(cpu) { - events[cpu] = wrapper_perf_event_create_kernel_counter(attr, - cpu, NULL, overflow_callback); -@@ -317,7 +318,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, - goto counter_busy; - } - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - perf_field->hp_enable = 1; - } - #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ -@@ -351,7 +352,7 @@ counter_error: - if (events[cpu] && !IS_ERR(events[cpu])) - perf_event_release_kernel(events[cpu]); - } -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - #ifdef CONFIG_HOTPLUG_CPU - unregister_cpu_notifier(&perf_field->nb); - #endif -diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c -index 4dfbca0b..2b42783a 100644 ---- a/src/lttng-statedump-impl.c -+++ b/src/lttng-statedump-impl.c -@@ -23,7 +23,6 @@ - #include <linux/file.h> - #include <linux/interrupt.h> - #include <linux/irqnr.h> --#include <linux/cpu.h> - #include <linux/netdevice.h> - #include <linux/inetdevice.h> - #include <linux/mm.h> -@@ -34,6 +33,7 @@ - - #include <lttng/events.h> - #include <lttng/tracer.h> -+#include <wrapper/cpu.h> - #include <wrapper/irqdesc.h> - #include <wrapper/fdtable.h> - #include <wrapper/namespace.h> -@@ -770,7 +770,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session) - * is to guarantee that each CPU has been in a state where is was in - * syscall mode (i.e. not in a trap, an IRQ or a soft IRQ). - */ -- get_online_cpus(); -+ lttng_cpus_read_lock(); - atomic_set(&kernel_threads_to_run, num_online_cpus()); - for_each_online_cpu(cpu) { - INIT_DELAYED_WORK(&cpu_work[cpu], lttng_statedump_work_func); -@@ -778,7 +778,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session) - } - /* Wait for all threads to run */ - __wait_event(statedump_wq, (atomic_read(&kernel_threads_to_run) == 0)); -- put_online_cpus(); -+ lttng_cpus_read_unlock(); - /* Our work is done */ - trace_lttng_statedump_end(session); - return 0; --- -2.19.1 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch deleted file mode 100644 index 5b5edc5319..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch +++ /dev/null @@ -1,829 +0,0 @@ -From c570be0da77e963d77bac099d468bc0cd5f1bd63 Mon Sep 17 00:00:00 2001 -From: Michael Jeanson <mjeanson@efficios.com> -Date: Mon, 13 Sep 2021 14:16:22 -0400 -Subject: [PATCH 2/2] fix: Revert "Makefile: Enable -Wimplicit-fallthrough for - Clang" (v5.15) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Starting with v5.15, "-Wimplicit-fallthrough=5" was added to the build -flags which requires the use of "__attribute__((__fallthrough__))" to -annotate fallthrough case statements. - -See upstream commit by the man himself: - - commit d936eb23874433caa3e3d841cfa16f5434b85dcf - Author: Linus Torvalds <torvalds@linux-foundation.org> - Date: Thu Jul 15 18:05:31 2021 -0700 - - Revert "Makefile: Enable -Wimplicit-fallthrough for Clang" - - This reverts commit b7eb335e26a9c7f258c96b3962c283c379d3ede0. - - It turns out that the problem with the clang -Wimplicit-fallthrough - warning is not about the kernel source code, but about clang itself, and - that the warning is unusable until clang fixes its broken ways. - - In particular, when you enable this warning for clang, you not only get - warnings about implicit fallthroughs. You also get this: - - warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] - - which is completely broken becasue it - - (a) doesn't even tell you where the problem is (seriously: no line - numbers, no filename, no nothing). - - (b) is fundamentally broken anyway, because there are perfectly valid - reasons to have a fallthrough statement even if it turns out that - it can perhaps not be reached. - - In the kernel, an example of that second case is code in the scheduler: - - switch (state) { - case cpuset: - if (IS_ENABLED(CONFIG_CPUSETS)) { - cpuset_cpus_allowed_fallback(p); - state = possible; - break; - } - fallthrough; - case possible: - - where if CONFIG_CPUSETS is enabled you actually never hit the - fallthrough case at all. But that in no way makes the fallthrough - wrong. - - So the warning is completely broken, and enabling it for clang is a very - bad idea. - - In the meantime, we can keep the gcc option enabled, and make the gcc - build use - - -Wimplicit-fallthrough=5 - - which means that we will at least continue to require a proper - fallthrough statement, and that gcc won't silently accept the magic - comment versions. Because gcc does this all correctly, and while the odd - "=5" part is kind of obscure, it's documented in [1]: - - "-Wimplicit-fallthrough=5 doesn’t recognize any comments as - fallthrough comments, only attributes disable the warning" - - so if clang ever fixes its bad behavior we can try enabling it there again. - -Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=c190d76e8c7b44d62b3651ab845b765c1b1f8104] - -Change-Id: Iea69849592fb69ac04fb9bb28efcd6b8dce8ba88 -Signed-off-by: Michael Jeanson <mjeanson@efficios.com> -Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> ---- - include/counter/counter-api.h | 4 +- - include/lttng/events-internal.h | 11 ++- - include/wrapper/compiler_attributes.h | 34 +++++++ - src/lib/counter/counter.c | 13 ++- - src/lttng-abi.c | 91 ++++++++++++------ - src/lttng-bytecode-interpreter.c | 4 +- - src/lttng-bytecode-specialize.c | 5 +- - src/lttng-events.c | 129 +++++++++++++++++--------- - src/lttng-string-utils.c | 3 +- - src/probes/lttng-kretprobes.c | 7 +- - 10 files changed, 215 insertions(+), 86 deletions(-) - create mode 100644 include/wrapper/compiler_attributes.h - -diff --git a/include/counter/counter-api.h b/include/counter/counter-api.h -index fbc65818..c9f2b141 100644 ---- a/include/counter/counter-api.h -+++ b/include/counter/counter-api.h -@@ -15,6 +15,7 @@ - #include <linux/bitops.h> - #include <counter/counter.h> - #include <counter/counter-internal.h> -+#include <wrapper/compiler_attributes.h> - #include <wrapper/limits.h> - - /* -@@ -256,7 +257,8 @@ static __always_inline int lttng_counter_add(const struct lib_counter_config *co - const size_t *dimension_indexes, int64_t v) - { - switch (config->alloc) { -- case COUNTER_ALLOC_PER_CPU: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - return __lttng_counter_add_percpu(config, counter, dimension_indexes, v); - case COUNTER_ALLOC_GLOBAL: -diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h -index cd560de8..ca2190c4 100644 ---- a/include/lttng/events-internal.h -+++ b/include/lttng/events-internal.h -@@ -8,6 +8,8 @@ - #ifndef _LTTNG_EVENTS_INTERNAL_H - #define _LTTNG_EVENTS_INTERNAL_H - -+#include <wrapper/compiler_attributes.h> -+ - #include <lttng/events.h> - - struct lttng_syscall_filter; -@@ -561,9 +563,12 @@ static inline bool lttng_kernel_type_is_bytewise_integer(const struct lttng_kern - if (!type_integer) - return false; - switch (type_integer->size) { -- case 8: /* Fall-through. */ -- case 16: /* Fall-through. */ -- case 32: /* Fall-through. */ -+ case 8: -+ lttng_fallthrough; -+ case 16: -+ lttng_fallthrough; -+ case 32: -+ lttng_fallthrough; - case 64: - break; - default: -diff --git a/include/wrapper/compiler_attributes.h b/include/wrapper/compiler_attributes.h -new file mode 100644 -index 00000000..c2c96e76 ---- /dev/null -+++ b/include/wrapper/compiler_attributes.h -@@ -0,0 +1,34 @@ -+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) -+ * -+ * wrapper/compiler_attributes.h -+ * -+ * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com> -+ */ -+ -+#ifndef _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H -+#define _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H -+ -+#include <lttng/kernel-version.h> -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0)) -+#include <linux/compiler_attributes.h> -+#endif -+ -+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0)) -+ -+/* -+ * Use the kernel provided fallthrough attribute macro. -+ */ -+#define lttng_fallthrough fallthrough -+ -+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */ -+ -+/* -+ * Fallback to the comment for kernels pre 5.15 that don't build with -+ * '-Wimplicit-fallthrough=5'. -+ */ -+#define lttng_fallthrough do {} while (0) /* fallthrough */ -+ -+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */ -+ -+#endif /* _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H */ -diff --git a/src/lib/counter/counter.c b/src/lib/counter/counter.c -index a4500a0e..bf038aac 100644 ---- a/src/lib/counter/counter.c -+++ b/src/lib/counter/counter.c -@@ -11,6 +11,7 @@ - #include <linux/cpumask.h> - #include <counter/counter.h> - #include <counter/counter-internal.h> -+#include <wrapper/compiler_attributes.h> - #include <wrapper/vmalloc.h> - #include <wrapper/limits.h> - -@@ -324,7 +325,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, - *underflow = false; - - switch (config->alloc) { -- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - /* Read global counter. */ - ret = lttng_counter_read(config, counter, dimension_indexes, -@@ -342,7 +344,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, - switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: - break; -- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU: - //TODO: integrate with CPU hotplug and online cpus - for (cpu = 0; cpu < num_possible_cpus(); cpu++) { -@@ -448,7 +451,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, - int cpu, ret; - - switch (config->alloc) { -- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: - /* Clear global counter. */ - ret = lttng_counter_clear_cpu(config, counter, dimension_indexes, -1); -@@ -462,7 +466,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, - switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: - break; -- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ -+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: -+ lttng_fallthrough; - case COUNTER_ALLOC_PER_CPU: - //TODO: integrate with CPU hotplug and online cpus - for (cpu = 0; cpu < num_possible_cpus(); cpu++) { -diff --git a/src/lttng-abi.c b/src/lttng-abi.c -index cc453894..eac1afd1 100644 ---- a/src/lttng-abi.c -+++ b/src/lttng-abi.c -@@ -34,6 +34,7 @@ - #include <ringbuffer/vfs.h> - #include <ringbuffer/backend.h> - #include <ringbuffer/frontend.h> -+#include <wrapper/compiler_attributes.h> - #include <wrapper/poll.h> - #include <wrapper/file.h> - #include <wrapper/kref.h> -@@ -1332,7 +1333,8 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp, - */ - return -ENOSYS; - } -- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */ -+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH: - { - struct lttng_metadata_stream *stream = filp->private_data; -@@ -1441,7 +1443,8 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp, - */ - return -ENOSYS; - } -- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */ -+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH: - { - struct lttng_metadata_stream *stream = filp->private_data; -@@ -1758,8 +1761,10 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param) - switch (event_param->instrumentation) { - case LTTNG_KERNEL_ABI_SYSCALL: - switch (event_param->u.syscall.entryexit) { -- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */ -- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT: - break; - default: -@@ -1783,20 +1788,26 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param) - switch (event_param->u.kretprobe.entryexit) { - case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT: - break; -- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */ -- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: -+ lttng_fallthrough; - default: - return -EINVAL; - } - break; - -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - return -EINVAL; - } -@@ -1830,18 +1841,23 @@ int lttng_abi_create_event(struct file *channel_file, - } - - switch (event_param->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - fops = <tng_event_recorder_enabler_fops; - break; -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - fops = <tng_event_recorder_event_fops; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - return -EINVAL; - } -@@ -1867,7 +1883,8 @@ int lttng_abi_create_event(struct file *channel_file, - goto event_error; - - switch (event_param->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - { - struct lttng_event_enabler *event_enabler; -@@ -1887,8 +1904,10 @@ int lttng_abi_create_event(struct file *channel_file, - break; - } - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - { - struct lttng_kernel_event_recorder *event; -@@ -1908,8 +1927,10 @@ int lttng_abi_create_event(struct file *channel_file, - break; - } - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto event_error; -@@ -2043,18 +2064,23 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - } - - switch (event_notifier_param->event.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - fops = <tng_event_notifier_enabler_fops; - break; -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - fops = <tng_event_notifier_event_fops; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto inval_instr; -@@ -2086,7 +2112,8 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - goto event_notifier_error; - - switch (event_notifier_param->event.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - { - struct lttng_event_notifier_enabler *enabler; -@@ -2110,8 +2137,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - break; - } - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - { - struct lttng_kernel_event_notifier *event_notifier; -@@ -2135,8 +2164,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file, - break; - } - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - ret = -EINVAL; - goto event_notifier_error; -diff --git a/src/lttng-bytecode-interpreter.c b/src/lttng-bytecode-interpreter.c -index b46a23b7..a2a932c6 100644 ---- a/src/lttng-bytecode-interpreter.c -+++ b/src/lttng-bytecode-interpreter.c -@@ -7,6 +7,7 @@ - * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - */ - -+#include <wrapper/compiler_attributes.h> - #include <wrapper/uaccess.h> - #include <wrapper/objtool.h> - #include <wrapper/types.h> -@@ -421,7 +422,8 @@ static int dynamic_get_index(struct lttng_kernel_probe_ctx *lttng_probe_ctx, - } - break; - case LOAD_ROOT_CONTEXT: -- case LOAD_ROOT_APP_CONTEXT: /* Fall-through */ -+ lttng_fallthrough; -+ case LOAD_ROOT_APP_CONTEXT: - { - ret = context_get_index(lttng_probe_ctx, - &stack_top->u.ptr, -diff --git a/src/lttng-bytecode-specialize.c b/src/lttng-bytecode-specialize.c -index c4b9d04b..f8b5f19d 100644 ---- a/src/lttng-bytecode-specialize.c -+++ b/src/lttng-bytecode-specialize.c -@@ -8,6 +8,8 @@ - */ - - #include <linux/slab.h> -+#include <wrapper/compiler_attributes.h> -+ - #include <lttng/lttng-bytecode.h> - #include <lttng/align.h> - #include <lttng/events-internal.h> -@@ -271,7 +273,8 @@ static int specialize_get_index(struct bytecode_runtime *runtime, - } - case OBJECT_TYPE_STRUCT: - /* Only generated by the specialize phase. */ -- case OBJECT_TYPE_VARIANT: /* Fall-through */ -+ case OBJECT_TYPE_VARIANT: -+ lttng_fallthrough; - default: - printk(KERN_WARNING "LTTng: bytecode: Unexpected get index type %d", - (int) stack_top->load.object_type); -diff --git a/src/lttng-events.c b/src/lttng-events.c -index e785fe4d..230e3934 100644 ---- a/src/lttng-events.c -+++ b/src/lttng-events.c -@@ -28,6 +28,7 @@ - #include <linux/vmalloc.h> - #include <linux/dmi.h> - -+#include <wrapper/compiler_attributes.h> - #include <wrapper/uuid.h> - #include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */ - #include <wrapper/random.h> -@@ -659,12 +660,14 @@ int lttng_event_enable(struct lttng_kernel_event_common *event) - goto end; - } - switch (event->priv->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - ret = -EINVAL; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - WRITE_ONCE(event->enabled, 1); - break; -@@ -673,8 +676,10 @@ int lttng_event_enable(struct lttng_kernel_event_common *event) - ret = lttng_kretprobes_event_enable_state(event, 1); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -719,12 +724,14 @@ int lttng_event_disable(struct lttng_kernel_event_common *event) - goto end; - } - switch (event->priv->instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - ret = -EINVAL; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - WRITE_ONCE(event->enabled, 0); - break; -@@ -733,8 +740,10 @@ int lttng_event_disable(struct lttng_kernel_event_common *event) - ret = lttng_kretprobes_event_enable_state(event, 0); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -873,15 +882,20 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l - event_name = event_desc->event_name; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - event_name = event_param->name; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1093,8 +1107,10 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l - WARN_ON_ONCE(!ret); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1141,15 +1157,20 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create( - event_name = event_desc->event_name; - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - event_name = event_notifier_param->event.name; - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1296,9 +1317,12 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create( - WARN_ON_ONCE(!ret); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - ret = -EINVAL; -@@ -1423,14 +1447,18 @@ void register_event(struct lttng_kernel_event_recorder *event_recorder) - ret = lttng_syscall_filter_enable_event(event_recorder->chan, event_recorder); - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_UPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_KRETPROBE: - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1481,7 +1509,8 @@ int _lttng_event_unregister(struct lttng_kernel_event_recorder *event_recorder) - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1512,14 +1541,18 @@ void register_event_notifier(struct lttng_kernel_event_notifier *event_notifier) - ret = lttng_syscall_filter_enable_event_notifier(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KPROBE: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_UPROBE: - ret = 0; - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1559,9 +1592,12 @@ int _lttng_event_notifier_unregister( - ret = lttng_syscall_filter_disable_event_notifier(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1614,8 +1650,10 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event) - lttng_uprobes_destroy_event_private(event_recorder); - break; - -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -1647,9 +1685,12 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event) - lttng_uprobes_destroy_event_notifier_private(event_notifier); - break; - -- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */ -- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */ -- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_KRETPROBE: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_FUNCTION: -+ lttng_fallthrough; -+ case LTTNG_KERNEL_ABI_NOOP: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -2713,7 +2754,8 @@ void lttng_session_sync_event_enablers(struct lttng_kernel_session *session) - int nr_filters = 0; - - switch (event_recorder_priv->parent.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - /* Enable events */ - list_for_each_entry(enabler_ref, -@@ -2807,7 +2849,8 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group - int nr_filters = 0, nr_captures = 0; - - switch (event_notifier_priv->parent.instrumentation) { -- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */ -+ case LTTNG_KERNEL_ABI_TRACEPOINT: -+ lttng_fallthrough; - case LTTNG_KERNEL_ABI_SYSCALL: - /* Enable event_notifiers */ - list_for_each_entry(enabler_ref, -@@ -3877,7 +3920,7 @@ int print_escaped_ctf_string(struct lttng_kernel_session *session, const char *s - if (ret) - goto error; - /* We still print the current char */ -- /* Fallthrough */ -+ lttng_fallthrough; - default: - ret = lttng_metadata_printf(session, "%c", cur); - break; -diff --git a/src/lttng-string-utils.c b/src/lttng-string-utils.c -index d9447903..65946193 100644 ---- a/src/lttng-string-utils.c -+++ b/src/lttng-string-utils.c -@@ -4,6 +4,7 @@ - */ - - #include <linux/types.h> -+#include <wrapper/compiler_attributes.h> - - #include <lttng/string-utils.h> - -@@ -302,7 +303,7 @@ retry: - p = pattern_get_char_at_cb(p_at, - pattern_get_char_at_cb_data); - -- /* Fall-through. */ -+ lttng_fallthrough; - default: - /* - * Default case which will compare the escaped -diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c -index 0fa6a1bf..1d0a5ecb 100644 ---- a/src/probes/lttng-kretprobes.c -+++ b/src/probes/lttng-kretprobes.c -@@ -14,6 +14,7 @@ - #include <lttng/events.h> - #include <lttng/events-internal.h> - #include <ringbuffer/frontend_types.h> -+#include <wrapper/compiler_attributes.h> - #include <wrapper/vmalloc.h> - #include <wrapper/irqflags.h> - #include <lttng/tracer.h> -@@ -61,7 +62,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, - return 0; - break; - } -- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */ -+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } -@@ -90,7 +92,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, - chan->ops->event_commit(&ctx); - break; - } -- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */ -+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: -+ lttng_fallthrough; - default: - WARN_ON_ONCE(1); - } --- -2.19.1 - diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb index 6dfde8dcad..b05cad6be7 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb @@ -10,13 +10,11 @@ inherit module include lttng-platforms.inc SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ - file://0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch \ - file://0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch \ " # Use :append here so that the patch is applied also when using devupstream SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" -SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356" +SRC_URI[sha256sum] = "a7c86d91c9bbe66d27f025aa04b8cfc6d7785ed2fc7ef774930800ee44d7f343" export INSTALL_MOD_DIR="kernel/lttng-modules" diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch deleted file mode 100644 index 925b51c3ce..0000000000 --- a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex@linutronix.de> -Date: Sun, 5 Sep 2021 10:13:08 +0200 -Subject: [PATCH] src/common: correct header location - -sys/unistd.h is not guaranteed to exist, and does not with -e.g. musl C library. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex@linutronix.de> ---- - src/common/kernel-probe.c | 2 +- - src/common/userspace-probe.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c -index 2beb53f..44100bc 100644 ---- a/src/common/kernel-probe.c -+++ b/src/common/kernel-probe.c -@@ -20,7 +20,7 @@ - #include <lttng/kernel-probe.h> - #include <sys/stat.h> - #include <sys/types.h> --#include <sys/unistd.h> -+#include <unistd.h> - - static - int lttng_kernel_probe_location_address_serialize( -diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c -index 67b0ee6..66afc6f 100644 ---- a/src/common/userspace-probe.c -+++ b/src/common/userspace-probe.c -@@ -20,7 +20,7 @@ - #include <lttng/userspace-probe-internal.h> - #include <sys/stat.h> - #include <sys/types.h> --#include <sys/unistd.h> -+#include <unistd.h> - - static - int lttng_userspace_probe_location_function_set_binary_fd_handle( diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch new file mode 100644 index 0000000000..3a77ea2e43 --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch @@ -0,0 +1,34 @@ +Upstream-Status: Inappropriate [need to root cause the test hangs] + +We keep seeing hangs in the tools/notifications tests on x86 and arm for +a variety of distros. Exclude them for now to work out if this is the +only place we see them and give SWAT/triage a break from the stream +of them. + +https://bugzilla.yoctoproject.org/show_bug.cgi?id=14263 + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: lttng-tools-2.13.1/tests/regression/Makefile.am +=================================================================== +--- lttng-tools-2.13.1.orig/tests/regression/Makefile.am ++++ lttng-tools-2.13.1/tests/regression/Makefile.am +@@ -29,18 +29,6 @@ TESTS = tools/base-path/test_ust \ + tools/crash/test_crash \ + tools/regen-metadata/test_ust \ + tools/regen-statedump/test_ust \ +- tools/notification/test_notification_ust_error \ +- tools/notification/test_notification_ust_buffer_usage \ +- tools/notification/test_notification_ust_capture \ +- tools/notification/test_notification_ust_event_rule_condition_exclusion \ +- tools/notification/test_notification_kernel_error \ +- tools/notification/test_notification_kernel_buffer_usage \ +- tools/notification/test_notification_kernel_capture \ +- tools/notification/test_notification_kernel_instrumentation \ +- tools/notification/test_notification_kernel_syscall \ +- tools/notification/test_notification_notifier_discarded_count \ +- tools/notification/test_notification_kernel_userspace_probe \ +- tools/notification/test_notification_multi_app \ + tools/rotation/test_ust \ + tools/rotation/test_kernel \ + tools/rotation/test_save_load_mi \ diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.1.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.2.bb index 063d8e8c2d..d6ce2c7e32 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.1.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.13.2.bb @@ -36,10 +36,10 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://run-ptest \ file://lttng-sessiond.service \ file://determinism.patch \ - file://0001-src-common-correct-header-location.patch \ + file://disable-tests.patch \ " -SRC_URI[sha256sum] = "cfe6df7da831fc07fd07ce46b442c2ec1074c167af73f3a1b1d2fba0c453c8b5" +SRC_URI[sha256sum] = "ced2ba00020da77fd17ac92b5a53825502409a07e3aeca28f9515d4a844fd7bd" inherit autotools ptest pkgconfig useradd python3-dir manpages systemd diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch b/poky/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch index 2d61dfa525..d3c451fd2b 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch +++ b/poky/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch @@ -5,7 +5,7 @@ Subject: [PATCH] lttng-ust-common: link with liburcu explicitly Otherwise linking errors are seen on x86-32. -Upstream-Status: Pending +Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan] Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- src/lib/lttng-ust-common/Makefile.am | 1 + diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.13.1.bb index 7c6a0743e1..82e544a4b9 100644 --- a/poky/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb +++ b/poky/meta/recipes-kernel/lttng/lttng-ust_2.13.1.bb @@ -34,7 +34,7 @@ SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ file://0001-Makefile.am-update-rpath-link.patch \ " -SRC_URI[sha256sum] = "54e4c933679cf6a07971dc5861ce57fc4876ab740ab612407b30b5fc85371750" +SRC_URI[sha256sum] = "5667bf0269e1e62e2d9cb974c456ff86e0401bd7aa3bfc8d5fdb97233249eddc" CVE_PRODUCT = "ust" diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb index f473272096..ec0c6efe15 100644 --- a/poky/meta/recipes-kernel/perf/perf.bb +++ b/poky/meta/recipes-kernel/perf/perf.bb @@ -31,7 +31,6 @@ PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd" # libunwind is not yet ported for some architectures PACKAGECONFIG:remove:arc = "libunwind" -PACKAGECONFIG:remove:riscv64 = "libunwind" PACKAGECONFIG:remove:riscv32 = "libunwind" DEPENDS = " \ @@ -126,9 +125,11 @@ PERF_SRC ?= "Makefile \ PERF_EXTRA_LDFLAGS = "" -# MIPS N32 +# MIPS N32/N64 PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32" PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32" +PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip" +PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing diff --git a/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py index 5ddf0f144f..09ba3328a7 100755 --- a/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py +++ b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py @@ -33,10 +33,10 @@ if os.path.exists(outfile): with open(infile, 'r') as file: data = file.read() -preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL ) +preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL ) preamble = re.search( preamble_regex, data ) -struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) +struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) @@ -45,22 +45,25 @@ name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) # types and then their fields. entry_dict = {} for struct in re.findall( struct_block_regex, data ): - # print( "struct: %s %s" % (struct[0],struct[1]) ) - entry_dict[struct[1]] = {} - entry_dict[struct[1]]['type'] = struct[0] - entry_dict[struct[1]]['fields'] = {} - for entry in re.findall( field_regex, struct[2] ): + # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) ) + entry_dict[struct[2]] = {} + entry_dict[struct[2]]['type_prefix'] = struct[0] + entry_dict[struct[2]]['type'] = struct[1] + entry_dict[struct[2]]['fields'] = {} + for entry in re.findall( field_regex, struct[3] ): #print( " entry: %s" % entry ) cpuid = re.search( cpuid_regex, entry ) if cpuid: #print( " cpuid found: %s" % cpuid.group(1) ) - entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry - + entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry + name = re.search( name_regex, entry ) if name: #print( " name found: %s" % name.group(1) ) - entry_dict[struct[1]]['fields'][name.group(1)] = entry - + entry_dict[struct[2]]['fields'][name.group(1)] = entry + + if not entry_dict[struct[2]]['fields']: + entry_dict[struct[2]]['fields']['0'] = entry # created ordered dictionaries from the captured values. These are ordered by # a sorted() iteration of the keys. We don't care about the order we read @@ -72,6 +75,7 @@ for struct in re.findall( struct_block_regex, data ): entry_dict_sorted = OrderedDict() for i in sorted(entry_dict.keys()): entry_dict_sorted[i] = {} + entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix'] entry_dict_sorted[i]['type'] = entry_dict[i]['type'] entry_dict_sorted[i]['fields'] = {} for f in sorted(entry_dict[i]['fields'].keys()): @@ -83,7 +87,7 @@ outf = open( outfile, 'w' ) print( preamble.group(1) ) outf.write( preamble.group(1) ) for d in entry_dict_sorted: - outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) ) + outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) ) for f in entry_dict_sorted[d]['fields']: outf.write( entry_dict_sorted[d]['fields'][f] + '\n' ) diff --git a/poky/meta/recipes-kernel/powertop/powertop_2.14.bb b/poky/meta/recipes-kernel/powertop/powertop_2.14.bb index 3a7c3ba31e..b46e5e8041 100644 --- a/poky/meta/recipes-kernel/powertop/powertop_2.14.bb +++ b/poky/meta/recipes-kernel/powertop/powertop_2.14.bb @@ -6,7 +6,7 @@ DEPENDS = "ncurses libnl pciutils autoconf-archive" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" -SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \ +SRC_URI = "git://github.com/fenrus75/powertop;protocol=https;branch=master \ file://0001-wakeup_xxx.h-include-limits.h.patch \ file://0001-src-fix-compatibility-with-ncurses-6.3.patch \ " diff --git a/poky/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch b/poky/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch new file mode 100644 index 0000000000..0801cb57ec --- /dev/null +++ b/poky/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch @@ -0,0 +1,45 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From b0422e9e5a539164af75cddcaeb01bceca56bf12 Mon Sep 17 00:00:00 2001 +From: "Frank Ch. Eigler" <fche@redhat.com> +Date: Thu, 13 Jan 2022 18:33:15 -0500 +Subject: [PATCH] PR28778: gcc warning tweak for sprintf precision parameter + +A precision=-1 sentinel value got interpreted as UINT_MAX in a +context, leading to diagnostics like: + +/usr/share/systemtap/runtime/vsprintf.c:341:23: error: 'strnlen' specified bound 4294967295 may exceed maximum object size 2147483647 [-Werror=stringop-overread] + +Adding a clamp_t() around the parameter field to keep it limited to +STP_BUFFER_SIZE (8K by default), which is apprx. the limit for a +single printf. +--- + runtime/vsprintf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c +index cd31a938b..606f685e8 100644 +--- a/runtime/vsprintf.c ++++ b/runtime/vsprintf.c +@@ -338,7 +338,7 @@ _stp_vsprint_memory(char * str, char * end, const char * ptr, + if (format == 's') { + if ((unsigned long)ptr < PAGE_SIZE) + ptr = "<NULL>"; +- len = strnlen(ptr, precision); ++ len = strnlen(ptr, clamp_t(size_t, precision, 0, STP_BUFFER_SIZE)); + } + else if (precision > 0) + len = precision; +@@ -410,7 +410,7 @@ _stp_vsprint_memory_size(const char * ptr, int width, int precision, + if (format == 's') { + if ((unsigned long)ptr < PAGE_SIZE) + ptr = "<NULL>"; +- len = strnlen(ptr, precision); ++ len = strnlen(ptr, clamp_t(size_t, precision, 0, STP_BUFFER_SIZE)); + } + else if (precision > 0) + len = precision; +-- +2.25.1 + diff --git a/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch b/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch index b53e107d84..1decf21593 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch +++ b/poky/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin <alex@linutronix.de> Date: Mon, 25 Oct 2021 17:59:24 +0200 Subject: [PATCH] staprun: address ncurses 6.3 failures -Upstream-Status: Pending +Upstream-Status: Submitted [by email to smakarov@redhat.com,systemtap@sourceware.org] Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- staprun/monitor.c | 24 ++++++++++++------------ diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/poky/meta/recipes-kernel/systemtap/systemtap_git.bb index d11d9b93a2..04f7e03ab5 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap_git.bb +++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.bb @@ -31,7 +31,7 @@ PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" inherit autotools gettext pkgconfig systemd -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'distutils3-base', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} # exporter comes with python3-probes PACKAGES =+ "${PN}-exporter" diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc index b6ff98f0f2..36c934c2fa 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc @@ -1,12 +1,13 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV = "7f6992539fb22c93c21ac30c94508bf655d496a7" -PV = "4.5" +SRCREV = "2e9f2f6967e44ce2bf8f34932b5bdd738ece2161" +PV = "4.6" -SRC_URI = "git://sourceware.org/git/systemtap.git \ +SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master \ file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \ file://0001-Install-python-modules-to-correct-library-dir.patch \ file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ + file://0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch \ " COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux' |