Lines Matching +full:non +full:- +full:pc
1 // SPDX-License-Identifier: GPL-2.0-only
20 #define __ALT_PTR(a, f) ((void *)&(a)->f + (a)->f)
43 * Check if the target PC is within an alternative block.
45 static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc) in branch_insn_requires_update() argument
48 return !(pc >= replptr && pc <= (replptr + alt->alt_len)); in branch_insn_requires_update()
51 #define align_down(x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1))
71 offset = target - (unsigned long)insnptr; in get_alt_insn()
79 * If we're replacing an adrp instruction, which uses PC-relative in get_alt_insn()
81 * PC. adrp operates on 4K aligned addresses. in get_alt_insn()
85 new_offset = target - align_down(insnptr, SZ_4K); in get_alt_insn()
89 * Disallow patching unhandled instructions using PC relative in get_alt_insn()
114 * We provide our own, private D-cache cleaning function so that we don't
125 cur = start & ~(d_size - 1); in clean_dcache_range_nopatch()
129 * Cortex-A53 errata 826319, 827319, 824069 and 819472 in clean_dcache_range_nopatch()
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()
163 nr_inst = alt->orig_len / AARCH64_INSN_SIZE; in __apply_alternatives()
165 if (alt->cpufeature < ARM64_CB_PATCH) in __apply_alternatives()
244 /* If called on non-boot cpu things could go wrong */ in apply_boot_alternatives()