git: e52a47446e50 - stable/15 - arm64: Fix the FEAT_WFxT check

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 22 Sep 2025 15:20:17 UTC
The branch stable/15 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=e52a47446e5068513ffb93929a896cab76b5bb26

commit e52a47446e5068513ffb93929a896cab76b5bb26
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-09-15 12:08:04 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-09-20 01:00:52 +0000

    arm64: Fix the FEAT_WFxT check
    
    The check was always true so would incorrectly enable the feature when
    it wasn't supported.
    
    Due to another bug this was harmless.
    
    Sponsored by:   Arm Ltd
    
    (cherry picked from commit 226375a1f6e3a71ca250c717e8d6d2c2e4b0b2e7)
---
 sys/arm/arm/generic_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
index 97976408c943..dacef8de2257 100644
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -889,7 +889,7 @@ wfxt_check(const struct cpu_feat *feat __unused, u_int midr __unused)
 
 	if (!get_kernel_reg(ID_AA64ISAR2_EL1, &id_aa64isar2))
 		return (FEAT_ALWAYS_DISABLE);
-	if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_NONE)
+	if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_IMPL)
 		return (FEAT_DEFAULT_ENABLE);
 
 	return (FEAT_ALWAYS_DISABLE);