Home
last modified time | relevance | path

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

12

/linux-6.6.21/arch/powerpc/lib/
Dtest_emulate_step.c99 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LD(5, 3, 0))); in test_ld()
140 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LWZ(5, 3, 0))); in test_lwz()
184 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LWZX(5, 3, 4))); in test_lwzx()
202 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STD(5, 3, 0))); in test_std()
250 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LDARX(5, 3, 4, 0))); in test_ldarx_stdcx()
268 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STDCX(5, 3, 4))); in test_ldarx_stdcx()
308 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LFSX(10, 3, 4))); in test_lfsx_stfsx()
321 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STFSX(10, 3, 4))); in test_lfsx_stfsx()
398 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_LFDX(10, 3, 4))); in test_lfdx_stfdx()
411 stepped = emulate_step(&regs, ppc_inst(PPC_RAW_STFDX(10, 3, 4))); in test_lfdx_stfdx()
[all …]
Dtest-code-patching.c39 check(instr_is_branch_iform(ppc_inst(0x48000000))); in test_branch_iform()
41 check(instr_is_branch_iform(ppc_inst(0x4bffffff))); in test_branch_iform()
43 check(!instr_is_branch_iform(ppc_inst(0xcbffffff))); in test_branch_iform()
45 check(!instr_is_branch_iform(ppc_inst(0x7bffffff))); in test_branch_iform()
48 check(instr_is_branch_iform(ppc_inst(0x48000001))); in test_branch_iform()
50 check(instr_is_branch_iform(ppc_inst(0x4bfffffd))); in test_branch_iform()
52 check(instr_is_branch_iform(ppc_inst(0x4bff00fd))); in test_branch_iform()
54 check(!instr_is_branch_iform(ppc_inst(0x7bfffffd))); in test_branch_iform()
57 ppc_inst_write(iptr, ppc_inst(0x48000103)); in test_branch_iform()
60 ppc_inst_write(iptr, ppc_inst(0x480420ff)); in test_branch_iform()
[all …]
Dfeature-fixups.c96 raw_patch_instruction(dest, ppc_inst(PPC_RAW_NOP())); in patch_feature_section_mask()
148 patch_instruction(dest + j, ppc_inst(instrs[j])); in do_patch_fixups()
170 patch_instruction(dest, ppc_inst(instrs[0])); in do_patch_entry_fixups()
171 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_patch_entry_fixups()
174 patch_instruction(dest + 1, ppc_inst(instrs[1])); in do_patch_entry_fixups()
175 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_patch_entry_fixups()
176 patch_instruction(dest, ppc_inst(instrs[0])); in do_patch_entry_fixups()
569 patch_instruction(start, ppc_inst(PPC_RAW_NOP())); in patch_btb_flush_section()
598 raw_patch_instruction(dest, ppc_inst(PPC_INST_LWSYNC)); in do_lwsync_fixups()
Dcode-patching.c427 *instr = ppc_inst(0x40000000 | (flags & 0x3FF0003) | (offset & 0xFFFC)); in create_cond_branch()
/linux-6.6.21/arch/powerpc/kernel/trace/
Dftrace.c144 old = ppc_inst(PPC_RAW_NOP()); in ftrace_make_call()
165 ppc_inst_t nop_inst = ppc_inst(PPC_RAW_NOP()); in ftrace_replace_code()
225 ret = ftrace_validate_inst(ip - 4, ppc_inst(PPC_RAW_NOP())); in ftrace_init_nop()
227 ret = ftrace_validate_inst(ip, ppc_inst(PPC_RAW_NOP())); in ftrace_init_nop()
230 ret = ftrace_validate_inst(ip - 8, ppc_inst(PPC_RAW_MFLR(_R0))); in ftrace_init_nop()
232 ret = ftrace_validate_inst(ip - 4, ppc_inst(PPC_RAW_STW(_R0, _R1, 4))); in ftrace_init_nop()
236 if (!ret && !ppc_inst_equal(old, ppc_inst(PPC_RAW_MFLR(_R0)))) { in ftrace_init_nop()
237 ret = ftrace_validate_inst(ip - 8, ppc_inst(PPC_RAW_MFLR(_R0))); in ftrace_init_nop()
238 ret |= ftrace_validate_inst(ip - 4, ppc_inst(PPC_RAW_STD(_R0, _R1, 16))); in ftrace_init_nop()
256 new = ppc_inst(PPC_RAW_NOP()); in ftrace_init_nop()
[all …]
Dftrace_64_pg.c160 if (!ppc_inst_equal(op, ppc_inst(PPC_RAW_MFLR(_R0))) && in __ftrace_make_nop()
161 !ppc_inst_equal(op, ppc_inst(PPC_INST_STD_LR))) { in __ftrace_make_nop()
176 if (!ppc_inst_equal(op, ppc_inst(PPC_INST_LD_TOC))) { in __ftrace_make_nop()
199 pop = ppc_inst(PPC_RAW_NOP()); in __ftrace_make_nop()
201 pop = ppc_inst(PPC_RAW_BRANCH(8)); /* b +8 */ in __ftrace_make_nop()
334 if (patch_instruction((u32 *)ip, ppc_inst(PPC_RAW_NOP()))) { in __ftrace_make_nop_kernel()
356 new = ppc_inst(PPC_RAW_NOP()); in ftrace_make_nop()
397 return ppc_inst_equal(op0, ppc_inst(PPC_RAW_NOP())); in expected_nop_sequence()
399 return ppc_inst_equal(op0, ppc_inst(PPC_RAW_BRANCH(8))) && in expected_nop_sequence()
400 ppc_inst_equal(op1, ppc_inst(PPC_INST_LD_TOC)); in expected_nop_sequence()
[all …]
/linux-6.6.21/arch/powerpc/include/asm/
Dinst.h24 __gui_inst = ppc_inst(__prefix); \
46 #define ppc_inst(x) ((ppc_inst_t){ .val = (x) }) macro
53 #define ppc_inst(x) (x) macro
70 #define ppc_inst_prefix(x, y) ((void)y, ppc_inst(x))
84 return ppc_inst(*ptr); in ppc_inst_read()
155 *inst = ppc_inst(val); in __copy_inst_from_kernel_nofault()
Dcode-patching.h57 *instr = ppc_inst(0); in create_branch()
67 *instr = ppc_inst(0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC)); in create_branch()
96 return patch_instruction(addr, ppc_inst((*addr & ~clr) | set)); in modify_instruction()
Dkvm_ppc.h341 *inst = ppc_inst(KVM_INST_FETCH_FAILED); in kvmppc_get_last_inst()
362 *inst = ppc_inst(fetched_inst); in kvmppc_get_last_inst()
/linux-6.6.21/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()
195 rc = patch_instruction(buff + i, ppc_inst(*(optprobe_template_entry + i))); in arch_prepare_optimized_kprobe()
Dstatic_call.c20 err = patch_instruction(tramp + PPC_SCT_DATA, ppc_inst(target)); in arch_static_call_transform()
26 err = patch_instruction(tramp, ppc_inst(PPC_RAW_BLR())); in arch_static_call_transform()
30 err = patch_instruction(tramp, ppc_inst(PPC_RAW_NOP())); in arch_static_call_transform()
Dsecurity.c446 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
447 patch_instruction_site(site2, 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()
461 patch_instruction_site(site, ppc_inst(PPC_RAW_NOP())); in update_branch_cache_flush()
472 patch_instruction_site(site, ppc_inst(0x39207fff)); // li r9,0x7fff in update_branch_cache_flush()
474 patch_instruction_site(site, ppc_inst(0x7d2903a6)); // mtctr r9 in update_branch_cache_flush()
476 patch_instruction_site(site, ppc_inst(PPC_INST_BCCTR_FLUSH)); in update_branch_cache_flush()
484 ppc_inst(PPC_RAW_BLR())); in update_branch_cache_flush()
489 ppc_inst(PPC_RAW_BLR())); in update_branch_cache_flush()
Dmodule_32.c177 if (patch_instruction(&entry->jump[0], ppc_inst(PPC_RAW_LIS(_R12, PPC_HA(val))))) in do_plt_call()
179 if (patch_instruction(&entry->jump[1], ppc_inst(PPC_RAW_ADDI(_R12, _R12, PPC_LO(val))))) in do_plt_call()
181 if (patch_instruction(&entry->jump[2], ppc_inst(PPC_RAW_MTCTR(_R12)))) in do_plt_call()
183 if (patch_instruction(&entry->jump[3], ppc_inst(PPC_RAW_BCTR()))) in do_plt_call()
193 return patch_instruction(loc, ppc_inst((*loc & 0xffff0000) | value)); in patch_location_16()
261 if (patch_instruction(location, ppc_inst(value))) in apply_relocate_add()
Dmodule_64.c611 ppc_inst(ppc64_stub_insns[i]))) in create_stub()
643 ppc_inst(entry->jump[0] | PPC_HA(reladdr)))) in create_stub()
647 ppc_inst(entry->jump[1] | PPC_LO(reladdr)))) in create_stub()
655 ppc_inst(((u32 *)(&desc))[i]))) in create_stub()
659 if (patch_instruction(&entry->magic, ppc_inst(STUB_MAGIC))) in create_stub()
742 if (!instr_is_relative_link_branch(ppc_inst(*prev_insn))) in restore_r2()
761 return patch_instruction(instruction, ppc_inst(PPC_INST_LD_TOC)); in restore_r2()
909 if (patch_instruction((u32 *)location, ppc_inst(value))) in apply_relocate_add()
Djump_label.c19 patch_instruction(addr, ppc_inst(PPC_RAW_NOP())); in arch_jump_label_transform()
Depapr_paravirt.c40 ppc_inst_t inst = ppc_inst(be32_to_cpu(insts[i])); in early_init_dt_scan_epapr()
Dcrash_dump.c48 patch_instruction(p, ppc_inst(PPC_RAW_NOP())); in create_trampoline()
Dsetup_32.c89 patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_RAW_NOP())); in machine_init()
Dkprobes.c192 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(BREAKPOINT_INSTRUCTION))); in arch_arm_kprobe()
198 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(p->opcode))); in arch_disarm_kprobe()
Dkgdb.c424 err = patch_instruction(addr, ppc_inst(BREAK_INSTR)); in kgdb_arch_set_breakpoint()
439 err = patch_instruction(addr, ppc_inst(instr)); in kgdb_arch_remove_breakpoint()
Dhw_breakpoint.c386 ppc_inst_t instr = ppc_inst(0); in hw_breakpoint_handler()
417 ppc_inst_equal(instr, ppc_inst(0))) { in hw_breakpoint_handler()
Dhw_breakpoint_constraints.c100 if (unlikely(ppc_inst_equal(instr, ppc_inst(0)))) { in wp_check_constraints()
/linux-6.6.21/arch/powerpc/platforms/86xx/
Dmpc86xx_smp.c86 patch_instruction(vector, ppc_inst(save_vector)); in smp_86xx_kick_cpu()
/linux-6.6.21/arch/powerpc/perf/
D8xx-pmu.c156 ppc_inst_t insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2)); in mpc8xx_pmu_del()
/linux-6.6.21/arch/powerpc/platforms/powermac/
Dsmp.c828 patch_instruction(vector, ppc_inst(save_vector)); in smp_core99_kick_cpu()

12