@@ -148,45 +148,45 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
148
148
*/
149
149
static __always_inline __pure bool _static_cpu_has (u16 bit )
150
150
{
151
- asm_volatile_goto ("1: jmp 6f\n"
152
- "2:\n"
153
- ".skip -(((5f-4f) - (2b-1b)) > 0) * "
154
- "((5f-4f) - (2b-1b)),0x90\n"
155
- "3:\n"
156
- ".section .altinstructions,\"a\"\n"
157
- " .long 1b - .\n" /* src offset */
158
- " .long 4f - .\n" /* repl offset */
159
- " .word %P1\n" /* always replace */
160
- " .byte 3b - 1b\n" /* src len */
161
- " .byte 5f - 4f\n" /* repl len */
162
- " .byte 3b - 2b\n" /* pad len */
163
- ".previous\n"
164
- ".section .altinstr_replacement,\"ax\"\n"
165
- "4: jmp %l[t_no]\n"
166
- "5:\n"
167
- ".previous\n"
168
- ".section .altinstructions,\"a\"\n"
169
- " .long 1b - .\n" /* src offset */
170
- " .long 0\n" /* no replacement */
171
- " .word %P0\n" /* feature bit */
172
- " .byte 3b - 1b\n" /* src len */
173
- " .byte 0\n" /* repl len */
174
- " .byte 0\n" /* pad len */
175
- ".previous\n"
176
- ".section .altinstr_aux,\"ax\"\n"
177
- "6:\n"
178
- " testb %[bitnum],%[cap_byte]\n"
179
- " jnz %l[t_yes]\n"
180
- " jmp %l[t_no]\n"
181
- ".previous\n"
182
- : : "i " (bit ), "i" (X86_FEATURE_ALWAYS ),
183
- [bitnum ] "i" (1 << (bit & 7 )),
184
- [cap_byte ] "m" (((const char * )boot_cpu_data .x86_capability )[bit >> 3 ])
185
- : : t_yes , t_no );
186
- t_yes :
187
- return true;
188
- t_no :
189
- return false;
151
+ asm_volatile_goto ("1: jmp 6f\n"
152
+ "2:\n"
153
+ ".skip -(((5f-4f) - (2b-1b)) > 0) * "
154
+ "((5f-4f) - (2b-1b)),0x90\n"
155
+ "3:\n"
156
+ ".section .altinstructions,\"a\"\n"
157
+ " .long 1b - .\n" /* src offset */
158
+ " .long 4f - .\n" /* repl offset */
159
+ " .word %P1\n" /* always replace */
160
+ " .byte 3b - 1b\n" /* src len */
161
+ " .byte 5f - 4f\n" /* repl len */
162
+ " .byte 3b - 2b\n" /* pad len */
163
+ ".previous\n"
164
+ ".section .altinstr_replacement,\"ax\"\n"
165
+ "4: jmp %l[t_no]\n"
166
+ "5:\n"
167
+ ".previous\n"
168
+ ".section .altinstructions,\"a\"\n"
169
+ " .long 1b - .\n" /* src offset */
170
+ " .long 0\n" /* no replacement */
171
+ " .word %P0\n" /* feature bit */
172
+ " .byte 3b - 1b\n" /* src len */
173
+ " .byte 0\n" /* repl len */
174
+ " .byte 0\n" /* pad len */
175
+ ".previous\n"
176
+ ".section .altinstr_aux,\"ax\"\n"
177
+ "6:\n"
178
+ " testb %[bitnum],%[cap_byte]\n"
179
+ " jnz %l[t_yes]\n"
180
+ " jmp %l[t_no]\n"
181
+ ".previous\n"
182
+ : : "i " (bit ), "i" (X86_FEATURE_ALWAYS ),
183
+ [bitnum ] "i" (1 << (bit & 7 )),
184
+ [cap_byte ] "m" (((const char * )boot_cpu_data .x86_capability )[bit >> 3 ])
185
+ : : t_yes , t_no );
186
+ t_yes :
187
+ return true;
188
+ t_no :
189
+ return false;
190
190
}
191
191
192
192
#define static_cpu_has (bit ) \
0 commit comments