@@ -130,14 +130,18 @@ x86_cap/bug_flags[] arrays in kernel/cpu/capflags.c. The names in the
130
130
resulting x86_cap/bug_flags[] are used to populate /proc/cpuinfo. The naming
131
131
of flags in the x86_cap/bug_flags[] are as follows:
132
132
133
- a: The name of the flag is from the string in X86_FEATURE_<name> by default.
134
- ----------------------------------------------------------------------------
135
- By default, the flag <name> in /proc/cpuinfo is extracted from the respective
136
- X86_FEATURE_<name> in cpufeatures.h. For example, the flag "avx2" is from
137
- X86_FEATURE_AVX2.
138
-
139
- b: The naming can be overridden.
140
- --------------------------------
133
+ a: Flags do not appear by default in /proc/cpuinfo
134
+ --------------------------------------------------
135
+
136
+ Feature flags are omitted by default from /proc/cpuinfo as it does not make
137
+ sense for the feature to be exposed to userspace in most cases. For example,
138
+ X86_FEATURE_ALWAYS is defined in cpufeatures.h but that flag is an internal
139
+ kernel feature used in the alternative runtime patching functionality. So the
140
+ flag does not appear in /proc/cpuinfo.
141
+
142
+ b: Specify a flag name if absolutely needed
143
+ -------------------------------------------
144
+
141
145
If the comment on the line for the #define X86_FEATURE_* starts with a
142
146
double-quote character (""), the string inside the double-quote characters
143
147
will be the name of the flags. For example, the flag "sse4_1" comes from
@@ -148,14 +152,6 @@ needed. For instance, /proc/cpuinfo is a userspace interface and must remain
148
152
constant. If, for some reason, the naming of X86_FEATURE_<name> changes, one
149
153
shall override the new naming with the name already used in /proc/cpuinfo.
150
154
151
- c: The naming override can be "", which means it will not appear in /proc/cpuinfo.
152
- ----------------------------------------------------------------------------------
153
- The feature shall be omitted from /proc/cpuinfo if it does not make sense for
154
- the feature to be exposed to userspace. For example, X86_FEATURE_ALWAYS is
155
- defined in cpufeatures.h but that flag is an internal kernel feature used
156
- in the alternative runtime patching functionality. So, its name is overridden
157
- with "". Its flag will not appear in /proc/cpuinfo.
158
-
159
155
Flags are missing when one or more of these happen
160
156
==================================================
161
157
0 commit comments