Lines Matching full:alt
45 static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc) in branch_insn_requires_update() argument
47 unsigned long replptr = (unsigned long)ALT_REPL_PTR(alt); in branch_insn_requires_update()
48 return !(pc >= replptr && pc <= (replptr + alt->alt_len)); in branch_insn_requires_update()
53 static u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr) in get_alt_insn() argument
70 if (branch_insn_requires_update(alt, target)) { in get_alt_insn()
98 static void patch_alternative(struct alt_instr *alt, in patch_alternative() argument
104 replptr = ALT_REPL_PTR(alt); in patch_alternative()
108 insn = get_alt_insn(alt, origptr + i, replptr + i); in patch_alternative()
138 struct alt_instr *alt; in __apply_alternatives() local
143 for (alt = region->begin; alt < region->end; alt++) { in __apply_alternatives()
147 if (alt->cpufeature < ARM64_CB_PATCH && in __apply_alternatives()
148 !cpus_have_cap(alt->cpufeature)) in __apply_alternatives()
151 if (alt->cpufeature == ARM64_CB_PATCH) in __apply_alternatives()
152 BUG_ON(alt->alt_len != 0); in __apply_alternatives()
154 BUG_ON(alt->alt_len != alt->orig_len); in __apply_alternatives()
158 origptr = ALT_ORIG_PTR(alt); in __apply_alternatives()
160 nr_inst = alt->orig_len / AARCH64_INSN_SIZE; in __apply_alternatives()
162 if (alt->cpufeature < ARM64_CB_PATCH) in __apply_alternatives()
165 alt_cb = ALT_REPL_PTR(alt); in __apply_alternatives()
167 alt_cb(alt, origptr, updptr, nr_inst); in __apply_alternatives()