From nobody Thu Jun 18 14:57:39 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 4gh3jw1Jnrz6hMNt for ; Thu, 18 Jun 2026 14:57:40 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gh3jv6p3Yz43xX for ; Thu, 18 Jun 2026 14:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781794660; 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=RD41JtZ3nV0kHcqBTqe2PCnt4fB2YhiU3lurUPNI/a4=; b=xOXnV/A3UO/VgAlkEPSLtSSpBjQOa8S0iA5QmNAiwODicgTVUw9UkgTHWXJA5au+cSUBsJ bf8LPlIIFkMEjp054AKAEOizdussJ8FqYVpOaKrys++bb9jSw7rABLtuRnB45uvVlmZNG2 1cd3wlGdGB2K5wh7HQkiT8EgPUQSDITibxMVhmC8kKAM7X26+gkWWCByLJuebk1QB/EIBp gFze5tVrxxIr05JBbx2IU5ymFwCyI1QN/yQvpxWO5Z+sHoUJ9AEr8lpxDqtYs7+nkhQnUA UTcNBRzgK/dPQFA9XRZpPDqp7eRuomrWE+YSQ2Y5mIzX2MWDHO974v0cjRR83w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781794660; a=rsa-sha256; cv=none; b=g3x/74vhX+wy5fpbL74GaScbXSYwCS5UbCgUqCtEHA+7sjcA6dTs36lfyd1QiOTySxN/Je 2jXnXFUAhhhMPZ9wNUVka0GwEp8R5s2QxiBDFoWSUuWJ5f5s760VvLOZaGT1Zr3lddx/Yl Ikd17hM42AgOdtuT3t/bnXe8kyCnN+/mKZuO0gyPGvv0Xv6OeQwK3k1ViLd24wjJrWbn1K cm6gAmd0wzkRfcr4o1nmKBI9+Kp6ObX3hXElNZ3p7H5ftpeTm+pVm/fZJMWsLwakpp1S0F lzAdoirF+nKNW0ZvmqmdDPyaWLltp5TcM33PyIvHS+JTS5Nb54GD0tQTAI1Znw== 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=1781794660; 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=RD41JtZ3nV0kHcqBTqe2PCnt4fB2YhiU3lurUPNI/a4=; b=FAsMeVVpzbpUxskZG6SvfvBzuvc8DE/ipg4SWJW1W7YbCN63540Yr2Ug9XFD7SUb0m9pnC fVwe22PTnOzjDRFY+zL5oKbwVEy3v3d9uibVTVxTne1Wbv975Gf9oIIaDDTPRhptBKQIWs /Fqkhc+IQHfGE5kxkZyEZbQ8f/0QTYNVi9RxEyS25efXYefFUA6Si+6Or4ej5l/SNH0OmD mwWfnaQ+KdHRnoxdXnJTWlbyDVyMmv7iMpauDXiTX3PPZHZsv8SdFahWKOm9Ry3GH7brSA o71bgz76EM21fc6TdKJwtJkvpYCfJEJjMVzWLWAu0oOnZflRuCo+rIOhToLdeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gh3jv55Chz12td for ; Thu, 18 Jun 2026 14:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f5e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Jun 2026 14:57:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: cd94485281f3 - main - arm64: Add FEAT_ALWAYS_ENABLE to cpu_feat 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd94485281f3fc6ae5414180420527ce11846742 Auto-Submitted: auto-generated Date: Thu, 18 Jun 2026 14:57:39 +0000 Message-Id: <6a340763.3f5e5.41d762a3@gitrepo.freebsd.org> The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cd94485281f3fc6ae5414180420527ce11846742 commit cd94485281f3fc6ae5414180420527ce11846742 Author: Andrew Turner AuthorDate: 2026-06-18 13:34:47 +0000 Commit: Andrew Turner CommitDate: 2026-06-18 14:56:53 +0000 arm64: Add FEAT_ALWAYS_ENABLE to cpu_feat A use for it has been found in the GICv5 driver where we need to read the Interrupt Affinity ID early in the boot on the secondary CPUs. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54249 --- sys/arm64/arm64/cpu_feat.c | 24 +++++++++++++----------- sys/arm64/include/cpu_feat.h | 7 ++++++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c index 94114d47f846..8b8af5fc7cf7 100644 --- a/sys/arm64/arm64/cpu_feat.c +++ b/sys/arm64/arm64/cpu_feat.c @@ -87,17 +87,19 @@ enable_cpu_feat(uint32_t stage) if (check_status == FEAT_ALWAYS_DISABLE) goto next; - /* The user disabled the feature */ - if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0) - goto next; - - /* - * The feature was disabled by default and the user - * didn't enable it then skip. - */ - if (check_status == FEAT_DEFAULT_DISABLE && - (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0) - goto next; + if (check_status != FEAT_ALWAYS_ENABLE) { + /* The user disabled the feature */ + if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0) + goto next; + + /* + * The feature was disabled by default and the user + * didn't enable it then skip. + */ + if (check_status == FEAT_DEFAULT_DISABLE && + (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0) + goto next; + } /* * Check if the feature has any errata that may need a diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h index 6a311d4000bb..5eff7f589d8b 100644 --- a/sys/arm64/include/cpu_feat.h +++ b/sys/arm64/include/cpu_feat.h @@ -62,7 +62,12 @@ typedef enum { */ FEAT_DEFAULT_ENABLE, - /* We could add FEAT_ALWAYS_ENABLE if a need was found. */ + /* + * Always enabled. Used when there is no way for the kernel to + * work without the feature, e.g. configuring the interrupt + * controller. + */ + FEAT_ALWAYS_ENABLE, } cpu_feat_en; #define CPU_FEAT_STAGE_MASK 0x00000001