git: 1c375ad453c0 - stable/14 - arm64: Add a macro to create cpu_feat
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 15 Jan 2026 14:50:59 UTC
The branch stable/14 has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=1c375ad453c000f64aa4f48eb4709bd5d3383bf7
commit 1c375ad453c000f64aa4f48eb4709bd5d3383bf7
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-09-04 14:23:23 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-01-14 21:14:11 +0000
arm64: Add a macro to create cpu_feat
This will be used later to extend cpu feature detection
Reviewed by: imp (earlier version)
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D52356
(cherry picked from commit b3605a7bb6f8c58d939e642671ce70b0ce39b95e)
---
sys/arm64/include/cpu_feat.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h
index 9fe6a9dd95d9..6a0b2d78f526 100644
--- a/sys/arm64/include/cpu_feat.h
+++ b/sys/arm64/include/cpu_feat.h
@@ -64,6 +64,16 @@ struct cpu_feat {
};
SET_DECLARE(cpu_feat_set, struct cpu_feat);
+#define CPU_FEAT(name, check, has_errata, enable, flags) \
+static struct cpu_feat name = { \
+ .feat_name = #name, \
+ .feat_check = check, \
+ .feat_has_errata = has_errata, \
+ .feat_enable = enable, \
+ .feat_flags = flags, \
+}; \
+DATA_SET(cpu_feat_set, name)
+
/*
* Allow drivers to mark an erratum as worked around, e.g. the Errata
* Management ABI may know the workaround isn't needed on a given system.