From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D60BD1581E7 for ; Mon, 29 Apr 2024 17:13:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 270BAE2A0E; Mon, 29 Apr 2024 17:13:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC5AAE2A0E for ; Mon, 29 Apr 2024 17:13:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E47EE33BE19 for ; Mon, 29 Apr 2024 17:13:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4625116C0 for ; Mon, 29 Apr 2024 17:13:16 +0000 (UTC) From: "Nick Sarnie" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nick Sarnie" Message-ID: <1714410769.3ee6246a9878a2852a8978a69e39a7ee5aa81b7d.sarnex@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/vendor-reset/files/, app-emulation/vendor-reset/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild X-VCS-Directories: app-emulation/vendor-reset/ app-emulation/vendor-reset/files/ X-VCS-Committer: sarnex X-VCS-Committer-Name: Nick Sarnie X-VCS-Revision: 3ee6246a9878a2852a8978a69e39a7ee5aa81b7d X-VCS-Branch: master Date: Mon, 29 Apr 2024 17:13:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 620037f4-6ac7-4935-b3ed-62e9c7e3e279 X-Archives-Hash: 535d09f821b7d9dfe8967941e5028aeb commit: 3ee6246a9878a2852a8978a69e39a7ee5aa81b7d Author: Brahmajit Das gmail com> AuthorDate: Mon Apr 29 13:11:58 2024 +0000 Commit: Nick Sarnie gentoo org> CommitDate: Mon Apr 29 17:12:49 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee6246a app-emulation/vendor-reset: Fix implicit declaration of function strlcpy Pulling C99 patches from upstream Closes: https://bugs.gentoo.org/928306 Signed-off-by: Brahmajit Das gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36481 Signed-off-by: Nick Sarnie gentoo.org> ....1.1-allow-correct-compilation-with-clang.patch | 23 +++++++++++ ...endor-reset-0.1.1-fix-build-on-kernel-6.8.patch | 35 +++++++++++++++++ .../vendor-reset-0.1.1_pre20221205-r2.ebuild | 44 ++++++++++++++++++++++ 3 files changed, 102 insertions(+) diff --git a/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch new file mode 100644 index 000000000000..32ae298d4049 --- /dev/null +++ b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-allow-correct-compilation-with-clang.patch @@ -0,0 +1,23 @@ +https://github.com/gnif/vendor-reset/commit/084881c6e9e11bdadaf05798e669568848e698a3.patch +From: =?UTF-8?q?Marcus=20K=C3=B6hler?= +Date: Mon, 25 Dec 2023 21:43:41 +0100 +Subject: [PATCH] Allow correct compilation with Clang/LLVM +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Marcus Köhler +--- a/src/hook.c ++++ b/src/hook.c +@@ -30,7 +30,11 @@ static bool hook_installed = false; + static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe); + + /* TCO breaks the hook, we must disable it for this function */ ++#if defined(__GNUC__) && !defined(__llvm__) + __attribute__((optimize("-fno-optimize-sibling-calls"))) ++#elif defined(__clang__) ++__attribute__((disable_tail_calls)) ++#endif + static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe) + { + int ret; diff --git a/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch new file mode 100644 index 000000000000..d99212c9ee27 --- /dev/null +++ b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch @@ -0,0 +1,35 @@ +https://github.com/gnif/vendor-reset/commit/f72619e468846e0bab4426f5e71b069f88c33a11.patch +From: Sakari <20642596+sakarie9@users.noreply.github.com> +Date: Thu, 14 Mar 2024 10:59:15 +0800 +Subject: [PATCH] Fix build on kernel 6.8+ + +--- a/src/amd/amdgpu/atom.c ++++ b/src/amd/amdgpu/atom.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + //#include +@@ -39,6 +40,10 @@ + #include "atom-names.h" + #include "atom-bits.h" + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) ++#define strscpy strlcpy ++#endif ++ + #define ATOM_COND_ABOVE 0 + #define ATOM_COND_ABOVEOREQUAL 1 + #define ATOM_COND_ALWAYS 2 +@@ -1424,7 +1429,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) + if (*str != '\0') + { + pr_info("ATOM BIOS: %s\n", str); +- strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version)); ++ strscpy(ctx->vbios_version, str, sizeof(ctx->vbios_version)); + } + + return ctx; diff --git a/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild new file mode 100644 index 000000000000..f34969845915 --- /dev/null +++ b/app-emulation/vendor-reset/vendor-reset-0.1.1_pre20221205-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/gnif/vendor-reset.git" + EGIT_BRANCH="master" + inherit git-r3 +else + KEYWORDS="~amd64" + EGIT_COMMIT="4b466e92a2d9f76ce1082cde982c7be0be91e248" + SRC_URI="https://github.com/gnif/vendor-reset/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="Linux kernel vendor specific hardware reset module" +HOMEPAGE="https://github.com/gnif/vendor-reset" + +LICENSE="GPL-2" +SLOT="0" + +S="${WORKDIR}/${PN}-${EGIT_COMMIT}" + +CONFIG_CHECK="FTRACE KPROBES PCI_QUIRKS KALLSYMS FUNCTION_TRACER" + +PATCHES=( + "${FILESDIR}/${PN}-0.1.1-allow-correct-compilation-with-clang.patch" + "${FILESDIR}/${PN}-0.1.1-fix-build-on-kernel-6.8.patch" +) + +src_compile() { + local modlist=( vendor-reset ) + local modargs=( KDIR="${KV_OUT_DIR}" ) + linux-mod-r1_src_compile +} + +src_install() { + linux-mod-r1_src_install + + insinto /etc/modules-load.d/ + newins "${FILESDIR}"/modload.conf vendor-reset.conf +}