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