Lines Matching +full:alternative +full:- +full:a

1 /* SPDX-License-Identifier: GPL-2.0 */
6 * Each alternative comes with a 32 bit feature field:
16 * @ctx is a bitfield, where only one bit must be set. Each bit defines
17 * in which context an alternative is supposed to be applied to the
20 * - from the decompressor before the kernel itself is executed
21 * - from early kernel code from within the kernel
23 * @type is a number which defines the type and with that the type
24 * specific alternative patching.
27 * alternative should be applied.
66 u32 type : 8; /* type of alternative */
88 * +---------------------------------+
91 * +---------------------------------+
94 * +---------------------------------+
96 * | alternative instr 1 |
97 * +---------------------------------+
99 * | alternative instr 2 |
100 * +---------------------------------+
103 * +---------------------------------+
105 * | alternative instr |
106 * +---------------------------------+
111 #define oldinstr_len "662b-661b"
112 #define altinstr_len(num) e_altinstr(num)"b-"b_altinstr(num)"b"
118 "\t.long 661b - .\n" /* old instruction */ \
119 "\t.long " b_altinstr(num)"b - .\n" /* alt instruction */ \
122 "\t.org . - (" oldinstr_len ") & 1\n" \
123 "\t.org . - (" oldinstr_len ") + (" altinstr_len(num) ")\n" \
124 "\t.org . - (" altinstr_len(num) ") + (" oldinstr_len ")\n"
129 /* alternative assembly primitive: */
130 #define ALTERNATIVE(oldinstr, altinstr, feature) \ macro
135 ".pushsection .altinstructions,\"a\"\n" \
145 ".pushsection .altinstructions,\"a\"\n" \
151 * Alternative instructions for different CPU types or capabilities.
157 * longer. altinstr is padded with jump and nops at run-time during patching.
162 #define alternative(oldinstr, altinstr, feature) \ macro
163 asm_inline volatile(ALTERNATIVE(oldinstr, altinstr, feature) : : : "memory")
169 /* Alternative inline assembly with input. */
171 asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) \
174 /* Like alternative_input, but with a single output argument */
176 asm_inline volatile(ALTERNATIVE(oldinstr, altinstr, feature) \
180 #define ASM_OUTPUT2(a...) a argument
194 .long \orig_start - .
195 .long \alt_start - .
197 .byte \orig_end - \orig_start
198 .org . - ( \orig_end - \orig_start ) & 1
199 .org . - ( \orig_end - \orig_start ) + ( \alt_end - \alt_start )
200 .org . - ( \alt_end - \alt_start ) + ( \orig_end - \orig_start )
204 * Define an alternative between two instructions. If @feature is
208 .macro ALTERNATIVE oldinstr, newinstr, feature
213 773: .pushsection .altinstructions,"a"
219 * Define an alternative between two instructions. If @feature is
229 774: .pushsection .altinstructions,"a"