git: 2c85ff5441e6 - stable/15 - amd64 FRED: normalize the user-provided 'fred' knob value

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 03 Nov 2026 09:02:19 UTC
The branch stable/15 has been updated by kib:

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

commit 2c85ff5441e6702924603cf1279ebf88d5c8a898
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-29 01:26:04 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-03 09:01:17 +0000

    amd64 FRED: normalize the user-provided 'fred' knob value
    
    (cherry picked from commit 78962f9b66d1f84b957ddac3f528f184ba1f4739)
---
 sys/amd64/amd64/machdep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 4ba137234e96..c902e2fbc962 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1399,6 +1399,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 	    (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0 && !pti) {
 		fred = 1;
 		TUNABLE_INT_FETCH("hw.fred", &fred);
+		if (fred != 0)
+			fred = 1;
 	}
 
 	sched_instance_select();