Home
last modified time | relevance | path

Searched refs:ppc_inst (Results 1 – 25 of 32) sorted by relevance

12

/Linux-v5.15/arch/powerpc/include/asm/
Dinst.h13 struct ppc_inst __gui_inst; \
23 __gui_inst = ppc_inst(__prefix); \
46 struct ppc_inst { struct
53 static inline u32 ppc_inst_val(struct ppc_inst x) in ppc_inst_val() argument
58 static inline int ppc_inst_primary_opcode(struct ppc_inst x) in ppc_inst_primary_opcode()
63 #define ppc_inst(x) ((struct ppc_inst){ .val = (x) }) macro
66 #define ppc_inst_prefix(x, y) ((struct ppc_inst){ .val = (x), .suffix = (y) })
68 static inline u32 ppc_inst_suffix(struct ppc_inst x) in ppc_inst_suffix()
74 #define ppc_inst_prefix(x, y) ppc_inst(x)
76 static inline u32 ppc_inst_suffix(struct ppc_inst x) in ppc_inst_suffix()
[all …]
Dcode-patching.h27 int create_branch(struct ppc_inst *instr, const u32 *addr,
29 int create_cond_branch(struct ppc_inst *instr, const u32 *addr,
32 int patch_instruction(u32 *addr, struct ppc_inst instr);
33 int raw_patch_instruction(u32 *addr, struct ppc_inst instr);
40 static inline int patch_instruction_site(s32 *site, struct ppc_inst instr) in patch_instruction_site()
53 return patch_instruction(addr, ppc_inst((*addr & ~clr) | set)); in modify_instruction()
61 int instr_is_relative_branch(struct ppc_inst instr);
62 int instr_is_relative_link_branch(struct ppc_inst instr);
64 int translate_branch(struct ppc_inst *instr, const u32 *dest, const u32 *src);
65 extern bool is_conditional_branch(struct ppc_inst instr);
Dhw_breakpoint.h59 bool wp_check_constraints(struct pt_regs *regs, struct ppc_inst instr,
63 void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
Dsstep.h148 struct ppc_inst instr);
165 extern int emulate_step(struct pt_regs *regs, struct ppc_inst instr);
/Linux-v5.15/arch/powerpc/lib/
Dcode-patching.c21 static int __patch_instruction(u32 *exec_addr, struct ppc_inst instr, u32 *patch_addr) in __patch_instruction()
42 int raw_patch_instruction(u32 *addr, struct ppc_inst instr) in raw_patch_instruction()
144 static int do_patch_instruction(u32 *addr, struct ppc_inst instr) in do_patch_instruction()
183 static int do_patch_instruction(u32 *addr, struct ppc_inst instr) in do_patch_instruction()
190 int patch_instruction(u32 *addr, struct ppc_inst instr) in patch_instruction()
203 struct ppc_inst instr; in patch_branch()
240 bool is_conditional_branch(struct ppc_inst instr) in is_conditional_branch()
258 int create_branch(struct ppc_inst *instr, const u32 *addr, in create_branch()
263 *instr = ppc_inst(0); in create_branch()
273 *instr = ppc_inst(0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC)); in create_branch()
[all …]
Dtest_emulate_step.c56 #define TEST_SETB(t, bfa) ppc_inst(PPC_INST_SETB | ___PPC_RT(t) | ___PPC_RA((bfa & 0x7) << 2))
102 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LD(5, 3, 0))); in test_ld()
143 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LWZ(5, 3, 0))); in test_lwz()
187 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LWZX(5, 3, 4))); in test_lwzx()
205 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STD(5, 3, 0))); in test_std()
253 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LDARX(5, 3, 4, 0))); in test_ldarx_stdcx()
271 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STDCX(5, 3, 4))); in test_ldarx_stdcx()
311 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LFSX(10, 3, 4))); in test_lfsx_stfsx()
324 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STFSX(10, 3, 4))); in test_lfsx_stfsx()
401 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LFDX(10, 3, 4))); in test_lfdx_stfdx()
[all …]
Dfeature-fixups.c50 struct ppc_inst instr; in patch_alt_instruction()
95 raw_patch_instruction(dest, ppc_inst(PPC_RAW_NOP())); in patch_feature_section()
154 patch_instruction(dest, ppc_inst(instrs[0])); in do_stf_entry_barrier_fixups()
155 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_stf_entry_barrier_fixups()
159 patch_instruction(dest + 1, ppc_inst(instrs[1])); in do_stf_entry_barrier_fixups()
160 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_stf_entry_barrier_fixups()
161 patch_instruction(dest, ppc_inst(instrs[0])); in do_stf_entry_barrier_fixups()
214 patch_instruction(dest, ppc_inst(instrs[0])); in do_stf_exit_barrier_fixups()
215 patch_instruction(dest + 1, ppc_inst(instrs[1])); in do_stf_exit_barrier_fixups()
216 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_stf_exit_barrier_fixups()
[all …]
/Linux-v5.15/arch/powerpc/kernel/trace/
Dftrace.c44 static struct ppc_inst
47 struct ppc_inst op; in ftrace_call_replace()
58 ftrace_modify_code(unsigned long ip, struct ppc_inst old, struct ppc_inst new) in ftrace_modify_code()
60 struct ppc_inst replaced; in ftrace_modify_code()
93 struct ppc_inst op; in test_24bit_addr()
100 static int is_bl_op(struct ppc_inst op) in is_bl_op()
105 static int is_b_op(struct ppc_inst op) in is_b_op()
110 static unsigned long find_bl_target(unsigned long ip, struct ppc_inst op) in find_bl_target()
130 struct ppc_inst op, pop; in __ftrace_make_nop()
165 pop = ppc_inst(PPC_RAW_NOP()); in __ftrace_make_nop()
[all …]
/Linux-v5.15/arch/powerpc/kernel/
Doptprobes.c129 patch_instruction(addr++, ppc_inst(PPC_RAW_LIS(reg, PPC_HI(val)))); in patch_imm32_load_insns()
130 patch_instruction(addr, ppc_inst(PPC_RAW_ORI(reg, reg, PPC_LO(val)))); in patch_imm32_load_insns()
139 patch_instruction(addr++, ppc_inst(PPC_RAW_LIS(reg, PPC_HIGHEST(val)))); in patch_imm64_load_insns()
140 patch_instruction(addr++, ppc_inst(PPC_RAW_ORI(reg, reg, PPC_HIGHER(val)))); in patch_imm64_load_insns()
141 patch_instruction(addr++, ppc_inst(PPC_RAW_SLDI(reg, reg, 32))); in patch_imm64_load_insns()
142 patch_instruction(addr++, ppc_inst(PPC_RAW_ORIS(reg, reg, PPC_HI(val)))); in patch_imm64_load_insns()
143 patch_instruction(addr, ppc_inst(PPC_RAW_ORI(reg, reg, PPC_LO(val)))); in patch_imm64_load_insns()
156 struct ppc_inst branch_op_callback, branch_emulate_step, temp; in arch_prepare_optimized_kprobe()
195 rc = patch_instruction(buff + i, ppc_inst(*(optprobe_template_entry + i))); in arch_prepare_optimized_kprobe()
272 struct ppc_inst instr; in arch_optimize_kprobes()
Dsecurity.c444 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
445 patch_instruction_site(site2, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
455 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
457 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
459 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
470 patch_instruction_site(site, ppc_inst(0x39207fff)); // li r9,0x7fff in update_branch_cache_flush()
472 patch_instruction_site(site, ppc_inst(0x7d2903a6)); // mtctr r9 in update_branch_cache_flush()
474 patch_instruction_site(site, ppc_inst(PPC_INST_BCCTR_FLUSH)); in update_branch_cache_flush()
482 ppc_inst(PPC_RAW_BLR())); in update_branch_cache_flush()
487 ppc_inst(PPC_RAW_BLR())); in update_branch_cache_flush()
Depapr_paravirt.c40 struct ppc_inst inst = ppc_inst(be32_to_cpu(insts[i])); in early_init_dt_scan_epapr()
Dhw_breakpoint_constraints.c83 bool wp_check_constraints(struct pt_regs *regs, struct ppc_inst instr, in wp_check_constraints()
100 if (unlikely(ppc_inst_equal(instr, ppc_inst(0)))) { in wp_check_constraints()
139 void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr, in wp_get_instr_detail()
Dsetup_32.c78 struct ppc_inst insn; in machine_init()
88 patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_RAW_NOP())); in machine_init()
Dkprobes.c127 struct ppc_inst insn = ppc_inst_read(p->addr); in arch_prepare_kprobe()
168 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(BREAKPOINT_INSTRUCTION))); in arch_arm_kprobe()
174 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(p->opcode))); in arch_disarm_kprobe()
247 struct ppc_inst insn = ppc_inst_read(p->ainsn.insn); in try_to_emulate()
Djump_label.c19 patch_instruction(addr, ppc_inst(PPC_RAW_NOP())); in arch_jump_label_transform()
Dhw_breakpoint.c526 struct ppc_inst instr) in stepping_handler()
619 struct ppc_inst instr = ppc_inst(0); in hw_breakpoint_handler()
648 ppc_inst_equal(instr, ppc_inst(0))) { in hw_breakpoint_handler()
Dalign.c108 struct ppc_inst ppc_instr) in emulate_spe()
303 struct ppc_inst instr; in fix_alignment()
Dcrash_dump.c48 patch_instruction(p, ppc_inst(PPC_RAW_NOP())); in create_trampoline()
Dkgdb.c427 err = patch_instruction(addr, ppc_inst(BREAK_INSTR)); in kgdb_arch_set_breakpoint()
442 err = patch_instruction(addr, ppc_inst(instr)); in kgdb_arch_remove_breakpoint()
/Linux-v5.15/arch/powerpc/xmon/
Dxmon_bpts.h8 #define BPT_SIZE (sizeof(struct ppc_inst) * 2)
9 #define BPT_WORDS (BPT_SIZE / sizeof(struct ppc_inst))
Dxmon.c128 static int mread_instr(unsigned long, struct ppc_inst *);
911 struct ppc_inst instr, instr2; in insert_bpts()
955 ppc_inst(bpinstr)); in insert_bpts()
959 ppc_inst(bpinstr)) != 0) { in insert_bpts()
991 struct ppc_inst instr; in remove_bpts()
998 && ppc_inst_equal(instr, ppc_inst(bpinstr)) in remove_bpts()
1207 struct ppc_inst instr; in do_step()
1462 struct ppc_inst instr; in check_bp_loc()
2303 mread_instr(unsigned long adrs, struct ppc_inst *instr) in mread_instr()
3023 struct ppc_inst inst, last_inst = ppc_inst(0); in generic_inst_dump()
/Linux-v5.15/arch/powerpc/mm/
Dmaccess.c15 int copy_inst_from_kernel_nofault(struct ppc_inst *inst, u32 *src) in copy_inst_from_kernel_nofault()
27 *inst = ppc_inst(val); in copy_inst_from_kernel_nofault()
/Linux-v5.15/arch/powerpc/mm/nohash/
D44x.c251 patch_instruction_site(&patch__tlb_44x_kuep, ppc_inst(PPC_RAW_NOP())); in setup_kuep()
256 patch_instruction_site(&patch__tlb_47x_kuep, ppc_inst(PPC_RAW_NOP())); in setup_kuep()
/Linux-v5.15/arch/powerpc/perf/
D8xx-pmu.c156 struct ppc_inst insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2)); in mpc8xx_pmu_del()
/Linux-v5.15/arch/powerpc/platforms/86xx/
Dmpc86xx_smp.c86 patch_instruction(vector, ppc_inst(save_vector)); in smp_86xx_kick_cpu()

12