From nobody Wed Apr 29 21:42:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5W4T4PWyz6c0P2 for ; Wed, 29 Apr 2026 21:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5W4T1snVz3gm3 for ; Wed, 29 Apr 2026 21:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777498969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tk44UAir/lBj6pcm5ZXqmEmjqhZPlRCE0vImyB041Q=; b=NFoBw6phXAjpjAGsQQ6l5fjKrCsIrhvyhWouu/UfaX5EFb+blXCb+InmKNKExWCW/w4bhW UP9thq8A9A1LJLDjYiFmIKU7vk3+PvwWkOuH1iWpNP5EprqFxUxlwLHL1OARDbGO7/65wK SBAWovbl1xUc1Z55jbBr+0g4CCwxxw0uXzqP/OK5ReFPnylh9eyocHnZ4FHsBdMp0XYFvb jUKF4iWlUkyxwgM8idNYx23wns8P1+lD3I5BPit0d9N10CdZgFKeXf4HkfbutCEjQMK8jQ UmNp5a1EwDAgBRVoiwBLh2RaFbb2u1S6Hrm/NZpUDQvudsPbBkBzkAtocY2KaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777498969; a=rsa-sha256; cv=none; b=m6PqzPHCWNqlS97WC+1TWQXNQG0eMjdKJPGUj3VFBjFaF/1qGkLhGXOjTQbk88S1Sw5EKz q49ve6Rdas0reJAXhAOBqbSLow5/FjDuip8Kq1VgMZcP+D195MrmgYaPusNC8971RgxlYS 1VMIyl/b3uYVBgg2xlWHznfkd/0HQlKj+PL8OcCBhn/0GRMpQkvbeIvfmTcJbX9p/v2NSK l5lqA91Ap8PNqgIyD+UypOtxrf1jEe4kg9zw1SvfW1DvwaXtG/OB7SyK5qoAK5xoYIA2I3 CMZh0XqV1HGQnu6ZXQ2BcRmj+dlsJBCUTKQoPKcOiP8r8Pa+tcsFQAvdodkoKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777498969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tk44UAir/lBj6pcm5ZXqmEmjqhZPlRCE0vImyB041Q=; b=rFIRvdw/+jF6PGr0bl1SHeKSe5TzqVYUDB/fXwC9N9yjyhcp3PItN7qNnCn4rzJUL0k1kz 4fjRGOO5dqh5a544FPjt1OaZcPHMm9lZ71+IMjguWTVNAnFSffQrACnDwIFzbTqp//F/la LlDWG0FQJGxBShBMHwIYxPDohsnkkmfJK9CvY4NcaUYZt4I1NKoaq+tsYm1XZhlK451Juw okYlig4G+i7DJ5YMqQhrRauSWrhkf7WAFRm/VuCc6YtKec/KYaY4Fb2/bqXVw2GfdjJZLg Px9Pgfj++dJkXZsQxEYWKq3jTrBZj4Ro1jMH4+8LplRqgMmAsvqs32PeLCcBkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5W4T1QFPzyQQ for ; Wed, 29 Apr 2026 21:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46df9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 21:42:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: b251ff5a729d - stable/15 - linuxkpi: Add several `guid_*()` functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b251ff5a729d4997bf72a014f5bec5ca76f2e0a5 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 21:42:49 +0000 Message-Id: <69f27b59.46df9.6638dafc@gitrepo.freebsd.org> The branch stable/15 has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=b251ff5a729d4997bf72a014f5bec5ca76f2e0a5 commit b251ff5a729d4997bf72a014f5bec5ca76f2e0a5 Author: Jean-Sébastien Pédron AuthorDate: 2026-04-13 22:36:18 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-29 21:03:23 +0000 linuxkpi: Add several `guid_*()` functions The DRM generic code and the amdgpu DRM driver started to use several of these functions in Linux 6.12. Likewise for `UUID_SIZE`. Reviewed by: bz Sponsored by: The FreeBSD Foundation (cherry picked from commit cefd0ae770bfad534ec666099489a869387e8836) --- sys/compat/linuxkpi/common/include/linux/uuid.h | 27 +++++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_compat.c | 3 +++ 2 files changed, 30 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/uuid.h b/sys/compat/linuxkpi/common/include/linux/uuid.h index 4f6f4a8b34f0..0765ef4dcc1e 100644 --- a/sys/compat/linuxkpi/common/include/linux/uuid.h +++ b/sys/compat/linuxkpi/common/include/linux/uuid.h @@ -33,6 +33,7 @@ #include +#define UUID_SIZE 16 #define UUID_STRING_LEN 36 #define GUID_INIT(x0_3, x4_5, x6_7, x8, x9, x10, x11, x12, x13, x14, x15) \ @@ -59,6 +60,8 @@ typedef struct { char x[16]; } guid_t; +extern const guid_t guid_null; + static inline void guid_gen(guid_t *g) { @@ -68,10 +71,34 @@ guid_gen(guid_t *g) g->x[8] = (g->x[8] & 0x3f) | 0x80; } +static inline bool +guid_equal(const guid_t *u1, const guid_t *u2) +{ + return (memcmp(u1, u2, sizeof(guid_t)) == 0); +} + static inline void guid_copy(guid_t *dst, const guid_t *src) { memcpy(dst, src, sizeof(*dst)); } +static inline void +import_guid(guid_t *dst, const uint8_t *src) +{ + memcpy(dst, src, sizeof(guid_t)); +} + +static inline void +export_guid(uint8_t *dst, const guid_t *src) +{ + memcpy(dst, src, sizeof(guid_t)); +} + +static inline bool +guid_is_null(const guid_t *guid) +{ + return (guid_equal(guid, &guid_null)); +} + #endif /* _LINUXKPI_LINUX_UUID_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 8fc644241d79..0c7032fa6e23 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -98,6 +98,7 @@ #include #include #include +#include #if defined(__i386__) || defined(__amd64__) #include @@ -164,6 +165,8 @@ unsigned long linux_timer_hz_mask; wait_queue_head_t linux_bit_waitq; wait_queue_head_t linux_var_waitq; +const guid_t guid_null; + int panic_cmp(struct rb_node *one, struct rb_node *two) {