• Home
  • Raw
  • Download

Lines Matching full:alt

44 static __always_inline bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)  in branch_insn_requires_update()  argument
46 unsigned long replptr = (unsigned long)ALT_REPL_PTR(alt); in branch_insn_requires_update()
47 return !(pc >= replptr && pc <= (replptr + alt->alt_len)); in branch_insn_requires_update()
52 static __always_inline u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr) in get_alt_insn() argument
69 if (branch_insn_requires_update(alt, target)) { in get_alt_insn()
97 static noinstr void patch_alternative(struct alt_instr *alt, in patch_alternative() argument
103 replptr = ALT_REPL_PTR(alt); in patch_alternative()
107 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()
146 if (!test_bit(alt->cpufeature, feature_mask)) in __apply_alternatives()
150 if (alt->cpufeature < ARM64_CB_PATCH && in __apply_alternatives()
151 !cpus_have_cap(alt->cpufeature)) in __apply_alternatives()
154 if (alt->cpufeature == ARM64_CB_PATCH) in __apply_alternatives()
155 BUG_ON(alt->alt_len != 0); in __apply_alternatives()
157 BUG_ON(alt->alt_len != alt->orig_len); in __apply_alternatives()
161 origptr = ALT_ORIG_PTR(alt); in __apply_alternatives()
163 nr_inst = alt->orig_len / AARCH64_INSN_SIZE; in __apply_alternatives()
165 if (alt->cpufeature < ARM64_CB_PATCH) in __apply_alternatives()
168 alt_cb = ALT_REPL_PTR(alt); in __apply_alternatives()
170 alt_cb(alt, origptr, updptr, nr_inst); in __apply_alternatives()