From nobody Thu Jun 18 14:57:39 2026 X-Original-To: dev-commits-src-main@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 4gh3jv6qmTz6hM4y for ; Thu, 18 Jun 2026 14:57:39 +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 4gh3jv5x45z43qr 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=1781794659; 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=H21yxigU7doKlVjgaTlXXfN196Bwf2SLyUShimVj7hjHkJMRYrHa/WtUnmt8F5HnKJBbHx HsmlTA3y0U8t1ibpH1G7EmKxnzRdUG39tSNCzEKJ6xumuGQPhdaCi1bufAL133HhJfZyHu xK88NgbZyf8fI8dpuxQwNB/vh8AskYRWVwftNzxxFauqkXH3VZwsP2aumIiDu3W85bWPcM iJUxRvmG4CRFwVxnInDpDs9BIPCn+NJx5Lgzjg5RmT+vDsYcOLXmgp0muZIgWzDjHKLMsj 1M5fD76cZQ5EH61r0tbmXZz9Uh8PN8XuwFnl7yLT59LI+uKj4ZrwBrqUJWaNGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781794659; a=rsa-sha256; cv=none; b=KdEVMrg4e3OAAtZfMGbvdSJtqyVptgyW/cq23p8P1P81lqhccB0G3hV9HpFh0rfWrJ4HVi FB2GexKhKbnQzX96Nc+BVRnL2x0lunbgxFbnxsYnGZUJQR72OYV9XHVP4tdMw8+h/a52Yb 9L4YSkIZJPfsJWZ/Ft/heLjB4oMJE5FPXAt1yLhPsAi6U6Z1/1mDtdT9KAQkFg3qGBwRHt naosvVn6rtTv1NrZ/WryAJP1RO0us1nd5TjkuYcINu3SSd+Hs3npjb8ei5NSVlXeJYg+Eg /7XAqpSfYehogSWi/kNON/BPpfKI0ThHAkBz5qsNcyMH4LJ+vOFc23bY+0HTdg== 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=1781794659; 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=DT20UHDBti1uMJgbb1q/OdrfGhcnkr0J9kA92hYyR1R90EuEV64mdoFMrT5ET4OCLk1ckY 3tLpobMlDaMOV8AdGHY5Kg97DUygyBqGETL4rpTZp6Ml6faVFVYWK1lAO5q2SX7zY4F7Uj jQAfx+tK5FeYZhklhHn62WZvFSoQDP766umYkw0WBWEm83WL0LhNoMCT1eHN6HJ6INxIOY pS2c/Jt8yPJqo3PUvLexXXxK2Qx8c2x9HFtX6kgpGWfZOadcCfpzbtoAYz//iBJmlZ6idu dqS3byjYFyDDZSbYyaDKragHGot9EdFWZvo2AqxSX45Bdldd0VjyTPYP9E/L/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gh3jv4lFSz13HZ 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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