Lines Matching +full:non +full:- +full:pc
1 // SPDX-License-Identifier: GPL-2.0-only
23 #define __ALT_PTR(a, f) ((void *)&(a)->f + (a)->f)
27 #define ALT_CAP(a) ((a)->cpucap & ~ARM64_CB_BIT)
28 #define ALT_HAS_CB(a) ((a)->cpucap & ARM64_CB_BIT)
49 * Check if the target PC is within an alternative block.
51 static __always_inline bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc) in branch_insn_requires_update() argument
54 return !(pc >= replptr && pc <= (replptr + alt->alt_len)); in branch_insn_requires_update()
57 #define align_down(x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1))
77 offset = target - (unsigned long)insnptr; in get_alt_insn()
85 * If we're replacing an adrp instruction, which uses PC-relative in get_alt_insn()
87 * PC. adrp operates on 4K aligned addresses. in get_alt_insn()
91 new_offset = target - align_down(insnptr, SZ_4K); in get_alt_insn()
95 * Disallow patching unhandled instructions using PC relative in get_alt_insn()
120 * We provide our own, private D-cache cleaning function so that we don't
131 cur = start & ~(d_size - 1); in clean_dcache_range_nopatch()
135 * Cortex-A53 errata 826319, 827319, 824069 and 819472 in clean_dcache_range_nopatch()
150 for (alt = region->begin; alt < region->end; 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()
167 nr_inst = alt->orig_len / AARCH64_INSN_SIZE; in __apply_alternatives()
209 shdr = (void *)hdr + hdr->e_shoff; 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()
256 pr_info("applying system-wide alternatives\n"); in apply_alternatives_all()
270 /* If called on non-boot cpu things could go wrong */ in apply_boot_alternatives()