Lines Matching full:alt

51 static __always_inline bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)  in branch_insn_requires_update()  argument
53 unsigned long replptr = (unsigned long)ALT_REPL_PTR(alt); in branch_insn_requires_update()
54 return !(pc >= replptr && pc <= (replptr + alt->alt_len)); in branch_insn_requires_update()
59 static __always_inline u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr) in get_alt_insn() argument
76 if (branch_insn_requires_update(alt, target)) { in get_alt_insn()
104 static noinstr void patch_alternative(struct alt_instr *alt, in patch_alternative() argument
110 replptr = ALT_REPL_PTR(alt); in patch_alternative()
114 insn = get_alt_insn(alt, origptr + i, replptr + i); in patch_alternative()
146 struct alt_instr *alt; in __apply_alternatives() local
150 for (alt = region->begin; alt < region->end; alt++) { in __apply_alternatives()
152 int cap = ALT_CAP(alt); in __apply_alternatives()
160 if (ALT_HAS_CB(alt)) in __apply_alternatives()
161 BUG_ON(alt->alt_len != 0); in __apply_alternatives()
163 BUG_ON(alt->alt_len != alt->orig_len); in __apply_alternatives()
165 origptr = ALT_ORIG_PTR(alt); in __apply_alternatives()
167 nr_inst = alt->orig_len / AARCH64_INSN_SIZE; in __apply_alternatives()
169 if (ALT_HAS_CB(alt)) in __apply_alternatives()
170 alt_cb = ALT_REPL_PTR(alt); in __apply_alternatives()
174 alt_cb(alt, origptr, updptr, nr_inst); in __apply_alternatives()
203 const struct elf64_shdr *alt; in apply_alternatives_vdso() local
210 alt = find_section(hdr, shdr, ".altinstructions"); in apply_alternatives_vdso()
211 if (!alt) in apply_alternatives_vdso()
215 .begin = (void *)hdr + alt->sh_offset, in apply_alternatives_vdso()
216 .end = (void *)hdr + alt->sh_offset + alt->sh_size, in apply_alternatives_vdso()
294 noinstr void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr, in alt_cb_patch_nops() argument