/linux/arch/powerpc/include/asm/ |
A D | inst.h | 13 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 63 #define ppc_inst(x) ((struct ppc_inst){ .val = (x) }) macro 74 #define ppc_inst_prefix(x, y) ppc_inst(x) 88 return ppc_inst(*ptr); in ppc_inst_read() 96 static inline struct ppc_inst ppc_inst_swab(struct ppc_inst x) in ppc_inst_swab() 101 static inline bool ppc_inst_equal(struct ppc_inst x, struct ppc_inst y) in ppc_inst_equal() 110 static inline int ppc_inst_len(struct ppc_inst x) in ppc_inst_len() [all …]
|
A D | code-patching.h | 27 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);
|
A D | hw_breakpoint.h | 59 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,
|
A D | sstep.h | 148 struct ppc_inst instr); 165 extern int emulate_step(struct pt_regs *regs, struct ppc_inst instr);
|
/linux/arch/powerpc/lib/ |
A D | code-patching.c | 203 struct ppc_inst instr; in patch_branch() 263 *instr = ppc_inst(0); in create_branch() 420 struct ppc_inst instr; in test_branch_iform() 444 patch_instruction(iptr, ppc_inst(0x48000103)); in test_branch_iform() 447 patch_instruction(iptr, ppc_inst(0x480420ff)); in test_branch_iform() 450 patch_instruction(iptr, ppc_inst(0x49fffffc)); in test_branch_iform() 453 patch_instruction(iptr, ppc_inst(0x4bfffffc)); in test_branch_iform() 456 patch_instruction(iptr, ppc_inst(0x4a000000)); in test_branch_iform() 502 struct ppc_inst instr; in test_create_function_call() 516 struct ppc_inst instr; in test_branch_bform() [all …]
|
A D | test_emulate_step.c | 795 struct ppc_inst instr; in test_plxvp_pstxvp() 909 struct ppc_inst instr; 925 .instr = ppc_inst(PPC_RAW_NOP()), 964 .instr = ppc_inst(PPC_RAW_ADD(20, 21, 22)), 972 .instr = ppc_inst(PPC_RAW_ADD(20, 21, 22)), 980 .instr = ppc_inst(PPC_RAW_ADD(20, 21, 22)), 988 .instr = ppc_inst(PPC_RAW_ADD(20, 21, 22)), 996 .instr = ppc_inst(PPC_RAW_ADD(20, 21, 22)), 1603 struct ppc_inst instr, in emulate_compute_instr() 1630 struct ppc_inst instr) in execute_compute_instr() [all …]
|
A D | feature-fixups.c | 50 struct ppc_inst instr; in patch_alt_instruction() 154 patch_instruction(dest, ppc_inst(instrs[0])); 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() 308 patch_instruction(dest, ppc_inst(instrs[0])); in do_uaccess_flush_fixups() 384 patch_instruction(dest, ppc_inst(instrs[0])); in __do_entry_flush_fixups() 391 patch_instruction(dest, ppc_inst(instrs[0])); in __do_entry_flush_fixups() 470 patch_instruction(dest, ppc_inst(instrs[0])); in __do_rfi_flush_fixups() 533 patch_instruction(dest, ppc_inst(instr)); in do_barrier_nospec_fixups_range() 576 patch_instruction(dest, ppc_inst(instr[0])); in do_barrier_nospec_fixups_range() [all …]
|
/linux/arch/powerpc/kernel/trace/ |
A D | ftrace.c | 44 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() 93 struct ppc_inst op; in test_24bit_addr() 224 struct ppc_inst op; in __ftrace_make_nop() 332 struct ppc_inst op; in setup_mcount_compiler_tramp() 399 struct ppc_inst op; in __ftrace_make_nop_kernel() 492 expected_nop_sequence(void *ip, struct ppc_inst op0, struct ppc_inst op1) in expected_nop_sequence() 591 struct ppc_inst op; 629 struct ppc_inst op; [all …]
|
/linux/arch/powerpc/kernel/ |
A D | optprobes.c | 129 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()
|
A D | security.c | 444 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()
|
A D | static_call.c | 20 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()
|
A D | module_64.c | 433 ppc_inst(ppc64_stub_insns[i]))) in create_stub() 447 ppc_inst(entry->jump[0] | PPC_HA(reladdr)))) in create_stub() 451 ppc_inst(entry->jump[1] | PPC_LO(reladdr)))) in create_stub() 458 ppc_inst(((u32 *)(&desc))[i]))) in create_stub() 462 if (patch_instruction(&entry->magic, ppc_inst(STUB_MAGIC))) in create_stub() 510 if (!instr_is_relative_link_branch(ppc_inst(*prev_insn))) in restore_r2() 520 if (patch_instruction(instruction, ppc_inst(PPC_INST_LD_TOC))) in restore_r2() 665 if (patch_instruction((u32 *)location, ppc_inst(value))) in apply_relocate_add()
|
A D | hw_breakpoint_constraints.c | 83 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() 130 void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr, in wp_get_instr_detail()
|
A D | epapr_paravirt.c | 40 struct ppc_inst inst = ppc_inst(be32_to_cpu(insts[i])); in early_init_dt_scan_epapr()
|
A D | kprobes.c | 127 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()
|
A D | setup_32.c | 78 struct ppc_inst insn; in machine_init() 88 patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_RAW_NOP())); in machine_init()
|
A D | jump_label.c | 19 patch_instruction(addr, ppc_inst(PPC_RAW_NOP())); in arch_jump_label_transform()
|
A D | hw_breakpoint.c | 526 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()
|
A D | align.c | 108 struct ppc_inst ppc_instr) in emulate_spe() 303 struct ppc_inst instr; in fix_alignment()
|
A D | crash_dump.c | 48 patch_instruction(p, ppc_inst(PPC_RAW_NOP())); in create_trampoline()
|
/linux/arch/powerpc/xmon/ |
A D | xmon_bpts.h | 8 #define BPT_SIZE (sizeof(struct ppc_inst) * 2) 9 #define BPT_WORDS (BPT_SIZE / sizeof(struct ppc_inst))
|
/linux/arch/powerpc/mm/ |
A D | maccess.c | 15 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/arch/powerpc/mm/nohash/ |
A D | 44x.c | 251 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/arch/powerpc/perf/ |
A D | 8xx-pmu.c | 156 struct ppc_inst insn = ppc_inst(PPC_RAW_MFSPR(10, SPRN_SPRG_SCRATCH2)); in mpc8xx_pmu_del()
|
/linux/arch/powerpc/platforms/86xx/ |
A D | mpc86xx_smp.c | 86 patch_instruction(vector, ppc_inst(save_vector)); in smp_86xx_kick_cpu()
|