Home
last modified time | relevance | path

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

12

/linux/arch/powerpc/lib/
H A 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 …]
H A 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 …]
H A Dfeature-fixups.c103 raw_patch_instruction(dest, ppc_inst(PPC_RAW_NOP())); in patch_feature_section_mask()
155 patch_instruction(dest + j, ppc_inst(instrs[j])); in do_patch_fixups()
177 patch_instruction(dest, ppc_inst(instrs[0])); in do_patch_entry_fixups()
178 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_patch_entry_fixups()
181 patch_instruction(dest + 1, ppc_inst(instrs[1])); in do_patch_entry_fixups()
182 patch_instruction(dest + 2, ppc_inst(instrs[2])); in do_patch_entry_fixups()
183 patch_instruction(dest, ppc_inst(instrs[0])); in do_patch_entry_fixups()
576 patch_instruction(start, ppc_inst(PPC_RAW_NOP())); in patch_btb_flush_section()
605 raw_patch_instruction(dest, ppc_inst(PPC_INST_LWSYNC)); in do_lwsync_fixups()
/linux/arch/powerpc/kernel/trace/
H A Dftrace.c356 old = ppc_inst(PPC_RAW_NOP()); in ftrace_make_call()
372 ret = ftrace_modify_code(rec->ip, ppc_inst(PPC_RAW_NOP()), in ftrace_make_call()
373 ppc_inst(PPC_RAW_BRANCH((long)ftrace_get_ool_stub(rec) - (long)rec->ip))); in ftrace_make_call()
391 ppc_inst_t nop_inst = ppc_inst(PPC_RAW_NOP()); in ftrace_replace_code()
446 call_inst = ppc_inst(PPC_RAW_BRANCH((long)ftrace_get_ool_stub(rec) - in ftrace_replace_code()
448 nop_inst = ppc_inst(PPC_RAW_NOP()); in ftrace_replace_code()
480 ret = ftrace_validate_inst(ip - 4, ppc_inst(PPC_RAW_NOP())); in ftrace_init_nop()
482 ret = ftrace_validate_inst(ip, ppc_inst(PPC_RAW_NOP())); in ftrace_init_nop()
485 ret = ftrace_validate_inst(ip - 8, ppc_inst(PPC_RAW_MFLR(_R0))); in ftrace_init_nop()
488 ret = ftrace_modify_code(ip - 4, ppc_inst(PPC_RAW_STW(_R0, _R1, 4)), in ftrace_init_nop()
[all …]
H A Dftrace_64_pg.c183 if (!ppc_inst_equal(op, ppc_inst(PPC_RAW_MFLR(_R0))) && in __ftrace_make_nop()
184 !ppc_inst_equal(op, ppc_inst(PPC_INST_STD_LR))) { in __ftrace_make_nop()
199 if (!ppc_inst_equal(op, ppc_inst(PPC_INST_LD_TOC))) { in __ftrace_make_nop()
222 pop = ppc_inst(PPC_RAW_NOP()); in __ftrace_make_nop()
224 pop = ppc_inst(PPC_RAW_BRANCH(8)); /* b +8 */ in __ftrace_make_nop()
357 if (patch_instruction((u32 *)ip, ppc_inst(PPC_RAW_NOP()))) { in __ftrace_make_nop_kernel()
379 new = ppc_inst(PPC_RAW_NOP()); in ftrace_make_nop()
399 return ppc_inst_equal(op0, ppc_inst(PPC_RAW_NOP())); in expected_nop_sequence()
401 return ppc_inst_equal(op0, ppc_inst(PPC_RAW_BRANCH(8))) && in expected_nop_sequence()
402 ppc_inst_equal(op1, ppc_inst(PPC_INST_LD_TOC)); in expected_nop_sequence()
[all …]
/linux/arch/powerpc/kernel/
H A Dstatic_call.c20 err = patch_instruction(site, ppc_inst(PPC_RAW_BLR())); in arch_static_call_transform()
31 err = patch_instruction(site, ppc_inst(PPC_RAW_NOP())); in arch_static_call_transform()
33 err = patch_instruction(site, ppc_inst(PPC_RAW_LI(_R3, 0))); in arch_static_call_transform()
48 err = patch_instruction(tramp, ppc_inst(PPC_RAW_BLR())); in arch_static_call_transform()
54 err = patch_instruction(tramp, ppc_inst(PPC_RAW_NOP())); in arch_static_call_transform()
H A 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()
H A 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()
H A 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()
H A Dmodule_64.c640 ppc_inst(ppc64_stub_insns[i]))) in create_stub()
672 ppc_inst(entry->jump[0] | PPC_HA(reladdr)))) in create_stub()
676 ppc_inst(entry->jump[1] | PPC_LO(reladdr)))) in create_stub()
771 if (!instr_is_relative_link_branch(ppc_inst(*prev_insn))) in restore_r2()
790 return patch_instruction(instruction, ppc_inst(PPC_INST_LD_TOC)); in restore_r2()
938 if (patch_instruction((u32 *)location, ppc_inst(value))) in apply_relocate_add()
H A Djump_label.c19 patch_instruction(addr, ppc_inst(PPC_RAW_NOP())); in arch_jump_label_transform()
H A Depapr_paravirt.c40 ppc_inst_t inst = ppc_inst(be32_to_cpu(insts[i])); in early_init_dt_scan_epapr()
H A Dkprobes.c176 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(BREAKPOINT_INSTRUCTION))); in arch_arm_kprobe()
182 WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(p->opcode))); in arch_disarm_kprobe()
H A Dcrash_dump.c49 patch_instruction(p, ppc_inst(PPC_RAW_NOP())); in create_trampoline()
H A 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()
H A 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()
H A Dsetup_32.c89 patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_RAW_NOP())); in machine_init()
H A Dhw_breakpoint_constraints.c100 if (unlikely(ppc_inst_equal(instr, ppc_inst(0)))) { in wp_check_constraints()
/linux/arch/powerpc/include/asm/
H A 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()
151 *inst = ppc_inst(val); in __copy_inst_from_kernel_nofault()
H A Dtext-patching.h57 *instr = ppc_inst(0); in create_branch()
67 *instr = ppc_inst(0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC)); in create_branch()
101 return patch_instruction(addr, ppc_inst(val)); in patch_uint()
109 return patch_instruction(addr, ppc_inst(val)); in patch_ulong()
134 return patch_instruction(addr, ppc_inst((*addr & ~clr) | set)); in modify_instruction()
H A Dkvm_ppc.h340 *inst = ppc_inst(KVM_INST_FETCH_FAILED); in kvmppc_get_last_inst()
361 *inst = ppc_inst(fetched_inst); in kvmppc_get_last_inst()
/linux/arch/powerpc/net/
H A Dbpf_jit_comp.c1197 old_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
1201 new_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
1225 old_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
1234 new_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
1268 old_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
1271 new_inst = ppc_inst(PPC_RAW_NOP()); in bpf_arch_text_poke()
/linux/arch/powerpc/platforms/86xx/
H A Dmpc86xx_smp.c86 patch_instruction(vector, ppc_inst(save_vector)); in smp_86xx_kick_cpu()
/linux/arch/powerpc/perf/
H A D8xx-pmu.c156 ppc_inst_t insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2)); in mpc8xx_pmu_del()
/linux/arch/powerpc/xmon/
H A Dxmon.c940 ppc_inst(bpinstr)); in insert_bpts()
944 ppc_inst(bpinstr)) != 0) { in insert_bpts()
983 && ppc_inst_equal(instr, ppc_inst(bpinstr)) in remove_bpts()
3009 ppc_inst_t inst, last_inst = ppc_inst(0); in generic_inst_dump()

12