From nobody Thu Apr 30 19:42:53 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 4g64Mf0jk3z6c7T2 for ; Thu, 30 Apr 2026 19:42:54 +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 4g64Md2tc4z3CyJ for ; Thu, 30 Apr 2026 19:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777578173; 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=9CDVxbZycu7i6Sv0WQ2OwlluZ8pjY0B1tIIJfL7be3M=; b=SEn0rwuUMb8NtH9tMHzS2K6rwluROIW66j0ZCQjmrWsQaqzP7c1pSkf8sF3jbGE6s9aV8O s6UrxTpPMJItBgS9OhBFC/yRgFnU0Xm4jmJRue1VOtHvhOwK4yXdvWnCU53yxI5h44KdF4 ejwn2qcSIdX7Mo7VqZtXCjWGM2EU82pOF7iPpt4psLgPwBDh99volM0bx1oKuD1ipN+xLV rozmZ84blDtwZwYppIOsUAM/Oa/Ps45J/3MIyM6Ubmeczi2KWWTCJpZSg4kaFNRTAJ1ex9 eREqVUQzQoaBim2mC/vcqfniwvq8GzNij4N49utHDnTyQpa47MKD5kL0C/3A6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777578173; a=rsa-sha256; cv=none; b=cXSy0mROQOrHyOw8Hg17uk7Ly75OqlWcYzAelIkkYRQULNv7zQRgKE2LT/dbYvaz72yDtl lykCFNS16FWZqlIGjQb7GL4aQpMHUyu8pOkxrZvQuNaOfD7IwMJmdcqH4PKRTY0KSX9eYy 78ppbMFyMn7zn96iCAbyol4uDuH27iafKszShdPzIQHODEjSOIhG6EHK1+n5FEi0AXmWkP JJZr/7DAW5NhRcR1pQDy4g6oenQJ7rq4O0qpJMGQUvQ6vaPuSLfS5wC4MTmY+cma83gkeb q0qZEvqoOMt1FH3Nz6DQfVSZycKbBaCNwla932L8VC8uFs3LYQSS46IWhhfHdA== 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=1777578173; 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=9CDVxbZycu7i6Sv0WQ2OwlluZ8pjY0B1tIIJfL7be3M=; b=GlA1Y6JNJzBZomvcL4Xb57j7Yu48k4HaDADGiMMzaQxJcPwcnOsnWnwdX4ASE/7dAhA+Y1 qy9xPRVTHQqg7daTXjSRWeMLPSs2ZZjf+FMaihuwGOjWSyjaHi8AMz0z9AsDyLmiGWhXgy fEiw4jo+3NcQgNRNXoOV6I5maL/1BlHKarnsVTrHwxXUezvJYnvrOBEApCTSEjbjFjGoac KSOQGBHimNPGYym2wH5ufHmlsD038tG7l/syH0Swk8uC2VJbkdEsZgprCMxCcJpiKkBR4O OKR5wE4cu0cz6SHIEZtLCiDZSuvOSclcBYFU2o9tySPM9kHkwE7mU23Xcpr+zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g64Md2PTFz9hD for ; Thu, 30 Apr 2026 19:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c1e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 30 Apr 2026 19:42:53 +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: 2b2b8b90a1d4 - stable/15 - linuxkpi: Define `VFM_*()` macros in 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: 2b2b8b90a1d45fcbd141535516b1c51869e89c66 Auto-Submitted: auto-generated Date: Thu, 30 Apr 2026 19:42:53 +0000 Message-Id: <69f3b0bd.3c1e6.5236b506@gitrepo.freebsd.org> The branch stable/15 has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=2b2b8b90a1d45fcbd141535516b1c51869e89c66 commit 2b2b8b90a1d45fcbd141535516b1c51869e89c66 Author: Jean-Sébastien Pédron AuthorDate: 2026-04-22 16:23:16 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-30 18:07:13 +0000 linuxkpi: Define `VFM_*()` macros in They use another set of constants and macros in . All these macros are defined regardless of the architecture, even though they are specific to x86. Perhaps we should restrict them using #ifdefs. The amdgpu DRM driver started to used `VFM_MODEL()` and the `INTEL_*LAKE*` constants in Linux 6.12.x. Reviewed by: bz, olce Sponsored by: The FreeBSD Foundation (cherry picked from commit 65dc0e9071a5ea206d6fbf070c974ebcfdea3680) --- .../linuxkpi/common/include/asm/cpu_device_id.h | 33 ++++++++++++++++++++++ .../linuxkpi/common/include/asm/intel-family.h | 9 ++++++ 2 files changed, 42 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/cpu_device_id.h b/sys/compat/linuxkpi/common/include/asm/cpu_device_id.h new file mode 100644 index 000000000000..a01d63a75a7e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/asm/cpu_device_id.h @@ -0,0 +1,33 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_ASM_CPU_DEVICE_ID_H_ +#define _LINUXKPI_ASM_CPU_DEVICE_ID_H_ + +#define VFM_MODEL_BIT 0 +#define VFM_FAMILY_BIT 8 +#define VFM_VENDOR_BIT 16 +#define VFM_RSVD_BIT 24 + +#define VFM_MODEL_MASK GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT) +#define VFM_FAMILY_MASK GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT) +#define VFM_VENDOR_MASK GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT) + +#define VFM_MODEL(vfm) (((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT) +#define VFM_FAMILY(vfm) (((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT) +#define VFM_VENDOR(vfm) (((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT) + +#define VFM_MAKE(_vendor, _family, _model) ( \ + ((_model) << VFM_MODEL_BIT) | \ + ((_family) << VFM_FAMILY_BIT) | \ + ((_vendor) << VFM_VENDOR_BIT) \ +) + +#include +#include +#include + +#endif /* _LINUXKPI_ASM_CPU_DEVICE_ID_H_ */ diff --git a/sys/compat/linuxkpi/common/include/asm/intel-family.h b/sys/compat/linuxkpi/common/include/asm/intel-family.h index 91ad1d1a8ff3..db815e0c012d 100644 --- a/sys/compat/linuxkpi/common/include/asm/intel-family.h +++ b/sys/compat/linuxkpi/common/include/asm/intel-family.h @@ -1,5 +1,14 @@ /* Public domain. */ +#define IFM(_fam, _model) VFM_MAKE(X86_VENDOR_INTEL, _fam, _model) + +#define INTEL_ALDERLAKE IFM(6, 0x97) +#define INTEL_ALDERLAKE_L IFM(6, 0x9A) + +#define INTEL_RAPTORLAKE IFM(6, 0xB7) +#define INTEL_RAPTORLAKE_P IFM(6, 0xBA) +#define INTEL_RAPTORLAKE_S IFM(6, 0xBF) + #define INTEL_FAM6_ALDERLAKE 0x97 #define INTEL_FAM6_ALDERLAKE_L 0x9A