insn 27 arch/alpha/include/asm/extable.h signed int insn; insn 12 arch/alpha/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 16 arch/alpha/include/asm/futex.h insn \ insn 182 arch/alpha/kernel/ptrace.c unsigned int insn, op_code; insn 186 arch/alpha/kernel/ptrace.c res = read_int(child, pc, (int *) &insn); insn 190 arch/alpha/kernel/ptrace.c op_code = insn >> 26; insn 200 arch/alpha/kernel/ptrace.c displ = ((s32)(insn << 11)) >> 9; insn 207 arch/alpha/kernel/ptrace.c reg_b = (insn >> 16) & 0x1f; insn 218 arch/alpha/kernel/ptrace.c (int *) &insn); insn 221 arch/alpha/kernel/ptrace.c task_thread_info(child)->bpt_insn[i] = insn; insn 115 arch/alpha/kernel/traps.c unsigned int insn; insn 116 arch/alpha/kernel/traps.c if (__get_user(insn, (unsigned int __user *)pc + i)) insn 118 arch/alpha/kernel/traps.c printk("%c%08x%c", i ? ' ' : '<', insn, i ? ' ' : '>'); insn 109 arch/alpha/math-emu/math.c __u32 insn; insn 112 arch/alpha/math-emu/math.c get_user(insn, (__u32 __user *)pc); insn 113 arch/alpha/math-emu/math.c fc = (insn >> 0) & 0x1f; /* destination register */ insn 114 arch/alpha/math-emu/math.c fb = (insn >> 16) & 0x1f; insn 115 arch/alpha/math-emu/math.c fa = (insn >> 21) & 0x1f; insn 116 arch/alpha/math-emu/math.c func = (insn >> 5) & 0xf; insn 117 arch/alpha/math-emu/math.c src = (insn >> 9) & 0x3; insn 118 arch/alpha/math-emu/math.c mode = (insn >> 11) & 0x3; insn 223 arch/alpha/math-emu/math.c if (insn & 0x2000) { insn 335 arch/alpha/math-emu/math.c insn, pc); insn 343 arch/alpha/math-emu/math.c unsigned long insn, opcode, rc, si_code = 0; insn 357 arch/alpha/math-emu/math.c get_user(insn, (__u32 __user *)(trigger_pc)); insn 358 arch/alpha/math-emu/math.c opcode = insn >> 26; insn 359 arch/alpha/math-emu/math.c rc = insn & 0x1f; insn 368 arch/alpha/math-emu/math.c switch (insn & 0xffff) { insn 98 arch/alpha/mm/fault.c unsigned int insn; insn 99 arch/alpha/mm/fault.c __get_user(insn, (unsigned int __user *)regs->pc); insn 100 arch/alpha/mm/fault.c if ((insn >> 21 & 0x1f) == 0x1f && insn 102 arch/alpha/mm/fault.c (1ul << (insn >> 26) & 0x30f00001400ul)) { insn 18 arch/arc/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ insn 23 arch/arc/include/asm/futex.h insn "\n" \ insn 46 arch/arc/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ insn 51 arch/arc/include/asm/futex.h insn "\n" \ insn 25 arch/arm/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ insn 33 arch/arm/include/asm/futex.h " " insn "\n" \ insn 84 arch/arm/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ insn 89 arch/arm/include/asm/futex.h " " insn "\n" \ insn 71 arch/arm/include/asm/kprobes.h kprobe_opcode_t *insn; insn 5 arch/arm/include/asm/patch.h void patch_text(void *addr, unsigned int insn); insn 6 arch/arm/include/asm/patch.h void __patch_text_real(void *addr, unsigned int insn, bool remap); insn 8 arch/arm/include/asm/patch.h static inline void __patch_text(void *addr, unsigned int insn) insn 10 arch/arm/include/asm/patch.h __patch_text_real(addr, insn, true); insn 13 arch/arm/include/asm/patch.h static inline void __patch_text_early(void *addr, unsigned int insn) insn 15 arch/arm/include/asm/patch.h __patch_text_real(addr, insn, false); insn 30 arch/arm/include/asm/probes.h probes_opcode_t *insn; insn 22 arch/arm/include/asm/unwind.h unsigned long insn; insn 28 arch/arm/include/asm/uprobes.h u8 insn[MAX_UINSN_BYTES]; insn 12 arch/arm/kernel/jump_label.c unsigned int insn; insn 15 arch/arm/kernel/jump_label.c insn = arm_gen_branch(entry->code, entry->target); insn 17 arch/arm/kernel/jump_label.c insn = arm_gen_nop(); insn 20 arch/arm/kernel/jump_label.c __patch_text_early(addr, insn); insn 22 arch/arm/kernel/jump_label.c patch_text(addr, insn); insn 16 arch/arm/kernel/patch.c unsigned int insn; insn 56 arch/arm/kernel/patch.c void __kprobes __patch_text_real(void *addr, unsigned int insn, bool remap) insn 70 arch/arm/kernel/patch.c if (thumb2 && __opcode_is_thumb16(insn)) { insn 71 arch/arm/kernel/patch.c *(u16 *)waddr = __opcode_to_mem_thumb16(insn); insn 74 arch/arm/kernel/patch.c u16 first = __opcode_thumb32_first(insn); insn 75 arch/arm/kernel/patch.c u16 second = __opcode_thumb32_second(insn); insn 94 arch/arm/kernel/patch.c insn = __opcode_to_mem_thumb32(insn); insn 96 arch/arm/kernel/patch.c insn = __opcode_to_mem_arm(insn); insn 98 arch/arm/kernel/patch.c *(u32 *)waddr = insn; insn 116 arch/arm/kernel/patch.c __patch_text(patch->addr, patch->insn); insn 121 arch/arm/kernel/patch.c void __kprobes patch_text(void *addr, unsigned int insn) insn 125 arch/arm/kernel/patch.c .insn = insn, insn 385 arch/arm/kernel/setup.c u32 insn = __opcode_thumb32_compose(0xfb90, 0xf0f1); insn 386 arch/arm/kernel/setup.c return __opcode_to_mem_thumb32(insn); insn 397 arch/arm/kernel/setup.c u32 insn = __opcode_thumb32_compose(0xfbb0, 0xf0f1); insn 398 arch/arm/kernel/setup.c return __opcode_to_mem_thumb32(insn); insn 409 arch/arm/kernel/setup.c u32 insn = __opcode_thumb32_compose(0x4770, 0x46c0); insn 410 arch/arm/kernel/setup.c return __opcode_to_mem_thumb32(insn); insn 384 arch/arm/kernel/traps.c u16 insn = __opcode_to_mem_thumb16(BUG_INSTR_VALUE); insn 387 arch/arm/kernel/traps.c u32 insn = __opcode_to_mem_arm(BUG_INSTR_VALUE); insn 393 arch/arm/kernel/traps.c return bkpt == insn; insn 57 arch/arm/kernel/unwind.c const unsigned long *insn; /* pointer to the current instructions word */ insn 219 arch/arm/kernel/unwind.c ret = (*ctrl->insn >> (ctrl->byte * 8)) & 0xff; insn 222 arch/arm/kernel/unwind.c ctrl->insn++; insn 265 arch/arm/kernel/unwind.c unsigned long insn) insn 271 arch/arm/kernel/unwind.c for (reg = 4; reg <= 4 + (insn & 7); reg++) insn 275 arch/arm/kernel/unwind.c if (insn & 0x8) insn 308 arch/arm/kernel/unwind.c unsigned long insn = unwind_get_byte(ctrl); insn 311 arch/arm/kernel/unwind.c pr_debug("%s: insn = %08lx\n", __func__, insn); insn 313 arch/arm/kernel/unwind.c if ((insn & 0xc0) == 0x00) insn 314 arch/arm/kernel/unwind.c ctrl->vrs[SP] += ((insn & 0x3f) << 2) + 4; insn 315 arch/arm/kernel/unwind.c else if ((insn & 0xc0) == 0x40) insn 316 arch/arm/kernel/unwind.c ctrl->vrs[SP] -= ((insn & 0x3f) << 2) + 4; insn 317 arch/arm/kernel/unwind.c else if ((insn & 0xf0) == 0x80) { insn 320 arch/arm/kernel/unwind.c insn = (insn << 8) | unwind_get_byte(ctrl); insn 321 arch/arm/kernel/unwind.c mask = insn & 0x0fff; insn 324 arch/arm/kernel/unwind.c insn); insn 331 arch/arm/kernel/unwind.c } else if ((insn & 0xf0) == 0x90 && insn 332 arch/arm/kernel/unwind.c (insn & 0x0d) != 0x0d) insn 333 arch/arm/kernel/unwind.c ctrl->vrs[SP] = ctrl->vrs[insn & 0x0f]; insn 334 arch/arm/kernel/unwind.c else if ((insn & 0xf0) == 0xa0) { insn 335 arch/arm/kernel/unwind.c ret = unwind_exec_pop_r4_to_rN(ctrl, insn); insn 338 arch/arm/kernel/unwind.c } else if (insn == 0xb0) { insn 343 arch/arm/kernel/unwind.c } else if (insn == 0xb1) { insn 348 arch/arm/kernel/unwind.c (insn << 8) | mask); insn 355 arch/arm/kernel/unwind.c } else if (insn == 0xb2) { insn 360 arch/arm/kernel/unwind.c pr_warn("unwind: Unhandled instruction %02lx\n", insn); insn 402 arch/arm/kernel/unwind.c if (idx->insn == 1) insn 405 arch/arm/kernel/unwind.c else if ((idx->insn & 0x80000000) == 0) insn 407 arch/arm/kernel/unwind.c ctrl.insn = (unsigned long *)prel31_to_addr(&idx->insn); insn 408 arch/arm/kernel/unwind.c else if ((idx->insn & 0xff000000) == 0x80000000) insn 410 arch/arm/kernel/unwind.c ctrl.insn = &idx->insn; insn 413 arch/arm/kernel/unwind.c idx->insn, idx); insn 418 arch/arm/kernel/unwind.c if ((*ctrl.insn & 0xff000000) == 0x80000000) { insn 421 arch/arm/kernel/unwind.c } else if ((*ctrl.insn & 0xff000000) == 0x81000000) { insn 423 arch/arm/kernel/unwind.c ctrl.entries = 1 + ((*ctrl.insn & 0x00ff0000) >> 16); insn 426 arch/arm/kernel/unwind.c *ctrl.insn, ctrl.insn); insn 1345 arch/arm/net/bpf_jit_32.c static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx) insn 1347 arch/arm/net/bpf_jit_32.c const u8 code = insn->code; insn 1348 arch/arm/net/bpf_jit_32.c const s8 *dst = bpf2a32[insn->dst_reg]; insn 1349 arch/arm/net/bpf_jit_32.c const s8 *src = bpf2a32[insn->src_reg]; insn 1352 arch/arm/net/bpf_jit_32.c const s16 off = insn->off; insn 1353 arch/arm/net/bpf_jit_32.c const s32 imm = insn->imm; insn 1354 arch/arm/net/bpf_jit_32.c const int i = insn - ctx->prog->insnsi; insn 1591 arch/arm/net/bpf_jit_32.c u64 val = (u32)imm | (u64)insn[1].imm << 32; insn 1829 arch/arm/net/bpf_jit_32.c const struct bpf_insn *insn = &(prog->insnsi[i]); insn 1832 arch/arm/net/bpf_jit_32.c ret = build_insn(insn, ctx); insn 21 arch/arm/probes/decode-arm.c #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) insn 53 arch/arm/probes/decode-arm.c void __kprobes simulate_bbl(probes_opcode_t insn, insn 57 arch/arm/probes/decode-arm.c int disp = branch_displacement(insn); insn 59 arch/arm/probes/decode-arm.c if (insn & (1 << 24)) insn 65 arch/arm/probes/decode-arm.c void __kprobes simulate_blx1(probes_opcode_t insn, insn 69 arch/arm/probes/decode-arm.c int disp = branch_displacement(insn); insn 72 arch/arm/probes/decode-arm.c regs->ARM_pc = iaddr + 8 + disp + ((insn >> 23) & 0x2); insn 76 arch/arm/probes/decode-arm.c void __kprobes simulate_blx2bx(probes_opcode_t insn, insn 79 arch/arm/probes/decode-arm.c int rm = insn & 0xf; insn 82 arch/arm/probes/decode-arm.c if (insn & (1 << 5)) insn 91 arch/arm/probes/decode-arm.c void __kprobes simulate_mrs(probes_opcode_t insn, insn 94 arch/arm/probes/decode-arm.c int rd = (insn >> 12) & 0xf; insn 99 arch/arm/probes/decode-arm.c void __kprobes simulate_mov_ipsp(probes_opcode_t insn, insn 700 arch/arm/probes/decode-arm.c static void __kprobes arm_singlestep(probes_opcode_t insn, insn 704 arch/arm/probes/decode-arm.c asi->insn_handler(insn, asi, regs); insn 720 arch/arm/probes/decode-arm.c arm_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 725 arch/arm/probes/decode-arm.c asi->insn_check_cc = probes_condition_checks[insn>>28]; insn 726 arch/arm/probes/decode-arm.c return probes_decode_insn(insn, asi, probes_decode_arm_table, false, insn 862 arch/arm/probes/decode-thumb.c thumb16_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 868 arch/arm/probes/decode-thumb.c return probes_decode_insn(insn, asi, probes_decode_thumb16_table, true, insn 873 arch/arm/probes/decode-thumb.c thumb32_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 879 arch/arm/probes/decode-thumb.c return probes_decode_insn(insn, asi, probes_decode_thumb32_table, true, insn 87 arch/arm/probes/decode-thumb.h thumb16_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 91 arch/arm/probes/decode-thumb.h thumb32_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 196 arch/arm/probes/decode.c prepare_emulated_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 201 arch/arm/probes/decode.c u16 *thumb_insn = (u16 *)asi->insn; insn 205 arch/arm/probes/decode.c return insn; insn 207 arch/arm/probes/decode.c asi->insn[1] = __opcode_to_mem_arm(0xe12fff1e); /* ARM bx lr */ insn 209 arch/arm/probes/decode.c asi->insn[1] = __opcode_to_mem_arm(0xe1a0f00e); /* mov pc, lr */ insn 212 arch/arm/probes/decode.c if (insn < 0xe0000000) insn 213 arch/arm/probes/decode.c insn = (insn | 0xe0000000) & ~0x10000000; insn 214 arch/arm/probes/decode.c return insn; insn 222 arch/arm/probes/decode.c set_emulated_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 227 arch/arm/probes/decode.c u16 *ip = (u16 *)asi->insn; insn 228 arch/arm/probes/decode.c if (is_wide_instruction(insn)) insn 229 arch/arm/probes/decode.c *ip++ = __opcode_to_mem_thumb16(insn >> 16); insn 230 arch/arm/probes/decode.c *ip++ = __opcode_to_mem_thumb16(insn); insn 234 arch/arm/probes/decode.c asi->insn[0] = __opcode_to_mem_arm(insn); insn 260 arch/arm/probes/decode.c probes_opcode_t insn = *pinsn; insn 284 arch/arm/probes/decode.c if ((insn ^ 0xdddddddd) & mask) insn 290 arch/arm/probes/decode.c if ((insn ^ 0xffffffff) & mask) insn 296 arch/arm/probes/decode.c if (((insn ^ 0xdddddddd) & mask) == 0) insn 303 arch/arm/probes/decode.c if (((insn ^ 0xdddddddd) & 0xdddddddd & mask) == 0) insn 308 arch/arm/probes/decode.c if (!is_writeback(insn)) insn 314 arch/arm/probes/decode.c if (((insn ^ 0xffffffff) & mask) == 0) insn 320 arch/arm/probes/decode.c insn &= ~mask; insn 321 arch/arm/probes/decode.c insn |= new_bits & mask; insn 325 arch/arm/probes/decode.c *pinsn = insn; insn 343 arch/arm/probes/decode.c int action, probes_opcode_t insn, insn 359 arch/arm/probes/decode.c retval = checker_func(insn, asi, h); insn 411 arch/arm/probes/decode.c probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi, insn 423 arch/arm/probes/decode.c probes_opcode_t origin_insn = insn; insn 443 arch/arm/probes/decode.c insn = prepare_emulated_insn(insn, asi, thumb); insn 455 arch/arm/probes/decode.c if (!matched && (insn & h->mask.bits) != h->value.bits) insn 458 arch/arm/probes/decode.c if (!decode_regs(&insn, regs, emulate)) insn 477 arch/arm/probes/decode.c return actions[action].decoder(insn, asi, h); insn 502 arch/arm/probes/decode.c return actions[action].decoder(insn, asi, h); insn 505 arch/arm/probes/decode.c set_emulated_insn(insn, asi, thumb); insn 133 arch/arm/probes/decode.h #define is_writeback(insn) ((insn ^ 0x01000000) & 0x01200000) insn 69 arch/arm/probes/kprobes/actions-arm.c emulate_ldrdstrd(probes_opcode_t insn, insn 73 arch/arm/probes/kprobes/actions-arm.c int rt = (insn >> 12) & 0xf; insn 74 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 75 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 93 arch/arm/probes/kprobes/actions-arm.c if (is_writeback(insn)) insn 98 arch/arm/probes/kprobes/actions-arm.c emulate_ldr(probes_opcode_t insn, insn 102 arch/arm/probes/kprobes/actions-arm.c int rt = (insn >> 12) & 0xf; insn 103 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 104 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 123 arch/arm/probes/kprobes/actions-arm.c if (is_writeback(insn)) insn 128 arch/arm/probes/kprobes/actions-arm.c emulate_str(probes_opcode_t insn, insn 133 arch/arm/probes/kprobes/actions-arm.c int rt = (insn >> 12) & 0xf; insn 134 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 135 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 150 arch/arm/probes/kprobes/actions-arm.c if (is_writeback(insn)) insn 155 arch/arm/probes/kprobes/actions-arm.c emulate_rd12rn16rm0rs8_rwflags(probes_opcode_t insn, insn 159 arch/arm/probes/kprobes/actions-arm.c int rd = (insn >> 12) & 0xf; insn 160 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 161 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 162 arch/arm/probes/kprobes/actions-arm.c int rs = (insn >> 8) & 0xf; insn 190 arch/arm/probes/kprobes/actions-arm.c emulate_rd12rn16rm0_rwflags_nopc(probes_opcode_t insn, insn 193 arch/arm/probes/kprobes/actions-arm.c int rd = (insn >> 12) & 0xf; insn 194 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 195 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 217 arch/arm/probes/kprobes/actions-arm.c emulate_rd16rn12rm0rs8_rwflags_nopc(probes_opcode_t insn, insn 221 arch/arm/probes/kprobes/actions-arm.c int rd = (insn >> 16) & 0xf; insn 222 arch/arm/probes/kprobes/actions-arm.c int rn = (insn >> 12) & 0xf; insn 223 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 224 arch/arm/probes/kprobes/actions-arm.c int rs = (insn >> 8) & 0xf; insn 247 arch/arm/probes/kprobes/actions-arm.c emulate_rd12rm0_noflags_nopc(probes_opcode_t insn, insn 250 arch/arm/probes/kprobes/actions-arm.c int rd = (insn >> 12) & 0xf; insn 251 arch/arm/probes/kprobes/actions-arm.c int rm = insn & 0xf; insn 267 arch/arm/probes/kprobes/actions-arm.c emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(probes_opcode_t insn, insn 271 arch/arm/probes/kprobes/actions-arm.c int rdlo = (insn >> 12) & 0xf; insn 272 arch/arm/probes/kprobes/actions-arm.c int rdhi = (insn >> 16) & 0xf; insn 273 arch/arm/probes/kprobes/actions-arm.c int rn = insn & 0xf; insn 274 arch/arm/probes/kprobes/actions-arm.c int rm = (insn >> 8) & 0xf; insn 18 arch/arm/probes/kprobes/actions-common.c static void __kprobes simulate_ldm1stm1(probes_opcode_t insn, insn 22 arch/arm/probes/kprobes/actions-common.c int rn = (insn >> 16) & 0xf; insn 23 arch/arm/probes/kprobes/actions-common.c int lbit = insn & (1 << 20); insn 24 arch/arm/probes/kprobes/actions-common.c int wbit = insn & (1 << 21); insn 25 arch/arm/probes/kprobes/actions-common.c int ubit = insn & (1 << 23); insn 26 arch/arm/probes/kprobes/actions-common.c int pbit = insn & (1 << 24); insn 32 arch/arm/probes/kprobes/actions-common.c reg_bit_vector = insn & 0xffff; insn 42 arch/arm/probes/kprobes/actions-common.c reg_bit_vector = insn & 0xffff; insn 60 arch/arm/probes/kprobes/actions-common.c static void __kprobes simulate_stm1_pc(probes_opcode_t insn, insn 67 arch/arm/probes/kprobes/actions-common.c simulate_ldm1stm1(insn, asi, regs); insn 71 arch/arm/probes/kprobes/actions-common.c static void __kprobes simulate_ldm1_pc(probes_opcode_t insn, insn 75 arch/arm/probes/kprobes/actions-common.c simulate_ldm1stm1(insn, asi, regs); insn 80 arch/arm/probes/kprobes/actions-common.c emulate_generic_r0_12_noflags(probes_opcode_t insn, insn 108 arch/arm/probes/kprobes/actions-common.c emulate_generic_r2_14_noflags(probes_opcode_t insn, insn 111 arch/arm/probes/kprobes/actions-common.c emulate_generic_r0_12_noflags(insn, asi, insn 116 arch/arm/probes/kprobes/actions-common.c emulate_ldm_r3_15(probes_opcode_t insn, insn 119 arch/arm/probes/kprobes/actions-common.c emulate_generic_r0_12_noflags(insn, asi, insn 125 arch/arm/probes/kprobes/actions-common.c kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_probes_insn *asi, insn 129 arch/arm/probes/kprobes/actions-common.c unsigned reglist = insn & 0xffff; insn 130 arch/arm/probes/kprobes/actions-common.c int is_ldm = insn & 0x100000; insn 131 arch/arm/probes/kprobes/actions-common.c int rn = (insn >> 16) & 0xf; insn 154 arch/arm/probes/kprobes/actions-common.c asi->insn[0] = __opcode_to_mem_arm((insn & 0xfff00000) | insn 24 arch/arm/probes/kprobes/actions-thumb.c t32_simulate_table_branch(probes_opcode_t insn, insn 28 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 29 arch/arm/probes/kprobes/actions-thumb.c int rm = insn & 0xf; insn 35 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x10) /* TBH */ insn 44 arch/arm/probes/kprobes/actions-thumb.c t32_simulate_mrs(probes_opcode_t insn, insn 47 arch/arm/probes/kprobes/actions-thumb.c int rd = (insn >> 8) & 0xf; insn 53 arch/arm/probes/kprobes/actions-thumb.c t32_simulate_cond_branch(probes_opcode_t insn, insn 58 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0x7ff; /* imm11 */ insn 59 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x003f0000) >> 5; /* imm6 */ insn 60 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x00002000) << 4; /* J1 */ insn 61 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x00000800) << 7; /* J2 */ insn 62 arch/arm/probes/kprobes/actions-thumb.c offset -= (insn & 0x04000000) >> 7; /* Apply sign bit */ insn 68 arch/arm/probes/kprobes/actions-thumb.c t32_decode_cond_branch(probes_opcode_t insn, struct arch_probes_insn *asi, insn 71 arch/arm/probes/kprobes/actions-thumb.c int cc = (insn >> 22) & 0xf; insn 78 arch/arm/probes/kprobes/actions-thumb.c t32_simulate_branch(probes_opcode_t insn, insn 83 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0x7ff; /* imm11 */ insn 84 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x03ff0000) >> 5; /* imm10 */ insn 85 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x00002000) << 9; /* J1 */ insn 86 arch/arm/probes/kprobes/actions-thumb.c offset += (insn & 0x00000800) << 10; /* J2 */ insn 87 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x04000000) insn 92 arch/arm/probes/kprobes/actions-thumb.c if (insn & (1 << 14)) { insn 95 arch/arm/probes/kprobes/actions-thumb.c if (!(insn & (1 << 12))) { insn 106 arch/arm/probes/kprobes/actions-thumb.c t32_simulate_ldr_literal(probes_opcode_t insn, insn 110 arch/arm/probes/kprobes/actions-thumb.c int rt = (insn >> 12) & 0xf; insn 113 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0xfff; insn 114 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x00800000) insn 119 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x00400000) { insn 126 arch/arm/probes/kprobes/actions-thumb.c } else if (insn & 0x00200000) { insn 128 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x01000000) insn 134 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x01000000) insn 144 arch/arm/probes/kprobes/actions-thumb.c t32_decode_ldmstm(probes_opcode_t insn, struct arch_probes_insn *asi, insn 147 arch/arm/probes/kprobes/actions-thumb.c enum probes_insn ret = kprobe_decode_ldmstm(insn, asi, d); insn 150 arch/arm/probes/kprobes/actions-thumb.c insn = __mem_to_opcode_arm(asi->insn[0]); insn 151 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[0] = __opcode_to_mem_thumb16(insn >> 16); insn 152 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[1] = __opcode_to_mem_thumb16(insn & 0xffff); insn 158 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_ldrdstrd(probes_opcode_t insn, insn 162 arch/arm/probes/kprobes/actions-thumb.c int rt1 = (insn >> 12) & 0xf; insn 163 arch/arm/probes/kprobes/actions-thumb.c int rt2 = (insn >> 8) & 0xf; insn 164 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 185 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_ldrstr(probes_opcode_t insn, insn 188 arch/arm/probes/kprobes/actions-thumb.c int rt = (insn >> 12) & 0xf; insn 189 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 190 arch/arm/probes/kprobes/actions-thumb.c int rm = insn & 0xf; insn 211 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_rd8rn16rm0_rwflags(probes_opcode_t insn, insn 214 arch/arm/probes/kprobes/actions-thumb.c int rd = (insn >> 8) & 0xf; insn 215 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 216 arch/arm/probes/kprobes/actions-thumb.c int rm = insn & 0xf; insn 238 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_rd8pc16_noflags(probes_opcode_t insn, insn 242 arch/arm/probes/kprobes/actions-thumb.c int rd = (insn >> 8) & 0xf; insn 258 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_rd8rn16_noflags(probes_opcode_t insn, insn 261 arch/arm/probes/kprobes/actions-thumb.c int rd = (insn >> 8) & 0xf; insn 262 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 278 arch/arm/probes/kprobes/actions-thumb.c t32_emulate_rdlo12rdhi8rn16rm0_noflags(probes_opcode_t insn, insn 282 arch/arm/probes/kprobes/actions-thumb.c int rdlo = (insn >> 12) & 0xf; insn 283 arch/arm/probes/kprobes/actions-thumb.c int rdhi = (insn >> 8) & 0xf; insn 284 arch/arm/probes/kprobes/actions-thumb.c int rn = (insn >> 16) & 0xf; insn 285 arch/arm/probes/kprobes/actions-thumb.c int rm = insn & 0xf; insn 306 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_bxblx(probes_opcode_t insn, insn 310 arch/arm/probes/kprobes/actions-thumb.c int rm = (insn >> 3) & 0xf; insn 313 arch/arm/probes/kprobes/actions-thumb.c if (insn & (1 << 7)) /* BLX ? */ insn 320 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_ldr_literal(probes_opcode_t insn, insn 324 arch/arm/probes/kprobes/actions-thumb.c long index = insn & 0xff; insn 325 arch/arm/probes/kprobes/actions-thumb.c int rt = (insn >> 8) & 0x7; insn 330 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_ldrstr_sp_relative(probes_opcode_t insn, insn 334 arch/arm/probes/kprobes/actions-thumb.c long index = insn & 0xff; insn 335 arch/arm/probes/kprobes/actions-thumb.c int rt = (insn >> 8) & 0x7; insn 336 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x800) /* LDR */ insn 343 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_reladr(probes_opcode_t insn, insn 346 arch/arm/probes/kprobes/actions-thumb.c unsigned long base = (insn & 0x800) ? regs->ARM_sp insn 348 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0xff; insn 349 arch/arm/probes/kprobes/actions-thumb.c int rt = (insn >> 8) & 0x7; insn 354 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_add_sp_imm(probes_opcode_t insn, insn 357 arch/arm/probes/kprobes/actions-thumb.c long imm = insn & 0x7f; insn 358 arch/arm/probes/kprobes/actions-thumb.c if (insn & 0x80) /* SUB */ insn 365 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_cbz(probes_opcode_t insn, insn 368 arch/arm/probes/kprobes/actions-thumb.c int rn = insn & 0x7; insn 369 arch/arm/probes/kprobes/actions-thumb.c probes_opcode_t nonzero = regs->uregs[rn] ? insn : ~insn; insn 371 arch/arm/probes/kprobes/actions-thumb.c long i = insn & 0x200; insn 372 arch/arm/probes/kprobes/actions-thumb.c long imm5 = insn & 0xf8; insn 379 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_it(probes_opcode_t insn, insn 390 arch/arm/probes/kprobes/actions-thumb.c cpsr |= (insn & 0xfc) << 8; insn 391 arch/arm/probes/kprobes/actions-thumb.c cpsr |= (insn & 0x03) << 25; insn 396 arch/arm/probes/kprobes/actions-thumb.c t16_singlestep_it(probes_opcode_t insn, insn 400 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_it(insn, asi, regs); insn 404 arch/arm/probes/kprobes/actions-thumb.c t16_decode_it(probes_opcode_t insn, struct arch_probes_insn *asi, insn 412 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_cond_branch(probes_opcode_t insn, insn 416 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0x7f; insn 417 arch/arm/probes/kprobes/actions-thumb.c offset -= insn & 0x80; /* Apply sign bit */ insn 422 arch/arm/probes/kprobes/actions-thumb.c t16_decode_cond_branch(probes_opcode_t insn, struct arch_probes_insn *asi, insn 425 arch/arm/probes/kprobes/actions-thumb.c int cc = (insn >> 8) & 0xf; insn 432 arch/arm/probes/kprobes/actions-thumb.c t16_simulate_branch(probes_opcode_t insn, insn 436 arch/arm/probes/kprobes/actions-thumb.c long offset = insn & 0x3ff; insn 437 arch/arm/probes/kprobes/actions-thumb.c offset -= insn & 0x400; /* Apply sign bit */ insn 442 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_loregs(probes_opcode_t insn, insn 465 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_loregs_rwflags(probes_opcode_t insn, insn 468 arch/arm/probes/kprobes/actions-thumb.c regs->ARM_cpsr = t16_emulate_loregs(insn, asi, regs); insn 472 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_loregs_noitrwflags(probes_opcode_t insn, insn 475 arch/arm/probes/kprobes/actions-thumb.c unsigned long cpsr = t16_emulate_loregs(insn, asi, regs); insn 481 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_hiregs(probes_opcode_t insn, insn 485 arch/arm/probes/kprobes/actions-thumb.c int rdn = (insn & 0x7) | ((insn & 0x80) >> 4); insn 486 arch/arm/probes/kprobes/actions-thumb.c int rm = (insn >> 3) & 0xf; insn 512 arch/arm/probes/kprobes/actions-thumb.c t16_decode_hiregs(probes_opcode_t insn, struct arch_probes_insn *asi, insn 515 arch/arm/probes/kprobes/actions-thumb.c insn &= ~0x00ff; insn 516 arch/arm/probes/kprobes/actions-thumb.c insn |= 0x001; /* Set Rdn = R1 and Rm = R0 */ insn 517 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[0] = __opcode_to_mem_thumb16(insn); insn 523 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_push(probes_opcode_t insn, insn 540 arch/arm/probes/kprobes/actions-thumb.c t16_decode_push(probes_opcode_t insn, struct arch_probes_insn *asi, insn 549 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[0] = __opcode_to_mem_thumb16(0xe929); insn 551 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[1] = __opcode_to_mem_thumb16(insn & 0x1ff); insn 557 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_pop_nopc(probes_opcode_t insn, insn 574 arch/arm/probes/kprobes/actions-thumb.c t16_emulate_pop_pc(probes_opcode_t insn, insn 595 arch/arm/probes/kprobes/actions-thumb.c t16_decode_pop(probes_opcode_t insn, struct arch_probes_insn *asi, insn 604 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[0] = __opcode_to_mem_thumb16(0xe8b9); insn 606 arch/arm/probes/kprobes/actions-thumb.c ((u16 *)asi->insn)[1] = __opcode_to_mem_thumb16(insn & 0x1ff); insn 607 arch/arm/probes/kprobes/actions-thumb.c asi->insn_handler = insn & 0x100 ? t16_emulate_pop_pc insn 13 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn __kprobes arm_check_stack(probes_opcode_t insn, insn 83 arch/arm/probes/kprobes/checkers-arm.c return probes_decode_insn(insn, asi, table, false, false, stack_check_actions, NULL); insn 93 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn __kprobes arm_check_regs_nouse(probes_opcode_t insn, insn 101 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn arm_check_regs_normal(probes_opcode_t insn, insn 109 arch/arm/probes/kprobes/checkers-arm.c for (i = 0; i < 5; regs >>= 4, insn >>= 4, i++) insn 111 arch/arm/probes/kprobes/checkers-arm.c asi->register_usage_flags |= 1 << (insn & 0xf); insn 117 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn arm_check_regs_ldmstm(probes_opcode_t insn, insn 121 arch/arm/probes/kprobes/checkers-arm.c unsigned int reglist = insn & 0xffff; insn 122 arch/arm/probes/kprobes/checkers-arm.c unsigned int rn = (insn >> 16) & 0xf; insn 127 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn arm_check_regs_mov_ip_sp(probes_opcode_t insn, insn 148 arch/arm/probes/kprobes/checkers-arm.c static enum probes_insn arm_check_regs_ldrdstrd(probes_opcode_t insn, insn 152 arch/arm/probes/kprobes/checkers-arm.c int rdt = (insn >> 12) & 0xf; insn 153 arch/arm/probes/kprobes/checkers-arm.c arm_check_regs_normal(insn, asi, h); insn 13 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_none(probes_opcode_t insn, insn 21 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_unknown(probes_opcode_t insn, insn 30 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn, insn 34 arch/arm/probes/kprobes/checkers-common.c int imm = insn & 0xff; insn 43 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn, insn 47 arch/arm/probes/kprobes/checkers-common.c int imm = insn & 0xff; insn 52 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_imm_x0x(probes_opcode_t insn, insn 56 arch/arm/probes/kprobes/checkers-common.c int imm = ((insn & 0xf00) >> 4) + (insn & 0xf); insn 62 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_imm_xxx(probes_opcode_t insn, insn 66 arch/arm/probes/kprobes/checkers-common.c int imm = insn & 0xfff; insn 71 arch/arm/probes/kprobes/checkers-common.c enum probes_insn checker_stack_use_stmdx(probes_opcode_t insn, insn 75 arch/arm/probes/kprobes/checkers-common.c unsigned int reglist = insn & 0xffff; insn 76 arch/arm/probes/kprobes/checkers-common.c int pbit = insn & (1 << 24); insn 13 arch/arm/probes/kprobes/checkers-thumb.c static enum probes_insn __kprobes t32_check_stack(probes_opcode_t insn, insn 75 arch/arm/probes/kprobes/checkers-thumb.c return probes_decode_insn(insn, asi, table, false, false, stack_check_actions, NULL); insn 87 arch/arm/probes/kprobes/checkers-thumb.c static enum probes_insn __kprobes t16_check_stack(probes_opcode_t insn, insn 91 arch/arm/probes/kprobes/checkers-thumb.c unsigned int reglist = insn & 0x1ff; insn 48 arch/arm/probes/kprobes/core.c kprobe_opcode_t insn; insn 60 arch/arm/probes/kprobes/core.c insn = __mem_to_opcode_thumb16(((u16 *)addr)[0]); insn 61 arch/arm/probes/kprobes/core.c if (is_wide_instruction(insn)) { insn 63 arch/arm/probes/kprobes/core.c insn = __opcode_thumb32_compose(insn, inst2); insn 76 arch/arm/probes/kprobes/core.c insn = __mem_to_opcode_arm(*p->addr); insn 82 arch/arm/probes/kprobes/core.c p->opcode = insn; insn 83 arch/arm/probes/kprobes/core.c p->ainsn.insn = tmp_insn; insn 85 arch/arm/probes/kprobes/core.c switch ((*decode_insn)(insn, &p->ainsn, true, actions, checkers)) { insn 90 arch/arm/probes/kprobes/core.c p->ainsn.insn = get_insn_slot(); insn 91 arch/arm/probes/kprobes/core.c if (!p->ainsn.insn) insn 94 arch/arm/probes/kprobes/core.c p->ainsn.insn[is] = tmp_insn[is]; insn 95 arch/arm/probes/kprobes/core.c flush_insns(p->ainsn.insn, insn 96 arch/arm/probes/kprobes/core.c sizeof(p->ainsn.insn[0]) * MAX_INSN_SIZE); insn 98 arch/arm/probes/kprobes/core.c ((uintptr_t)p->ainsn.insn | thumb); insn 102 arch/arm/probes/kprobes/core.c p->ainsn.insn = NULL; insn 132 arch/arm/probes/kprobes/core.c kprobe_opcode_t insn = p->opcode; insn 137 arch/arm/probes/kprobes/core.c if (insn >= 0xe0000000) insn 140 arch/arm/probes/kprobes/core.c brkp |= insn & 0xf0000000; /* Copy condition from insn */ insn 156 arch/arm/probes/kprobes/core.c unsigned int insn; insn 162 arch/arm/probes/kprobes/core.c __patch_text(p->addr, p->insn); insn 166 arch/arm/probes/kprobes/core.c void __kprobes kprobes_remove_breakpoint(void *addr, unsigned int insn) insn 170 arch/arm/probes/kprobes/core.c .insn = insn, insn 184 arch/arm/probes/kprobes/core.c if (p->ainsn.insn) { insn 185 arch/arm/probes/kprobes/core.c free_insn_slot(p->ainsn.insn, 0); insn 186 arch/arm/probes/kprobes/core.c p->ainsn.insn = NULL; insn 25 arch/arm/probes/kprobes/core.h extern void kprobes_remove_breakpoint(void *addr, unsigned int insn); insn 28 arch/arm/probes/kprobes/core.h kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_probes_insn *asi, insn 111 arch/arm/probes/kprobes/opt-arm.c return optinsn->insn != NULL; insn 142 arch/arm/probes/kprobes/opt-arm.c if (op->optinsn.insn) { insn 143 arch/arm/probes/kprobes/opt-arm.c free_optinsn_slot(op->optinsn.insn, dirty); insn 144 arch/arm/probes/kprobes/opt-arm.c op->optinsn.insn = NULL; insn 287 arch/arm/probes/kprobes/opt-arm.c op->optinsn.insn = code; insn 296 arch/arm/probes/kprobes/opt-arm.c unsigned long insn; insn 306 arch/arm/probes/kprobes/opt-arm.c insn = arm_gen_branch((unsigned long)op->kp.addr, insn 307 arch/arm/probes/kprobes/opt-arm.c (unsigned long)op->optinsn.insn); insn 308 arch/arm/probes/kprobes/opt-arm.c BUG_ON(insn == 0); insn 314 arch/arm/probes/kprobes/opt-arm.c insn = (__mem_to_opcode_arm( insn 316 arch/arm/probes/kprobes/opt-arm.c (insn & 0x0fffffff); insn 323 arch/arm/probes/kprobes/opt-arm.c kprobes_remove_breakpoint(op->kp.addr, insn); insn 775 arch/arm/probes/kprobes/test-core.c coverage_add_registers(struct coverage_entry *entry, kprobe_opcode_t insn) insn 781 arch/arm/probes/kprobes/test-core.c int reg = (insn >> i) & 0xf; insn 824 arch/arm/probes/kprobes/test-core.c if (!is_writeback(insn)) insn 842 arch/arm/probes/kprobes/test-core.c static void coverage_add(kprobe_opcode_t insn) insn 860 arch/arm/probes/kprobes/test-core.c if ((insn & h->mask.bits) != h->value.bits) insn 874 arch/arm/probes/kprobes/test-core.c coverage_add_registers(entry, insn); insn 19 arch/arm/probes/uprobes/actions-arm.c probes_opcode_t insn = __mem_to_opcode_arm(*pinsn); insn 26 arch/arm/probes/uprobes/actions-arm.c for (regs = oregs; regs; regs >>= 4, insn >>= 4) { insn 30 arch/arm/probes/uprobes/actions-arm.c free &= ~(1 << (insn & 0xf)); insn 47 arch/arm/probes/uprobes/actions-arm.c insn = temp; insn 58 arch/arm/probes/uprobes/actions-arm.c insn &= ~mask; insn 59 arch/arm/probes/uprobes/actions-arm.c insn |= free & mask; insn 62 arch/arm/probes/uprobes/actions-arm.c *pinsn = __opcode_to_mem_arm(insn); insn 105 arch/arm/probes/uprobes/actions-arm.c decode_pc_ro(probes_opcode_t insn, struct arch_probes_insn *asi, insn 129 arch/arm/probes/uprobes/actions-arm.c decode_wb_pc(probes_opcode_t insn, struct arch_probes_insn *asi, insn 134 arch/arm/probes/uprobes/actions-arm.c enum probes_insn ret = decode_pc_ro(insn, asi, d); insn 136 arch/arm/probes/uprobes/actions-arm.c if (((insn >> 12) & 0xf) == 15) insn 144 arch/arm/probes/uprobes/actions-arm.c decode_rd12rn16rm0rs8_rwflags(probes_opcode_t insn, insn 148 arch/arm/probes/uprobes/actions-arm.c return decode_wb_pc(insn, asi, d, true); insn 152 arch/arm/probes/uprobes/actions-arm.c decode_ldr(probes_opcode_t insn, struct arch_probes_insn *asi, insn 155 arch/arm/probes/uprobes/actions-arm.c return decode_wb_pc(insn, asi, d, false); insn 159 arch/arm/probes/uprobes/actions-arm.c uprobe_decode_ldmstm(probes_opcode_t insn, insn 165 arch/arm/probes/uprobes/actions-arm.c unsigned reglist = insn & 0xffff; insn 166 arch/arm/probes/uprobes/actions-arm.c int rn = (insn >> 16) & 0xf; insn 167 arch/arm/probes/uprobes/actions-arm.c int lbit = insn & (1 << 20); insn 180 arch/arm/probes/uprobes/actions-arm.c insn ^= 0xc000; insn 183 arch/arm/probes/uprobes/actions-arm.c auprobe->ixol[0] = __opcode_to_mem_arm(insn); insn 23 arch/arm/probes/uprobes/core.c bool is_swbp_insn(uprobe_opcode_t *insn) insn 25 arch/arm/probes/uprobes/core.c return (__mem_to_opcode_arm(*insn) & 0x0fffffff) == insn 53 arch/arm/probes/uprobes/core.c opcode = __mem_to_opcode_arm(*(unsigned int *) auprobe->insn); insn 75 arch/arm/probes/uprobes/core.c unsigned int insn; insn 83 arch/arm/probes/uprobes/core.c insn = __mem_to_opcode_arm(*(unsigned int *)auprobe->insn); insn 84 arch/arm/probes/uprobes/core.c auprobe->ixol[0] = __opcode_to_mem_arm(insn); insn 87 arch/arm/probes/uprobes/core.c ret = arm_probes_decode_insn(insn, &auprobe->asi, false, insn 103 arch/arm/probes/uprobes/core.c if (insn >= 0xe0000000) insn 106 arch/arm/probes/uprobes/core.c bpinsn |= insn & 0xf0000000; /* Copy condition from insn */ insn 9 arch/arm/probes/uprobes/core.h enum probes_insn uprobe_decode_ldmstm(probes_opcode_t insn, insn 13 arch/arm/probes/uprobes/core.h enum probes_insn decode_ldr(probes_opcode_t insn, insn 18 arch/arm/probes/uprobes/core.h decode_rd12rn16rm0rs8_rwflags(probes_opcode_t insn, insn 23 arch/arm/probes/uprobes/core.h decode_wb_pc(probes_opcode_t insn, struct arch_probes_insn *asi, insn 27 arch/arm/probes/uprobes/core.h decode_pc_ro(probes_opcode_t insn, struct arch_probes_insn *asi, insn 20 arch/arm64/include/asm/extable.h int insn, fixup; insn 176 arch/arm64/include/asm/fpsimdmacros.h .macro _for var:req, from:req, to:req, insn:vararg insn 15 arch/arm64/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ insn 23 arch/arm64/include/asm/futex.h insn "\n" \ insn 347 arch/arm64/include/asm/insn.h bool aarch64_insn_is_nop(u32 insn); insn 348 arch/arm64/include/asm/insn.h bool aarch64_insn_is_branch_imm(u32 insn); insn 350 arch/arm64/include/asm/insn.h static inline bool aarch64_insn_is_adr_adrp(u32 insn) insn 352 arch/arm64/include/asm/insn.h return aarch64_insn_is_adr(insn) || aarch64_insn_is_adrp(insn); insn 356 arch/arm64/include/asm/insn.h int aarch64_insn_write(void *addr, u32 insn); insn 357 arch/arm64/include/asm/insn.h enum aarch64_insn_encoding_class aarch64_get_insn_class(u32 insn); insn 358 arch/arm64/include/asm/insn.h bool aarch64_insn_uses_literal(u32 insn); insn 359 arch/arm64/include/asm/insn.h bool aarch64_insn_is_branch(u32 insn); insn 360 arch/arm64/include/asm/insn.h u64 aarch64_insn_decode_immediate(enum aarch64_insn_imm_type type, u32 insn); insn 362 arch/arm64/include/asm/insn.h u32 insn, u64 imm); insn 364 arch/arm64/include/asm/insn.h u32 insn); insn 457 arch/arm64/include/asm/insn.h s32 aarch64_get_branch_offset(u32 insn); insn 458 arch/arm64/include/asm/insn.h u32 aarch64_set_branch_offset(u32 insn, s32 offset); insn 460 arch/arm64/include/asm/insn.h int aarch64_insn_patch_text_nosync(void *addr, u32 insn); insn 463 arch/arm64/include/asm/insn.h s32 aarch64_insn_adrp_get_offset(u32 insn); insn 464 arch/arm64/include/asm/insn.h u32 aarch64_insn_adrp_set_offset(u32 insn, s32 offset); insn 466 arch/arm64/include/asm/insn.h bool aarch32_insn_is_wide(u32 insn); insn 472 arch/arm64/include/asm/insn.h u32 aarch64_insn_extract_system_reg(u32 insn); insn 473 arch/arm64/include/asm/insn.h u32 aarch32_insn_extract_reg_num(u32 insn, int offset); insn 474 arch/arm64/include/asm/insn.h u32 aarch32_insn_mcr_extract_opc2(u32 insn); insn 475 arch/arm64/include/asm/insn.h u32 aarch32_insn_mcr_extract_crm(u32 insn); insn 15 arch/arm64/include/asm/probes.h probe_opcode_t *insn; insn 26 arch/arm64/include/asm/uprobes.h u8 insn[MAX_UINSN_BYTES]; insn 66 arch/arm64/kernel/alternative.c u32 insn; insn 68 arch/arm64/kernel/alternative.c insn = le32_to_cpu(*altinsnptr); insn 70 arch/arm64/kernel/alternative.c if (aarch64_insn_is_branch_imm(insn)) { insn 71 arch/arm64/kernel/alternative.c s32 offset = aarch64_get_branch_offset(insn); insn 83 arch/arm64/kernel/alternative.c insn = aarch64_set_branch_offset(insn, offset); insn 85 arch/arm64/kernel/alternative.c } else if (aarch64_insn_is_adrp(insn)) { insn 94 arch/arm64/kernel/alternative.c orig_offset = aarch64_insn_adrp_get_offset(insn); insn 97 arch/arm64/kernel/alternative.c insn = aarch64_insn_adrp_set_offset(insn, new_offset); insn 98 arch/arm64/kernel/alternative.c } else if (aarch64_insn_uses_literal(insn)) { insn 106 arch/arm64/kernel/alternative.c return insn; insn 117 arch/arm64/kernel/alternative.c u32 insn; insn 119 arch/arm64/kernel/alternative.c insn = get_alt_insn(alt, origptr + i, replptr + i); insn 120 arch/arm64/kernel/alternative.c updptr[i] = cpu_to_le32(insn); insn 89 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn = (struct insn_emulation *)data; insn 90 arch/arm64/kernel/armv8_deprecated.c if (insn->ops->set_hw_mode) insn 91 arch/arm64/kernel/armv8_deprecated.c insn->ops->set_hw_mode(true); insn 96 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn = (struct insn_emulation *)data; insn 97 arch/arm64/kernel/armv8_deprecated.c if (insn->ops->set_hw_mode) insn 98 arch/arm64/kernel/armv8_deprecated.c insn->ops->set_hw_mode(false); insn 102 arch/arm64/kernel/armv8_deprecated.c static int run_all_cpu_set_hw_mode(struct insn_emulation *insn, bool enable) insn 104 arch/arm64/kernel/armv8_deprecated.c if (!insn->ops->set_hw_mode) insn 107 arch/arm64/kernel/armv8_deprecated.c on_each_cpu(enable_insn_hw_mode, (void *)insn, true); insn 109 arch/arm64/kernel/armv8_deprecated.c on_each_cpu(disable_insn_hw_mode, (void *)insn, true); insn 123 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn; insn 126 arch/arm64/kernel/armv8_deprecated.c list_for_each_entry(insn, &insn_emulation, node) { insn 127 arch/arm64/kernel/armv8_deprecated.c bool enable = (insn->current_mode == INSN_HW); insn 128 arch/arm64/kernel/armv8_deprecated.c if (insn->ops->set_hw_mode && insn->ops->set_hw_mode(enable)) { insn 130 arch/arm64/kernel/armv8_deprecated.c cpu, insn->ops->name); insn 138 arch/arm64/kernel/armv8_deprecated.c static int update_insn_emulation_mode(struct insn_emulation *insn, insn 147 arch/arm64/kernel/armv8_deprecated.c remove_emulation_hooks(insn->ops); insn 150 arch/arm64/kernel/armv8_deprecated.c if (!run_all_cpu_set_hw_mode(insn, false)) insn 151 arch/arm64/kernel/armv8_deprecated.c pr_notice("Disabled %s support\n", insn->ops->name); insn 155 arch/arm64/kernel/armv8_deprecated.c switch (insn->current_mode) { insn 159 arch/arm64/kernel/armv8_deprecated.c register_emulation_hooks(insn->ops); insn 162 arch/arm64/kernel/armv8_deprecated.c ret = run_all_cpu_set_hw_mode(insn, true); insn 164 arch/arm64/kernel/armv8_deprecated.c pr_notice("Enabled %s support\n", insn->ops->name); insn 174 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn; insn 176 arch/arm64/kernel/armv8_deprecated.c insn = kzalloc(sizeof(*insn), GFP_KERNEL); insn 177 arch/arm64/kernel/armv8_deprecated.c if (!insn) insn 180 arch/arm64/kernel/armv8_deprecated.c insn->ops = ops; insn 181 arch/arm64/kernel/armv8_deprecated.c insn->min = INSN_UNDEF; insn 185 arch/arm64/kernel/armv8_deprecated.c insn->current_mode = INSN_EMULATE; insn 187 arch/arm64/kernel/armv8_deprecated.c run_all_cpu_set_hw_mode(insn, false); insn 188 arch/arm64/kernel/armv8_deprecated.c insn->max = INSN_HW; insn 191 arch/arm64/kernel/armv8_deprecated.c insn->current_mode = INSN_UNDEF; insn 192 arch/arm64/kernel/armv8_deprecated.c insn->max = INSN_EMULATE; insn 197 arch/arm64/kernel/armv8_deprecated.c list_add(&insn->node, &insn_emulation); insn 202 arch/arm64/kernel/armv8_deprecated.c update_insn_emulation_mode(insn, INSN_UNDEF); insn 210 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn = (struct insn_emulation *) table->data; insn 211 arch/arm64/kernel/armv8_deprecated.c enum insn_emulation_mode prev_mode = insn->current_mode; insn 213 arch/arm64/kernel/armv8_deprecated.c table->data = &insn->current_mode; insn 216 arch/arm64/kernel/armv8_deprecated.c if (ret || !write || prev_mode == insn->current_mode) insn 219 arch/arm64/kernel/armv8_deprecated.c ret = update_insn_emulation_mode(insn, prev_mode); insn 222 arch/arm64/kernel/armv8_deprecated.c insn->current_mode = prev_mode; insn 223 arch/arm64/kernel/armv8_deprecated.c update_insn_emulation_mode(insn, INSN_UNDEF); insn 226 arch/arm64/kernel/armv8_deprecated.c table->data = insn; insn 234 arch/arm64/kernel/armv8_deprecated.c struct insn_emulation *insn; insn 243 arch/arm64/kernel/armv8_deprecated.c list_for_each_entry(insn, &insn_emulation, node) { insn 249 arch/arm64/kernel/armv8_deprecated.c sysctl->procname = insn->ops->name; insn 250 arch/arm64/kernel/armv8_deprecated.c sysctl->data = insn; insn 251 arch/arm64/kernel/armv8_deprecated.c sysctl->extra1 = &insn->min; insn 252 arch/arm64/kernel/armv8_deprecated.c sysctl->extra2 = &insn->max; insn 561 arch/arm64/kernel/armv8_deprecated.c char *insn; insn 566 arch/arm64/kernel/armv8_deprecated.c insn = "setend be"; insn 569 arch/arm64/kernel/armv8_deprecated.c insn = "setend le"; insn 573 arch/arm64/kernel/armv8_deprecated.c trace_instruction_emulation(insn, regs->pc); insn 316 arch/arm64/kernel/cpu_errata.c u32 insn; insn 322 arch/arm64/kernel/cpu_errata.c insn = aarch64_insn_get_hvc_value(); insn 325 arch/arm64/kernel/cpu_errata.c insn = aarch64_insn_get_smc_value(); insn 331 arch/arm64/kernel/cpu_errata.c *updptr = cpu_to_le32(insn); insn 2196 arch/arm64/kernel/cpufeature.c static int emulate_mrs(struct pt_regs *regs, u32 insn) insn 2204 arch/arm64/kernel/cpufeature.c sys_reg = (u32)aarch64_insn_decode_immediate(AARCH64_INSN_IMM_16, insn) << 5; insn 2205 arch/arm64/kernel/cpufeature.c rt = aarch64_insn_decode_register(AARCH64_INSN_REGTYPE_RT, insn); insn 48 arch/arm64/kernel/insn.c enum aarch64_insn_encoding_class __kprobes aarch64_get_insn_class(u32 insn) insn 50 arch/arm64/kernel/insn.c return aarch64_insn_encoding_class[(insn >> 25) & 0xf]; insn 54 arch/arm64/kernel/insn.c bool __kprobes aarch64_insn_is_nop(u32 insn) insn 56 arch/arm64/kernel/insn.c if (!aarch64_insn_is_hint(insn)) insn 59 arch/arm64/kernel/insn.c switch (insn & 0xFE0) { insn 71 arch/arm64/kernel/insn.c bool aarch64_insn_is_branch_imm(u32 insn) insn 73 arch/arm64/kernel/insn.c return (aarch64_insn_is_b(insn) || aarch64_insn_is_bl(insn) || insn 74 arch/arm64/kernel/insn.c aarch64_insn_is_tbz(insn) || aarch64_insn_is_tbnz(insn) || insn 75 arch/arm64/kernel/insn.c aarch64_insn_is_cbz(insn) || aarch64_insn_is_cbnz(insn) || insn 76 arch/arm64/kernel/insn.c aarch64_insn_is_bcond(insn)); insn 119 arch/arm64/kernel/insn.c static int __kprobes __aarch64_insn_write(void *addr, __le32 insn) insn 128 arch/arm64/kernel/insn.c ret = probe_kernel_write(waddr, &insn, AARCH64_INSN_SIZE); insn 136 arch/arm64/kernel/insn.c int __kprobes aarch64_insn_write(void *addr, u32 insn) insn 138 arch/arm64/kernel/insn.c return __aarch64_insn_write(addr, cpu_to_le32(insn)); insn 141 arch/arm64/kernel/insn.c bool __kprobes aarch64_insn_uses_literal(u32 insn) insn 145 arch/arm64/kernel/insn.c return aarch64_insn_is_ldr_lit(insn) || insn 146 arch/arm64/kernel/insn.c aarch64_insn_is_ldrsw_lit(insn) || insn 147 arch/arm64/kernel/insn.c aarch64_insn_is_adr_adrp(insn) || insn 148 arch/arm64/kernel/insn.c aarch64_insn_is_prfm_lit(insn); insn 151 arch/arm64/kernel/insn.c bool __kprobes aarch64_insn_is_branch(u32 insn) insn 155 arch/arm64/kernel/insn.c return aarch64_insn_is_b(insn) || insn 156 arch/arm64/kernel/insn.c aarch64_insn_is_bl(insn) || insn 157 arch/arm64/kernel/insn.c aarch64_insn_is_cbz(insn) || insn 158 arch/arm64/kernel/insn.c aarch64_insn_is_cbnz(insn) || insn 159 arch/arm64/kernel/insn.c aarch64_insn_is_tbz(insn) || insn 160 arch/arm64/kernel/insn.c aarch64_insn_is_tbnz(insn) || insn 161 arch/arm64/kernel/insn.c aarch64_insn_is_ret(insn) || insn 162 arch/arm64/kernel/insn.c aarch64_insn_is_br(insn) || insn 163 arch/arm64/kernel/insn.c aarch64_insn_is_blr(insn) || insn 164 arch/arm64/kernel/insn.c aarch64_insn_is_bcond(insn); insn 167 arch/arm64/kernel/insn.c int __kprobes aarch64_insn_patch_text_nosync(void *addr, u32 insn) insn 176 arch/arm64/kernel/insn.c ret = aarch64_insn_write(tp, insn); insn 293 arch/arm64/kernel/insn.c u64 aarch64_insn_decode_immediate(enum aarch64_insn_imm_type type, u32 insn) insn 301 arch/arm64/kernel/insn.c immlo = (insn >> ADR_IMM_LOSHIFT) & ADR_IMM_LOMASK; insn 302 arch/arm64/kernel/insn.c immhi = (insn >> ADR_IMM_HISHIFT) & ADR_IMM_HIMASK; insn 303 arch/arm64/kernel/insn.c insn = (immhi << ADR_IMM_HILOSPLIT) | immlo; insn 314 arch/arm64/kernel/insn.c return (insn >> shift) & mask; insn 318 arch/arm64/kernel/insn.c u32 insn, u64 imm) insn 323 arch/arm64/kernel/insn.c if (insn == AARCH64_BREAK_FAULT) insn 345 arch/arm64/kernel/insn.c insn &= ~(mask << shift); insn 346 arch/arm64/kernel/insn.c insn |= (imm & mask) << shift; insn 348 arch/arm64/kernel/insn.c return insn; insn 352 arch/arm64/kernel/insn.c u32 insn) insn 377 arch/arm64/kernel/insn.c return (insn >> shift) & GENMASK(4, 0); insn 381 arch/arm64/kernel/insn.c u32 insn, insn 386 arch/arm64/kernel/insn.c if (insn == AARCH64_BREAK_FAULT) insn 416 arch/arm64/kernel/insn.c insn &= ~(GENMASK(4, 0) << shift); insn 417 arch/arm64/kernel/insn.c insn |= reg << shift; insn 419 arch/arm64/kernel/insn.c return insn; insn 423 arch/arm64/kernel/insn.c u32 insn) insn 445 arch/arm64/kernel/insn.c insn &= ~GENMASK(31, 30); insn 446 arch/arm64/kernel/insn.c insn |= size << 30; insn 448 arch/arm64/kernel/insn.c return insn; insn 474 arch/arm64/kernel/insn.c u32 insn; insn 488 arch/arm64/kernel/insn.c insn = aarch64_insn_get_bl_value(); insn 491 arch/arm64/kernel/insn.c insn = aarch64_insn_get_b_value(); insn 498 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_26, insn, insn 507 arch/arm64/kernel/insn.c u32 insn; insn 516 arch/arm64/kernel/insn.c insn = aarch64_insn_get_cbz_value(); insn 519 arch/arm64/kernel/insn.c insn = aarch64_insn_get_cbnz_value(); insn 530 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 537 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, insn, reg); insn 539 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_19, insn, insn 546 arch/arm64/kernel/insn.c u32 insn; insn 551 arch/arm64/kernel/insn.c insn = aarch64_insn_get_bcond_value(); insn 557 arch/arm64/kernel/insn.c insn |= cond; insn 559 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_19, insn, insn 576 arch/arm64/kernel/insn.c u32 insn; insn 580 arch/arm64/kernel/insn.c insn = aarch64_insn_get_br_value(); insn 583 arch/arm64/kernel/insn.c insn = aarch64_insn_get_blr_value(); insn 586 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ret_value(); insn 593 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, reg); insn 602 arch/arm64/kernel/insn.c u32 insn; insn 606 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ldr_reg_value(); insn 609 arch/arm64/kernel/insn.c insn = aarch64_insn_get_str_reg_value(); insn 616 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_ldst_size(size, insn); insn 618 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, insn, reg); insn 620 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 623 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, insn 634 arch/arm64/kernel/insn.c u32 insn; insn 639 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ldp_pre_value(); insn 642 arch/arm64/kernel/insn.c insn = aarch64_insn_get_stp_pre_value(); insn 645 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ldp_post_value(); insn 648 arch/arm64/kernel/insn.c insn = aarch64_insn_get_stp_post_value(); insn 671 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 678 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, insn, insn 681 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT2, insn, insn 684 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 687 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_7, insn, insn 697 arch/arm64/kernel/insn.c u32 insn; insn 701 arch/arm64/kernel/insn.c insn = aarch64_insn_get_load_ex_value(); insn 704 arch/arm64/kernel/insn.c insn = aarch64_insn_get_store_ex_value(); insn 711 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_ldst_size(size, insn); insn 713 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, insn, insn 716 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 719 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT2, insn, insn 722 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RS, insn, insn 731 arch/arm64/kernel/insn.c u32 insn = aarch64_insn_get_ldadd_value(); insn 742 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_ldst_size(size, insn); insn 744 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, insn, insn 747 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 750 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RS, insn, insn 769 arch/arm64/kernel/insn.c u32 insn) insn 813 arch/arm64/kernel/insn.c insn &= ~GENMASK(4, 0); insn 814 arch/arm64/kernel/insn.c insn |= imm_policy | (imm_target << 1) | (imm_type << 3); insn 816 arch/arm64/kernel/insn.c return insn; insn 824 arch/arm64/kernel/insn.c u32 insn = aarch64_insn_get_prfm_value(); insn 826 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_ldst_size(AARCH64_INSN_SIZE_64, insn); insn 828 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_prfm_imm(type, target, policy, insn); insn 830 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 833 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_12, insn, 0); insn 841 arch/arm64/kernel/insn.c u32 insn; insn 845 arch/arm64/kernel/insn.c insn = aarch64_insn_get_add_imm_value(); insn 848 arch/arm64/kernel/insn.c insn = aarch64_insn_get_sub_imm_value(); insn 851 arch/arm64/kernel/insn.c insn = aarch64_insn_get_adds_imm_value(); insn 854 arch/arm64/kernel/insn.c insn = aarch64_insn_get_subs_imm_value(); insn 865 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 883 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_LSL_12; insn 886 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 888 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 890 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_12, insn, imm); insn 903 arch/arm64/kernel/insn.c u32 insn; insn 908 arch/arm64/kernel/insn.c insn = aarch64_insn_get_bfm_value(); insn 911 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ubfm_value(); insn 914 arch/arm64/kernel/insn.c insn = aarch64_insn_get_sbfm_value(); insn 926 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT | AARCH64_INSN_N_BIT; insn 943 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 945 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 947 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_R, insn, immr); insn 949 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_S, insn, imms); insn 957 arch/arm64/kernel/insn.c u32 insn; insn 961 arch/arm64/kernel/insn.c insn = aarch64_insn_get_movz_value(); insn 964 arch/arm64/kernel/insn.c insn = aarch64_insn_get_movk_value(); insn 967 arch/arm64/kernel/insn.c insn = aarch64_insn_get_movn_value(); insn 988 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1000 arch/arm64/kernel/insn.c insn |= (shift >> 4) << 21; insn 1002 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1004 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_16, insn, imm); insn 1014 arch/arm64/kernel/insn.c u32 insn; insn 1018 arch/arm64/kernel/insn.c insn = aarch64_insn_get_add_value(); insn 1021 arch/arm64/kernel/insn.c insn = aarch64_insn_get_sub_value(); insn 1024 arch/arm64/kernel/insn.c insn = aarch64_insn_get_adds_value(); insn 1027 arch/arm64/kernel/insn.c insn = aarch64_insn_get_subs_value(); insn 1043 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1056 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1058 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 1060 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, reg); insn 1062 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_6, insn, shift); insn 1070 arch/arm64/kernel/insn.c u32 insn; insn 1074 arch/arm64/kernel/insn.c insn = aarch64_insn_get_rev16_value(); insn 1077 arch/arm64/kernel/insn.c insn = aarch64_insn_get_rev32_value(); insn 1085 arch/arm64/kernel/insn.c insn = aarch64_insn_get_rev64_value(); insn 1096 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1103 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1105 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 1114 arch/arm64/kernel/insn.c u32 insn; insn 1118 arch/arm64/kernel/insn.c insn = aarch64_insn_get_udiv_value(); insn 1121 arch/arm64/kernel/insn.c insn = aarch64_insn_get_sdiv_value(); insn 1124 arch/arm64/kernel/insn.c insn = aarch64_insn_get_lslv_value(); insn 1127 arch/arm64/kernel/insn.c insn = aarch64_insn_get_lsrv_value(); insn 1130 arch/arm64/kernel/insn.c insn = aarch64_insn_get_asrv_value(); insn 1133 arch/arm64/kernel/insn.c insn = aarch64_insn_get_rorv_value(); insn 1144 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1151 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1153 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 1155 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, reg); insn 1165 arch/arm64/kernel/insn.c u32 insn; insn 1169 arch/arm64/kernel/insn.c insn = aarch64_insn_get_madd_value(); insn 1172 arch/arm64/kernel/insn.c insn = aarch64_insn_get_msub_value(); insn 1183 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1190 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1192 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RA, insn, src); insn 1194 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, insn 1197 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, insn 1208 arch/arm64/kernel/insn.c u32 insn; insn 1212 arch/arm64/kernel/insn.c insn = aarch64_insn_get_and_value(); insn 1215 arch/arm64/kernel/insn.c insn = aarch64_insn_get_bic_value(); insn 1218 arch/arm64/kernel/insn.c insn = aarch64_insn_get_orr_value(); insn 1221 arch/arm64/kernel/insn.c insn = aarch64_insn_get_orn_value(); insn 1224 arch/arm64/kernel/insn.c insn = aarch64_insn_get_eor_value(); insn 1227 arch/arm64/kernel/insn.c insn = aarch64_insn_get_eon_value(); insn 1230 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ands_value(); insn 1233 arch/arm64/kernel/insn.c insn = aarch64_insn_get_bics_value(); insn 1249 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1262 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, dst); insn 1264 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, src); insn 1266 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, reg); insn 1268 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_6, insn, shift); insn 1275 arch/arm64/kernel/insn.c u32 insn; insn 1280 arch/arm64/kernel/insn.c insn = aarch64_insn_get_adr_value(); insn 1284 arch/arm64/kernel/insn.c insn = aarch64_insn_get_adrp_value(); insn 1295 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, reg); insn 1297 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_ADR, insn, offset); insn 1305 arch/arm64/kernel/insn.c s32 aarch64_get_branch_offset(u32 insn) insn 1309 arch/arm64/kernel/insn.c if (aarch64_insn_is_b(insn) || aarch64_insn_is_bl(insn)) { insn 1310 arch/arm64/kernel/insn.c imm = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_26, insn); insn 1314 arch/arm64/kernel/insn.c if (aarch64_insn_is_cbz(insn) || aarch64_insn_is_cbnz(insn) || insn 1315 arch/arm64/kernel/insn.c aarch64_insn_is_bcond(insn)) { insn 1316 arch/arm64/kernel/insn.c imm = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_19, insn); insn 1320 arch/arm64/kernel/insn.c if (aarch64_insn_is_tbz(insn) || aarch64_insn_is_tbnz(insn)) { insn 1321 arch/arm64/kernel/insn.c imm = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_14, insn); insn 1333 arch/arm64/kernel/insn.c u32 aarch64_set_branch_offset(u32 insn, s32 offset) insn 1335 arch/arm64/kernel/insn.c if (aarch64_insn_is_b(insn) || aarch64_insn_is_bl(insn)) insn 1336 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_26, insn, insn 1339 arch/arm64/kernel/insn.c if (aarch64_insn_is_cbz(insn) || aarch64_insn_is_cbnz(insn) || insn 1340 arch/arm64/kernel/insn.c aarch64_insn_is_bcond(insn)) insn 1341 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_19, insn, insn 1344 arch/arm64/kernel/insn.c if (aarch64_insn_is_tbz(insn) || aarch64_insn_is_tbnz(insn)) insn 1345 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_14, insn, insn 1352 arch/arm64/kernel/insn.c s32 aarch64_insn_adrp_get_offset(u32 insn) insn 1354 arch/arm64/kernel/insn.c BUG_ON(!aarch64_insn_is_adrp(insn)); insn 1355 arch/arm64/kernel/insn.c return aarch64_insn_decode_immediate(AARCH64_INSN_IMM_ADR, insn) << 12; insn 1358 arch/arm64/kernel/insn.c u32 aarch64_insn_adrp_set_offset(u32 insn, s32 offset) insn 1360 arch/arm64/kernel/insn.c BUG_ON(!aarch64_insn_is_adrp(insn)); insn 1361 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_ADR, insn, insn 1368 arch/arm64/kernel/insn.c u32 aarch64_insn_extract_system_reg(u32 insn) insn 1370 arch/arm64/kernel/insn.c return (insn & 0x1FFFE0) >> 5; insn 1373 arch/arm64/kernel/insn.c bool aarch32_insn_is_wide(u32 insn) insn 1375 arch/arm64/kernel/insn.c return insn >= 0xe800; insn 1381 arch/arm64/kernel/insn.c u32 aarch32_insn_extract_reg_num(u32 insn, int offset) insn 1383 arch/arm64/kernel/insn.c return (insn & (0xf << offset)) >> offset; insn 1388 arch/arm64/kernel/insn.c u32 aarch32_insn_mcr_extract_opc2(u32 insn) insn 1390 arch/arm64/kernel/insn.c return (insn & (OPC2_MASK << OPC2_OFFSET)) >> OPC2_OFFSET; insn 1394 arch/arm64/kernel/insn.c u32 aarch32_insn_mcr_extract_crm(u32 insn) insn 1396 arch/arm64/kernel/insn.c return insn & CRM_MASK; insn 1508 arch/arm64/kernel/insn.c u32 insn) insn 1524 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1597 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_N, insn, n); insn 1598 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_R, insn, immr); insn 1599 arch/arm64/kernel/insn.c return aarch64_insn_encode_immediate(AARCH64_INSN_IMM_S, insn, imms); insn 1608 arch/arm64/kernel/insn.c u32 insn; insn 1612 arch/arm64/kernel/insn.c insn = aarch64_insn_get_and_imm_value(); insn 1615 arch/arm64/kernel/insn.c insn = aarch64_insn_get_orr_imm_value(); insn 1618 arch/arm64/kernel/insn.c insn = aarch64_insn_get_eor_imm_value(); insn 1621 arch/arm64/kernel/insn.c insn = aarch64_insn_get_ands_imm_value(); insn 1628 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, Rd); insn 1629 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, Rn); insn 1630 arch/arm64/kernel/insn.c return aarch64_encode_immediate(imm, variant, insn); insn 1639 arch/arm64/kernel/insn.c u32 insn; insn 1641 arch/arm64/kernel/insn.c insn = aarch64_insn_get_extr_value(); insn 1651 arch/arm64/kernel/insn.c insn |= AARCH64_INSN_SF_BIT; insn 1652 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_N, insn, 1); insn 1659 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_S, insn, lsb); insn 1660 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RD, insn, Rd); insn 1661 arch/arm64/kernel/insn.c insn = aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RN, insn, Rn); insn 1662 arch/arm64/kernel/insn.c return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, Rm); insn 16 arch/arm64/kernel/jump_label.c u32 insn; insn 19 arch/arm64/kernel/jump_label.c insn = aarch64_insn_gen_branch_imm(jump_entry_code(entry), insn 23 arch/arm64/kernel/jump_label.c insn = aarch64_insn_gen_nop(); insn 26 arch/arm64/kernel/jump_label.c aarch64_insn_patch_text_nosync(addr, insn); insn 157 arch/arm64/kernel/module.c u32 insn = le32_to_cpu(*place); insn 168 arch/arm64/kernel/module.c insn &= ~(3 << 29); insn 171 arch/arm64/kernel/module.c insn |= 2 << 29; insn 184 arch/arm64/kernel/module.c insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_16, insn, imm); insn 185 arch/arm64/kernel/module.c *place = cpu_to_le32(insn); insn 198 arch/arm64/kernel/module.c u32 insn = le32_to_cpu(*place); insn 209 arch/arm64/kernel/module.c insn = aarch64_insn_encode_immediate(imm_type, insn, imm); insn 210 arch/arm64/kernel/module.c *place = cpu_to_le32(insn); insn 231 arch/arm64/kernel/module.c u32 insn; insn 240 arch/arm64/kernel/module.c insn = le32_to_cpu(*place); insn 241 arch/arm64/kernel/module.c insn &= ~BIT(31); insn 247 arch/arm64/kernel/module.c insn = aarch64_insn_gen_branch_imm((u64)place, val, insn 251 arch/arm64/kernel/module.c *place = cpu_to_le32(insn); insn 18 arch/arm64/kernel/probes/decode-insn.c static bool __kprobes aarch64_insn_is_steppable(u32 insn) insn 27 arch/arm64/kernel/probes/decode-insn.c if (aarch64_get_insn_class(insn) == AARCH64_INSN_CLS_BR_SYS) { insn 28 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_is_branch(insn) || insn 29 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_msr_imm(insn) || insn 30 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_msr_reg(insn) || insn 31 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_exception(insn) || insn 32 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_eret(insn)) insn 40 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_is_mrs(insn)) insn 41 arch/arm64/kernel/probes/decode-insn.c return aarch64_insn_extract_system_reg(insn) insn 48 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_is_hint(insn)) insn 49 arch/arm64/kernel/probes/decode-insn.c return aarch64_insn_is_nop(insn); insn 60 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_uses_literal(insn) || insn 61 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_exclusive(insn)) insn 73 arch/arm64/kernel/probes/decode-insn.c arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api) insn 79 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_is_steppable(insn)) insn 82 arch/arm64/kernel/probes/decode-insn.c if (aarch64_insn_is_bcond(insn)) { insn 84 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_cbz(insn) || insn 85 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_cbnz(insn)) { insn 87 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_tbz(insn) || insn 88 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_tbnz(insn)) { insn 90 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_adr_adrp(insn)) { insn 92 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_b(insn) || insn 93 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_bl(insn)) { insn 95 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_br(insn) || insn 96 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_blr(insn) || insn 97 arch/arm64/kernel/probes/decode-insn.c aarch64_insn_is_ret(insn)) { insn 99 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_ldr_lit(insn)) { insn 101 arch/arm64/kernel/probes/decode-insn.c } else if (aarch64_insn_is_ldrsw_lit(insn)) { insn 137 arch/arm64/kernel/probes/decode-insn.c probe_opcode_t insn = le32_to_cpu(*addr); insn 157 arch/arm64/kernel/probes/decode-insn.c decoded = arm_probe_decode_insn(insn, &asi->api); insn 31 arch/arm64/kernel/probes/decode-insn.h arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *asi); insn 53 arch/arm64/kernel/probes/kprobes.c patch_text(p->ainsn.api.insn, p->opcode); insn 55 arch/arm64/kernel/probes/kprobes.c flush_icache_range((uintptr_t) (p->ainsn.api.insn), insn 56 arch/arm64/kernel/probes/kprobes.c (uintptr_t) (p->ainsn.api.insn) + insn 102 arch/arm64/kernel/probes/kprobes.c p->ainsn.api.insn = NULL; insn 106 arch/arm64/kernel/probes/kprobes.c p->ainsn.api.insn = get_insn_slot(); insn 107 arch/arm64/kernel/probes/kprobes.c if (!p->ainsn.api.insn) insn 113 arch/arm64/kernel/probes/kprobes.c if (p->ainsn.api.insn) insn 148 arch/arm64/kernel/probes/kprobes.c if (p->ainsn.api.insn) { insn 149 arch/arm64/kernel/probes/kprobes.c free_insn_slot(p->ainsn.api.insn, 0); insn 150 arch/arm64/kernel/probes/kprobes.c p->ainsn.api.insn = NULL; insn 223 arch/arm64/kernel/probes/kprobes.c if (p->ainsn.api.insn) { insn 225 arch/arm64/kernel/probes/kprobes.c slot = (unsigned long)p->ainsn.api.insn; insn 16 arch/arm64/kernel/probes/simulate-insn.c #define bbl_displacement(insn) \ insn 17 arch/arm64/kernel/probes/simulate-insn.c sign_extend32(((insn) & 0x3ffffff) << 2, 27) insn 19 arch/arm64/kernel/probes/simulate-insn.c #define bcond_displacement(insn) \ insn 20 arch/arm64/kernel/probes/simulate-insn.c sign_extend32(((insn >> 5) & 0x7ffff) << 2, 20) insn 22 arch/arm64/kernel/probes/simulate-insn.c #define cbz_displacement(insn) \ insn 23 arch/arm64/kernel/probes/simulate-insn.c sign_extend32(((insn >> 5) & 0x7ffff) << 2, 20) insn 25 arch/arm64/kernel/probes/simulate-insn.c #define tbz_displacement(insn) \ insn 26 arch/arm64/kernel/probes/simulate-insn.c sign_extend32(((insn >> 5) & 0x3fff) << 2, 15) insn 28 arch/arm64/kernel/probes/simulate-insn.c #define ldr_displacement(insn) \ insn 29 arch/arm64/kernel/probes/simulate-insn.c sign_extend32(((insn >> 5) & 0x7ffff) << 2, 20) insn 37 arch/arm64/kernel/probes/uprobes.c probe_opcode_t insn; insn 45 arch/arm64/kernel/probes/uprobes.c insn = *(probe_opcode_t *)(&auprobe->insn[0]); insn 47 arch/arm64/kernel/probes/uprobes.c switch (arm_probe_decode_insn(insn, &auprobe->api)) { insn 105 arch/arm64/kernel/probes/uprobes.c probe_opcode_t insn; insn 111 arch/arm64/kernel/probes/uprobes.c insn = *(probe_opcode_t *)(&auprobe->insn[0]); insn 115 arch/arm64/kernel/probes/uprobes.c auprobe->api.handler(insn, addr, regs); insn 409 arch/arm64/kernel/traps.c #define __user_cache_maint(insn, address, res) \ insn 415 arch/arm64/kernel/traps.c "1: " insn ", %1\n" \ insn 66 arch/arm64/kvm/va_layout.c u32 insn = AARCH64_BREAK_FAULT; insn 70 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_logical_immediate(AARCH64_INSN_LOGIC_AND, insn 77 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_extr(AARCH64_INSN_VARIANT_64BIT, insn 83 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_add_sub_imm(rd, rn, insn 90 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_add_sub_imm(rd, rn, insn 98 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_extr(AARCH64_INSN_VARIANT_64BIT, insn 103 arch/arm64/kvm/va_layout.c return insn; insn 117 arch/arm64/kvm/va_layout.c u32 rd, rn, insn, oinsn; insn 136 arch/arm64/kvm/va_layout.c insn = compute_instruction(i, rd, rn); insn 137 arch/arm64/kvm/va_layout.c BUG_ON(insn == AARCH64_BREAK_FAULT); insn 139 arch/arm64/kvm/va_layout.c updptr[i] = cpu_to_le32(insn); insn 150 arch/arm64/kvm/va_layout.c u32 insn; insn 179 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_load_store_pair(AARCH64_INSN_REG_0, insn 185 arch/arm64/kvm/va_layout.c *updptr++ = cpu_to_le32(insn); insn 188 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_movewide(AARCH64_INSN_REG_0, insn 193 arch/arm64/kvm/va_layout.c *updptr++ = cpu_to_le32(insn); insn 196 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_movewide(AARCH64_INSN_REG_0, insn 201 arch/arm64/kvm/va_layout.c *updptr++ = cpu_to_le32(insn); insn 204 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_movewide(AARCH64_INSN_REG_0, insn 209 arch/arm64/kvm/va_layout.c *updptr++ = cpu_to_le32(insn); insn 212 arch/arm64/kvm/va_layout.c insn = aarch64_insn_gen_branch_reg(AARCH64_INSN_REG_0, insn 214 arch/arm64/kvm/va_layout.c *updptr++ = cpu_to_le32(insn); insn 63 arch/arm64/net/bpf_jit_comp.c static inline void emit(const u32 insn, struct jit_ctx *ctx) insn 66 arch/arm64/net/bpf_jit_comp.c ctx->image[ctx->idx] = cpu_to_le32(insn); insn 342 arch/arm64/net/bpf_jit_comp.c static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, insn 345 arch/arm64/net/bpf_jit_comp.c const u8 code = insn->code; insn 346 arch/arm64/net/bpf_jit_comp.c const u8 dst = bpf2a64[insn->dst_reg]; insn 347 arch/arm64/net/bpf_jit_comp.c const u8 src = bpf2a64[insn->src_reg]; insn 351 arch/arm64/net/bpf_jit_comp.c const s16 off = insn->off; insn 352 arch/arm64/net/bpf_jit_comp.c const s32 imm = insn->imm; insn 353 arch/arm64/net/bpf_jit_comp.c const int i = insn - ctx->prog->insnsi; insn 642 arch/arm64/net/bpf_jit_comp.c ret = bpf_jit_get_func_addr(ctx->prog, insn, extra_pass, insn 670 arch/arm64/net/bpf_jit_comp.c const struct bpf_insn insn1 = insn[1]; insn 784 arch/arm64/net/bpf_jit_comp.c const struct bpf_insn *insn = &prog->insnsi[i]; insn 787 arch/arm64/net/bpf_jit_comp.c ret = build_insn(insn, ctx, extra_pass); insn 405 arch/csky/include/asm/uaccess.h unsigned long insn; insn 13 arch/hexagon/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 17 arch/hexagon/include/asm/futex.h insn \ insn 8 arch/ia64/include/asm/extable.h int insn; /* location-relative address of insn this fixup is for */ insn 9 arch/ia64/include/asm/futex.h #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ insn 14 arch/ia64/include/asm/futex.h "[1:] " insn ";; \n" \ insn 23 arch/ia64/include/asm/futex.h #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ insn 32 arch/ia64/include/asm/futex.h insn ";; \n" \ insn 99 arch/ia64/include/asm/kprobes.h kprobe_opcode_t *insn; insn 551 arch/ia64/kernel/kprobes.c if (can_boost(&p->ainsn.insn[0].bundle, slot, addr)) { insn 552 arch/ia64/kernel/kprobes.c set_brl_inst(&p->ainsn.insn[1].bundle, (bundle_t *)addr + 1); insn 590 arch/ia64/kernel/kprobes.c p->ainsn.insn = get_insn_slot(); insn 591 arch/ia64/kernel/kprobes.c if (!p->ainsn.insn) insn 594 arch/ia64/kernel/kprobes.c memcpy(p->ainsn.insn, kprobe_addr, sizeof(kprobe_opcode_t)); insn 612 arch/ia64/kernel/kprobes.c flush_icache_range((unsigned long)p->ainsn.insn, insn 613 arch/ia64/kernel/kprobes.c (unsigned long)p->ainsn.insn + insn 638 arch/ia64/kernel/kprobes.c src = &p->ainsn.insn->bundle; insn 655 arch/ia64/kernel/kprobes.c if (p->ainsn.insn) { insn 656 arch/ia64/kernel/kprobes.c free_insn_slot(p->ainsn.insn, insn 658 arch/ia64/kernel/kprobes.c p->ainsn.insn = NULL; insn 671 arch/ia64/kernel/kprobes.c unsigned long bundle_addr = (unsigned long) (&p->ainsn.insn->bundle); insn 676 arch/ia64/kernel/kprobes.c template = p->ainsn.insn->bundle.quad0.template; insn 739 arch/ia64/kernel/kprobes.c unsigned long bundle_addr = (unsigned long) &p->ainsn.insn->bundle; insn 848 arch/ia64/kernel/kprobes.c regs->cr_iip = (unsigned long)&p->ainsn.insn->bundle & ~0xFULL; insn 141 arch/ia64/kernel/module.c struct insn; insn 144 arch/ia64/kernel/module.c bundle (const struct insn *insn) insn 146 arch/ia64/kernel/module.c return (uint64_t) insn & ~0xfUL; insn 150 arch/ia64/kernel/module.c slot (const struct insn *insn) insn 152 arch/ia64/kernel/module.c return (uint64_t) insn & 0x3; insn 156 arch/ia64/kernel/module.c apply_imm64 (struct module *mod, struct insn *insn, uint64_t val) insn 158 arch/ia64/kernel/module.c if (slot(insn) != 1 && slot(insn) != 2) { insn 160 arch/ia64/kernel/module.c mod->name, slot(insn)); insn 163 arch/ia64/kernel/module.c ia64_patch_imm64((u64) insn, val); insn 168 arch/ia64/kernel/module.c apply_imm60 (struct module *mod, struct insn *insn, uint64_t val) insn 170 arch/ia64/kernel/module.c if (slot(insn) != 1 && slot(insn) != 2) { insn 172 arch/ia64/kernel/module.c mod->name, slot(insn)); insn 180 arch/ia64/kernel/module.c ia64_patch_imm60((u64) insn, val); insn 185 arch/ia64/kernel/module.c apply_imm22 (struct module *mod, struct insn *insn, uint64_t val) insn 192 arch/ia64/kernel/module.c ia64_patch((u64) insn, 0x01fffcfe000UL, ( ((val & 0x200000UL) << 15) /* bit 21 -> 36 */ insn 200 arch/ia64/kernel/module.c apply_imm21b (struct module *mod, struct insn *insn, uint64_t val) insn 207 arch/ia64/kernel/module.c ia64_patch((u64) insn, 0x11ffffe000UL, ( ((val & 0x100000UL) << 16) /* bit 20 -> 36 */ insn 237 arch/ia64/kernel/module.c if (apply_imm64(mod, (struct insn *) (plt->bundle[0] + 2), target_gp) insn 238 arch/ia64/kernel/module.c && apply_imm60(mod, (struct insn *) (plt->bundle[1] + 2), insn 287 arch/ia64/kernel/module.c if (apply_imm64(mod, (struct insn *) (plt->bundle[0] + 2), target_ip) insn 288 arch/ia64/kernel/module.c && apply_imm64(mod, (struct insn *) (plt->bundle[1] + 2), target_gp)) insn 539 arch/ia64/kernel/module.c get_plt (struct module *mod, const struct insn *insn, uint64_t value, int *okp) insn 547 arch/ia64/kernel/module.c if (in_init(mod, (uint64_t) insn)) { insn 1304 arch/ia64/kernel/unaligned.c load_store_t insn; insn 1391 arch/ia64/kernel/unaligned.c "ld.x6=0x%x ld.m=%d ld.op=%d\n", opcode, u.insn.qp, u.insn.r1, u.insn.imm, insn 1392 arch/ia64/kernel/unaligned.c u.insn.r3, u.insn.x, u.insn.hint, u.insn.x6_sz, u.insn.m, u.insn.op); insn 1431 arch/ia64/kernel/unaligned.c if (u.insn.x) insn 1459 arch/ia64/kernel/unaligned.c if (u.insn.x) insn 1470 arch/ia64/kernel/unaligned.c ret = emulate_load_int(ifa, u.insn, regs); insn 1475 arch/ia64/kernel/unaligned.c if (u.insn.x) insn 1481 arch/ia64/kernel/unaligned.c ret = emulate_store_int(ifa, u.insn, regs); insn 1488 arch/ia64/kernel/unaligned.c if (u.insn.x) insn 1489 arch/ia64/kernel/unaligned.c ret = emulate_load_floatpair(ifa, u.insn, regs); insn 1491 arch/ia64/kernel/unaligned.c ret = emulate_load_float(ifa, u.insn, regs); insn 1498 arch/ia64/kernel/unaligned.c ret = emulate_load_float(ifa, u.insn, regs); insn 1503 arch/ia64/kernel/unaligned.c ret = emulate_store_float(ifa, u.insn, regs); insn 1346 arch/ia64/kernel/unwind.c script_emit (struct unw_script *script, struct unw_insn insn) insn 1353 arch/ia64/kernel/unwind.c script->insn[script->count++] = insn; insn 1361 arch/ia64/kernel/unwind.c struct unw_insn insn; insn 1395 arch/ia64/kernel/unwind.c insn.opc = opc; insn 1396 arch/ia64/kernel/unwind.c insn.dst = unw.preg_index[i]; insn 1397 arch/ia64/kernel/unwind.c insn.val = val; insn 1398 arch/ia64/kernel/unwind.c script_emit(script, insn); insn 1407 arch/ia64/kernel/unwind.c struct unw_insn insn; insn 1480 arch/ia64/kernel/unwind.c insn.opc = opc; insn 1481 arch/ia64/kernel/unwind.c insn.dst = unw.preg_index[i]; insn 1482 arch/ia64/kernel/unwind.c insn.val = val; insn 1483 arch/ia64/kernel/unwind.c script_emit(script, insn); insn 1494 arch/ia64/kernel/unwind.c insn.opc = UNW_INSN_LOAD; insn 1495 arch/ia64/kernel/unwind.c insn.dst = insn.val = unw.preg_index[UNW_REG_PSP]; insn 1496 arch/ia64/kernel/unwind.c script_emit(script, insn); insn 1536 arch/ia64/kernel/unwind.c struct unw_insn insn; insn 1677 arch/ia64/kernel/unwind.c insn.opc = UNW_INSN_ADD; insn 1678 arch/ia64/kernel/unwind.c insn.dst = offsetof(struct unw_frame_info, psp)/8; insn 1679 arch/ia64/kernel/unwind.c insn.val = sr.curr.reg[UNW_REG_PSP].val; /* frame size */ insn 1680 arch/ia64/kernel/unwind.c script_emit(script, insn); insn 1729 arch/ia64/kernel/unwind.c ip = script->insn; insn 1730 arch/ia64/kernel/unwind.c limit = script->insn + script->count; insn 164 arch/ia64/kernel/unwind_i.h struct unw_insn insn[UNW_MAX_SCRIPT_LEN]; insn 11 arch/microblaze/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 15 arch/microblaze/include/asm/futex.h insn \ insn 130 arch/microblaze/include/asm/uaccess.h #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ insn 133 arch/microblaze/include/asm/uaccess.h "1:" insn " %1, %2, r0;" \ insn 199 arch/microblaze/include/asm/uaccess.h #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ insn 202 arch/microblaze/include/asm/uaccess.h "1:" insn " %1, %2, r0;" \ insn 1131 arch/mips/cavium-octeon/setup.c u32 insn; insn 1134 arch/mips/cavium-octeon/setup.c foo = &insn; insn 1145 arch/mips/cavium-octeon/setup.c : "=r" (insn) : : "$31", "memory"); insn 1147 arch/mips/cavium-octeon/setup.c if ((insn >> 26) != 0x33) insn 1150 arch/mips/cavium-octeon/setup.c if (((insn >> 16) & 0x1f) != 28) insn 1153 arch/mips/cavium-octeon/setup.c insn); insn 77 arch/mips/dec/kn01-berr.c union mips_instruction insn; insn 100 arch/mips/dec/kn01-berr.c __get_user(insn.word, pc); insn 101 arch/mips/dec/kn01-berr.c vaddr = regs->regs[insn.i_format.rs] + insn 102 arch/mips/dec/kn01-berr.c insn.i_format.simmediate; insn 47 arch/mips/include/asm/asm-eva.h #define __BUILD_EVA_INSN(insn, reg, addr) \ insn 51 arch/mips/include/asm/asm-eva.h " "insn" "reg", "addr "\n" \ insn 134 arch/mips/include/asm/asm-eva.h #define __BUILD_EVA_INSN(insn, reg, addr) \ insn 138 arch/mips/include/asm/asm-eva.h insn reg, addr; \ insn 33 arch/mips/include/asm/asm.h .insn insn 45 arch/mips/include/asm/asm.h .insn insn 68 arch/mips/include/asm/asm.h symbol: .insn insn 30 arch/mips/include/asm/asmmacro.h .insn insn 42 arch/mips/include/asm/asmmacro.h .insn insn 19 arch/mips/include/asm/branch.h union mips_instruction insn); insn 7 arch/mips/include/asm/extable.h unsigned long insn; insn 21 arch/mips/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 31 arch/mips/include/asm/futex.h " " insn " \n" \ insn 61 arch/mips/include/asm/futex.h " " insn " \n" \ insn 78 arch/mips/include/asm/inst.h mips_instruction insn; insn 49 arch/mips/include/asm/kprobes.h kprobe_opcode_t *insn; insn 1162 arch/mips/include/asm/mipsregs.h static inline int mm_insn_16bit(u16 insn) insn 1164 arch/mips/include/asm/mipsregs.h u16 opcode = (insn >> 10) & 0x7; insn 53 arch/mips/include/asm/paccess.h #define __get_dbe_asm(insn) \ insn 56 arch/mips/include/asm/paccess.h "1:\t" insn "\t%1,%2\n\t" \ insn 92 arch/mips/include/asm/paccess.h #define __put_dbe_asm(insn) \ insn 95 arch/mips/include/asm/paccess.h "1:\t" insn "\t%1,%2\n\t" \ insn 265 arch/mips/include/asm/uaccess.h #define __GET_DW(val, insn, ptr) __get_data_asm_ll32(val, insn, ptr) insn 268 arch/mips/include/asm/uaccess.h #define __GET_DW(val, insn, ptr) __get_data_asm(val, insn, ptr) insn 314 arch/mips/include/asm/uaccess.h #define __get_data_asm(val, insn, addr) \ insn 319 arch/mips/include/asm/uaccess.h "1: "insn("%1", "%3")" \n" \ insn 339 arch/mips/include/asm/uaccess.h #define __get_data_asm_ll32(val, insn, addr) \ insn 347 arch/mips/include/asm/uaccess.h "1: " insn("%1", "(%3)")" \n" \ insn 348 arch/mips/include/asm/uaccess.h "2: " insn("%D1", "4(%3)")" \n" \ insn 406 arch/mips/include/asm/uaccess.h #define __PUT_DW(insn, ptr) __put_data_asm_ll32(insn, ptr) insn 409 arch/mips/include/asm/uaccess.h #define __PUT_DW(insn, ptr) __put_data_asm(insn, ptr) insn 455 arch/mips/include/asm/uaccess.h #define __put_data_asm(insn, ptr) \ insn 458 arch/mips/include/asm/uaccess.h "1: "insn("%z2", "%3")" # __put_data_asm \n" \ insn 473 arch/mips/include/asm/uaccess.h #define __put_data_asm_ll32(insn, ptr) \ insn 476 arch/mips/include/asm/uaccess.h "1: "insn("%2", "(%3)")" # __put_data_asm_ll32 \n" \ insn 477 arch/mips/include/asm/uaccess.h "2: "insn("%D2", "4(%3)")" \n" \ insn 37 arch/mips/include/asm/uprobes.h u32 insn[2]; insn 60 arch/mips/kernel/branch.c union mips_instruction insn = (union mips_instruction)dec_insn.insn; insn 66 arch/mips/kernel/branch.c switch (insn.mm_i_format.opcode) { insn 68 arch/mips/kernel/branch.c if ((insn.mm_i_format.simmediate & MM_POOL32A_MINOR_MASK) == insn 70 arch/mips/kernel/branch.c switch (insn.mm_i_format.simmediate >> insn 76 arch/mips/kernel/branch.c if (insn.mm_i_format.rt != 0) /* Not mm_jr */ insn 77 arch/mips/kernel/branch.c regs->regs[insn.mm_i_format.rt] = insn 81 arch/mips/kernel/branch.c *contpc = regs->regs[insn.mm_i_format.rs]; insn 87 arch/mips/kernel/branch.c switch (insn.mm_i_format.rt) { insn 95 arch/mips/kernel/branch.c if ((long)regs->regs[insn.mm_i_format.rs] < 0) insn 98 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 111 arch/mips/kernel/branch.c if ((long)regs->regs[insn.mm_i_format.rs] >= 0) insn 114 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 121 arch/mips/kernel/branch.c if ((long)regs->regs[insn.mm_i_format.rs] <= 0) insn 124 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 131 arch/mips/kernel/branch.c if ((long)regs->regs[insn.mm_i_format.rs] <= 0) insn 134 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 160 arch/mips/kernel/branch.c bit = (insn.mm_i_format.rs >> 2); insn 166 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 176 arch/mips/kernel/branch.c switch (insn.mm_i_format.rt) { insn 183 arch/mips/kernel/branch.c *contpc = regs->regs[insn.mm_i_format.rs]; insn 188 arch/mips/kernel/branch.c if ((long)regs->regs[reg16to32map[insn.mm_b1_format.rs]] == 0) insn 191 arch/mips/kernel/branch.c (insn.mm_b1_format.simmediate << 1); insn 197 arch/mips/kernel/branch.c if ((long)regs->regs[reg16to32map[insn.mm_b1_format.rs]] != 0) insn 200 arch/mips/kernel/branch.c (insn.mm_b1_format.simmediate << 1); insn 207 arch/mips/kernel/branch.c (insn.mm_b0_format.simmediate << 1); insn 210 arch/mips/kernel/branch.c if (regs->regs[insn.mm_i_format.rs] == insn 211 arch/mips/kernel/branch.c regs->regs[insn.mm_i_format.rt]) insn 214 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 221 arch/mips/kernel/branch.c if (regs->regs[insn.mm_i_format.rs] != insn 222 arch/mips/kernel/branch.c regs->regs[insn.mm_i_format.rt]) insn 225 arch/mips/kernel/branch.c (insn.mm_i_format.simmediate << 1); insn 236 arch/mips/kernel/branch.c *contpc |= (insn.j_format.target << 2); insn 247 arch/mips/kernel/branch.c *contpc |= (insn.j_format.target << 1); insn 285 arch/mips/kernel/branch.c mminsn.insn = word; insn 421 arch/mips/kernel/branch.c union mips_instruction insn) insn 427 arch/mips/kernel/branch.c switch (insn.i_format.opcode) { insn 432 arch/mips/kernel/branch.c switch (insn.r_format.func) { insn 434 arch/mips/kernel/branch.c regs->regs[insn.r_format.rd] = epc + 8; insn 437 arch/mips/kernel/branch.c if (NO_R6EMU && insn.r_format.func == jr_op) insn 439 arch/mips/kernel/branch.c regs->cp0_epc = regs->regs[insn.r_format.rs]; insn 450 arch/mips/kernel/branch.c switch (insn.i_format.rt) { insn 456 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] < 0) { insn 457 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 458 arch/mips/kernel/branch.c if (insn.i_format.rt == bltzl_op) insn 470 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] >= 0) { insn 471 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 472 arch/mips/kernel/branch.c if (insn.i_format.rt == bgezl_op) insn 481 arch/mips/kernel/branch.c if (NO_R6EMU && (insn.i_format.rs || insn 482 arch/mips/kernel/branch.c insn.i_format.rt == bltzall_op)) insn 491 arch/mips/kernel/branch.c if (!insn.i_format.rs) { insn 498 arch/mips/kernel/branch.c (insn.i_format.simmediate << 2); insn 502 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] < 0) { insn 503 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 504 arch/mips/kernel/branch.c if (insn.i_format.rt == bltzall_op) insn 513 arch/mips/kernel/branch.c if (NO_R6EMU && (insn.i_format.rs || insn 514 arch/mips/kernel/branch.c insn.i_format.rt == bgezall_op)) insn 523 arch/mips/kernel/branch.c if (!insn.i_format.rs) { insn 530 arch/mips/kernel/branch.c (insn.i_format.simmediate << 2); insn 534 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] >= 0) { insn 535 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 536 arch/mips/kernel/branch.c if (insn.i_format.rt == bgezall_op) insn 550 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 569 arch/mips/kernel/branch.c epc |= (insn.j_format.target << 2); insn 571 arch/mips/kernel/branch.c if (insn.i_format.opcode == jalx_op) insn 583 arch/mips/kernel/branch.c if (regs->regs[insn.i_format.rs] == insn 584 arch/mips/kernel/branch.c regs->regs[insn.i_format.rt]) { insn 585 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 586 arch/mips/kernel/branch.c if (insn.i_format.opcode == beql_op) insn 598 arch/mips/kernel/branch.c if (regs->regs[insn.i_format.rs] != insn 599 arch/mips/kernel/branch.c regs->regs[insn.i_format.rt]) { insn 600 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 601 arch/mips/kernel/branch.c if (insn.i_format.opcode == bnel_op) insn 609 arch/mips/kernel/branch.c if (!insn.i_format.rt && NO_R6EMU) insn 626 arch/mips/kernel/branch.c if (cpu_has_mips_r6 && insn.i_format.rt) { insn 627 arch/mips/kernel/branch.c if ((insn.i_format.opcode == blez_op) && insn 628 arch/mips/kernel/branch.c ((!insn.i_format.rs && insn.i_format.rt) || insn 629 arch/mips/kernel/branch.c (insn.i_format.rs == insn.i_format.rt))) insn 635 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] <= 0) { insn 636 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 637 arch/mips/kernel/branch.c if (insn.i_format.opcode == blezl_op) insn 645 arch/mips/kernel/branch.c if (!insn.i_format.rt && NO_R6EMU) insn 662 arch/mips/kernel/branch.c if (cpu_has_mips_r6 && insn.i_format.rt) { insn 663 arch/mips/kernel/branch.c if ((insn.i_format.opcode == blez_op) && insn 664 arch/mips/kernel/branch.c ((!insn.i_format.rs && insn.i_format.rt) || insn 665 arch/mips/kernel/branch.c (insn.i_format.rs == insn.i_format.rt))) insn 672 arch/mips/kernel/branch.c if ((long)regs->regs[insn.i_format.rs] > 0) { insn 673 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 674 arch/mips/kernel/branch.c if (insn.i_format.opcode == bgtzl_op) insn 689 arch/mips/kernel/branch.c ((insn.i_format.rs == bc1eqz_op) || insn 690 arch/mips/kernel/branch.c (insn.i_format.rs == bc1nez_op))) { insn 693 arch/mips/kernel/branch.c reg = insn.i_format.rt; insn 695 arch/mips/kernel/branch.c if (insn.i_format.rs == bc1eqz_op) insn 700 arch/mips/kernel/branch.c (insn.i_format.simmediate << 2); insn 715 arch/mips/kernel/branch.c bit = (insn.i_format.rt >> 2); insn 718 arch/mips/kernel/branch.c switch (insn.i_format.rt & 3) { insn 723 arch/mips/kernel/branch.c (insn.i_format.simmediate << 2); insn 724 arch/mips/kernel/branch.c if (insn.i_format.rt == 2) insn 735 arch/mips/kernel/branch.c (insn.i_format.simmediate << 2); insn 736 arch/mips/kernel/branch.c if (insn.i_format.rt == 3) insn 750 arch/mips/kernel/branch.c if ((regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) insn 752 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 758 arch/mips/kernel/branch.c if ((regs->regs[insn.i_format.rs] & insn 759 arch/mips/kernel/branch.c (1ull<<(insn.i_format.rt+32))) == 0) insn 760 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 766 arch/mips/kernel/branch.c if (regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) insn 767 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 773 arch/mips/kernel/branch.c if (regs->regs[insn.i_format.rs] & insn 774 arch/mips/kernel/branch.c (1ull<<(insn.i_format.rt+32))) insn 775 arch/mips/kernel/branch.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 792 arch/mips/kernel/branch.c epc += 4 + (insn.i_format.simmediate << 2); insn 805 arch/mips/kernel/branch.c if (!insn.i_format.rs) { insn 821 arch/mips/kernel/branch.c if (insn.i_format.rt && !insn.i_format.rs) insn 851 arch/mips/kernel/branch.c union mips_instruction insn; insn 861 arch/mips/kernel/branch.c if (__get_user(insn.word, addr)) { insn 866 arch/mips/kernel/branch.c return __compute_return_epc_for_insn(regs, insn); insn 876 arch/mips/kernel/branch.c int __insn_is_compact_branch(union mips_instruction insn) insn 881 arch/mips/kernel/branch.c switch (insn.i_format.opcode) { insn 890 arch/mips/kernel/branch.c if (insn.i_format.rt) insn 42 arch/mips/kernel/jump_label.c union mips_instruction insn; insn 62 arch/mips/kernel/jump_label.c insn.j_format.opcode = bc6_op; insn 63 arch/mips/kernel/jump_label.c insn.j_format.target = offset; insn 72 arch/mips/kernel/jump_label.c insn.j_format.opcode = J_ISA_BIT ? mm_j32_op : j_op; insn 73 arch/mips/kernel/jump_label.c insn.j_format.target = e->target >> J_RANGE_SHIFT; insn 76 arch/mips/kernel/jump_label.c insn.word = 0; /* nop */ insn 81 arch/mips/kernel/jump_label.c insn_p->halfword[0] = insn.word >> 16; insn 82 arch/mips/kernel/jump_label.c insn_p->halfword[1] = insn.word; insn 84 arch/mips/kernel/jump_label.c *insn_p = insn; insn 45 arch/mips/kernel/kprobes.c static int __kprobes insn_has_delayslot(union mips_instruction insn) insn 47 arch/mips/kernel/kprobes.c return __insn_has_delay_slot(insn); insn 57 arch/mips/kernel/kprobes.c static int __kprobes insn_has_ll_or_sc(union mips_instruction insn) insn 61 arch/mips/kernel/kprobes.c switch (insn.i_format.opcode) { insn 76 arch/mips/kernel/kprobes.c union mips_instruction insn; insn 80 arch/mips/kernel/kprobes.c insn = p->addr[0]; insn 82 arch/mips/kernel/kprobes.c if (insn_has_ll_or_sc(insn)) { insn 97 arch/mips/kernel/kprobes.c if (__insn_is_compact_branch(insn)) { insn 104 arch/mips/kernel/kprobes.c p->ainsn.insn = get_insn_slot(); insn 105 arch/mips/kernel/kprobes.c if (!p->ainsn.insn) { insn 123 arch/mips/kernel/kprobes.c if (insn_has_delayslot(insn)) insn 124 arch/mips/kernel/kprobes.c memcpy(&p->ainsn.insn[0], p->addr + 1, sizeof(kprobe_opcode_t)); insn 126 arch/mips/kernel/kprobes.c memcpy(&p->ainsn.insn[0], p->addr, sizeof(kprobe_opcode_t)); insn 128 arch/mips/kernel/kprobes.c p->ainsn.insn[1] = breakpoint2_insn; insn 149 arch/mips/kernel/kprobes.c if (p->ainsn.insn) { insn 150 arch/mips/kernel/kprobes.c free_insn_slot(p->ainsn.insn, 0); insn 151 arch/mips/kernel/kprobes.c p->ainsn.insn = NULL; insn 197 arch/mips/kernel/kprobes.c union mips_instruction insn = p->opcode; insn 205 arch/mips/kernel/kprobes.c if (p->ainsn.insn->word == 0) insn 210 arch/mips/kernel/kprobes.c ret = __compute_return_epc_for_insn(regs, insn); insn 246 arch/mips/kernel/kprobes.c regs->cp0_epc = (unsigned long)&p->ainsn.insn[0]; insn 294 arch/mips/kernel/kprobes.c p->ainsn.insn->word == breakpoint_insn.word) { insn 137 arch/mips/kernel/module.c unsigned long insn; insn 151 arch/mips/kernel/module.c insn = *l->addr; insn 152 arch/mips/kernel/module.c val = ((insn & 0xffff) << 16) + vallo; insn 161 arch/mips/kernel/module.c insn = (insn & ~0xffff) | val; insn 162 arch/mips/kernel/module.c *l->addr = insn; insn 12 arch/mips/kernel/probes-common.h int __insn_is_compact_branch(union mips_instruction insn); insn 14 arch/mips/kernel/probes-common.h static inline int __insn_has_delay_slot(const union mips_instruction insn) insn 16 arch/mips/kernel/probes-common.h switch (insn.i_format.opcode) { insn 21 arch/mips/kernel/probes-common.h switch (insn.r_format.func) { insn 34 arch/mips/kernel/probes-common.h switch (insn.i_format.rt) { insn 374 arch/mips/kernel/process.c union mips_instruction insn, *ip; insn 391 arch/mips/kernel/process.c insn.word = ip->halfword[0] << 16; insn 394 arch/mips/kernel/process.c insn.word = ip->halfword[0] << 16 | ip->halfword[1]; insn 397 arch/mips/kernel/process.c insn.word = ip->word; insn 402 arch/mips/kernel/process.c is_sp_move_ins(&insn, &info->frame_size); insn 422 arch/mips/kernel/process.c is_ra_save_ins(&insn, &info->pc_offset)) insn 119 arch/mips/kernel/relocate.c unsigned long insn = *loc_orig; insn 120 arch/mips/kernel/relocate.c unsigned long target = (insn & 0xffff) << 16; /* high 16bits of target */ insn 124 arch/mips/kernel/relocate.c *loc_new = (insn & ~0xffff) | ((target >> 16) & 0xffff); insn 241 arch/mips/kernel/traps.c unsigned int insn; insn 242 arch/mips/kernel/traps.c if (pc16 ? __get_user(insn, pc16 + i) : __get_user(insn, pc + i)) { insn 246 arch/mips/kernel/traps.c pr_cont("%c%0*x%c", (i?' ':'<'), pc16 ? 4 : 8, insn, (i?' ':'>')); insn 2052 arch/mips/kernel/traps.c u32 insn; insn 2057 arch/mips/kernel/traps.c insn = 0xd4000000 | (((u32)handler & 0x07ffffff) >> 1); insn 2059 arch/mips/kernel/traps.c insn = 0x08000000 | (((u32)handler & 0x0fffffff) >> 2); insn 2061 arch/mips/kernel/traps.c h[0] = (insn >> 16) & 0xffff; insn 2062 arch/mips/kernel/traps.c h[1] = insn & 0xffff; insn 887 arch/mips/kernel/unaligned.c union mips_instruction insn; insn 900 arch/mips/kernel/unaligned.c __get_user(insn.word, pc); insn 902 arch/mips/kernel/unaligned.c switch (insn.i_format.opcode) { insn 937 arch/mips/kernel/unaligned.c if (insn.dsp_format.func == lx_op) { insn 938 arch/mips/kernel/unaligned.c switch (insn.dsp_format.op) { insn 946 arch/mips/kernel/unaligned.c regs->regs[insn.dsp_format.rd] = value; insn 955 arch/mips/kernel/unaligned.c regs->regs[insn.dsp_format.rd] = value; insn 970 arch/mips/kernel/unaligned.c switch (insn.spec3_format.func) { insn 982 arch/mips/kernel/unaligned.c regs->regs[insn.spec3_format.rt] = value; insn 995 arch/mips/kernel/unaligned.c regs->regs[insn.spec3_format.rt] = value; insn 1008 arch/mips/kernel/unaligned.c regs->regs[insn.spec3_format.rt] = value; insn 1016 arch/mips/kernel/unaligned.c value = regs->regs[insn.spec3_format.rt]; insn 1029 arch/mips/kernel/unaligned.c value = regs->regs[insn.spec3_format.rt]; insn 1060 arch/mips/kernel/unaligned.c regs->regs[insn.i_format.rt] = value; insn 1079 arch/mips/kernel/unaligned.c regs->regs[insn.i_format.rt] = value; insn 1098 arch/mips/kernel/unaligned.c regs->regs[insn.i_format.rt] = value; insn 1117 arch/mips/kernel/unaligned.c regs->regs[insn.i_format.rt] = value; insn 1140 arch/mips/kernel/unaligned.c regs->regs[insn.i_format.rt] = value; insn 1152 arch/mips/kernel/unaligned.c value = regs->regs[insn.i_format.rt]; insn 1172 arch/mips/kernel/unaligned.c value = regs->regs[insn.i_format.rt]; insn 1200 arch/mips/kernel/unaligned.c value = regs->regs[insn.i_format.rt]; insn 1252 arch/mips/kernel/unaligned.c df = insn.msa_mi10_format.df; insn 1253 arch/mips/kernel/unaligned.c wd = insn.msa_mi10_format.wd; insn 1256 arch/mips/kernel/unaligned.c switch (insn.msa_mi10_format.func) { insn 1402 arch/mips/kernel/unaligned.c union mips_instruction insn; insn 1427 arch/mips/kernel/unaligned.c mminsn.insn = word; insn 1443 arch/mips/kernel/unaligned.c insn = (union mips_instruction)(mminsn.insn); insn 1445 arch/mips/kernel/unaligned.c insn = (union mips_instruction)(mminsn.next_insn); insn 1449 arch/mips/kernel/unaligned.c switch (insn.mm_i_format.opcode) { insn 1452 arch/mips/kernel/unaligned.c switch (insn.mm_x_format.func) { insn 1454 arch/mips/kernel/unaligned.c reg = insn.mm_x_format.rd; insn 1461 arch/mips/kernel/unaligned.c switch (insn.mm_m_format.func) { insn 1463 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1482 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1502 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1525 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1547 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1583 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1620 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1661 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1706 arch/mips/kernel/unaligned.c switch (insn.mm_m_format.func) { insn 1708 arch/mips/kernel/unaligned.c reg = insn.mm_m_format.rd; insn 1717 arch/mips/kernel/unaligned.c switch (insn.mm_x_format.func) { insn 1756 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1760 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1764 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1768 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1772 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1776 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1780 arch/mips/kernel/unaligned.c reg = insn.mm_i_format.rt; insn 1784 arch/mips/kernel/unaligned.c switch (insn.mm16_m_format.func) { insn 1786 arch/mips/kernel/unaligned.c reg = insn.mm16_m_format.rlist; insn 1806 arch/mips/kernel/unaligned.c reg = insn.mm16_m_format.rlist; insn 1830 arch/mips/kernel/unaligned.c reg = reg16to32[insn.mm16_rb_format.rt]; insn 1834 arch/mips/kernel/unaligned.c reg = reg16to32[insn.mm16_rb_format.rt]; insn 1838 arch/mips/kernel/unaligned.c reg = reg16to32st[insn.mm16_rb_format.rt]; insn 1842 arch/mips/kernel/unaligned.c reg = reg16to32st[insn.mm16_rb_format.rt]; insn 1846 arch/mips/kernel/unaligned.c reg = insn.mm16_r5_format.rt; insn 1850 arch/mips/kernel/unaligned.c reg = insn.mm16_r5_format.rt; insn 1854 arch/mips/kernel/unaligned.c reg = reg16to32[insn.mm16_r3_format.rt]; insn 15 arch/mips/kernel/uprobes.c static inline int insn_has_delay_slot(const union mips_instruction insn) insn 17 arch/mips/kernel/uprobes.c return __insn_has_delay_slot(insn); insn 39 arch/mips/kernel/uprobes.c inst.word = aup->insn[0]; insn 46 arch/mips/kernel/uprobes.c aup->ixol[0] = aup->insn[insn_has_delay_slot(inst)]; insn 62 arch/mips/kernel/uprobes.c bool is_trap_insn(uprobe_opcode_t *insn) insn 66 arch/mips/kernel/uprobes.c inst.word = *insn; insn 114 arch/mips/kernel/uprobes.c if (insn_has_delay_slot((union mips_instruction) aup->insn[0])) { insn 116 arch/mips/kernel/uprobes.c (union mips_instruction) aup->insn[0]); insn 347 arch/mips/kernel/vpe.c unsigned long insn; insn 363 arch/mips/kernel/vpe.c insn = *l->addr; insn 364 arch/mips/kernel/vpe.c val = ((insn & 0xffff) << 16) + vallo; insn 373 arch/mips/kernel/vpe.c insn = (insn & ~0xffff) | val; insn 374 arch/mips/kernel/vpe.c *l->addr = insn; insn 45 arch/mips/kvm/emulate.c union mips_instruction insn; insn 57 arch/mips/kvm/emulate.c err = kvm_get_badinstrp((u32 *)epc, vcpu, &insn.word); insn 61 arch/mips/kvm/emulate.c switch (insn.i_format.opcode) { insn 64 arch/mips/kvm/emulate.c switch (insn.r_format.func) { insn 66 arch/mips/kvm/emulate.c arch->gprs[insn.r_format.rd] = epc + 8; insn 69 arch/mips/kvm/emulate.c nextpc = arch->gprs[insn.r_format.rs]; insn 82 arch/mips/kvm/emulate.c switch (insn.i_format.rt) { insn 85 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] < 0) insn 86 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 94 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] >= 0) insn 95 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 104 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] < 0) insn 105 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 114 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] >= 0) insn 115 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 130 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 148 arch/mips/kvm/emulate.c epc |= (insn.j_format.target << 2); insn 155 arch/mips/kvm/emulate.c if (arch->gprs[insn.i_format.rs] == insn 156 arch/mips/kvm/emulate.c arch->gprs[insn.i_format.rt]) insn 157 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 165 arch/mips/kvm/emulate.c if (arch->gprs[insn.i_format.rs] != insn 166 arch/mips/kvm/emulate.c arch->gprs[insn.i_format.rt]) insn 167 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 177 arch/mips/kvm/emulate.c if (insn.i_format.rt != 0) insn 179 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] <= 0) insn 180 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 190 arch/mips/kvm/emulate.c if (insn.i_format.rt != 0) insn 192 arch/mips/kvm/emulate.c if ((long)arch->gprs[insn.i_format.rs] > 0) insn 193 arch/mips/kvm/emulate.c epc = epc + 4 + (insn.i_format.simmediate << 2); insn 209 arch/mips/kvm/emulate.c if (insn.i_format.rt != 0) insn 215 arch/mips/kvm/emulate.c if (insn.i_format.rs != 0 || insn.i_format.rt != 0) insn 221 arch/mips/kvm/emulate.c if (insn.i_format.rs != 0) insn 84 arch/mips/math-emu/cp1emu.c union mips_instruction insn = *insn_ptr; insn 85 arch/mips/math-emu/cp1emu.c union mips_instruction mips32_insn = insn; insn 88 arch/mips/math-emu/cp1emu.c switch (insn.mm_i_format.opcode) { insn 91 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rt = insn.mm_i_format.rs; insn 92 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rs = insn.mm_i_format.rt; insn 96 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rt = insn.mm_i_format.rs; insn 97 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rs = insn.mm_i_format.rt; insn 101 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rt = insn.mm_i_format.rs; insn 102 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rs = insn.mm_i_format.rt; insn 106 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rt = insn.mm_i_format.rs; insn 107 arch/mips/math-emu/cp1emu.c mips32_insn.mm_i_format.rs = insn.mm_i_format.rt; insn 111 arch/mips/math-emu/cp1emu.c if ((insn.mm_i_format.rt == mm_bc1f_op) || insn 112 arch/mips/math-emu/cp1emu.c (insn.mm_i_format.rt == mm_bc1t_op)) { insn 116 arch/mips/math-emu/cp1emu.c (insn.mm_i_format.rt == mm_bc1t_op) ? 1 : 0; insn 121 arch/mips/math-emu/cp1emu.c switch (insn.mm_fp0_format.func) { insn 130 arch/mips/math-emu/cp1emu.c op = insn.mm_fp0_format.func; insn 148 arch/mips/math-emu/cp1emu.c mips32_insn.fp6_format.fr = insn.mm_fp6_format.fr; insn 149 arch/mips/math-emu/cp1emu.c mips32_insn.fp6_format.ft = insn.mm_fp6_format.ft; insn 150 arch/mips/math-emu/cp1emu.c mips32_insn.fp6_format.fs = insn.mm_fp6_format.fs; insn 151 arch/mips/math-emu/cp1emu.c mips32_insn.fp6_format.fd = insn.mm_fp6_format.fd; insn 156 arch/mips/math-emu/cp1emu.c op = insn.mm_fp5_format.op & 0x7; insn 169 arch/mips/math-emu/cp1emu.c insn.mm_fp5_format.base; insn 171 arch/mips/math-emu/cp1emu.c insn.mm_fp5_format.index; insn 173 arch/mips/math-emu/cp1emu.c mips32_insn.r_format.re = insn.mm_fp5_format.fd; insn 180 arch/mips/math-emu/cp1emu.c if (insn.mm_fp2_format.op == mm_fmovt_op) insn 182 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp2_format.op == mm_fmovf_op) insn 187 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp2_format.fmt]; insn 189 arch/mips/math-emu/cp1emu.c (insn.mm_fp2_format.cc<<2) + op; insn 191 arch/mips/math-emu/cp1emu.c insn.mm_fp2_format.fs; insn 193 arch/mips/math-emu/cp1emu.c insn.mm_fp2_format.fd; insn 200 arch/mips/math-emu/cp1emu.c if (insn.mm_fp0_format.op == mm_fadd_op) insn 202 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp0_format.op == mm_fsub_op) insn 204 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp0_format.op == mm_fmul_op) insn 206 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp0_format.op == mm_fdiv_op) insn 211 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp0_format.fmt]; insn 213 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.ft; insn 215 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.fs; insn 217 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.fd; insn 224 arch/mips/math-emu/cp1emu.c if (insn.mm_fp0_format.op == mm_fmovn_op) insn 226 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp0_format.op == mm_fmovz_op) insn 231 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp0_format.fmt]; insn 233 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.ft; insn 235 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.fs; insn 237 arch/mips/math-emu/cp1emu.c insn.mm_fp0_format.fd; insn 243 arch/mips/math-emu/cp1emu.c switch (insn.mm_fp1_format.op) { insn 248 arch/mips/math-emu/cp1emu.c if ((insn.mm_fp1_format.op & 0x7f) == insn 254 arch/mips/math-emu/cp1emu.c mips32_insn.r_format.rs = insn.mm_fp4_format.fs; insn 256 arch/mips/math-emu/cp1emu.c (insn.mm_fp4_format.cc << 2) + op; insn 257 arch/mips/math-emu/cp1emu.c mips32_insn.r_format.rd = insn.mm_fp4_format.rt; insn 265 arch/mips/math-emu/cp1emu.c if ((insn.mm_fp1_format.op & 0x7f) == insn 268 arch/mips/math-emu/cp1emu.c fmt = swl_format[insn.mm_fp3_format.fmt]; insn 271 arch/mips/math-emu/cp1emu.c fmt = dwl_format[insn.mm_fp3_format.fmt]; insn 277 arch/mips/math-emu/cp1emu.c insn.mm_fp3_format.fs; insn 279 arch/mips/math-emu/cp1emu.c insn.mm_fp3_format.rt; insn 288 arch/mips/math-emu/cp1emu.c if ((insn.mm_fp1_format.op & 0x7f) == insn 291 arch/mips/math-emu/cp1emu.c else if ((insn.mm_fp1_format.op & 0x7f) == insn 298 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp3_format.fmt]; insn 301 arch/mips/math-emu/cp1emu.c insn.mm_fp3_format.fs; insn 303 arch/mips/math-emu/cp1emu.c insn.mm_fp3_format.rt; insn 316 arch/mips/math-emu/cp1emu.c if (insn.mm_fp1_format.op == mm_ffloorl_op) insn 318 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_ffloorw_op) insn 320 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_fceill_op) insn 322 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_fceilw_op) insn 324 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_ftruncl_op) insn 326 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_ftruncw_op) insn 328 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_froundl_op) insn 330 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_froundw_op) insn 332 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_fcvtl_op) insn 338 arch/mips/math-emu/cp1emu.c sd_format[insn.mm_fp1_format.fmt]; insn 341 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.fs; insn 343 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.rt; insn 349 arch/mips/math-emu/cp1emu.c if (insn.mm_fp1_format.op == mm_frsqrt_op) insn 351 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_fsqrt_op) insn 357 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp1_format.fmt]; insn 360 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.fs; insn 362 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.rt; insn 371 arch/mips/math-emu/cp1emu.c if (insn.mm_fp1_format.op == mm_mfc1_op) insn 373 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_mtc1_op) insn 375 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_cfc1_op) insn 377 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_ctc1_op) insn 379 arch/mips/math-emu/cp1emu.c else if (insn.mm_fp1_format.op == mm_mfhc1_op) insn 386 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.rt; insn 388 arch/mips/math-emu/cp1emu.c insn.mm_fp1_format.fs; insn 399 arch/mips/math-emu/cp1emu.c sdps_format[insn.mm_fp4_format.fmt]; insn 400 arch/mips/math-emu/cp1emu.c mips32_insn.fp0_format.ft = insn.mm_fp4_format.rt; insn 401 arch/mips/math-emu/cp1emu.c mips32_insn.fp0_format.fs = insn.mm_fp4_format.fs; insn 402 arch/mips/math-emu/cp1emu.c mips32_insn.fp0_format.fd = insn.mm_fp4_format.cc << 2; insn 404 arch/mips/math-emu/cp1emu.c insn.mm_fp4_format.cond | MM_MIPS32_COND_FC; insn 427 arch/mips/math-emu/cp1emu.c union mips_instruction insn = (union mips_instruction)dec_insn.insn; insn 433 arch/mips/math-emu/cp1emu.c switch (insn.i_format.opcode) { insn 435 arch/mips/math-emu/cp1emu.c switch (insn.r_format.func) { insn 437 arch/mips/math-emu/cp1emu.c if (insn.r_format.rd != 0) { insn 438 arch/mips/math-emu/cp1emu.c regs->regs[insn.r_format.rd] = insn 445 arch/mips/math-emu/cp1emu.c if (NO_R6EMU && insn.r_format.func == jr_op) insn 447 arch/mips/math-emu/cp1emu.c *contpc = regs->regs[insn.r_format.rs]; insn 452 arch/mips/math-emu/cp1emu.c switch (insn.i_format.rt) { insn 455 arch/mips/math-emu/cp1emu.c if (NO_R6EMU && (insn.i_format.rs || insn 456 arch/mips/math-emu/cp1emu.c insn.i_format.rt == bltzall_op)) insn 468 arch/mips/math-emu/cp1emu.c if ((long)regs->regs[insn.i_format.rs] < 0) insn 471 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 479 arch/mips/math-emu/cp1emu.c if (NO_R6EMU && (insn.i_format.rs || insn 480 arch/mips/math-emu/cp1emu.c insn.i_format.rt == bgezall_op)) insn 492 arch/mips/math-emu/cp1emu.c if ((long)regs->regs[insn.i_format.rs] >= 0) insn 495 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 515 arch/mips/math-emu/cp1emu.c *contpc |= (insn.j_format.target << 2); insn 524 arch/mips/math-emu/cp1emu.c if (regs->regs[insn.i_format.rs] == insn 525 arch/mips/math-emu/cp1emu.c regs->regs[insn.i_format.rt]) insn 528 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 539 arch/mips/math-emu/cp1emu.c if (regs->regs[insn.i_format.rs] != insn 540 arch/mips/math-emu/cp1emu.c regs->regs[insn.i_format.rt]) insn 543 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 550 arch/mips/math-emu/cp1emu.c if (!insn.i_format.rt && NO_R6EMU) insn 567 arch/mips/math-emu/cp1emu.c if (cpu_has_mips_r6 && insn.i_format.rt) { insn 568 arch/mips/math-emu/cp1emu.c if ((insn.i_format.opcode == blez_op) && insn 569 arch/mips/math-emu/cp1emu.c ((!insn.i_format.rs && insn.i_format.rt) || insn 570 arch/mips/math-emu/cp1emu.c (insn.i_format.rs == insn.i_format.rt))) insn 578 arch/mips/math-emu/cp1emu.c if ((long)regs->regs[insn.i_format.rs] <= 0) insn 581 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 588 arch/mips/math-emu/cp1emu.c if (!insn.i_format.rt && NO_R6EMU) insn 605 arch/mips/math-emu/cp1emu.c if (cpu_has_mips_r6 && insn.i_format.rt) { insn 606 arch/mips/math-emu/cp1emu.c if ((insn.i_format.opcode == blez_op) && insn 607 arch/mips/math-emu/cp1emu.c ((!insn.i_format.rs && insn.i_format.rt) || insn 608 arch/mips/math-emu/cp1emu.c (insn.i_format.rs == insn.i_format.rt))) insn 617 arch/mips/math-emu/cp1emu.c if ((long)regs->regs[insn.i_format.rs] > 0) insn 620 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 630 arch/mips/math-emu/cp1emu.c if (insn.i_format.rt && !insn.i_format.rs) insn 638 arch/mips/math-emu/cp1emu.c if ((regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) == 0) insn 639 arch/mips/math-emu/cp1emu.c *contpc = regs->cp0_epc + 4 + (insn.i_format.simmediate << 2); insn 644 arch/mips/math-emu/cp1emu.c if ((regs->regs[insn.i_format.rs] & (1ull<<(insn.i_format.rt + 32))) == 0) insn 645 arch/mips/math-emu/cp1emu.c *contpc = regs->cp0_epc + 4 + (insn.i_format.simmediate << 2); insn 650 arch/mips/math-emu/cp1emu.c if (regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) insn 651 arch/mips/math-emu/cp1emu.c *contpc = regs->cp0_epc + 4 + (insn.i_format.simmediate << 2); insn 656 arch/mips/math-emu/cp1emu.c if (regs->regs[insn.i_format.rs] & (1ull<<(insn.i_format.rt + 32))) insn 657 arch/mips/math-emu/cp1emu.c *contpc = regs->cp0_epc + 4 + (insn.i_format.simmediate << 2); insn 692 arch/mips/math-emu/cp1emu.c if (!insn.i_format.rs) insn 703 arch/mips/math-emu/cp1emu.c ((insn.i_format.rs == bc1eqz_op) || insn 704 arch/mips/math-emu/cp1emu.c (insn.i_format.rs == bc1nez_op))) { insn 706 arch/mips/math-emu/cp1emu.c fpr = ¤t->thread.fpu.fpr[insn.i_format.rt]; insn 708 arch/mips/math-emu/cp1emu.c switch (insn.i_format.rs) { insn 719 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 731 arch/mips/math-emu/cp1emu.c if (insn.i_format.rs == bc_op) { insn 739 arch/mips/math-emu/cp1emu.c bit = (insn.i_format.rt >> 2); insn 742 arch/mips/math-emu/cp1emu.c switch (insn.i_format.rt & 3) { insn 748 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 759 arch/mips/math-emu/cp1emu.c (insn.i_format.simmediate << 2); insn 1019 arch/mips/math-emu/cp1emu.c ir = dec_insn.insn; /* process current instr */ insn 2850 arch/mips/math-emu/cp1emu.c dec_insn.insn = (*instr_ptr << 16) | insn 2856 arch/mips/math-emu/cp1emu.c dec_insn.insn = (*instr_ptr << 16) | insn 2877 arch/mips/math-emu/cp1emu.c if ((get_user(dec_insn.insn, insn 2889 arch/mips/math-emu/cp1emu.c if ((dec_insn.insn == 0) || insn 2891 arch/mips/math-emu/cp1emu.c ((dec_insn.insn & 0xffff) == MM_NOP16))) insn 227 arch/mips/math-emu/dsemul.c union mips_instruction insn = { .word = ir }; insn 234 arch/mips/math-emu/dsemul.c if (insn.mm_a_format.opcode == mm_addiupc_op) { insn 238 arch/mips/math-emu/dsemul.c rs = (((insn.mm_a_format.rs + 0xe) & 0xf) + 2); insn 240 arch/mips/math-emu/dsemul.c v += insn.mm_a_format.simmediate << 2; insn 42 arch/mips/mm/uasm-micromips.c static const struct insn insn_table_MM[insn_invalid] = { insn 158 arch/mips/mm/uasm-micromips.c const struct insn *ip; insn 50 arch/mips/mm/uasm-mips.c static const struct insn insn_table[insn_invalid] = { insn 232 arch/mips/mm/uasm-mips.c const struct insn *ip; insn 155 arch/mips/mm/uasm.c build_insn(buf, insn##op, a, b, c); \ insn 162 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, c, a); \ insn 169 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, c); \ insn 176 arch/mips/mm/uasm.c build_insn(buf, insn##op, c, b, a); \ insn 183 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, c, a); \ insn 190 arch/mips/mm/uasm.c build_insn(buf, insn##op, a, b, c); \ insn 197 arch/mips/mm/uasm.c build_insn(buf, insn##op, c, a, b); \ insn 204 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, c); \ insn 211 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, c+d-1, c); \ insn 218 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, c+d-33, c); \ insn 225 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, c+d-33, c-32); \ insn 232 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a, d-1, c); \ insn 239 arch/mips/mm/uasm.c build_insn(buf, insn##op, a, b); \ insn 246 arch/mips/mm/uasm.c build_insn(buf, insn##op, b, a); \ insn 253 arch/mips/mm/uasm.c build_insn(buf, insn##op, a, b); \ insn 260 arch/mips/mm/uasm.c build_insn(buf, insn##op, a); \ insn 267 arch/mips/mm/uasm.c build_insn(buf, insn##op); \ insn 194 arch/mips/net/ebpf_jit.c const struct bpf_insn *insn, insn 198 arch/mips/net/ebpf_jit.c insn->src_reg : insn->dst_reg; insn 408 arch/mips/net/ebpf_jit.c static void gen_imm_to_reg(const struct bpf_insn *insn, int reg, insn 411 arch/mips/net/ebpf_jit.c if (insn->imm >= S16_MIN && insn->imm <= S16_MAX) { insn 412 arch/mips/net/ebpf_jit.c emit_instr(ctx, addiu, reg, MIPS_R_ZERO, insn->imm); insn 414 arch/mips/net/ebpf_jit.c int lower = (s16)(insn->imm & 0xffff); insn 415 arch/mips/net/ebpf_jit.c int upper = insn->imm - lower; insn 422 arch/mips/net/ebpf_jit.c static int gen_imm_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, insn 426 arch/mips/net/ebpf_jit.c int dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 431 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code)) { insn 462 arch/mips/net/ebpf_jit.c if (BPF_CLASS(insn->code) == BPF_ALU64 && insn 463 arch/mips/net/ebpf_jit.c BPF_OP(insn->code) != BPF_MOV && insn 464 arch/mips/net/ebpf_jit.c get_reg_val_type(ctx, idx, insn->dst_reg) == REG_32BIT) insn 467 arch/mips/net/ebpf_jit.c if (BPF_CLASS(insn->code) == BPF_ALU && insn 468 arch/mips/net/ebpf_jit.c BPF_OP(insn->code) != BPF_LSH && insn 469 arch/mips/net/ebpf_jit.c BPF_OP(insn->code) != BPF_MOV && insn 470 arch/mips/net/ebpf_jit.c get_reg_val_type(ctx, idx, insn->dst_reg) != REG_32BIT) insn 473 arch/mips/net/ebpf_jit.c if (insn->imm >= lower_bound && insn->imm <= upper_bound) { insn 475 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code) | BPF_CLASS(insn->code)) { insn 477 arch/mips/net/ebpf_jit.c emit_instr(ctx, daddiu, dst, MIPS_R_ZERO, insn->imm); insn 481 arch/mips/net/ebpf_jit.c emit_instr(ctx, andi, dst, dst, insn->imm); insn 485 arch/mips/net/ebpf_jit.c emit_instr(ctx, ori, dst, dst, insn->imm); insn 489 arch/mips/net/ebpf_jit.c emit_instr(ctx, xori, dst, dst, insn->imm); insn 492 arch/mips/net/ebpf_jit.c emit_instr(ctx, daddiu, dst, dst, insn->imm); insn 495 arch/mips/net/ebpf_jit.c emit_instr(ctx, daddiu, dst, dst, -insn->imm); insn 498 arch/mips/net/ebpf_jit.c emit_instr(ctx, dsrl_safe, dst, dst, insn->imm & 0x3f); insn 501 arch/mips/net/ebpf_jit.c emit_instr(ctx, srl, dst, dst, insn->imm & 0x1f); insn 504 arch/mips/net/ebpf_jit.c emit_instr(ctx, dsll_safe, dst, dst, insn->imm & 0x3f); insn 507 arch/mips/net/ebpf_jit.c emit_instr(ctx, sll, dst, dst, insn->imm & 0x1f); insn 510 arch/mips/net/ebpf_jit.c emit_instr(ctx, dsra_safe, dst, dst, insn->imm & 0x3f); insn 513 arch/mips/net/ebpf_jit.c emit_instr(ctx, sra, dst, dst, insn->imm & 0x1f); insn 516 arch/mips/net/ebpf_jit.c emit_instr(ctx, addiu, dst, MIPS_R_ZERO, insn->imm); insn 519 arch/mips/net/ebpf_jit.c emit_instr(ctx, addiu, dst, dst, insn->imm); insn 522 arch/mips/net/ebpf_jit.c emit_instr(ctx, addiu, dst, dst, -insn->imm); insn 529 arch/mips/net/ebpf_jit.c if (BPF_OP(insn->code) == BPF_MOV) { insn 530 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, dst, ctx); insn 532 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 533 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code) | BPF_CLASS(insn->code)) { insn 659 arch/mips/net/ebpf_jit.c static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, insn 667 arch/mips/net/ebpf_jit.c int bpf_op = BPF_OP(insn->code); insn 669 arch/mips/net/ebpf_jit.c if (IS_ENABLED(CONFIG_32BIT) && ((BPF_CLASS(insn->code) == BPF_ALU64) insn 673 arch/mips/net/ebpf_jit.c switch (insn->code) { insn 692 arch/mips/net/ebpf_jit.c r = gen_imm_insn(insn, ctx, this_idx); insn 697 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 700 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) insn 702 arch/mips/net/ebpf_jit.c if (insn->imm == 1) /* Mult by 1 is a nop */ insn 704 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 713 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 716 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) insn 721 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 724 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 729 arch/mips/net/ebpf_jit.c if (insn->imm == 1) /* Mult by 1 is a nop */ insn 731 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 740 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 743 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 752 arch/mips/net/ebpf_jit.c if (insn->imm == 0) insn 754 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 757 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 761 arch/mips/net/ebpf_jit.c if (insn->imm == 1) { insn 767 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 783 arch/mips/net/ebpf_jit.c if (insn->imm == 0) insn 785 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 788 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) insn 790 arch/mips/net/ebpf_jit.c if (insn->imm == 1) { insn 796 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 822 arch/mips/net/ebpf_jit.c src = ebpf_to_mips_reg(ctx, insn, src_reg); insn 823 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 826 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) insn 829 arch/mips/net/ebpf_jit.c if (insn->src_reg == BPF_REG_10) { insn 837 arch/mips/net/ebpf_jit.c } else if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) { insn 918 arch/mips/net/ebpf_jit.c src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp); insn 919 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 922 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 928 arch/mips/net/ebpf_jit.c ts = get_reg_val_type(ctx, this_idx, insn->src_reg); insn 1004 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok); insn 1007 arch/mips/net/ebpf_jit.c if (insn->imm == 0) { insn 1010 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 1025 arch/mips/net/ebpf_jit.c src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp); insn 1026 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1029 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 1030 arch/mips/net/ebpf_jit.c ts = get_reg_val_type(ctx, this_idx, insn->src_reg); insn 1045 arch/mips/net/ebpf_jit.c if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) { insn 1056 arch/mips/net/ebpf_jit.c b_off = b_imm(this_idx + insn->off + 1, ctx); insn 1103 arch/mips/net/ebpf_jit.c if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) { insn 1128 arch/mips/net/ebpf_jit.c b_off = b_imm(this_idx + insn->off + 1, ctx); insn 1130 arch/mips/net/ebpf_jit.c target = j_target(ctx, this_idx + insn->off + 1); insn 1156 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok); insn 1160 arch/mips/net/ebpf_jit.c if (insn->imm == 0) { insn 1161 arch/mips/net/ebpf_jit.c if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) { insn 1182 arch/mips/net/ebpf_jit.c b_off = b_imm(this_idx + insn->off + 1, ctx); insn 1207 arch/mips/net/ebpf_jit.c t64s = insn->imm + 1; insn 1209 arch/mips/net/ebpf_jit.c t64s = insn->imm + 1; insn 1211 arch/mips/net/ebpf_jit.c t64s = insn->imm; insn 1231 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok); insn 1239 arch/mips/net/ebpf_jit.c t64s = (u64)(u32)(insn->imm) + 1; insn 1241 arch/mips/net/ebpf_jit.c t64s = (u64)(u32)(insn->imm) + 1; insn 1243 arch/mips/net/ebpf_jit.c t64s = (u64)(u32)(insn->imm); insn 1254 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok); insn 1258 arch/mips/net/ebpf_jit.c if (ctx->use_bbit_insns && hweight32((u32)insn->imm) == 1) { insn 1259 arch/mips/net/ebpf_jit.c if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) { insn 1263 arch/mips/net/ebpf_jit.c emit_instr(ctx, bbit0, dst, ffs((u32)insn->imm) - 1, b_off); insn 1267 arch/mips/net/ebpf_jit.c b_off = b_imm(this_idx + insn->off + 1, ctx); insn 1270 arch/mips/net/ebpf_jit.c emit_instr(ctx, bbit1, dst, ffs((u32)insn->imm) - 1, b_off); insn 1274 arch/mips/net/ebpf_jit.c t64 = (u32)insn->imm; insn 1287 arch/mips/net/ebpf_jit.c b_off = b_imm(this_idx + insn->off + 1, ctx); insn 1289 arch/mips/net/ebpf_jit.c target = j_target(ctx, this_idx + insn->off + 1); insn 1299 arch/mips/net/ebpf_jit.c if (insn->src_reg != 0) insn 1301 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1304 arch/mips/net/ebpf_jit.c t64 = ((u64)(u32)insn->imm) | ((u64)(insn + 1)->imm << 32); insn 1310 arch/mips/net/ebpf_jit.c t64s = (s64)insn->imm + (long)__bpf_call_base; insn 1324 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1327 arch/mips/net/ebpf_jit.c td = get_reg_val_type(ctx, this_idx, insn->dst_reg); insn 1328 arch/mips/net/ebpf_jit.c if (insn->imm == 64 && td == REG_32BIT) insn 1331 arch/mips/net/ebpf_jit.c if (insn->imm != 64 && td == REG_64BIT) { insn 1337 arch/mips/net/ebpf_jit.c need_swap = (BPF_SRC(insn->code) == BPF_FROM_LE); insn 1339 arch/mips/net/ebpf_jit.c need_swap = (BPF_SRC(insn->code) == BPF_FROM_BE); insn 1341 arch/mips/net/ebpf_jit.c if (insn->imm == 16) { insn 1345 arch/mips/net/ebpf_jit.c } else if (insn->imm == 32) { insn 1362 arch/mips/net/ebpf_jit.c if (insn->dst_reg == BPF_REG_10) { insn 1365 arch/mips/net/ebpf_jit.c mem_off = insn->off + MAX_BPF_STACK; insn 1367 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1370 arch/mips/net/ebpf_jit.c mem_off = insn->off; insn 1372 arch/mips/net/ebpf_jit.c gen_imm_to_reg(insn, MIPS_R_AT, ctx); insn 1373 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1393 arch/mips/net/ebpf_jit.c if (insn->src_reg == BPF_REG_10) { insn 1396 arch/mips/net/ebpf_jit.c mem_off = insn->off + MAX_BPF_STACK; insn 1398 arch/mips/net/ebpf_jit.c src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp); insn 1401 arch/mips/net/ebpf_jit.c mem_off = insn->off; insn 1403 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1406 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1428 arch/mips/net/ebpf_jit.c if (insn->dst_reg == BPF_REG_10) { insn 1431 arch/mips/net/ebpf_jit.c mem_off = insn->off + MAX_BPF_STACK; insn 1433 arch/mips/net/ebpf_jit.c dst = ebpf_to_mips_reg(ctx, insn, dst_reg); insn 1436 arch/mips/net/ebpf_jit.c mem_off = insn->off; insn 1438 arch/mips/net/ebpf_jit.c src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp); insn 1441 arch/mips/net/ebpf_jit.c if (BPF_MODE(insn->code) == BPF_XADD) { insn 1453 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1455 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) { insn 1470 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) { insn 1483 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1494 arch/mips/net/ebpf_jit.c if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) { insn 1507 arch/mips/net/ebpf_jit.c this_idx, (unsigned int)insn->code); insn 1521 arch/mips/net/ebpf_jit.c const struct bpf_insn *insn; insn 1525 arch/mips/net/ebpf_jit.c insn = prog->insnsi + i; insn 1535 arch/mips/net/ebpf_jit.c r = build_one_insn(insn, ctx, i, prog->len); insn 1551 arch/mips/net/ebpf_jit.c insn = prog->insnsi + i; insn 1552 arch/mips/net/ebpf_jit.c if (insn->code == (BPF_JMP | BPF_EXIT)) insn 1563 arch/mips/net/ebpf_jit.c const struct bpf_insn *insn; insn 1571 arch/mips/net/ebpf_jit.c insn = prog->insnsi + idx; insn 1572 arch/mips/net/ebpf_jit.c switch (BPF_CLASS(insn->code)) { insn 1574 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code)) { insn 1586 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1589 arch/mips/net/ebpf_jit.c if (BPF_SRC(insn->code)) { insn 1590 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1593 arch/mips/net/ebpf_jit.c if (insn->imm >= 0) insn 1594 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1596 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1600 arch/mips/net/ebpf_jit.c if (insn->imm == 64) insn 1601 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1602 arch/mips/net/ebpf_jit.c else if (insn->imm == 32) insn 1603 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1605 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1611 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code)) { insn 1613 arch/mips/net/ebpf_jit.c if (BPF_SRC(insn->code)) { insn 1615 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1618 arch/mips/net/ebpf_jit.c if (insn->imm >= 0) insn 1619 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1621 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT_32BIT); insn 1625 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1630 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1632 arch/mips/net/ebpf_jit.c if (BPF_MODE(insn->code) == BPF_IMM) { insn 1635 arch/mips/net/ebpf_jit.c val = (s64)((u32)insn->imm | ((u64)(insn + 1)->imm << 32)); insn 1637 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1639 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT_32BIT); insn 1641 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1645 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1650 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1653 arch/mips/net/ebpf_jit.c if (BPF_MODE(insn->code) == BPF_IMM) insn 1654 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, insn 1655 arch/mips/net/ebpf_jit.c insn->imm >= 0 ? REG_32BIT_POS : REG_32BIT); insn 1657 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1663 arch/mips/net/ebpf_jit.c switch (BPF_SIZE(insn->code)) { insn 1665 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT); insn 1669 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS); insn 1672 arch/mips/net/ebpf_jit.c set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT); insn 1678 arch/mips/net/ebpf_jit.c switch (BPF_OP(insn->code)) { insn 1685 arch/mips/net/ebpf_jit.c idx += insn->off; insn 1700 arch/mips/net/ebpf_jit.c idx += insn->off; insn 32 arch/nds32/include/asm/assembler.h #define USER(insn, reg, addr, opr) \ insn 33 arch/nds32/include/asm/assembler.h 9999: insn reg, addr, opr; \ insn 24 arch/nds32/include/asm/ftrace.h #define INSN_SIZE(insn) (((insn & 0x00000080) == 0) ? 4 : 2) insn 25 arch/nds32/include/asm/ftrace.h #define IS_SETHI(insn) ((insn & 0x000000fe) == 0x00000046) insn 26 arch/nds32/include/asm/ftrace.h #define ENDIAN_CONVERT(insn) be32_to_cpu(insn) insn 29 arch/nds32/include/asm/ftrace.h #define INSN_SIZE(insn) (((insn & 0x80000000) == 0) ? 4 : 2) insn 30 arch/nds32/include/asm/ftrace.h #define IS_SETHI(insn) ((insn & 0xfe000000) == 0x46000000) insn 31 arch/nds32/include/asm/ftrace.h #define ENDIAN_CONVERT(insn) (insn) insn 22 arch/nds32/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ insn 27 arch/nds32/include/asm/futex.h " " insn "\n" \ insn 32 arch/nds32/include/asm/uaccess.h unsigned long insn, fixup; insn 69 arch/nds32/math-emu/fpuemu.c static int fpu_emu(struct fpu_struct *fpu_reg, unsigned long insn) insn 75 arch/nds32/math-emu/fpuemu.c switch (rfmt = NDS32Insn_OPCODE_COP0(insn)) { insn 77 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT69(insn)) { insn 111 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT1014(insn)) { insn 154 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT69(insn)) { insn 170 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT69(insn)) { insn 204 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT1014(insn)) { insn 249 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_BIT69(insn)) { insn 273 arch/nds32/math-emu/fpuemu.c SPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 274 arch/nds32/math-emu/fpuemu.c SPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 281 arch/nds32/math-emu/fpuemu.c SPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 282 arch/nds32/math-emu/fpuemu.c SPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 283 arch/nds32/math-emu/fpuemu.c SPFROMREG(fb, NDS32Insn_OPCODE_Rb(insn)); insn 290 arch/nds32/math-emu/fpuemu.c DPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 291 arch/nds32/math-emu/fpuemu.c SPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 296 arch/nds32/math-emu/fpuemu.c unsigned int cmpop = NDS32Insn_OPCODE_BIT69(insn); insn 299 arch/nds32/math-emu/fpuemu.c SPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 300 arch/nds32/math-emu/fpuemu.c SPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 301 arch/nds32/math-emu/fpuemu.c SPFROMREG(fb, NDS32Insn_OPCODE_Rb(insn)); insn 312 arch/nds32/math-emu/fpuemu.c DPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 313 arch/nds32/math-emu/fpuemu.c DPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 320 arch/nds32/math-emu/fpuemu.c DPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 321 arch/nds32/math-emu/fpuemu.c DPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 322 arch/nds32/math-emu/fpuemu.c DPFROMREG(fb, NDS32Insn_OPCODE_Rb(insn)); insn 329 arch/nds32/math-emu/fpuemu.c SPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 330 arch/nds32/math-emu/fpuemu.c DPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 335 arch/nds32/math-emu/fpuemu.c unsigned int cmpop = NDS32Insn_OPCODE_BIT69(insn); insn 338 arch/nds32/math-emu/fpuemu.c SPFROMREG(ft, NDS32Insn_OPCODE_Rt(insn)); insn 339 arch/nds32/math-emu/fpuemu.c DPFROMREG(fa, NDS32Insn_OPCODE_Ra(insn)); insn 340 arch/nds32/math-emu/fpuemu.c DPFROMREG(fb, NDS32Insn_OPCODE_Rb(insn)); insn 368 arch/nds32/math-emu/fpuemu.c unsigned long insn = 0, addr = regs->ipc; insn 370 arch/nds32/math-emu/fpuemu.c unsigned char *pc = (void *)&insn; insn 380 arch/nds32/math-emu/fpuemu.c insn = be32_to_cpu(insn); insn 385 arch/nds32/math-emu/fpuemu.c if (NDS32Insn_OPCODE(insn) != cop0_op) insn 388 arch/nds32/math-emu/fpuemu.c switch (NDS32Insn_OPCODE_COP0(insn)) { insn 395 arch/nds32/math-emu/fpuemu.c ret = fpu_emu(fpu, insn); insn 90 arch/nios2/include/asm/uaccess.h #define __get_user_asm(val, insn, addr, err) \ insn 94 arch/nios2/include/asm/uaccess.h "1: " insn " %1, 0(%2)\n" \ insn 151 arch/nios2/include/asm/uaccess.h #define __put_user_asm(val, insn, ptr, err) \ insn 155 arch/nios2/include/asm/uaccess.h "1: " insn " %1, 0(%2)\n" \ insn 11 arch/openrisc/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 15 arch/openrisc/include/asm/futex.h insn "\n" \ insn 281 arch/openrisc/kernel/traps.c unsigned int op, insn; insn 283 arch/openrisc/kernel/traps.c insn = *((unsigned int *)regs->pc); insn 284 arch/openrisc/kernel/traps.c op = insn >> 26; insn 350 arch/openrisc/kernel/traps.c unsigned int insn) insn 362 arch/openrisc/kernel/traps.c ra = (insn >> 16) & 0x1f; insn 363 arch/openrisc/kernel/traps.c rd = (insn >> 21) & 0x1f; insn 364 arch/openrisc/kernel/traps.c imm = (short)insn; insn 392 arch/openrisc/kernel/traps.c unsigned int insn) insn 404 arch/openrisc/kernel/traps.c ra = (insn >> 16) & 0x1f; insn 405 arch/openrisc/kernel/traps.c rb = (insn >> 11) & 0x1f; insn 406 arch/openrisc/kernel/traps.c imm = (short)(((insn & 0x2200000) >> 10) | (insn & 0x7ff)); insn 445 arch/openrisc/kernel/traps.c unsigned int insn = *((unsigned int *)address); insn 447 arch/openrisc/kernel/traps.c op = insn >> 26; insn 451 arch/openrisc/kernel/traps.c simulate_lwa(regs, address, insn); insn 455 arch/openrisc/kernel/traps.c simulate_swa(regs, address, insn); insn 30 arch/parisc/include/asm/kprobes.h flush_icache_range((unsigned long)&(p)->ainsn.insn[0], \ insn 31 arch/parisc/include/asm/kprobes.h (unsigned long)&(p)->ainsn.insn[0] + \ insn 37 arch/parisc/include/asm/kprobes.h kprobe_opcode_t *insn; insn 6 arch/parisc/include/asm/patch.h void patch_text(void *addr, unsigned int insn); insn 7 arch/parisc/include/asm/patch.h void patch_text_multiple(void *addr, u32 *insn, unsigned int len); insn 10 arch/parisc/include/asm/patch.h void __patch_text(void *addr, u32 insn); insn 11 arch/parisc/include/asm/patch.h void __patch_text_multiple(void *addr, u32 *insn, unsigned int len); insn 52 arch/parisc/include/asm/uaccess.h int insn; /* relative address of insn that is allowed to fault. */ insn 119 arch/parisc/kernel/ftrace.c u32 insn[FTRACE_PATCHABLE_FUNCTION_SIZE]; insn 175 arch/parisc/kernel/ftrace.c ret = probe_kernel_read(insn, ip, size); insn 180 arch/parisc/kernel/ftrace.c if (insn[i] != INSN_NOP) insn 191 arch/parisc/kernel/ftrace.c u32 insn[FTRACE_PATCHABLE_FUNCTION_SIZE]; insn 194 arch/parisc/kernel/ftrace.c for (i = 0; i < ARRAY_SIZE(insn); i++) insn 195 arch/parisc/kernel/ftrace.c insn[i] = INSN_NOP; insn 198 arch/parisc/kernel/ftrace.c __patch_text_multiple((void *)rec->ip + 4 - sizeof(insn), insn 199 arch/parisc/kernel/ftrace.c insn, sizeof(insn)-4); insn 242 arch/parisc/kernel/ftrace.c p->ainsn.insn = NULL; insn 25 arch/parisc/kernel/jump_label.c u32 insn; insn 38 arch/parisc/kernel/jump_label.c insn = 0xe8000002 | reassemble_17(distance >> 2); insn 40 arch/parisc/kernel/jump_label.c insn = INSN_NOP; insn 43 arch/parisc/kernel/jump_label.c patch_text(addr, insn); insn 24 arch/parisc/kernel/kprobes.c p->ainsn.insn = get_insn_slot(); insn 25 arch/parisc/kernel/kprobes.c if (!p->ainsn.insn) insn 28 arch/parisc/kernel/kprobes.c memcpy(p->ainsn.insn, p->addr, insn 37 arch/parisc/kernel/kprobes.c if (!p->ainsn.insn) insn 40 arch/parisc/kernel/kprobes.c free_insn_slot(p->ainsn.insn, 0); insn 41 arch/parisc/kernel/kprobes.c p->ainsn.insn = NULL; insn 76 arch/parisc/kernel/kprobes.c regs->iaoq[0] = (unsigned long)p->ainsn.insn; insn 139 arch/parisc/kernel/kprobes.c if (regs->iaoq[0] != (unsigned long)p->ainsn.insn+4) insn 20 arch/parisc/kernel/patch.c u32 *insn; insn 61 arch/parisc/kernel/patch.c void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) insn 76 arch/parisc/kernel/patch.c *p++ = *insn++; insn 99 arch/parisc/kernel/patch.c void __kprobes __patch_text(void *addr, u32 insn) insn 101 arch/parisc/kernel/patch.c __patch_text_multiple(addr, &insn, sizeof(insn)); insn 108 arch/parisc/kernel/patch.c __patch_text_multiple(patch->addr, patch->insn, patch->len); insn 112 arch/parisc/kernel/patch.c void __kprobes patch_text(void *addr, unsigned int insn) insn 116 arch/parisc/kernel/patch.c .insn = &insn, insn 117 arch/parisc/kernel/patch.c .len = sizeof(insn), insn 123 arch/parisc/kernel/patch.c void __kprobes patch_text_multiple(void *addr, u32 *insn, unsigned int len) insn 128 arch/parisc/kernel/patch.c .insn = insn, insn 270 arch/parisc/kernel/unwind.c unsigned int insn; insn 330 arch/parisc/kernel/unwind.c insn = *(unsigned int *)npc; insn 332 arch/parisc/kernel/unwind.c if ((insn & 0xffffc001) == 0x37de0000 || insn 333 arch/parisc/kernel/unwind.c (insn & 0xffe00001) == 0x6fc00000) { insn 335 arch/parisc/kernel/unwind.c frame_size += (insn & 0x3fff) >> 1; insn 338 arch/parisc/kernel/unwind.c insn, npc, frame_size); insn 339 arch/parisc/kernel/unwind.c } else if ((insn & 0xffe00009) == 0x73c00008) { insn 341 arch/parisc/kernel/unwind.c frame_size += ((insn >> 4) & 0x3ff) << 3; insn 344 arch/parisc/kernel/unwind.c insn, npc, frame_size); insn 345 arch/parisc/kernel/unwind.c } else if (insn == 0x6bc23fd9) { insn 351 arch/parisc/kernel/unwind.c } else if (insn == 0x0fc212c1) { insn 82 arch/powerpc/include/asm/code-patching.h u32 *insn = func; insn 100 arch/powerpc/include/asm/code-patching.h if ((((*insn & OP_RT_RA_MASK) == ADDIS_R2_R12) || insn 101 arch/powerpc/include/asm/code-patching.h ((*insn & OP_RT_RA_MASK) == LIS_R2)) && insn 102 arch/powerpc/include/asm/code-patching.h ((*(insn+1) & OP_RT_RA_MASK) == ADDI_R2_R2)) insn 103 arch/powerpc/include/asm/code-patching.h return (unsigned long)(insn + 2); insn 21 arch/powerpc/include/asm/extable.h int insn; insn 13 arch/powerpc/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 17 arch/powerpc/include/asm/futex.h insn \ insn 104 arch/powerpc/include/asm/io.h #define DEF_MMIO_IN_X(name, size, insn) \ insn 108 arch/powerpc/include/asm/io.h __asm__ __volatile__("sync;"#insn" %0,%y1;twi 0,%0,0;isync" \ insn 113 arch/powerpc/include/asm/io.h #define DEF_MMIO_OUT_X(name, size, insn) \ insn 116 arch/powerpc/include/asm/io.h __asm__ __volatile__("sync;"#insn" %1,%y0" \ insn 121 arch/powerpc/include/asm/io.h #define DEF_MMIO_IN_D(name, size, insn) \ insn 125 arch/powerpc/include/asm/io.h __asm__ __volatile__("sync;"#insn"%U1%X1 %0,%1;twi 0,%0,0;isync"\ insn 130 arch/powerpc/include/asm/io.h #define DEF_MMIO_OUT_D(name, size, insn) \ insn 133 arch/powerpc/include/asm/io.h __asm__ __volatile__("sync;"#insn"%U0%X0 %1,%0" \ insn 60 arch/powerpc/include/asm/kprobes.h kprobe_opcode_t *insn; insn 84 arch/powerpc/include/asm/kprobes.h kprobe_opcode_t *insn; insn 26 arch/powerpc/include/asm/uprobes.h u32 insn; insn 60 arch/powerpc/kernel/kprobes-ftrace.c p->ainsn.insn = NULL; insn 108 arch/powerpc/kernel/kprobes.c kprobe_opcode_t insn = *p->addr; insn 113 arch/powerpc/kernel/kprobes.c } else if (IS_MTMSRD(insn) || IS_RFID(insn) || IS_RFI(insn)) { insn 121 arch/powerpc/kernel/kprobes.c p->ainsn.insn = get_insn_slot(); insn 122 arch/powerpc/kernel/kprobes.c if (!p->ainsn.insn) insn 127 arch/powerpc/kernel/kprobes.c memcpy(p->ainsn.insn, p->addr, insn 130 arch/powerpc/kernel/kprobes.c flush_icache_range((unsigned long)p->ainsn.insn, insn 131 arch/powerpc/kernel/kprobes.c (unsigned long)p->ainsn.insn + sizeof(kprobe_opcode_t)); insn 153 arch/powerpc/kernel/kprobes.c if (p->ainsn.insn) { insn 154 arch/powerpc/kernel/kprobes.c free_insn_slot(p->ainsn.insn, 0); insn 155 arch/powerpc/kernel/kprobes.c p->ainsn.insn = NULL; insn 170 arch/powerpc/kernel/kprobes.c regs->nip = (unsigned long)p->ainsn.insn; insn 219 arch/powerpc/kernel/kprobes.c unsigned int insn = *p->ainsn.insn; insn 222 arch/powerpc/kernel/kprobes.c ret = emulate_step(regs, insn); insn 236 arch/powerpc/kernel/kprobes.c printk("Can't step on instruction %x\n", insn); insn 281 arch/powerpc/kernel/kprobes.c kprobe_opcode_t insn = *p->ainsn.insn; insn 283 arch/powerpc/kernel/kprobes.c is_trap(insn)) { insn 489 arch/powerpc/kernel/kprobes.c if (((unsigned long)cur->ainsn.insn + 4) != regs->nip) insn 102 arch/powerpc/kernel/optprobes.c if (!is_conditional_branch(*p->ainsn.insn) && insn 103 arch/powerpc/kernel/optprobes.c analyse_instr(&op, ®s, *p->ainsn.insn) == 1) { insn 136 arch/powerpc/kernel/optprobes.c if (op->optinsn.insn) { insn 137 arch/powerpc/kernel/optprobes.c free_ppc_optinsn_slot(op->optinsn.insn, 1); insn 138 arch/powerpc/kernel/optprobes.c op->optinsn.insn = NULL; insn 271 arch/powerpc/kernel/optprobes.c patch_imm32_load_insns(*p->ainsn.insn, buff + TMPL_INSN_IDX); insn 281 arch/powerpc/kernel/optprobes.c op->optinsn.insn = buff; insn 293 arch/powerpc/kernel/optprobes.c return optinsn->insn != NULL; insn 320 arch/powerpc/kernel/optprobes.c (unsigned long)op->optinsn.insn, 0)); insn 78 arch/powerpc/kernel/setup_32.c unsigned long insn; insn 88 arch/powerpc/kernel/setup_32.c insn = create_cond_branch(addr, branch_target(addr), 0x820000); insn 89 arch/powerpc/kernel/setup_32.c patch_instruction(addr, insn); /* replace b by bne cr0 */ insn 25 arch/powerpc/kernel/uprobes.c bool is_trap_insn(uprobe_opcode_t *insn) insn 27 arch/powerpc/kernel/uprobes.c return (is_trap(*insn)); insn 176 arch/powerpc/kernel/uprobes.c ret = emulate_step(regs, auprobe->insn); insn 231 arch/powerpc/math-emu/math.c u32 insn = 0; insn 237 arch/powerpc/math-emu/math.c if (get_user(insn, (u32 *)pc)) insn 240 arch/powerpc/math-emu/math.c switch (insn >> 26) { insn 251 arch/powerpc/math-emu/math.c switch ((insn >> 1) & 0x3ff) { insn 267 arch/powerpc/math-emu/math.c switch ((insn >> 1) & 0x1f) { insn 285 arch/powerpc/math-emu/math.c if (insn & 0x20) { insn 286 arch/powerpc/math-emu/math.c switch ((insn >> 1) & 0x1f) { insn 305 arch/powerpc/math-emu/math.c switch ((insn >> 1) & 0x3ff) { insn 332 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 333 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 16) & 0x1f); insn 334 arch/powerpc/math-emu/math.c op2 = (void *)¤t->thread.TS_FPR((insn >> 11) & 0x1f); insn 338 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 339 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 16) & 0x1f); insn 340 arch/powerpc/math-emu/math.c op2 = (void *)¤t->thread.TS_FPR((insn >> 6) & 0x1f); insn 344 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 345 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 16) & 0x1f); insn 346 arch/powerpc/math-emu/math.c op2 = (void *)¤t->thread.TS_FPR((insn >> 11) & 0x1f); insn 347 arch/powerpc/math-emu/math.c op3 = (void *)¤t->thread.TS_FPR((insn >> 6) & 0x1f); insn 351 arch/powerpc/math-emu/math.c idx = (insn >> 16) & 0x1f; insn 352 arch/powerpc/math-emu/math.c sdisp = (insn & 0xffff); insn 353 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 358 arch/powerpc/math-emu/math.c idx = (insn >> 16) & 0x1f; insn 362 arch/powerpc/math-emu/math.c sdisp = (insn & 0xffff); insn 363 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 368 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 372 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 373 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 16) & 0x1f); insn 377 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 378 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 11) & 0x1f); insn 382 arch/powerpc/math-emu/math.c idx = (insn >> 16) & 0x1f; insn 383 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 385 arch/powerpc/math-emu/math.c + regs->gpr[(insn >> 11) & 0x1f]); insn 389 arch/powerpc/math-emu/math.c idx = (insn >> 16) & 0x1f; insn 392 arch/powerpc/math-emu/math.c op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); insn 394 arch/powerpc/math-emu/math.c + regs->gpr[(insn >> 11) & 0x1f]); insn 399 arch/powerpc/math-emu/math.c op1 = (void *)((insn >> 23) & 0x7); insn 400 arch/powerpc/math-emu/math.c op2 = (void *)¤t->thread.TS_FPR((insn >> 16) & 0x1f); insn 401 arch/powerpc/math-emu/math.c op3 = (void *)¤t->thread.TS_FPR((insn >> 11) & 0x1f); insn 406 arch/powerpc/math-emu/math.c op1 = (void *)((insn >> 23) & 0x7); insn 407 arch/powerpc/math-emu/math.c op2 = (void *)((insn >> 18) & 0x7); insn 411 arch/powerpc/math-emu/math.c op0 = (void *)((insn >> 21) & 0x1f); insn 415 arch/powerpc/math-emu/math.c op0 = (void *)((insn >> 23) & 0x7); insn 416 arch/powerpc/math-emu/math.c op1 = (void *)((insn >> 12) & 0xf); insn 420 arch/powerpc/math-emu/math.c op0 = (void *)((insn >> 17) & 0xff); insn 421 arch/powerpc/math-emu/math.c op1 = (void *)¤t->thread.TS_FPR((insn >> 11) & 0x1f); insn 437 arch/powerpc/math-emu/math.c if (insn & 1) { insn 296 arch/powerpc/net/bpf_jit_comp64.c const struct bpf_insn *insn = fp->insnsi; insn 304 arch/powerpc/net/bpf_jit_comp64.c u32 code = insn[i].code; insn 305 arch/powerpc/net/bpf_jit_comp64.c u32 dst_reg = b2p[insn[i].dst_reg]; insn 306 arch/powerpc/net/bpf_jit_comp64.c u32 src_reg = b2p[insn[i].src_reg]; insn 307 arch/powerpc/net/bpf_jit_comp64.c s16 off = insn[i].off; insn 308 arch/powerpc/net/bpf_jit_comp64.c s32 imm = insn[i].imm; insn 333 arch/powerpc/net/bpf_jit_comp64.c bpf_set_seen_register(ctx, insn[i].dst_reg); insn 335 arch/powerpc/net/bpf_jit_comp64.c bpf_set_seen_register(ctx, insn[i].src_reg); insn 504 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 513 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 522 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 530 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 568 arch/powerpc/net/bpf_jit_comp64.c else if (insn_is_zext(&insn[i + 1])) insn 633 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 716 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 722 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 728 arch/powerpc/net/bpf_jit_comp64.c if (insn_is_zext(&insn[i + 1])) insn 741 arch/powerpc/net/bpf_jit_comp64.c imm64 = ((u64)(u32) insn[i].imm) | insn 742 arch/powerpc/net/bpf_jit_comp64.c (((u64)(u32) insn[i+1].imm) << 32); insn 768 arch/powerpc/net/bpf_jit_comp64.c ret = bpf_jit_get_func_addr(fp, &insn[i], extra_pass, insn 1017 arch/powerpc/net/bpf_jit_comp64.c const struct bpf_insn *insn = fp->insnsi; insn 1033 arch/powerpc/net/bpf_jit_comp64.c if (insn[i].code == (BPF_JMP | BPF_CALL) && insn 1034 arch/powerpc/net/bpf_jit_comp64.c insn[i].src_reg == BPF_PSEUDO_CALL) { insn 1035 arch/powerpc/net/bpf_jit_comp64.c ret = bpf_jit_get_func_addr(fp, &insn[i], true, insn 161 arch/powerpc/perf/8xx-pmu.c unsigned int insn = PPC_INST_MFSPR | __PPC_RS(R10) | insn 176 arch/powerpc/perf/8xx-pmu.c patch_instruction_site(&patch__itlbmiss_exit_1, insn); insn 178 arch/powerpc/perf/8xx-pmu.c patch_instruction_site(&patch__itlbmiss_exit_2, insn); insn 184 arch/powerpc/perf/8xx-pmu.c patch_instruction_site(&patch__dtlbmiss_exit_1, insn); insn 185 arch/powerpc/perf/8xx-pmu.c patch_instruction_site(&patch__dtlbmiss_exit_2, insn); insn 186 arch/powerpc/perf/8xx-pmu.c patch_instruction_site(&patch__dtlbmiss_exit_3, insn); insn 11 arch/powerpc/xmon/dis-asm.h extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr); insn 12 arch/powerpc/xmon/dis-asm.h extern int print_insn_spu(unsigned long insn, unsigned long memaddr); insn 14 arch/powerpc/xmon/dis-asm.h static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr) insn 16 arch/powerpc/xmon/dis-asm.h printf("%.8x", insn); insn 20 arch/powerpc/xmon/dis-asm.h static inline int print_insn_spu(unsigned long insn, unsigned long memaddr) insn 22 arch/powerpc/xmon/dis-asm.h printf("%.8x", insn); insn 27 arch/powerpc/xmon/ppc-dis.c unsigned long insn, ppc_cpu_t dialect) insn 33 arch/powerpc/xmon/ppc-dis.c value = (*operand->extract) (insn, dialect, &invalid); insn 37 arch/powerpc/xmon/ppc-dis.c value = (insn >> operand->shift) & operand->bitm; insn 39 arch/powerpc/xmon/ppc-dis.c value = (insn << -operand->shift) & operand->bitm; insn 60 arch/powerpc/xmon/ppc-dis.c unsigned long insn, ppc_cpu_t dialect) insn 69 arch/powerpc/xmon/ppc-dis.c && operand_value_powerpc (operand, insn, dialect) != insn 81 arch/powerpc/xmon/ppc-dis.c lookup_powerpc (unsigned long insn, ppc_cpu_t dialect) insn 94 arch/powerpc/xmon/ppc-dis.c if ((insn & opcode->mask) != opcode->opcode insn 106 arch/powerpc/xmon/ppc-dis.c (*operand->extract) (insn, dialect, &invalid); insn 119 arch/powerpc/xmon/ppc-dis.c int print_insn_powerpc (unsigned long insn, unsigned long memaddr) insn 157 arch/powerpc/xmon/ppc-dis.c opcode = lookup_powerpc (insn, dialect); insn 159 arch/powerpc/xmon/ppc-dis.c opcode = lookup_powerpc (insn, (ppc_cpu_t) -1); insn 176 arch/powerpc/xmon/ppc-dis.c insn >>= 16; insn 199 arch/powerpc/xmon/ppc-dis.c skip_optional = skip_optional_operands (opindex, insn, insn 205 arch/powerpc/xmon/ppc-dis.c value = operand_value_powerpc (operand, insn, dialect); insn 282 arch/powerpc/xmon/ppc-dis.c printf(".long 0x%lx", insn); insn 965 arch/powerpc/xmon/ppc-opc.c insert_arx (unsigned long insn, insn 971 arch/powerpc/xmon/ppc-opc.c return insn | ((value - 8) & 0xf); insn 980 arch/powerpc/xmon/ppc-opc.c extract_arx (unsigned long insn, insn 984 arch/powerpc/xmon/ppc-opc.c return (insn & 0xf) + 8; insn 988 arch/powerpc/xmon/ppc-opc.c insert_ary (unsigned long insn, insn 994 arch/powerpc/xmon/ppc-opc.c return insn | (((value - 8) & 0xf) << 4); insn 1003 arch/powerpc/xmon/ppc-opc.c extract_ary (unsigned long insn, insn 1007 arch/powerpc/xmon/ppc-opc.c return ((insn >> 4) & 0xf) + 8; insn 1011 arch/powerpc/xmon/ppc-opc.c insert_rx (unsigned long insn, insn 1017 arch/powerpc/xmon/ppc-opc.c return insn | value; insn 1019 arch/powerpc/xmon/ppc-opc.c return insn | (value - 16); insn 1028 arch/powerpc/xmon/ppc-opc.c extract_rx (unsigned long insn, insn 1032 arch/powerpc/xmon/ppc-opc.c int value = insn & 0xf; insn 1040 arch/powerpc/xmon/ppc-opc.c insert_ry (unsigned long insn, insn 1046 arch/powerpc/xmon/ppc-opc.c return insn | (value << 4); insn 1048 arch/powerpc/xmon/ppc-opc.c return insn | ((value - 16) << 4); insn 1057 arch/powerpc/xmon/ppc-opc.c extract_ry (unsigned long insn, insn 1061 arch/powerpc/xmon/ppc-opc.c int value = (insn >> 4) & 0xf; insn 1075 arch/powerpc/xmon/ppc-opc.c insert_bat (unsigned long insn, insn 1080 arch/powerpc/xmon/ppc-opc.c return insn | (((insn >> 21) & 0x1f) << 16); insn 1084 arch/powerpc/xmon/ppc-opc.c extract_bat (unsigned long insn, insn 1088 arch/powerpc/xmon/ppc-opc.c if (((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f)) insn 1100 arch/powerpc/xmon/ppc-opc.c insert_bba (unsigned long insn, insn 1105 arch/powerpc/xmon/ppc-opc.c return insn | (((insn >> 16) & 0x1f) << 11); insn 1109 arch/powerpc/xmon/ppc-opc.c extract_bba (unsigned long insn, insn 1113 arch/powerpc/xmon/ppc-opc.c if (((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f)) insn 1138 arch/powerpc/xmon/ppc-opc.c insert_bdm (unsigned long insn, insn 1146 arch/powerpc/xmon/ppc-opc.c insn |= 1 << 21; insn 1150 arch/powerpc/xmon/ppc-opc.c if ((insn & (0x14 << 21)) == (0x04 << 21)) insn 1151 arch/powerpc/xmon/ppc-opc.c insn |= 0x02 << 21; insn 1152 arch/powerpc/xmon/ppc-opc.c else if ((insn & (0x14 << 21)) == (0x10 << 21)) insn 1153 arch/powerpc/xmon/ppc-opc.c insn |= 0x08 << 21; insn 1155 arch/powerpc/xmon/ppc-opc.c return insn | (value & 0xfffc); insn 1159 arch/powerpc/xmon/ppc-opc.c extract_bdm (unsigned long insn, insn 1165 arch/powerpc/xmon/ppc-opc.c if (((insn & (1 << 21)) == 0) != ((insn & (1 << 15)) == 0)) insn 1170 arch/powerpc/xmon/ppc-opc.c if ((insn & (0x17 << 21)) != (0x06 << 21) insn 1171 arch/powerpc/xmon/ppc-opc.c && (insn & (0x1d << 21)) != (0x18 << 21)) insn 1175 arch/powerpc/xmon/ppc-opc.c return ((insn & 0xfffc) ^ 0x8000) - 0x8000; insn 1183 arch/powerpc/xmon/ppc-opc.c insert_bdp (unsigned long insn, insn 1191 arch/powerpc/xmon/ppc-opc.c insn |= 1 << 21; insn 1195 arch/powerpc/xmon/ppc-opc.c if ((insn & (0x14 << 21)) == (0x04 << 21)) insn 1196 arch/powerpc/xmon/ppc-opc.c insn |= 0x03 << 21; insn 1197 arch/powerpc/xmon/ppc-opc.c else if ((insn & (0x14 << 21)) == (0x10 << 21)) insn 1198 arch/powerpc/xmon/ppc-opc.c insn |= 0x09 << 21; insn 1200 arch/powerpc/xmon/ppc-opc.c return insn | (value & 0xfffc); insn 1204 arch/powerpc/xmon/ppc-opc.c extract_bdp (unsigned long insn, insn 1210 arch/powerpc/xmon/ppc-opc.c if (((insn & (1 << 21)) == 0) == ((insn & (1 << 15)) == 0)) insn 1215 arch/powerpc/xmon/ppc-opc.c if ((insn & (0x17 << 21)) != (0x07 << 21) insn 1216 arch/powerpc/xmon/ppc-opc.c && (insn & (0x1d << 21)) != (0x19 << 21)) insn 1220 arch/powerpc/xmon/ppc-opc.c return ((insn & 0xfffc) ^ 0x8000) - 0x8000; insn 1293 arch/powerpc/xmon/ppc-opc.c insert_bo (unsigned long insn, insn 1300 arch/powerpc/xmon/ppc-opc.c else if (PPC_OP (insn) == 19 && (insn & 0x400) && ! (value & 4)) insn 1302 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 21); insn 1306 arch/powerpc/xmon/ppc-opc.c extract_bo (unsigned long insn, insn 1312 arch/powerpc/xmon/ppc-opc.c value = (insn >> 21) & 0x1f; insn 1323 arch/powerpc/xmon/ppc-opc.c insert_boe (unsigned long insn, insn 1330 arch/powerpc/xmon/ppc-opc.c else if (PPC_OP (insn) == 19 && (insn & 0x400) && ! (value & 4)) insn 1335 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 21); insn 1339 arch/powerpc/xmon/ppc-opc.c extract_boe (unsigned long insn, insn 1345 arch/powerpc/xmon/ppc-opc.c value = (insn >> 21) & 0x1f; insn 1355 arch/powerpc/xmon/ppc-opc.c insert_dcmxs (unsigned long insn, insn 1360 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16) | ((value & 0x20) >> 3) | (value & 0x40); insn 1364 arch/powerpc/xmon/ppc-opc.c extract_dcmxs (unsigned long insn, insn 1368 arch/powerpc/xmon/ppc-opc.c return (insn & 0x40) | ((insn << 3) & 0x20) | ((insn >> 16) & 0x1f); insn 1375 arch/powerpc/xmon/ppc-opc.c insert_dxd (unsigned long insn, insn 1380 arch/powerpc/xmon/ppc-opc.c return insn | (value & 0xffc1) | ((value & 0x3e) << 15); insn 1384 arch/powerpc/xmon/ppc-opc.c extract_dxd (unsigned long insn, insn 1388 arch/powerpc/xmon/ppc-opc.c unsigned long dxd = (insn & 0xffc1) | ((insn >> 15) & 0x3e); insn 1393 arch/powerpc/xmon/ppc-opc.c insert_dxdn (unsigned long insn, insn 1398 arch/powerpc/xmon/ppc-opc.c return insert_dxd (insn, -value, dialect, errmsg); insn 1402 arch/powerpc/xmon/ppc-opc.c extract_dxdn (unsigned long insn, insn 1406 arch/powerpc/xmon/ppc-opc.c return -extract_dxd (insn, dialect, invalid); insn 1412 arch/powerpc/xmon/ppc-opc.c insert_fxm (unsigned long insn, insn 1419 arch/powerpc/xmon/ppc-opc.c if ((insn & (1 << 20)) != 0) insn 1437 arch/powerpc/xmon/ppc-opc.c && (insn & (0x3ff << 1)) == 19 << 1))) insn 1438 arch/powerpc/xmon/ppc-opc.c insn |= 1 << 20; insn 1441 arch/powerpc/xmon/ppc-opc.c else if ((insn & (0x3ff << 1)) == 19 << 1) insn 1450 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xff) << 12); insn 1454 arch/powerpc/xmon/ppc-opc.c extract_fxm (unsigned long insn, insn 1458 arch/powerpc/xmon/ppc-opc.c long mask = (insn >> 12) & 0xff; insn 1461 arch/powerpc/xmon/ppc-opc.c if ((insn & (1 << 20)) != 0) insn 1469 arch/powerpc/xmon/ppc-opc.c else if ((insn & (0x3ff << 1)) == 19 << 1) insn 1481 arch/powerpc/xmon/ppc-opc.c insert_li20 (unsigned long insn, insn 1486 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf0000) >> 5) | ((value & 0x0f800) << 5) | (value & 0x7ff); insn 1490 arch/powerpc/xmon/ppc-opc.c extract_li20 (unsigned long insn, insn 1494 arch/powerpc/xmon/ppc-opc.c long ext = ((insn & 0x4000) == 0x4000) ? 0xfff00000 : 0x00000000; insn 1497 arch/powerpc/xmon/ppc-opc.c | (((insn >> 11) & 0xf) << 16) insn 1498 arch/powerpc/xmon/ppc-opc.c | (((insn >> 17) & 0xf) << 12) insn 1499 arch/powerpc/xmon/ppc-opc.c | (((insn >> 16) & 0x1) << 11) insn 1500 arch/powerpc/xmon/ppc-opc.c | (insn & 0x7ff); insn 1509 arch/powerpc/xmon/ppc-opc.c insert_ls (unsigned long insn, insn 1515 arch/powerpc/xmon/ppc-opc.c if (((insn >> 1) & 0x3ff) == 598) insn 1521 arch/powerpc/xmon/ppc-opc.c return insn; insn 1525 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x3) << 21); insn 1533 arch/powerpc/xmon/ppc-opc.c insert_esync (unsigned long insn, insn 1538 arch/powerpc/xmon/ppc-opc.c unsigned long ls = (insn >> 21) & 0x03; insn 1545 arch/powerpc/xmon/ppc-opc.c return insn; insn 1552 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf) << 16); insn 1561 arch/powerpc/xmon/ppc-opc.c insert_mbe (unsigned long insn, insn 1574 arch/powerpc/xmon/ppc-opc.c return insn; insn 1610 arch/powerpc/xmon/ppc-opc.c return insn | (mb << 6) | ((me - 1) << 1); insn 1614 arch/powerpc/xmon/ppc-opc.c extract_mbe (unsigned long insn, insn 1624 arch/powerpc/xmon/ppc-opc.c mb = (insn >> 6) & 0x1f; insn 1625 arch/powerpc/xmon/ppc-opc.c me = (insn >> 1) & 0x1f; insn 1647 arch/powerpc/xmon/ppc-opc.c insert_mb6 (unsigned long insn, insn 1652 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 6) | (value & 0x20); insn 1656 arch/powerpc/xmon/ppc-opc.c extract_mb6 (unsigned long insn, insn 1660 arch/powerpc/xmon/ppc-opc.c return ((insn >> 6) & 0x1f) | (insn & 0x20); insn 1667 arch/powerpc/xmon/ppc-opc.c extract_nb (unsigned long insn, insn 1673 arch/powerpc/xmon/ppc-opc.c ret = (insn >> 11) & 0x1f; insn 1683 arch/powerpc/xmon/ppc-opc.c insert_nbi (unsigned long insn, insn 1688 arch/powerpc/xmon/ppc-opc.c long rtvalue = (insn & RT_MASK) >> 21; insn 1689 arch/powerpc/xmon/ppc-opc.c long ravalue = (insn & RA_MASK) >> 16; insn 1696 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 11); insn 1705 arch/powerpc/xmon/ppc-opc.c insert_nsi (unsigned long insn, insn 1710 arch/powerpc/xmon/ppc-opc.c return insn | (-value & 0xffff); insn 1714 arch/powerpc/xmon/ppc-opc.c extract_nsi (unsigned long insn, insn 1719 arch/powerpc/xmon/ppc-opc.c return -(((insn & 0xffff) ^ 0x8000) - 0x8000); insn 1727 arch/powerpc/xmon/ppc-opc.c insert_ral (unsigned long insn, insn 1733 arch/powerpc/xmon/ppc-opc.c || (unsigned long) value == ((insn >> 21) & 0x1f)) insn 1735 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16); insn 1742 arch/powerpc/xmon/ppc-opc.c insert_ram (unsigned long insn, insn 1747 arch/powerpc/xmon/ppc-opc.c if ((unsigned long) value >= ((insn >> 21) & 0x1f)) insn 1749 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16); insn 1756 arch/powerpc/xmon/ppc-opc.c insert_raq (unsigned long insn, insn 1761 arch/powerpc/xmon/ppc-opc.c long rtvalue = (insn & RT_MASK) >> 21; insn 1765 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16); insn 1773 arch/powerpc/xmon/ppc-opc.c insert_ras (unsigned long insn, insn 1780 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16); insn 1790 arch/powerpc/xmon/ppc-opc.c insert_rbs (unsigned long insn, insn 1795 arch/powerpc/xmon/ppc-opc.c return insn | (((insn >> 21) & 0x1f) << 11); insn 1799 arch/powerpc/xmon/ppc-opc.c extract_rbs (unsigned long insn, insn 1803 arch/powerpc/xmon/ppc-opc.c if (((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f)) insn 1812 arch/powerpc/xmon/ppc-opc.c insert_rbx (unsigned long insn, insn 1817 arch/powerpc/xmon/ppc-opc.c long rtvalue = (insn & RT_MASK) >> 21; insn 1821 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 11); insn 1826 arch/powerpc/xmon/ppc-opc.c insert_sci8 (unsigned long insn, insn 1874 arch/powerpc/xmon/ppc-opc.c return insn | fill_scale | (ui8 & 0xff); insn 1878 arch/powerpc/xmon/ppc-opc.c extract_sci8 (unsigned long insn, insn 1882 arch/powerpc/xmon/ppc-opc.c int fill = insn & 0x400; insn 1883 arch/powerpc/xmon/ppc-opc.c int scale_factor = (insn & 0x300) >> 5; insn 1884 arch/powerpc/xmon/ppc-opc.c long value = (insn & 0xff) << scale_factor; insn 1892 arch/powerpc/xmon/ppc-opc.c insert_sci8n (unsigned long insn, insn 1897 arch/powerpc/xmon/ppc-opc.c return insert_sci8 (insn, -value, dialect, errmsg); insn 1901 arch/powerpc/xmon/ppc-opc.c extract_sci8n (unsigned long insn, insn 1905 arch/powerpc/xmon/ppc-opc.c return -extract_sci8 (insn, dialect, invalid); insn 1909 arch/powerpc/xmon/ppc-opc.c insert_sd4h (unsigned long insn, insn 1914 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1e) << 7); insn 1918 arch/powerpc/xmon/ppc-opc.c extract_sd4h (unsigned long insn, insn 1922 arch/powerpc/xmon/ppc-opc.c return ((insn >> 8) & 0xf) << 1; insn 1926 arch/powerpc/xmon/ppc-opc.c insert_sd4w (unsigned long insn, insn 1931 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x3c) << 6); insn 1935 arch/powerpc/xmon/ppc-opc.c extract_sd4w (unsigned long insn, insn 1939 arch/powerpc/xmon/ppc-opc.c return ((insn >> 8) & 0xf) << 2; insn 1943 arch/powerpc/xmon/ppc-opc.c insert_oimm (unsigned long insn, insn 1948 arch/powerpc/xmon/ppc-opc.c return insn | (((value - 1) & 0x1f) << 4); insn 1952 arch/powerpc/xmon/ppc-opc.c extract_oimm (unsigned long insn, insn 1956 arch/powerpc/xmon/ppc-opc.c return ((insn >> 4) & 0x1f) + 1; insn 1962 arch/powerpc/xmon/ppc-opc.c insert_sh6 (unsigned long insn, insn 1968 arch/powerpc/xmon/ppc-opc.c if (PPC_OP (insn) == 4) insn 1969 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 6) | ((value & 0x20) >> 5); insn 1971 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4); insn 1975 arch/powerpc/xmon/ppc-opc.c extract_sh6 (unsigned long insn, insn 1980 arch/powerpc/xmon/ppc-opc.c if (PPC_OP (insn) == 4) insn 1981 arch/powerpc/xmon/ppc-opc.c return ((insn >> 6) & 0x1f) | ((insn << 5) & 0x20); insn 1983 arch/powerpc/xmon/ppc-opc.c return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20); insn 1990 arch/powerpc/xmon/ppc-opc.c insert_spr (unsigned long insn, insn 1995 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6); insn 1999 arch/powerpc/xmon/ppc-opc.c extract_spr (unsigned long insn, insn 2003 arch/powerpc/xmon/ppc-opc.c return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0); insn 2010 arch/powerpc/xmon/ppc-opc.c insert_sprg (unsigned long insn, insn 2021 arch/powerpc/xmon/ppc-opc.c if (value <= 3 || (insn & 0x100) != 0) insn 2024 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x17) << 16); insn 2028 arch/powerpc/xmon/ppc-opc.c extract_sprg (unsigned long insn, insn 2032 arch/powerpc/xmon/ppc-opc.c unsigned long val = (insn >> 16) & 0x1f; insn 2037 arch/powerpc/xmon/ppc-opc.c || (val - 0x10 > 7 && (insn & 0x100) != 0) insn 2048 arch/powerpc/xmon/ppc-opc.c insert_tbr (unsigned long insn, insn 2055 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6); insn 2059 arch/powerpc/xmon/ppc-opc.c extract_tbr (unsigned long insn, insn 2065 arch/powerpc/xmon/ppc-opc.c ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0); insn 2074 arch/powerpc/xmon/ppc-opc.c insert_xt6 (unsigned long insn, insn 2079 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 21) | ((value & 0x20) >> 5); insn 2083 arch/powerpc/xmon/ppc-opc.c extract_xt6 (unsigned long insn, insn 2087 arch/powerpc/xmon/ppc-opc.c return ((insn << 5) & 0x20) | ((insn >> 21) & 0x1f); insn 2092 arch/powerpc/xmon/ppc-opc.c insert_xtq6 (unsigned long insn, insn 2097 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 21) | ((value & 0x20) >> 2); insn 2101 arch/powerpc/xmon/ppc-opc.c extract_xtq6 (unsigned long insn, insn 2105 arch/powerpc/xmon/ppc-opc.c return ((insn << 2) & 0x20) | ((insn >> 21) & 0x1f); insn 2111 arch/powerpc/xmon/ppc-opc.c insert_xa6 (unsigned long insn, insn 2116 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 16) | ((value & 0x20) >> 3); insn 2120 arch/powerpc/xmon/ppc-opc.c extract_xa6 (unsigned long insn, insn 2124 arch/powerpc/xmon/ppc-opc.c return ((insn << 3) & 0x20) | ((insn >> 16) & 0x1f); insn 2130 arch/powerpc/xmon/ppc-opc.c insert_xb6 (unsigned long insn, insn 2135 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4); insn 2139 arch/powerpc/xmon/ppc-opc.c extract_xb6 (unsigned long insn, insn 2143 arch/powerpc/xmon/ppc-opc.c return ((insn << 4) & 0x20) | ((insn >> 11) & 0x1f); insn 2153 arch/powerpc/xmon/ppc-opc.c insert_xb6s (unsigned long insn, insn 2158 arch/powerpc/xmon/ppc-opc.c return insn | (((insn >> 16) & 0x1f) << 11) | (((insn >> 2) & 0x1) << 1); insn 2162 arch/powerpc/xmon/ppc-opc.c extract_xb6s (unsigned long insn, insn 2166 arch/powerpc/xmon/ppc-opc.c if ((((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f)) insn 2167 arch/powerpc/xmon/ppc-opc.c || (((insn >> 2) & 0x1) != ((insn >> 1) & 0x1))) insn 2175 arch/powerpc/xmon/ppc-opc.c insert_xc6 (unsigned long insn, insn 2180 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0x1f) << 6) | ((value & 0x20) >> 2); insn 2184 arch/powerpc/xmon/ppc-opc.c extract_xc6 (unsigned long insn, insn 2188 arch/powerpc/xmon/ppc-opc.c return ((insn << 2) & 0x20) | ((insn >> 6) & 0x1f); insn 2192 arch/powerpc/xmon/ppc-opc.c insert_dm (unsigned long insn, insn 2199 arch/powerpc/xmon/ppc-opc.c return insn | (((value) ? 3 : 0) << 8); insn 2203 arch/powerpc/xmon/ppc-opc.c extract_dm (unsigned long insn, insn 2209 arch/powerpc/xmon/ppc-opc.c value = (insn >> 8) & 3; insn 2218 arch/powerpc/xmon/ppc-opc.c insert_vlesi (unsigned long insn, insn 2223 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf800) << 10) | (value & 0x7ff); insn 2227 arch/powerpc/xmon/ppc-opc.c extract_vlesi (unsigned long insn, insn 2231 arch/powerpc/xmon/ppc-opc.c long value = ((insn >> 10) & 0xf800) | (insn & 0x7ff); insn 2237 arch/powerpc/xmon/ppc-opc.c insert_vlensi (unsigned long insn, insn 2243 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf800) << 10) | (value & 0x7ff); insn 2246 arch/powerpc/xmon/ppc-opc.c extract_vlensi (unsigned long insn, insn 2250 arch/powerpc/xmon/ppc-opc.c long value = ((insn >> 10) & 0xf800) | (insn & 0x7ff); insn 2260 arch/powerpc/xmon/ppc-opc.c insert_vleui (unsigned long insn, insn 2265 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf800) << 10) | (value & 0x7ff); insn 2269 arch/powerpc/xmon/ppc-opc.c extract_vleui (unsigned long insn, insn 2273 arch/powerpc/xmon/ppc-opc.c return ((insn >> 10) & 0xf800) | (insn & 0x7ff); insn 2279 arch/powerpc/xmon/ppc-opc.c insert_vleil (unsigned long insn, insn 2284 arch/powerpc/xmon/ppc-opc.c return insn | ((value & 0xf800) << 5) | (value & 0x7ff); insn 2288 arch/powerpc/xmon/ppc-opc.c extract_vleil (unsigned long insn, insn 2292 arch/powerpc/xmon/ppc-opc.c return ((insn >> 5) & 0xf800) | (insn & 0x7ff); insn 44 arch/powerpc/xmon/spu-dis.c get_index_for_opcode (unsigned int insn) insn 47 arch/powerpc/xmon/spu-dis.c unsigned int opcode = insn >> (32-11); insn 83 arch/powerpc/xmon/spu-dis.c print_insn_spu (unsigned long insn, unsigned long memaddr) insn 90 arch/powerpc/xmon/spu-dis.c index = get_index_for_opcode (insn); insn 94 arch/powerpc/xmon/spu-dis.c printf(".long 0x%lx", insn); insn 106 arch/powerpc/xmon/spu-dis.c int fb = (insn >> (32-18)) & 0x7f; insn 127 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RT (insn)); insn 131 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RA (insn)); insn 135 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RB (insn)); insn 139 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RC (insn)); insn 143 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RA (insn)); insn 147 arch/powerpc/xmon/spu-dis.c DECODE_INSN_RA (insn)); insn 155 arch/powerpc/xmon/spu-dis.c 173 - DECODE_INSN_U8 (insn)); insn 159 arch/powerpc/xmon/spu-dis.c 155 - DECODE_INSN_U8 (insn)); insn 169 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_I7 (insn); insn 173 arch/powerpc/xmon/spu-dis.c print_address(memaddr + DECODE_INSN_I9a (insn) * 4); insn 176 arch/powerpc/xmon/spu-dis.c print_address(memaddr + DECODE_INSN_I9b (insn) * 4); insn 180 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_I10 (insn); insn 184 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_I10 (insn) * 16; insn 188 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_I16 (insn); insn 192 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_U16 (insn); insn 196 arch/powerpc/xmon/spu-dis.c value = DECODE_INSN_I16 (insn) * 4; insn 206 arch/powerpc/xmon/spu-dis.c value = DECODE_INSN_U16 (insn) * 4; insn 213 arch/powerpc/xmon/spu-dis.c value = DECODE_INSN_U18 (insn); insn 223 arch/powerpc/xmon/spu-dis.c hex_value = DECODE_INSN_U14 (insn); insn 80 arch/powerpc/xmon/spu.h #define SIGNED_EXTRACT(insn,size,pos) (((int)((insn) << (32-size-pos))) >> (32-size)) insn 81 arch/powerpc/xmon/spu.h #define UNSIGNED_EXTRACT(insn,size,pos) (((insn) >> pos) & ((1 << size)-1)) insn 83 arch/powerpc/xmon/spu.h #define DECODE_INSN_RT(insn) (insn & 0x7f) insn 84 arch/powerpc/xmon/spu.h #define DECODE_INSN_RA(insn) ((insn >> 7) & 0x7f) insn 85 arch/powerpc/xmon/spu.h #define DECODE_INSN_RB(insn) ((insn >> 14) & 0x7f) insn 86 arch/powerpc/xmon/spu.h #define DECODE_INSN_RC(insn) ((insn >> 21) & 0x7f) insn 88 arch/powerpc/xmon/spu.h #define DECODE_INSN_I10(insn) SIGNED_EXTRACT(insn,10,14) insn 89 arch/powerpc/xmon/spu.h #define DECODE_INSN_U10(insn) UNSIGNED_EXTRACT(insn,10,14) insn 92 arch/powerpc/xmon/spu.h #define DECODE_INSN_I16(insn) SIGNED_EXTRACT(insn,16,7) insn 93 arch/powerpc/xmon/spu.h #define DECODE_INSN_U16(insn) UNSIGNED_EXTRACT(insn,16,7) insn 96 arch/powerpc/xmon/spu.h #define DECODE_INSN_U14(insn) UNSIGNED_EXTRACT(insn,14,0) insn 99 arch/powerpc/xmon/spu.h #define DECODE_INSN_I18(insn) SIGNED_EXTRACT(insn,18,7) insn 100 arch/powerpc/xmon/spu.h #define DECODE_INSN_U18(insn) UNSIGNED_EXTRACT(insn,18,7) insn 103 arch/powerpc/xmon/spu.h #define DECODE_INSN_I7(insn) SIGNED_EXTRACT(insn,7,14) insn 104 arch/powerpc/xmon/spu.h #define DECODE_INSN_U7(insn) UNSIGNED_EXTRACT(insn,7,14) insn 107 arch/powerpc/xmon/spu.h #define DECODE_INSN_I8(insn) SIGNED_EXTRACT(insn,8,14) insn 108 arch/powerpc/xmon/spu.h #define DECODE_INSN_U8(insn) UNSIGNED_EXTRACT(insn,8,14) insn 111 arch/powerpc/xmon/spu.h #define DECODE_INSN_I9a(insn) ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0)) insn 112 arch/powerpc/xmon/spu.h #define DECODE_INSN_I9b(insn) ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0)) insn 113 arch/powerpc/xmon/spu.h #define DECODE_INSN_U9a(insn) ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0)) insn 114 arch/powerpc/xmon/spu.h #define DECODE_INSN_U9b(insn) ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0)) insn 15 arch/riscv/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ insn 20 arch/riscv/include/asm/futex.h "1: " insn " \n" \ insn 105 arch/riscv/include/asm/uaccess.h #define __get_user_asm(insn, x, ptr, err) \ insn 112 arch/riscv/include/asm/uaccess.h " " insn " %1, %3\n" \ insn 241 arch/riscv/include/asm/uaccess.h #define __put_user_asm(insn, x, ptr, err) \ insn 248 arch/riscv/include/asm/uaccess.h " " insn " %z3, %2\n" \ insn 117 arch/riscv/kernel/traps.c bug_insn_t insn; insn 119 arch/riscv/kernel/traps.c if (probe_kernel_address((bug_insn_t *)pc, insn)) insn 121 arch/riscv/kernel/traps.c return (((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) ? 4UL : 2UL); insn 137 arch/riscv/kernel/traps.c bug_insn_t insn; insn 141 arch/riscv/kernel/traps.c if (probe_kernel_address((bug_insn_t *)pc, insn)) insn 143 arch/riscv/kernel/traps.c if ((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) insn 144 arch/riscv/kernel/traps.c return (insn == __BUG_INSN_32); insn 146 arch/riscv/kernel/traps.c return ((insn & __COMPRESSED_INSN_MASK) == __BUG_INSN_16); insn 159 arch/riscv/net/bpf_jit_comp.c static void emit(const u32 insn, struct rv_jit_context *ctx) insn 162 arch/riscv/net/bpf_jit_comp.c ctx->insns[ctx->ninsns] = insn; insn 484 arch/riscv/net/bpf_jit_comp.c static int is_12b_check(int off, int insn) insn 488 arch/riscv/net/bpf_jit_comp.c insn, (int)off); insn 494 arch/riscv/net/bpf_jit_comp.c static int is_13b_check(int off, int insn) insn 498 arch/riscv/net/bpf_jit_comp.c insn, (int)off); insn 504 arch/riscv/net/bpf_jit_comp.c static int is_21b_check(int off, int insn) insn 508 arch/riscv/net/bpf_jit_comp.c insn, (int)off); insn 615 arch/riscv/net/bpf_jit_comp.c static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx) insn 627 arch/riscv/net/bpf_jit_comp.c tc_ninsn = insn ? ctx->offset[insn] - ctx->offset[insn - 1] : insn 632 arch/riscv/net/bpf_jit_comp.c if (is_12b_check(off, insn)) insn 636 arch/riscv/net/bpf_jit_comp.c if (is_13b_check(off, insn)) insn 645 arch/riscv/net/bpf_jit_comp.c if (is_13b_check(off, insn)) insn 656 arch/riscv/net/bpf_jit_comp.c if (is_12b_check(off, insn)) insn 660 arch/riscv/net/bpf_jit_comp.c if (is_13b_check(off, insn)) insn 666 arch/riscv/net/bpf_jit_comp.c if (is_12b_check(off, insn)) insn 675 arch/riscv/net/bpf_jit_comp.c static void init_regs(u8 *rd, u8 *rs, const struct bpf_insn *insn, insn 678 arch/riscv/net/bpf_jit_comp.c u8 code = insn->code; insn 687 arch/riscv/net/bpf_jit_comp.c *rd = bpf_to_rv_reg(insn->dst_reg, ctx); insn 693 arch/riscv/net/bpf_jit_comp.c *rs = bpf_to_rv_reg(insn->src_reg, ctx); insn 696 arch/riscv/net/bpf_jit_comp.c static int rv_offset_check(int *rvoff, s16 off, int insn, insn 699 arch/riscv/net/bpf_jit_comp.c *rvoff = rv_offset(insn + off, insn, ctx); insn 700 arch/riscv/net/bpf_jit_comp.c return is_13b_check(*rvoff, insn); insn 735 arch/riscv/net/bpf_jit_comp.c static int emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx, insn 738 arch/riscv/net/bpf_jit_comp.c bool is64 = BPF_CLASS(insn->code) == BPF_ALU64 || insn 739 arch/riscv/net/bpf_jit_comp.c BPF_CLASS(insn->code) == BPF_JMP; insn 741 arch/riscv/net/bpf_jit_comp.c int rvoff, i = insn - ctx->prog->insnsi; insn 742 arch/riscv/net/bpf_jit_comp.c u8 rd = -1, rs = -1, code = insn->code; insn 743 arch/riscv/net/bpf_jit_comp.c s16 off = insn->off; insn 744 arch/riscv/net/bpf_jit_comp.c s32 imm = insn->imm; insn 746 arch/riscv/net/bpf_jit_comp.c init_regs(&rd, &rs, insn, ctx); insn 1220 arch/riscv/net/bpf_jit_comp.c ret = bpf_jit_get_func_addr(ctx->prog, insn, extra_pass, &addr, insn 1260 arch/riscv/net/bpf_jit_comp.c struct bpf_insn insn1 = insn[1]; insn 1278 arch/riscv/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 1290 arch/riscv/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 1302 arch/riscv/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 1523 arch/riscv/net/bpf_jit_comp.c const struct bpf_insn *insn = &prog->insnsi[i]; insn 1526 arch/riscv/net/bpf_jit_comp.c ret = emit_insn(insn, ctx, extra_pass); insn 17 arch/s390/include/asm/cpu_mf-insn.h .insn rsy,0xeb0000000017,\r1,\m3 & 0xf,\db2 insn 19 arch/s390/include/asm/extable.h int insn, fixup; insn 49 arch/s390/include/asm/ftrace.h static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn) insn 54 arch/s390/include/asm/ftrace.h insn->opc = 0xc004; insn 55 arch/s390/include/asm/ftrace.h insn->disp = 0; insn 58 arch/s390/include/asm/ftrace.h insn->opc = 0xc0f4; insn 59 arch/s390/include/asm/ftrace.h insn->disp = MCOUNT_INSN_SIZE / 2; insn 64 arch/s390/include/asm/ftrace.h static inline int is_ftrace_nop(struct ftrace_insn *insn) insn 68 arch/s390/include/asm/ftrace.h if (insn->disp == 0) insn 71 arch/s390/include/asm/ftrace.h if (insn->disp == MCOUNT_INSN_SIZE / 2) insn 78 arch/s390/include/asm/ftrace.h static inline void ftrace_generate_call_insn(struct ftrace_insn *insn, insn 86 arch/s390/include/asm/ftrace.h insn->opc = 0xc005; insn 87 arch/s390/include/asm/ftrace.h insn->disp = (target - ip) / 2; insn 10 arch/s390/include/asm/futex.h #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ insn 14 arch/s390/include/asm/futex.h "1:"insn \ insn 27 arch/s390/include/asm/kprobes.h int probe_is_prohibited_opcode(u16 *insn); insn 28 arch/s390/include/asm/kprobes.h int probe_get_fixup_type(u16 *insn); insn 29 arch/s390/include/asm/kprobes.h int probe_is_insn_relative_long(u16 *insn); insn 56 arch/s390/include/asm/kprobes.h kprobe_opcode_t *insn; insn 23 arch/s390/include/asm/uprobes.h uprobe_opcode_t insn[3]; insn 230 arch/s390/include/uapi/asm/sie.h #define INSN_DECODE_IPA0(ipa0, insn, rshift, mask) \ insn 231 arch/s390/include/uapi/asm/sie.h (insn >> 56) == (ipa0) ? \ insn 232 arch/s390/include/uapi/asm/sie.h ((ipa0 << 8) | ((insn >> rshift) & mask)) : insn 234 arch/s390/include/uapi/asm/sie.h #define INSN_DECODE(insn) (insn >> 56) insn 241 arch/s390/include/uapi/asm/sie.h #define icpt_insn_decoder(insn) ( \ insn 242 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0x01, insn, 48, 0xff) \ insn 243 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xaa, insn, 48, 0x0f) \ insn 244 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xb2, insn, 48, 0xff) \ insn 245 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xb9, insn, 48, 0xff) \ insn 246 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xe3, insn, 48, 0xff) \ insn 247 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xe5, insn, 48, 0xff) \ insn 248 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xeb, insn, 16, 0xff) \ insn 249 arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xc8, insn, 48, 0x0f) \ insn 250 arch/s390/include/uapi/asm/sie.h INSN_DECODE(insn)) insn 395 arch/s390/kernel/dis.c struct s390_insn *insn; insn 412 arch/s390/kernel/dis.c insn = &opcode[entry->offset]; insn 414 arch/s390/kernel/dis.c if (insn->opfrag == opfrag) insn 415 arch/s390/kernel/dis.c return insn; insn 416 arch/s390/kernel/dis.c insn++; insn 423 arch/s390/kernel/dis.c struct s390_insn *insn; insn 432 arch/s390/kernel/dis.c insn = find_insn(code); insn 433 arch/s390/kernel/dis.c if (insn) { insn 434 arch/s390/kernel/dis.c if (insn->zero == 0) insn 436 arch/s390/kernel/dis.c long_insn_name[insn->offset]); insn 438 arch/s390/kernel/dis.c ptr += sprintf(ptr, "%.5s\t", insn->name); insn 441 arch/s390/kernel/dis.c for (ops = formats[insn->format], i = 0; insn 62 arch/s390/kernel/ftrace.c static inline void ftrace_generate_orig_insn(struct ftrace_insn *insn) insn 66 arch/s390/kernel/ftrace.c insn->opc = 0xc004; insn 67 arch/s390/kernel/ftrace.c insn->disp = 0; insn 70 arch/s390/kernel/ftrace.c insn->opc = 0xe3e0; insn 71 arch/s390/kernel/ftrace.c insn->disp = 0xf0080024; insn 75 arch/s390/kernel/ftrace.c static inline int is_kprobe_on_ftrace(struct ftrace_insn *insn) insn 78 arch/s390/kernel/ftrace.c if (insn->opc == BREAKPOINT_INSTRUCTION) insn 84 arch/s390/kernel/ftrace.c static inline void ftrace_generate_kprobe_nop_insn(struct ftrace_insn *insn) insn 87 arch/s390/kernel/ftrace.c insn->opc = BREAKPOINT_INSTRUCTION; insn 88 arch/s390/kernel/ftrace.c insn->disp = KPROBE_ON_FTRACE_NOP; insn 92 arch/s390/kernel/ftrace.c static inline void ftrace_generate_kprobe_call_insn(struct ftrace_insn *insn) insn 95 arch/s390/kernel/ftrace.c insn->opc = BREAKPOINT_INSTRUCTION; insn 96 arch/s390/kernel/ftrace.c insn->disp = KPROBE_ON_FTRACE_CALL; insn 18 arch/s390/kernel/jump_label.c static void jump_label_make_nop(struct jump_entry *entry, struct insn *insn) insn 21 arch/s390/kernel/jump_label.c insn->opcode = 0xc004; insn 22 arch/s390/kernel/jump_label.c insn->offset = (jump_entry_target(entry) - jump_entry_code(entry)) >> 1; insn 25 arch/s390/kernel/jump_label.c static void jump_label_make_branch(struct jump_entry *entry, struct insn *insn) insn 28 arch/s390/kernel/jump_label.c insn->opcode = 0xc0f4; insn 29 arch/s390/kernel/jump_label.c insn->offset = (jump_entry_target(entry) - jump_entry_code(entry)) >> 1; insn 32 arch/s390/kernel/jump_label.c static void jump_label_bug(struct jump_entry *entry, struct insn *expected, insn 33 arch/s390/kernel/jump_label.c struct insn *new) insn 46 arch/s390/kernel/jump_label.c static struct insn orignop = { insn 56 arch/s390/kernel/jump_label.c struct insn old, new; insn 70 arch/s390/kernel/kprobes.c ftrace_generate_nop_insn((struct ftrace_insn *)p->ainsn.insn); insn 73 arch/s390/kernel/kprobes.c memcpy(p->ainsn.insn, p->addr, insn_length(*p->addr >> 8)); insn 74 arch/s390/kernel/kprobes.c p->opcode = p->ainsn.insn[0]; insn 75 arch/s390/kernel/kprobes.c if (!probe_is_insn_relative_long(p->ainsn.insn)) insn 84 arch/s390/kernel/kprobes.c disp = *(s32 *)&p->ainsn.insn[1]; insn 86 arch/s390/kernel/kprobes.c new_addr = (u64)(unsigned long)p->ainsn.insn; insn 88 arch/s390/kernel/kprobes.c *(s32 *)&p->ainsn.insn[1] = new_disp; insn 104 arch/s390/kernel/kprobes.c p->ainsn.insn = NULL; insn 106 arch/s390/kernel/kprobes.c p->ainsn.insn = get_s390_insn_slot(); insn 108 arch/s390/kernel/kprobes.c p->ainsn.insn = get_insn_slot(); insn 109 arch/s390/kernel/kprobes.c return p->ainsn.insn ? 0 : -ENOMEM; insn 115 arch/s390/kernel/kprobes.c if (!p->ainsn.insn) insn 118 arch/s390/kernel/kprobes.c free_s390_insn_slot(p->ainsn.insn, 0); insn 120 arch/s390/kernel/kprobes.c free_insn_slot(p->ainsn.insn, 0); insn 121 arch/s390/kernel/kprobes.c p->ainsn.insn = NULL; insn 152 arch/s390/kernel/kprobes.c struct ftrace_insn new_insn, *insn; insn 161 arch/s390/kernel/kprobes.c insn = (struct ftrace_insn *) p->addr; insn 163 arch/s390/kernel/kprobes.c if (is_ftrace_nop(insn)) insn 169 arch/s390/kernel/kprobes.c if (insn->disp == KPROBE_ON_FTRACE_NOP) insn 337 arch/s390/kernel/kprobes.c enable_singlestep(kcb, regs, (unsigned long) p->ainsn.insn); insn 465 arch/s390/kernel/kprobes.c int fixup = probe_get_fixup_type(p->ainsn.insn); insn 469 arch/s390/kernel/kprobes.c struct ftrace_insn *insn = (struct ftrace_insn *) p->addr; insn 479 arch/s390/kernel/kprobes.c if (insn->disp == KPROBE_ON_FTRACE_CALL) { insn 481 arch/s390/kernel/kprobes.c regs->gprs[0] = (unsigned long)p->addr + sizeof(*insn); insn 486 arch/s390/kernel/kprobes.c ip += (unsigned long) p->addr - (unsigned long) p->ainsn.insn; insn 489 arch/s390/kernel/kprobes.c int ilen = insn_length(p->ainsn.insn[0] >> 8); insn 490 arch/s390/kernel/kprobes.c if (ip - (unsigned long) p->ainsn.insn == ilen) insn 495 arch/s390/kernel/kprobes.c int reg = (p->ainsn.insn[0] & 0xf0) >> 4; insn 497 arch/s390/kernel/kprobes.c (unsigned long) p->ainsn.insn; insn 26 arch/s390/kernel/uprobes.c return probe_is_prohibited_opcode(auprobe->insn); insn 80 arch/s390/kernel/uprobes.c int fixup = probe_get_fixup_type(auprobe->insn); insn 91 arch/s390/kernel/uprobes.c int reg = (auprobe->insn[0] & 0xf0) >> 4; insn 96 arch/s390/kernel/uprobes.c int ilen = insn_length(auprobe->insn[0] >> 8); insn 272 arch/s390/kernel/uprobes.c struct insn_ril *insn; insn 277 arch/s390/kernel/uprobes.c insn = (struct insn_ril *) &auprobe->insn; insn 278 arch/s390/kernel/uprobes.c rx = (union split_register *) ®s->gprs[insn->reg]; insn 279 arch/s390/kernel/uprobes.c uptr = (void *)(regs->psw.addr + (insn->disp * 2)); insn 280 arch/s390/kernel/uprobes.c ilen = insn_length(insn->opc0); insn 282 arch/s390/kernel/uprobes.c switch (insn->opc0) { insn 284 arch/s390/kernel/uprobes.c switch (insn->opc1) { insn 291 arch/s390/kernel/uprobes.c switch (insn->opc1) { insn 328 arch/s390/kernel/uprobes.c switch (insn->opc1) { insn 392 arch/s390/kernel/uprobes.c if (probe_is_insn_relative_long(auprobe->insn)) { insn 12 arch/s390/lib/probes.c int probe_is_prohibited_opcode(u16 *insn) insn 14 arch/s390/lib/probes.c if (!is_known_insn((unsigned char *)insn)) insn 16 arch/s390/lib/probes.c switch (insn[0] >> 8) { insn 25 arch/s390/lib/probes.c switch (insn[0] & 0x0f) { insn 30 arch/s390/lib/probes.c switch (insn[0]) { insn 46 arch/s390/lib/probes.c int probe_get_fixup_type(u16 *insn) insn 51 arch/s390/lib/probes.c switch (insn[0] >> 8) { insn 56 arch/s390/lib/probes.c if ((insn[0] & 0x0f) == 0) insn 77 arch/s390/lib/probes.c if ((insn[0] & 0xff) == 0xb2) insn 81 arch/s390/lib/probes.c if ((insn[0] & 0x0f) == 0x05) insn 85 arch/s390/lib/probes.c if ((insn[0] & 0x0f) == 0x05) /* brasl */ insn 89 arch/s390/lib/probes.c switch (insn[2] & 0xff) { insn 97 arch/s390/lib/probes.c if ((insn[2] & 0xff) == 0x46) insn 101 arch/s390/lib/probes.c switch (insn[2] & 0xff) { insn 118 arch/s390/lib/probes.c int probe_is_insn_relative_long(u16 *insn) insn 122 arch/s390/lib/probes.c switch (insn[0] >> 8) { insn 124 arch/s390/lib/probes.c if ((insn[0] & 0x0f) == 0x00) /* larl */ insn 128 arch/s390/lib/probes.c switch (insn[0] & 0x0f) { insn 144 arch/s390/lib/probes.c switch (insn[0] & 0x0f) { insn 509 arch/s390/net/bpf_jit_comp.c struct bpf_insn *insn = &fp->insnsi[i]; insn 511 arch/s390/net/bpf_jit_comp.c u32 dst_reg = insn->dst_reg; insn 512 arch/s390/net/bpf_jit_comp.c u32 src_reg = insn->src_reg; insn 514 arch/s390/net/bpf_jit_comp.c s32 imm = insn->imm; insn 515 arch/s390/net/bpf_jit_comp.c s16 off = insn->off; insn 520 arch/s390/net/bpf_jit_comp.c switch (insn->code) { insn 527 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 537 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 552 arch/s390/net/bpf_jit_comp.c imm64 = (u64)(u32) insn[0].imm | ((u64)(u32) insn[1].imm) << 32; insn 640 arch/s390/net/bpf_jit_comp.c int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; insn 650 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 657 arch/s390/net/bpf_jit_comp.c int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; insn 672 arch/s390/net/bpf_jit_comp.c int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; insn 675 arch/s390/net/bpf_jit_comp.c if (BPF_OP(insn->code) == BPF_MOD) insn 689 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 696 arch/s390/net/bpf_jit_comp.c int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; insn 699 arch/s390/net/bpf_jit_comp.c if (BPF_OP(insn->code) == BPF_MOD) insn 879 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 900 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 989 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 996 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 1003 arch/s390/net/bpf_jit_comp.c if (insn_is_zext(&insn[1])) insn 1020 arch/s390/net/bpf_jit_comp.c ret = bpf_jit_get_func_addr(fp, insn, extra_pass, insn 1185 arch/s390/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_JMP32) { insn 1241 arch/s390/net/bpf_jit_comp.c bool is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 1249 arch/s390/net/bpf_jit_comp.c is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 1257 arch/s390/net/bpf_jit_comp.c is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 1265 arch/s390/net/bpf_jit_comp.c is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 1271 arch/s390/net/bpf_jit_comp.c is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 1283 arch/s390/net/bpf_jit_comp.c pr_err("Unknown opcode %02x\n", insn->code); insn 44 arch/s390/tools/gen_opcode_table.c struct insn *insn; insn 154 arch/s390/tools/gen_opcode_table.c struct insn insn; insn 158 arch/s390/tools/gen_opcode_table.c rc = scanf("%s %s %s", insn.opcode, insn.name, insn.format); insn 163 arch/s390/tools/gen_opcode_table.c insn.type = insn_format_to_type(insn.format); insn 164 arch/s390/tools/gen_opcode_table.c insn.name_len = strlen(insn.name); insn 165 arch/s390/tools/gen_opcode_table.c for (i = 0; i <= insn.name_len; i++) insn 166 arch/s390/tools/gen_opcode_table.c insn.upper[i] = toupper((unsigned char)insn.name[i]); insn 168 arch/s390/tools/gen_opcode_table.c desc->insn = realloc(desc->insn, desc->nr * sizeof(*desc->insn)); insn 169 arch/s390/tools/gen_opcode_table.c if (!desc->insn) insn 171 arch/s390/tools/gen_opcode_table.c desc->insn[desc->nr - 1] = insn; insn 177 arch/s390/tools/gen_opcode_table.c return strcmp(((struct insn *)a)->format, ((struct insn *)b)->format); insn 185 arch/s390/tools/gen_opcode_table.c qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmpformat); insn 190 arch/s390/tools/gen_opcode_table.c if (!strcmp(format, desc->insn[i].format)) insn 193 arch/s390/tools/gen_opcode_table.c format = desc->insn[i].format; insn 201 arch/s390/tools/gen_opcode_table.c return strcmp(((struct insn *)a)->name, ((struct insn *)b)->name); insn 206 arch/s390/tools/gen_opcode_table.c struct insn *insn; insn 209 arch/s390/tools/gen_opcode_table.c qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmp_long_insn); insn 213 arch/s390/tools/gen_opcode_table.c insn = &desc->insn[i]; insn 214 arch/s390/tools/gen_opcode_table.c if (insn->name_len < 6) insn 216 arch/s390/tools/gen_opcode_table.c printf("\tLONG_INSN_%s,\n", insn->upper); insn 223 arch/s390/tools/gen_opcode_table.c insn = &desc->insn[i]; insn 224 arch/s390/tools/gen_opcode_table.c if (insn->name_len < 6) insn 226 arch/s390/tools/gen_opcode_table.c printf("\t[LONG_INSN_%s] = \"%s\", \\\n", insn->upper, insn->name); insn 231 arch/s390/tools/gen_opcode_table.c static void print_opcode(struct insn *insn, int nr) insn 235 arch/s390/tools/gen_opcode_table.c opcode = insn->opcode; insn 236 arch/s390/tools/gen_opcode_table.c if (insn->type->byte != 0) insn 238 arch/s390/tools/gen_opcode_table.c printf("\t[%4d] = { .opfrag = 0x%s, .format = INSTR_%s, ", nr, opcode, insn->format); insn 239 arch/s390/tools/gen_opcode_table.c if (insn->name_len < 6) insn 240 arch/s390/tools/gen_opcode_table.c printf(".name = \"%s\" ", insn->name); insn 242 arch/s390/tools/gen_opcode_table.c printf(".offset = LONG_INSN_%s ", insn->upper); insn 246 arch/s390/tools/gen_opcode_table.c static void add_to_group(struct gen_opcode *desc, struct insn *insn, int offset) insn 251 arch/s390/tools/gen_opcode_table.c if (group && (!strncmp(group->opcode, insn->opcode, 2) || group->type->byte == 0)) { insn 260 arch/s390/tools/gen_opcode_table.c memcpy(group->opcode, insn->opcode, 2); insn 261 arch/s390/tools/gen_opcode_table.c group->type = insn->type; insn 268 arch/s390/tools/gen_opcode_table.c return strcmp(((struct insn *)a)->opcode, ((struct insn *)b)->opcode); insn 274 arch/s390/tools/gen_opcode_table.c struct insn *insn; insn 277 arch/s390/tools/gen_opcode_table.c qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmpopcode); insn 281 arch/s390/tools/gen_opcode_table.c insn = &desc->insn[i]; insn 282 arch/s390/tools/gen_opcode_table.c if (insn->type->byte == 0) insn 284 arch/s390/tools/gen_opcode_table.c add_to_group(desc, insn, offset); insn 285 arch/s390/tools/gen_opcode_table.c if (strncmp(opcode, insn->opcode, 2)) { insn 286 arch/s390/tools/gen_opcode_table.c memcpy(opcode, insn->opcode, 2); insn 289 arch/s390/tools/gen_opcode_table.c print_opcode(insn, offset); insn 294 arch/s390/tools/gen_opcode_table.c insn = &desc->insn[i]; insn 295 arch/s390/tools/gen_opcode_table.c if (insn->type->byte != 0) insn 297 arch/s390/tools/gen_opcode_table.c add_to_group(desc, insn, offset); insn 298 arch/s390/tools/gen_opcode_table.c print_opcode(insn, offset); insn 353 arch/sh/include/asm/dwarf.h static inline unsigned int DW_CFA_opcode(unsigned long insn) insn 355 arch/sh/include/asm/dwarf.h return (insn & 0xc0); insn 358 arch/sh/include/asm/dwarf.h static inline unsigned int DW_CFA_operand(unsigned long insn) insn 360 arch/sh/include/asm/dwarf.h return (insn & 0x3f); insn 34 arch/sh/include/asm/kprobes.h kprobe_opcode_t insn[MAX_INSN_SIZE]; insn 169 arch/sh/include/asm/processor.h extern unsigned int instruction_size(unsigned int insn); insn 171 arch/sh/include/asm/processor.h #define instruction_size(insn) (2) insn 173 arch/sh/include/asm/processor.h #define instruction_size(insn) (4) insn 36 arch/sh/include/asm/uaccess_32.h #define __get_user_asm(x, addr, err, insn) \ insn 40 arch/sh/include/asm/uaccess_32.h "mov." insn " %2, %1\n\t" \ insn 57 arch/sh/include/asm/uaccess_32.h #define __get_user_asm(x, addr, err, insn) \ insn 60 arch/sh/include/asm/uaccess_32.h "mov." insn " %1, %0\n\t" \ insn 91 arch/sh/include/asm/uaccess_32.h #define __put_user_asm(x, addr, err, insn) \ insn 95 arch/sh/include/asm/uaccess_32.h "mov." insn " %1, %2\n\t" \ insn 115 arch/sh/include/asm/uaccess_32.h #define __put_user_asm(x, addr, err, insn) \ insn 118 arch/sh/include/asm/uaccess_32.h "mov." insn " %0, %1\n\t" \ insn 408 arch/sh/kernel/cpu/sh2a/fpu.c unsigned short insn = *(unsigned short *) regs->pc; insn 412 arch/sh/kernel/cpu/sh2a/fpu.c (insn >> 12) & 0xf, insn 413 arch/sh/kernel/cpu/sh2a/fpu.c (insn >> 8) & 0xf, insn 414 arch/sh/kernel/cpu/sh2a/fpu.c (insn >> 4) & 0xf, insn 415 arch/sh/kernel/cpu/sh2a/fpu.c insn & 0xf}; insn 421 arch/sh/kernel/cpu/sh2a/fpu.c nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); insn 425 arch/sh/kernel/cpu/sh2a/fpu.c nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); insn 433 arch/sh/kernel/cpu/sh2a/fpu.c nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); insn 443 arch/sh/kernel/cpu/sh2a/fpu.c } else if (insn == 0x000b) { /* rts */ insn 448 arch/sh/kernel/cpu/sh2a/fpu.c finsn = insn; insn 34 arch/sh/kernel/cpu/sh2a/opcode_helper.c unsigned int instruction_size(unsigned int insn) insn 37 arch/sh/kernel/cpu/sh2a/opcode_helper.c switch ((insn & 0xf00f)) { insn 45 arch/sh/kernel/cpu/sh2a/opcode_helper.c switch ((insn & 0xf08f)) { insn 176 arch/sh/kernel/cpu/sh4/fpu.c unsigned short insn = *(unsigned short *)regs->pc; insn 180 arch/sh/kernel/cpu/sh4/fpu.c (insn >> 12) & 0xf, insn 181 arch/sh/kernel/cpu/sh4/fpu.c (insn >> 8) & 0xf, insn 182 arch/sh/kernel/cpu/sh4/fpu.c (insn >> 4) & 0xf, insn 183 arch/sh/kernel/cpu/sh4/fpu.c insn & 0xf insn 191 arch/sh/kernel/cpu/sh4/fpu.c nextpc = regs->pc + 4 + ((short)((insn & 0xfff) << 4) >> 3); insn 196 arch/sh/kernel/cpu/sh4/fpu.c nextpc = regs->pc + 4 + ((char)(insn & 0xff) << 1); insn 205 arch/sh/kernel/cpu/sh4/fpu.c nextpc = regs->pc + 4 + ((char)(insn & 0xff) << 1); insn 217 arch/sh/kernel/cpu/sh4/fpu.c } else if (insn == 0x000b) { insn 222 arch/sh/kernel/cpu/sh4/fpu.c nextpc = regs->pc + instruction_size(insn); insn 223 arch/sh/kernel/cpu/sh4/fpu.c finsn = insn; insn 291 arch/sh/kernel/disassemble.c static void print_sh_insn(u32 memaddr, u16 insn) insn 294 arch/sh/kernel/disassemble.c int nibs[4] = { (insn >> 12) & 0xf, (insn >> 8) & 0xf, (insn >> 4) & 0xf, insn & 0xf}; insn 558 arch/sh/kernel/disassemble.c unsigned short insn; insn 560 arch/sh/kernel/disassemble.c if (__get_user(insn, pc + i)) { insn 566 arch/sh/kernel/disassemble.c print_sh_insn((unsigned long)(pc + i), insn); insn 403 arch/sh/kernel/dwarf.c unsigned char insn; insn 411 arch/sh/kernel/dwarf.c insn = __raw_readb(current_insn++); insn 417 arch/sh/kernel/dwarf.c switch (DW_CFA_opcode(insn)) { insn 419 arch/sh/kernel/dwarf.c delta = DW_CFA_operand(insn); insn 425 arch/sh/kernel/dwarf.c reg = DW_CFA_operand(insn); insn 435 arch/sh/kernel/dwarf.c reg = DW_CFA_operand(insn); insn 444 arch/sh/kernel/dwarf.c switch (insn) { insn 543 arch/sh/kernel/dwarf.c pr_debug("unhandled DWARF instruction 0x%x\n", insn); insn 54 arch/sh/kernel/kprobes.c memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); insn 233 arch/sh/kernel/kprobes.c *p->ainsn.insn == BREAKPOINT_INSTRUCTION) { insn 163 arch/sh/kernel/traps.c insn_size_t insn = *(insn_size_t *)instruction_pointer(regs); insn 164 arch/sh/kernel/traps.c if (insn == TRAPA_BUG_OPCODE) insn 507 arch/sh/math-emu/math.c unsigned short insn = *(unsigned short *)regs->pc; insn 511 arch/sh/math-emu/math.c (insn >> 12) & 0xf, insn 512 arch/sh/math-emu/math.c (insn >> 8) & 0xf, insn 513 arch/sh/math-emu/math.c (insn >> 4) & 0xf, insn 514 arch/sh/math-emu/math.c insn & 0xf}; insn 521 arch/sh/math-emu/math.c nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); insn 525 arch/sh/math-emu/math.c nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); insn 533 arch/sh/math-emu/math.c nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); insn 543 arch/sh/math-emu/math.c } else if (insn == 0x000b) { /* rts */ insn 548 arch/sh/math-emu/math.c finsn = insn; insn 96 arch/sh/mm/alignment.c void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn, insn 103 arch/sh/mm/alignment.c (void *)instruction_pointer(regs), insn); insn 108 arch/sh/mm/alignment.c (void *)instruction_pointer(regs), insn); insn 50 arch/sh/mm/extable_64.c if (_key > _elt->insn) insn 52 arch/sh/mm/extable_64.c if (_key < _elt->insn) insn 18 arch/sparc/include/asm/extable_64.h unsigned int insn, fixup; insn 9 arch/sparc/include/asm/futex_64.h #define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \ insn 12 arch/sparc/include/asm/futex_64.h " " insn "\n" \ insn 10 arch/sparc/include/asm/hugetlb.h unsigned int insn; insn 23 arch/sparc/include/asm/kprobes.h do { flushi(&(p)->ainsn.insn[0]); \ insn 24 arch/sparc/include/asm/kprobes.h flushi(&(p)->ainsn.insn[1]); \ insn 32 arch/sparc/include/asm/kprobes.h kprobe_opcode_t insn[MAX_INSN_SIZE]; insn 31 arch/sparc/include/asm/processor_32.h unsigned long insn; insn 55 arch/sparc/include/asm/setup.h int handle_ldf_stq(u32 insn, struct pt_regs *regs); insn 56 arch/sparc/include/asm/setup.h void handle_ld_nf(u32 insn, struct pt_regs *regs); insn 101 arch/sparc/include/asm/sigcontext.h unsigned long insn; insn 73 arch/sparc/include/asm/trap_block.h unsigned int insn; insn 73 arch/sparc/include/asm/tsb.h unsigned int insn; insn 67 arch/sparc/include/asm/uaccess_32.h unsigned long insn, fixup; insn 200 arch/sparc/include/asm/uaccess_64.h unsigned int insn, insn 27 arch/sparc/include/asm/uprobes.h u8 insn[MAX_UINSN_BYTES]; insn 15 arch/sparc/kernel/jump_label.c u32 *insn = (u32 *) (unsigned long) entry->code; insn 44 arch/sparc/kernel/jump_label.c *insn = val; insn 45 arch/sparc/kernel/jump_label.c flushi(insn); insn 33 arch/sparc/kernel/kernel.h asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); insn 34 arch/sparc/kernel/kernel.h int handle_popc(u32 insn, struct pt_regs *regs); insn 175 arch/sparc/kernel/kernel.h asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); insn 176 arch/sparc/kernel/kernel.h asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn); insn 55 arch/sparc/kernel/kprobes.c p->ainsn.insn[0] = *p->addr; insn 56 arch/sparc/kernel/kprobes.c flushi(&p->ainsn.insn[0]); insn 58 arch/sparc/kernel/kprobes.c p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; insn 59 arch/sparc/kernel/kprobes.c flushi(&p->ainsn.insn[1]); insn 111 arch/sparc/kernel/kprobes.c regs->tpc = (unsigned long) &p->ainsn.insn[0]; insn 112 arch/sparc/kernel/kprobes.c regs->tnpc = (unsigned long) &p->ainsn.insn[1]; insn 201 arch/sparc/kernel/kprobes.c static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p, insn 213 arch/sparc/kernel/kprobes.c if ((insn & 0xc0000000) == 0x40000000 || insn 214 arch/sparc/kernel/kprobes.c (insn & 0xc1c00000) == 0x00400000 || insn 215 arch/sparc/kernel/kprobes.c (insn & 0xc1c00000) == 0x00800000) { insn 218 arch/sparc/kernel/kprobes.c ainsn_addr = (unsigned long) &p->ainsn.insn[0]; insn 236 arch/sparc/kernel/kprobes.c static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, insn 242 arch/sparc/kernel/kprobes.c if ((insn & 0xc0000000) == 0x40000000) { insn 247 arch/sparc/kernel/kprobes.c if ((insn & 0xc1f80000) == 0x81c00000) { insn 248 arch/sparc/kernel/kprobes.c unsigned long rd = ((insn >> 25) & 0x1f); insn 280 arch/sparc/kernel/kprobes.c u32 insn = p->ainsn.insn[0]; insn 282 arch/sparc/kernel/kprobes.c regs->tnpc = relbranch_fixup(insn, p, regs); insn 287 arch/sparc/kernel/kprobes.c retpc_fixup(regs, insn, (unsigned long) p->addr); insn 337 arch/sparc/kernel/ptrace_32.c unsigned long insn; insn 906 arch/sparc/kernel/ptrace_64.c unsigned int insn; insn 244 arch/sparc/kernel/setup_32.c unsigned int insn; insn 262 arch/sparc/kernel/setup_32.c *(unsigned int *)(addr) = start->insn; insn 237 arch/sparc/kernel/setup_64.c *(unsigned int *) (addr + 0) = start->insn; insn 256 arch/sparc/kernel/traps_64.c u32 insn; insn 258 arch/sparc/kernel/traps_64.c if (get_user(insn, (u32 __user *)regs->tpc) == -EFAULT) insn 273 arch/sparc/kernel/traps_64.c if ((insn & 0xc0800000) == 0xc0800000) { /* op=3, op3[4]=1 */ insn 274 arch/sparc/kernel/traps_64.c if (insn & 0x2000) /* immediate offset */ insn 277 arch/sparc/kernel/traps_64.c asi = (insn >> 5); /* immediate asi */ insn 279 arch/sparc/kernel/traps_64.c if (insn & 0x1000000) { /* op3[5:4]=3 */ insn 280 arch/sparc/kernel/traps_64.c handle_ldf_stq(insn, regs); insn 282 arch/sparc/kernel/traps_64.c } else if (insn & 0x200000) { /* op3[2], stores */ insn 285 arch/sparc/kernel/traps_64.c handle_ld_nf(insn, regs); insn 1952 arch/sparc/kernel/traps_64.c unsigned int insn; insn 1958 arch/sparc/kernel/traps_64.c insn = *(unsigned int *) regs->tpc; insn 1960 arch/sparc/kernel/traps_64.c addr = compute_effective_address(regs, insn, 0); insn 2143 arch/sparc/kernel/traps_64.c unsigned int insn; insn 2145 arch/sparc/kernel/traps_64.c if (!copy_from_user(&insn, (void __user *)regs->tpc, 4)) { insn 2146 arch/sparc/kernel/traps_64.c return compute_effective_address(regs, insn, insn 2147 arch/sparc/kernel/traps_64.c (insn >> 25) & 0x1f); insn 2582 arch/sparc/kernel/traps_64.c u32 insn; insn 2592 arch/sparc/kernel/traps_64.c if (get_user(insn, (u32 __user *) pc) != -EFAULT) { insn 2593 arch/sparc/kernel/traps_64.c if ((insn & 0xc1ffc000) == 0x81700000) /* POPC */ { insn 2594 arch/sparc/kernel/traps_64.c if (handle_popc(insn, regs)) insn 2596 arch/sparc/kernel/traps_64.c } else if ((insn & 0xc1580000) == 0xc1100000) /* LDQ/STQ */ { insn 2597 arch/sparc/kernel/traps_64.c if (handle_ldf_stq(insn, regs)) insn 2600 arch/sparc/kernel/traps_64.c if ((insn & VIS_OPCODE_MASK) == VIS_OPCODE_VAL) { insn 2601 arch/sparc/kernel/traps_64.c if (!vis_emul(regs, insn)) insn 33 arch/sparc/kernel/unaligned_32.c static inline enum direction decode_direction(unsigned int insn) insn 35 arch/sparc/kernel/unaligned_32.c unsigned long tmp = (insn >> 21) & 1; insn 40 arch/sparc/kernel/unaligned_32.c if(((insn>>19)&0x3f) == 15) insn 48 arch/sparc/kernel/unaligned_32.c static inline int decode_access_size(unsigned int insn) insn 50 arch/sparc/kernel/unaligned_32.c insn = (insn >> 19) & 3; insn 52 arch/sparc/kernel/unaligned_32.c if(!insn) insn 54 arch/sparc/kernel/unaligned_32.c else if(insn == 3) insn 56 arch/sparc/kernel/unaligned_32.c else if(insn == 2) insn 59 arch/sparc/kernel/unaligned_32.c printk("Impossible unaligned trap. insn=%08x\n", insn); insn 66 arch/sparc/kernel/unaligned_32.c static inline int decode_signedness(unsigned int insn) insn 68 arch/sparc/kernel/unaligned_32.c return (insn & 0x400000); insn 136 arch/sparc/kernel/unaligned_32.c unsigned int insn) insn 138 arch/sparc/kernel/unaligned_32.c unsigned int rs1 = (insn >> 14) & 0x1f; insn 139 arch/sparc/kernel/unaligned_32.c unsigned int rs2 = insn & 0x1f; insn 140 arch/sparc/kernel/unaligned_32.c unsigned int rd = (insn >> 25) & 0x1f; insn 142 arch/sparc/kernel/unaligned_32.c if(insn & 0x2000) { insn 144 arch/sparc/kernel/unaligned_32.c return (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); insn 152 arch/sparc/kernel/unaligned_32.c unsigned int insn) insn 154 arch/sparc/kernel/unaligned_32.c unsigned int rs1 = (insn >> 14) & 0x1f; insn 155 arch/sparc/kernel/unaligned_32.c unsigned int rs2 = insn & 0x1f; insn 156 arch/sparc/kernel/unaligned_32.c unsigned int rd = (insn >> 25) & 0x1f; insn 158 arch/sparc/kernel/unaligned_32.c if(insn & 0x2000) { insn 160 arch/sparc/kernel/unaligned_32.c return (safe_fetch_reg(rs1, regs) + sign_extend_imm13(insn)); insn 204 arch/sparc/kernel/unaligned_32.c static inline int floating_point_load_or_store_p(unsigned int insn) insn 206 arch/sparc/kernel/unaligned_32.c return (insn >> 24) & 1; insn 209 arch/sparc/kernel/unaligned_32.c static inline int ok_for_kernel(unsigned int insn) insn 211 arch/sparc/kernel/unaligned_32.c return !floating_point_load_or_store_p(insn); insn 214 arch/sparc/kernel/unaligned_32.c static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) insn 220 arch/sparc/kernel/unaligned_32.c unsigned long address = compute_effective_address(regs, insn); insn 240 arch/sparc/kernel/unaligned_32.c asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) insn 242 arch/sparc/kernel/unaligned_32.c enum direction dir = decode_direction(insn); insn 243 arch/sparc/kernel/unaligned_32.c int size = decode_access_size(insn); insn 245 arch/sparc/kernel/unaligned_32.c if(!ok_for_kernel(insn) || dir == both) { insn 250 arch/sparc/kernel/unaligned_32.c unsigned long addr = compute_effective_address(regs, insn); insn 256 arch/sparc/kernel/unaligned_32.c err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), insn 259 arch/sparc/kernel/unaligned_32.c decode_signedness(insn)); insn 263 arch/sparc/kernel/unaligned_32.c err = do_int_store(((insn>>25)&0x1f), size, insn 271 arch/sparc/kernel/unaligned_32.c kernel_mna_trap_fault(regs, insn); insn 277 arch/sparc/kernel/unaligned_32.c static inline int ok_for_user(struct pt_regs *regs, unsigned int insn, insn 281 arch/sparc/kernel/unaligned_32.c int size = ((insn >> 19) & 3) == 3 ? 8 : 4; insn 290 arch/sparc/kernel/unaligned_32.c reg = (insn >> 25) & 0x1f; insn 295 arch/sparc/kernel/unaligned_32.c reg = (insn >> 14) & 0x1f; insn 300 arch/sparc/kernel/unaligned_32.c if (!(insn & 0x2000)) { insn 301 arch/sparc/kernel/unaligned_32.c reg = (insn & 0x1f); insn 311 arch/sparc/kernel/unaligned_32.c static void user_mna_trap_fault(struct pt_regs *regs, unsigned int insn) insn 314 arch/sparc/kernel/unaligned_32.c (void __user *)safe_compute_effective_address(regs, insn), insn 318 arch/sparc/kernel/unaligned_32.c asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn) insn 323 arch/sparc/kernel/unaligned_32.c (((insn >> 30) & 3) != 3)) insn 325 arch/sparc/kernel/unaligned_32.c dir = decode_direction(insn); insn 326 arch/sparc/kernel/unaligned_32.c if(!ok_for_user(regs, insn, dir)) { insn 329 arch/sparc/kernel/unaligned_32.c int err, size = decode_access_size(insn); insn 332 arch/sparc/kernel/unaligned_32.c if(floating_point_load_or_store_p(insn)) { insn 337 arch/sparc/kernel/unaligned_32.c addr = compute_effective_address(regs, insn); insn 341 arch/sparc/kernel/unaligned_32.c err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), insn 344 arch/sparc/kernel/unaligned_32.c decode_signedness(insn)); insn 348 arch/sparc/kernel/unaligned_32.c err = do_int_store(((insn>>25)&0x1f), size, insn 373 arch/sparc/kernel/unaligned_32.c user_mna_trap_fault(regs, insn); insn 42 arch/sparc/kernel/unaligned_64.c static inline enum direction decode_direction(unsigned int insn) insn 44 arch/sparc/kernel/unaligned_64.c unsigned long tmp = (insn >> 21) & 1; insn 49 arch/sparc/kernel/unaligned_64.c switch ((insn>>19)&0xf) { insn 59 arch/sparc/kernel/unaligned_64.c static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) insn 63 arch/sparc/kernel/unaligned_64.c tmp = ((insn >> 19) & 0xf); insn 74 arch/sparc/kernel/unaligned_64.c printk("Impossible unaligned trap. insn=%08x\n", insn); insn 87 arch/sparc/kernel/unaligned_64.c static inline int decode_asi(unsigned int insn, struct pt_regs *regs) insn 89 arch/sparc/kernel/unaligned_64.c if (insn & 0x800000) { insn 90 arch/sparc/kernel/unaligned_64.c if (insn & 0x2000) insn 93 arch/sparc/kernel/unaligned_64.c return (unsigned char)(insn >> 5); /* imm_asi */ insn 99 arch/sparc/kernel/unaligned_64.c static inline int decode_signedness(unsigned int insn) insn 101 arch/sparc/kernel/unaligned_64.c return (insn & 0x400000); insn 170 arch/sparc/kernel/unaligned_64.c unsigned int insn, unsigned int rd) insn 173 arch/sparc/kernel/unaligned_64.c unsigned int rs1 = (insn >> 14) & 0x1f; insn 174 arch/sparc/kernel/unaligned_64.c unsigned int rs2 = insn & 0x1f; insn 177 arch/sparc/kernel/unaligned_64.c if (insn & 0x2000) { insn 179 arch/sparc/kernel/unaligned_64.c addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); insn 249 arch/sparc/kernel/unaligned_64.c static inline int floating_point_load_or_store_p(unsigned int insn) insn 251 arch/sparc/kernel/unaligned_64.c return (insn >> 24) & 1; insn 254 arch/sparc/kernel/unaligned_64.c static inline int ok_for_kernel(unsigned int insn) insn 256 arch/sparc/kernel/unaligned_64.c return !floating_point_load_or_store_p(insn); insn 262 arch/sparc/kernel/unaligned_64.c unsigned int insn = current_thread_info()->kern_una_insn; insn 269 arch/sparc/kernel/unaligned_64.c address = compute_effective_address(regs, insn, insn 270 arch/sparc/kernel/unaligned_64.c ((insn >> 25) & 0x1f)); insn 306 arch/sparc/kernel/unaligned_64.c asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) insn 308 arch/sparc/kernel/unaligned_64.c enum direction dir = decode_direction(insn); insn 309 arch/sparc/kernel/unaligned_64.c int size = decode_access_size(regs, insn); insn 313 arch/sparc/kernel/unaligned_64.c current_thread_info()->kern_una_insn = insn; insn 315 arch/sparc/kernel/unaligned_64.c orig_asi = asi = decode_asi(insn, regs); insn 327 arch/sparc/kernel/unaligned_64.c if (!ok_for_kernel(insn) || dir == both) { insn 338 arch/sparc/kernel/unaligned_64.c addr = compute_effective_address(regs, insn, insn 339 arch/sparc/kernel/unaligned_64.c ((insn >> 25) & 0x1f)); insn 354 arch/sparc/kernel/unaligned_64.c reg_addr = fetch_reg_addr(((insn>>25)&0x1f), regs); insn 357 arch/sparc/kernel/unaligned_64.c decode_signedness(insn), asi); insn 380 arch/sparc/kernel/unaligned_64.c err = do_int_store(((insn>>25)&0x1f), size, insn 396 arch/sparc/kernel/unaligned_64.c int handle_popc(u32 insn, struct pt_regs *regs) insn 399 arch/sparc/kernel/unaligned_64.c int ret, rd = ((insn >> 25) & 0x1f); insn 403 arch/sparc/kernel/unaligned_64.c if (insn & 0x2000) { insn 405 arch/sparc/kernel/unaligned_64.c value = sign_extend_imm13(insn); insn 407 arch/sparc/kernel/unaligned_64.c maybe_flush_windows(0, insn & 0x1f, rd, from_kernel); insn 408 arch/sparc/kernel/unaligned_64.c value = fetch_reg(insn & 0x1f, regs); insn 437 arch/sparc/kernel/unaligned_64.c int handle_ldf_stq(u32 insn, struct pt_regs *regs) insn 439 arch/sparc/kernel/unaligned_64.c unsigned long addr = compute_effective_address(regs, insn, 0); insn 442 arch/sparc/kernel/unaligned_64.c int asi = decode_asi(insn, regs); insn 449 arch/sparc/kernel/unaligned_64.c if (insn & 0x200000) { insn 453 arch/sparc/kernel/unaligned_64.c freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); insn 514 arch/sparc/kernel/unaligned_64.c switch (insn & 0x180000) { insn 520 arch/sparc/kernel/unaligned_64.c freg = (insn >> 25) & 0x1f; insn 522 arch/sparc/kernel/unaligned_64.c freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); insn 570 arch/sparc/kernel/unaligned_64.c void handle_ld_nf(u32 insn, struct pt_regs *regs) insn 572 arch/sparc/kernel/unaligned_64.c int rd = ((insn >> 25) & 0x1f); insn 582 arch/sparc/kernel/unaligned_64.c if ((insn & 0x780000) == 0x180000) insn 586 arch/sparc/kernel/unaligned_64.c if ((insn & 0x780000) == 0x180000) insn 590 arch/sparc/kernel/unaligned_64.c if ((insn & 0x780000) == 0x180000) insn 601 arch/sparc/kernel/unaligned_64.c u32 insn; insn 612 arch/sparc/kernel/unaligned_64.c if (get_user(insn, (u32 __user *) pc) != -EFAULT) { insn 613 arch/sparc/kernel/unaligned_64.c int asi = decode_asi(insn, regs); insn 630 arch/sparc/kernel/unaligned_64.c freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); insn 665 arch/sparc/kernel/unaligned_64.c u32 insn; insn 676 arch/sparc/kernel/unaligned_64.c if (get_user(insn, (u32 __user *) pc) != -EFAULT) { insn 677 arch/sparc/kernel/unaligned_64.c int asi = decode_asi(insn, regs); insn 678 arch/sparc/kernel/unaligned_64.c freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); insn 51 arch/sparc/kernel/uprobes.c u32 insn = *(u32 *) src; insn 59 arch/sparc/kernel/uprobes.c u32 op = (insn >> 30) & 0x3; insn 60 arch/sparc/kernel/uprobes.c u32 op2 = (insn >> 22) & 0x7; insn 64 arch/sparc/kernel/uprobes.c (insn & ANNUL_BIT) == ANNUL_BIT) insn 65 arch/sparc/kernel/uprobes.c insn &= ~ANNUL_BIT; insn 67 arch/sparc/kernel/uprobes.c copy_to_page(page, vaddr, &insn, len); insn 91 arch/sparc/kernel/uprobes.c static unsigned long relbranch_fixup(u32 insn, struct uprobe_task *utask, insn 101 arch/sparc/kernel/uprobes.c if ((insn & 0xc0000000) == 0x40000000 || insn 102 arch/sparc/kernel/uprobes.c (insn & 0xc1c00000) == 0x00400000 || insn 103 arch/sparc/kernel/uprobes.c (insn & 0xc1c00000) == 0x00800000) { insn 123 arch/sparc/kernel/uprobes.c static int retpc_fixup(struct pt_regs *regs, u32 insn, insn 130 arch/sparc/kernel/uprobes.c if ((insn & 0xc0000000) == 0x40000000) insn 134 arch/sparc/kernel/uprobes.c if ((insn & 0xc1f80000) == 0x81c00000) { insn 135 arch/sparc/kernel/uprobes.c unsigned long rd = ((insn >> 25) & 0x1f); insn 220 arch/sparc/kernel/uprobes.c u32 insn = auprobe->ixol; insn 224 arch/sparc/kernel/uprobes.c regs->tnpc = relbranch_fixup(insn, utask, regs); insn 226 arch/sparc/kernel/uprobes.c rc = retpc_fixup(regs, insn, (unsigned long) utask->vaddr); insn 294 arch/sparc/kernel/visemul.c static void edge(struct pt_regs *regs, unsigned int insn, unsigned int opf) insn 299 arch/sparc/kernel/visemul.c maybe_flush_windows(RS1(insn), RS2(insn), RD(insn), 0); insn 300 arch/sparc/kernel/visemul.c orig_rs1 = rs1 = fetch_reg(RS1(insn), regs); insn 301 arch/sparc/kernel/visemul.c orig_rs2 = rs2 = fetch_reg(RS2(insn), regs); insn 350 arch/sparc/kernel/visemul.c store_reg(regs, rd_val, RD(insn)); insn 372 arch/sparc/kernel/visemul.c static void array(struct pt_regs *regs, unsigned int insn, unsigned int opf) insn 377 arch/sparc/kernel/visemul.c maybe_flush_windows(RS1(insn), RS2(insn), RD(insn), 0); insn 378 arch/sparc/kernel/visemul.c rs1 = fetch_reg(RS1(insn), regs); insn 379 arch/sparc/kernel/visemul.c rs2 = fetch_reg(RS2(insn), regs); insn 403 arch/sparc/kernel/visemul.c store_reg(regs, rd_val, RD(insn)); insn 406 arch/sparc/kernel/visemul.c static void bmask(struct pt_regs *regs, unsigned int insn) insn 410 arch/sparc/kernel/visemul.c maybe_flush_windows(RS1(insn), RS2(insn), RD(insn), 0); insn 411 arch/sparc/kernel/visemul.c rs1 = fetch_reg(RS1(insn), regs); insn 412 arch/sparc/kernel/visemul.c rs2 = fetch_reg(RS2(insn), regs); insn 415 arch/sparc/kernel/visemul.c store_reg(regs, rd_val, RD(insn)); insn 422 arch/sparc/kernel/visemul.c static void bshuffle(struct pt_regs *regs, unsigned int insn) insn 430 arch/sparc/kernel/visemul.c rs1 = fpd_regval(f, RS1(insn)); insn 431 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 445 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 448 arch/sparc/kernel/visemul.c static void pdist(struct pt_regs *regs, unsigned int insn) insn 454 arch/sparc/kernel/visemul.c rs1 = fpd_regval(f, RS1(insn)); insn 455 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 456 arch/sparc/kernel/visemul.c rd = fpd_regaddr(f, RD(insn)); insn 477 arch/sparc/kernel/visemul.c static void pformat(struct pt_regs *regs, unsigned int insn, unsigned int opf) insn 488 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 503 arch/sparc/kernel/visemul.c *fps_regaddr(f, RD(insn)) = rd_val; insn 510 arch/sparc/kernel/visemul.c rs1 = fpd_regval(f, RS1(insn)); insn 511 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 526 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 533 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 549 arch/sparc/kernel/visemul.c *fps_regaddr(f, RD(insn)) = rd_val; insn 556 arch/sparc/kernel/visemul.c rs2 = fps_regval(f, RS2(insn)); insn 567 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 572 arch/sparc/kernel/visemul.c rs1 = fps_regval(f, RS1(insn)); insn 573 arch/sparc/kernel/visemul.c rs2 = fps_regval(f, RS2(insn)); insn 583 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 589 arch/sparc/kernel/visemul.c static void pmul(struct pt_regs *regs, unsigned int insn, unsigned int opf) insn 598 arch/sparc/kernel/visemul.c rs1 = fps_regval(f, RS1(insn)); insn 599 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 614 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 623 arch/sparc/kernel/visemul.c rs1 = fps_regval(f, RS1(insn)); insn 624 arch/sparc/kernel/visemul.c rs2 = fps_regval(f, RS2(insn)); insn 639 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 647 arch/sparc/kernel/visemul.c rs1 = fpd_regval(f, RS1(insn)); insn 648 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 669 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 677 arch/sparc/kernel/visemul.c rs1 = fps_regval(f, RS1(insn)); insn 678 arch/sparc/kernel/visemul.c rs2 = fps_regval(f, RS2(insn)); insn 699 arch/sparc/kernel/visemul.c *fpd_regaddr(f, RD(insn)) = rd_val; insn 705 arch/sparc/kernel/visemul.c static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf) insn 710 arch/sparc/kernel/visemul.c rs1 = fpd_regval(f, RS1(insn)); insn 711 arch/sparc/kernel/visemul.c rs2 = fpd_regval(f, RS2(insn)); insn 797 arch/sparc/kernel/visemul.c maybe_flush_windows(0, 0, RD(insn), 0); insn 798 arch/sparc/kernel/visemul.c store_reg(regs, rd_val, RD(insn)); insn 804 arch/sparc/kernel/visemul.c int vis_emul(struct pt_regs *regs, unsigned int insn) insn 816 arch/sparc/kernel/visemul.c if (get_user(insn, (u32 __user *) pc)) insn 821 arch/sparc/kernel/visemul.c opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; insn 832 arch/sparc/kernel/visemul.c pformat(regs, insn, opf); insn 843 arch/sparc/kernel/visemul.c pmul(regs, insn, opf); insn 855 arch/sparc/kernel/visemul.c pcmp(regs, insn, opf); insn 871 arch/sparc/kernel/visemul.c edge(regs, insn, opf); insn 876 arch/sparc/kernel/visemul.c pdist(regs, insn); insn 883 arch/sparc/kernel/visemul.c array(regs, insn, opf); insn 888 arch/sparc/kernel/visemul.c bmask(regs, insn); insn 892 arch/sparc/kernel/visemul.c bshuffle(regs, insn); insn 133 arch/sparc/math-emu/math_32.c static int do_one_mathemu(u32 insn, unsigned long *fsr, unsigned long *fregs); insn 166 arch/sparc/math-emu/math_32.c unsigned long insn; insn 174 arch/sparc/math-emu/math_32.c printk("%d: %08lx at %08lx\n", i, fpt->thread.fpqueue[i].insn, insn 182 arch/sparc/math-emu/math_32.c if (!get_user(insn, (u32 __user *) regs->pc)) { insn 183 arch/sparc/math-emu/math_32.c retcode = do_one_mathemu(insn, &fpt->thread.fsr, fpt->thread.float_regs); insn 195 arch/sparc/math-emu/math_32.c retcode = do_one_mathemu(fpt->thread.fpqueue[i].insn, &(fpt->thread.fsr), fpt->thread.float_regs); insn 275 arch/sparc/math-emu/math_32.c static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs) insn 293 arch/sparc/math-emu/math_32.c printk("In do_mathemu(), emulating %08lx\n", insn); insn 296 arch/sparc/math-emu/math_32.c if ((insn & 0xc1f80000) == 0x81a00000) /* FPOP1 */ { insn 297 arch/sparc/math-emu/math_32.c switch ((insn >> 5) & 0x1ff) { insn 331 arch/sparc/math-emu/math_32.c } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { insn 332 arch/sparc/math-emu/math_32.c switch ((insn >> 5) & 0x1ff) { insn 354 arch/sparc/math-emu/math_32.c freg = ((insn >> 14) & 0x1f); insn 375 arch/sparc/math-emu/math_32.c freg = (insn & 0x1f); insn 396 arch/sparc/math-emu/math_32.c freg = ((insn >> 25) & 0x1f); insn 426 arch/sparc/math-emu/math_32.c switch ((insn >> 5) & 0x1ff) { insn 475 arch/sparc/math-emu/math_32.c (((insn >> 5) & 0x1ff) == FCMPES || insn 484 arch/sparc/math-emu/math_32.c (((insn >> 5) & 0x1ff) == FCMPED || insn 493 arch/sparc/math-emu/math_32.c (((insn >> 5) & 0x1ff) == FCMPEQ || insn 171 arch/sparc/math-emu/math_64.c u32 insn = 0; insn 192 arch/sparc/math-emu/math_64.c if (get_user(insn, (u32 __user *) pc) != -EFAULT) { insn 193 arch/sparc/math-emu/math_64.c if ((insn & 0xc1f80000) == 0x81a00000) /* FPOP1 */ { insn 194 arch/sparc/math-emu/math_64.c switch ((insn >> 5) & 0x1ff) { insn 261 arch/sparc/math-emu/math_64.c else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { insn 263 arch/sparc/math-emu/math_64.c switch ((insn >> 5) & 0x1ff) { insn 272 arch/sparc/math-emu/math_64.c if (!((insn >> 11) & 3)) insn 275 arch/sparc/math-emu/math_64.c XR = current_thread_info()->xfsr[0] >> (30 + ((insn >> 10) & 0x6)); insn 278 arch/sparc/math-emu/math_64.c switch ((insn >> 14) & 0x7) { insn 288 arch/sparc/math-emu/math_64.c if ((insn >> 14) & 8) insn 295 arch/sparc/math-emu/math_64.c if ((insn >> 5) & 0x80) insn 300 arch/sparc/math-emu/math_64.c switch ((insn >> 14) & 0x7) { insn 310 arch/sparc/math-emu/math_64.c if ((insn >> 14) & 8) insn 319 arch/sparc/math-emu/math_64.c freg = (insn >> 14) & 0x1f; insn 336 arch/sparc/math-emu/math_64.c switch ((insn >> 10) & 3) { insn 341 arch/sparc/math-emu/math_64.c if ((insn >> 10) & 4) insn 353 arch/sparc/math-emu/math_64.c insn = (insn & 0x3e00001f) | 0x81a00060; insn 373 arch/sparc/math-emu/math_64.c freg = ((insn >> 14) & 0x1f); insn 391 arch/sparc/math-emu/math_64.c freg = (insn & 0x1f); insn 409 arch/sparc/math-emu/math_64.c freg = ((insn >> 25) & 0x1f); insn 431 arch/sparc/math-emu/math_64.c switch ((insn >> 5) & 0x1ff) { insn 489 arch/sparc/math-emu/math_64.c (((insn >> 5) & 0x1ff) == FCMPEQ || insn 52 arch/sparc/mm/extable.c if (base[i].insn == value) insn 61 arch/sparc/mm/extable.c if (base[i].insn <= value && base[i + 1].insn > value) insn 80 arch/sparc/mm/extable.c if (within_module_init(m->extable[i].insn, m)) { insn 102 arch/sparc/mm/extable.c *g2 = (addr - entry->insn) / 4; insn 63 arch/sparc/mm/fault_32.c unsigned int insn; insn 75 arch/sparc/mm/fault_32.c insn = *((unsigned int *) pc); insn 76 arch/sparc/mm/fault_32.c if ((insn >> 21) & 1) insn 83 arch/sparc/mm/fault_32.c insn = *((unsigned int *) pc); insn 84 arch/sparc/mm/fault_32.c if (!((insn >> 21) & 1) || ((insn>>19)&0x3f) == 15) insn 139 arch/sparc/mm/fault_32.c unsigned int insn; insn 145 arch/sparc/mm/fault_32.c insn = *(unsigned int *) regs->pc; insn 147 arch/sparc/mm/fault_32.c __get_user(insn, (unsigned int *) regs->pc); insn 149 arch/sparc/mm/fault_32.c return safe_compute_effective_address(regs, insn); insn 87 arch/sparc/mm/fault_64.c u32 insn = 0; insn 109 arch/sparc/mm/fault_64.c : "=r" (insn) insn 122 arch/sparc/mm/fault_64.c : "=r" (insn) insn 130 arch/sparc/mm/fault_64.c return insn; insn 155 arch/sparc/mm/fault_64.c unsigned long fault_addr, unsigned int insn, insn 167 arch/sparc/mm/fault_64.c if (insn) insn 168 arch/sparc/mm/fault_64.c addr = compute_effective_address(regs, insn, 0); insn 179 arch/sparc/mm/fault_64.c static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) insn 181 arch/sparc/mm/fault_64.c if (!insn) { insn 185 arch/sparc/mm/fault_64.c insn = *(unsigned int *) regs->tpc; insn 187 arch/sparc/mm/fault_64.c insn = get_user_insn(regs->tpc); insn 190 arch/sparc/mm/fault_64.c return insn; insn 194 arch/sparc/mm/fault_64.c int fault_code, unsigned int insn, insn 199 arch/sparc/mm/fault_64.c if ((!insn) && (regs->tstate & TSTATE_PRIV)) insn 208 arch/sparc/mm/fault_64.c (insn & 0xc0800000) == 0xc0800000) { insn 209 arch/sparc/mm/fault_64.c if (insn & 0x2000) insn 212 arch/sparc/mm/fault_64.c asi = (insn >> 5); insn 214 arch/sparc/mm/fault_64.c if (insn & 0x1000000) { insn 215 arch/sparc/mm/fault_64.c handle_ldf_stq(insn, regs); insn 221 arch/sparc/mm/fault_64.c handle_ld_nf(insn, regs); insn 241 arch/sparc/mm/fault_64.c do_fault_siginfo(si_code, SIGSEGV, regs, address, insn, fault_code); insn 266 arch/sparc/mm/fault_64.c unsigned int insn = 0; insn 321 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, insn); insn 347 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, 0); insn 348 arch/sparc/mm/fault_64.c if (!insn) insn 354 arch/sparc/mm/fault_64.c if ((insn & 0xc0200000) == 0xc0200000 && insn 355 arch/sparc/mm/fault_64.c (insn & 0x01780000) != 0x01680000) { insn 371 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, insn); insn 372 arch/sparc/mm/fault_64.c if ((insn & 0xc0800000) == 0xc0800000) { insn 375 arch/sparc/mm/fault_64.c if (insn & 0x2000) insn 378 arch/sparc/mm/fault_64.c asi = (insn >> 5); insn 489 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, insn); insn 493 arch/sparc/mm/fault_64.c do_kernel_fault(regs, si_code, fault_code, insn, address); insn 501 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, insn); insn 510 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, 0); insn 514 arch/sparc/mm/fault_64.c insn = get_fault_insn(regs, insn); insn 521 arch/sparc/mm/fault_64.c do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, address, insn, fault_code); insn 358 arch/sparc/mm/init_64.c *(unsigned int *)addr = p->insn; insn 2062 arch/sparc/mm/init_64.c *(unsigned int *) addr = p->insn; insn 236 arch/sparc/net/bpf_jit_comp_64.c static void emit(const u32 insn, struct jit_ctx *ctx) insn 239 arch/sparc/net/bpf_jit_comp_64.c ctx->image[ctx->idx] = insn; insn 302 arch/sparc/net/bpf_jit_comp_64.c unsigned int insn = opcode; insn 304 arch/sparc/net/bpf_jit_comp_64.c insn |= RS1(dst) | RD(dst); insn 306 arch/sparc/net/bpf_jit_comp_64.c emit(insn | IMMED | S13(imm), ctx); insn 313 arch/sparc/net/bpf_jit_comp_64.c emit(insn | RS2(tmp), ctx); insn 321 arch/sparc/net/bpf_jit_comp_64.c unsigned int insn = opcode; insn 323 arch/sparc/net/bpf_jit_comp_64.c insn |= RS1(src) | RD(dst); insn 325 arch/sparc/net/bpf_jit_comp_64.c emit(insn | IMMED | S13(imm), ctx); insn 332 arch/sparc/net/bpf_jit_comp_64.c emit(insn | RS2(tmp), ctx); insn 895 arch/sparc/net/bpf_jit_comp_64.c static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx) insn 897 arch/sparc/net/bpf_jit_comp_64.c const u8 code = insn->code; insn 898 arch/sparc/net/bpf_jit_comp_64.c const u8 dst = bpf2sparc[insn->dst_reg]; insn 899 arch/sparc/net/bpf_jit_comp_64.c const u8 src = bpf2sparc[insn->src_reg]; insn 900 arch/sparc/net/bpf_jit_comp_64.c const int i = insn - ctx->prog->insnsi; insn 901 arch/sparc/net/bpf_jit_comp_64.c const s16 off = insn->off; insn 902 arch/sparc/net/bpf_jit_comp_64.c const s32 imm = insn->imm; insn 904 arch/sparc/net/bpf_jit_comp_64.c if (insn->src_reg == BPF_REG_FP) insn 911 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 947 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 982 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1006 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1033 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1051 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1066 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1150 arch/sparc/net/bpf_jit_comp_64.c if (insn_is_zext(&insn[1])) insn 1245 arch/sparc/net/bpf_jit_comp_64.c const struct bpf_insn insn1 = insn[1]; insn 1286 arch/sparc/net/bpf_jit_comp_64.c if (opcode != LD64 && insn_is_zext(&insn[1])) insn 1299 arch/sparc/net/bpf_jit_comp_64.c if (insn->dst_reg == BPF_REG_FP) insn 1340 arch/sparc/net/bpf_jit_comp_64.c if (insn->dst_reg == BPF_REG_FP) insn 1375 arch/sparc/net/bpf_jit_comp_64.c if (insn->dst_reg == BPF_REG_FP) insn 1398 arch/sparc/net/bpf_jit_comp_64.c if (insn->dst_reg == BPF_REG_FP) insn 1430 arch/sparc/net/bpf_jit_comp_64.c const struct bpf_insn *insn = &prog->insnsi[i]; insn 1433 arch/sparc/net/bpf_jit_comp_64.c ret = build_insn(insn, ctx); insn 25 arch/unicore32/include/asm/processor.h u32 insn; insn 1258 arch/x86/events/intel/ds.c struct insn insn; insn 1265 arch/x86/events/intel/ds.c insn_init(&insn, kaddr, size, is_64bit); insn 1266 arch/x86/events/intel/ds.c insn_get_length(&insn); insn 1273 arch/x86/events/intel/ds.c if (!insn.length) insn 1276 arch/x86/events/intel/ds.c to += insn.length; insn 1277 arch/x86/events/intel/ds.c kaddr += insn.length; insn 1278 arch/x86/events/intel/ds.c size -= insn.length; insn 834 arch/x86/events/intel/lbr.c struct insn insn; insn 900 arch/x86/events/intel/lbr.c insn_init(&insn, addr, bytes_read, is64); insn 901 arch/x86/events/intel/lbr.c insn_get_opcode(&insn); insn 902 arch/x86/events/intel/lbr.c if (!insn.opcode.got) insn 905 arch/x86/events/intel/lbr.c switch (insn.opcode.bytes[0]) { insn 907 arch/x86/events/intel/lbr.c switch (insn.opcode.bytes[1]) { insn 939 arch/x86/events/intel/lbr.c insn_get_immediate(&insn); insn 940 arch/x86/events/intel/lbr.c if (insn.immediate1.value == 0) { insn 956 arch/x86/events/intel/lbr.c insn_get_modrm(&insn); insn 957 arch/x86/events/intel/lbr.c ext = (insn.modrm.bytes[0] >> 3) & 0x7; insn 18 arch/x86/include/asm/extable.h int insn, fixup, handler; insn 105 arch/x86/include/asm/fpu/internal.h #define user_insn(insn, output, input...) \ insn 112 arch/x86/include/asm/fpu/internal.h "1:" #insn "\n\t" \ insn 124 arch/x86/include/asm/fpu/internal.h #define kernel_insn_err(insn, output, input...) \ insn 127 arch/x86/include/asm/fpu/internal.h asm volatile("1:" #insn "\n\t" \ insn 139 arch/x86/include/asm/fpu/internal.h #define kernel_insn(insn, output, input...) \ insn 140 arch/x86/include/asm/fpu/internal.h asm volatile("1:" #insn "\n\t" \ insn 15 arch/x86/include/asm/futex.h #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ insn 17 arch/x86/include/asm/futex.h "1:\t" insn "\n" \ insn 27 arch/x86/include/asm/futex.h #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ insn 31 arch/x86/include/asm/futex.h "\t" insn "\n" \ insn 18 arch/x86/include/asm/insn-eval.h void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs); insn 19 arch/x86/include/asm/insn-eval.h int insn_get_modrm_rm_off(struct insn *insn, struct pt_regs *regs); insn 88 arch/x86/include/asm/insn.h extern void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64); insn 89 arch/x86/include/asm/insn.h extern void insn_get_prefixes(struct insn *insn); insn 90 arch/x86/include/asm/insn.h extern void insn_get_opcode(struct insn *insn); insn 91 arch/x86/include/asm/insn.h extern void insn_get_modrm(struct insn *insn); insn 92 arch/x86/include/asm/insn.h extern void insn_get_sib(struct insn *insn); insn 93 arch/x86/include/asm/insn.h extern void insn_get_displacement(struct insn *insn); insn 94 arch/x86/include/asm/insn.h extern void insn_get_immediate(struct insn *insn); insn 95 arch/x86/include/asm/insn.h extern void insn_get_length(struct insn *insn); insn 98 arch/x86/include/asm/insn.h static inline void insn_get_attribute(struct insn *insn) insn 100 arch/x86/include/asm/insn.h insn_get_modrm(insn); insn 104 arch/x86/include/asm/insn.h extern int insn_rip_relative(struct insn *insn); insn 107 arch/x86/include/asm/insn.h static inline void kernel_insn_init(struct insn *insn, insn 111 arch/x86/include/asm/insn.h insn_init(insn, kaddr, buf_len, 1); insn 113 arch/x86/include/asm/insn.h insn_init(insn, kaddr, buf_len, 0); insn 117 arch/x86/include/asm/insn.h static inline int insn_is_avx(struct insn *insn) insn 119 arch/x86/include/asm/insn.h if (!insn->prefixes.got) insn 120 arch/x86/include/asm/insn.h insn_get_prefixes(insn); insn 121 arch/x86/include/asm/insn.h return (insn->vex_prefix.value != 0); insn 124 arch/x86/include/asm/insn.h static inline int insn_is_evex(struct insn *insn) insn 126 arch/x86/include/asm/insn.h if (!insn->prefixes.got) insn 127 arch/x86/include/asm/insn.h insn_get_prefixes(insn); insn 128 arch/x86/include/asm/insn.h return (insn->vex_prefix.nbytes == 4); insn 132 arch/x86/include/asm/insn.h static inline int insn_complete(struct insn *insn) insn 134 arch/x86/include/asm/insn.h return insn->opcode.got && insn->modrm.got && insn->sib.got && insn 135 arch/x86/include/asm/insn.h insn->displacement.got && insn->immediate.got; insn 138 arch/x86/include/asm/insn.h static inline insn_byte_t insn_vex_m_bits(struct insn *insn) insn 140 arch/x86/include/asm/insn.h if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn 142 arch/x86/include/asm/insn.h else if (insn->vex_prefix.nbytes == 3) /* 3 bytes VEX */ insn 143 arch/x86/include/asm/insn.h return X86_VEX3_M(insn->vex_prefix.bytes[1]); insn 145 arch/x86/include/asm/insn.h return X86_EVEX_M(insn->vex_prefix.bytes[1]); insn 148 arch/x86/include/asm/insn.h static inline insn_byte_t insn_vex_p_bits(struct insn *insn) insn 150 arch/x86/include/asm/insn.h if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn 151 arch/x86/include/asm/insn.h return X86_VEX_P(insn->vex_prefix.bytes[1]); insn 153 arch/x86/include/asm/insn.h return X86_VEX_P(insn->vex_prefix.bytes[2]); insn 157 arch/x86/include/asm/insn.h static inline int insn_last_prefix_id(struct insn *insn) insn 159 arch/x86/include/asm/insn.h if (insn_is_avx(insn)) insn 160 arch/x86/include/asm/insn.h return insn_vex_p_bits(insn); /* VEX_p is a SIMD prefix id */ insn 162 arch/x86/include/asm/insn.h if (insn->prefixes.bytes[3]) insn 163 arch/x86/include/asm/insn.h return inat_get_last_prefix_id(insn->prefixes.bytes[3]); insn 169 arch/x86/include/asm/insn.h static inline int insn_offset_rex_prefix(struct insn *insn) insn 171 arch/x86/include/asm/insn.h return insn->prefixes.nbytes; insn 173 arch/x86/include/asm/insn.h static inline int insn_offset_vex_prefix(struct insn *insn) insn 175 arch/x86/include/asm/insn.h return insn_offset_rex_prefix(insn) + insn->rex_prefix.nbytes; insn 177 arch/x86/include/asm/insn.h static inline int insn_offset_opcode(struct insn *insn) insn 179 arch/x86/include/asm/insn.h return insn_offset_vex_prefix(insn) + insn->vex_prefix.nbytes; insn 181 arch/x86/include/asm/insn.h static inline int insn_offset_modrm(struct insn *insn) insn 183 arch/x86/include/asm/insn.h return insn_offset_opcode(insn) + insn->opcode.nbytes; insn 185 arch/x86/include/asm/insn.h static inline int insn_offset_sib(struct insn *insn) insn 187 arch/x86/include/asm/insn.h return insn_offset_modrm(insn) + insn->modrm.nbytes; insn 189 arch/x86/include/asm/insn.h static inline int insn_offset_displacement(struct insn *insn) insn 191 arch/x86/include/asm/insn.h return insn_offset_sib(insn) + insn->sib.nbytes; insn 193 arch/x86/include/asm/insn.h static inline int insn_offset_immediate(struct insn *insn) insn 195 arch/x86/include/asm/insn.h return insn_offset_displacement(insn) + insn->displacement.nbytes; insn 209 arch/x86/include/asm/insn.h static inline int insn_masking_exception(struct insn *insn) insn 211 arch/x86/include/asm/insn.h return insn->opcode.bytes[0] == POP_SS_OPCODE || insn 212 arch/x86/include/asm/insn.h (insn->opcode.bytes[0] == MOV_SREG_OPCODE && insn 213 arch/x86/include/asm/insn.h X86_MODRM_REG(insn->modrm.bytes[0]) == 2); insn 62 arch/x86/include/asm/kprobes.h kprobe_opcode_t *insn; insn 78 arch/x86/include/asm/kprobes.h kprobe_opcode_t *insn; insn 444 arch/x86/include/asm/kvm_emulate.h int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len); insn 1358 arch/x86/include/asm/kvm_host.h void *insn, int insn_len); insn 1456 arch/x86/include/asm/kvm_host.h void *insn, int insn_len); insn 1546 arch/x86/include/asm/kvm_host.h #define __kvm_handle_fault_on_reboot(insn) \ insn 1548 arch/x86/include/asm/kvm_host.h insn "\n\t" \ insn 27 arch/x86/include/asm/uprobes.h u8 insn[MAX_UINSN_BYTES]; insn 80 arch/x86/kernel/kprobes/common.h extern int can_boost(struct insn *insn, void *orig_addr); insn 88 arch/x86/kernel/kprobes/common.h extern int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn); insn 112 arch/x86/kernel/kprobes/core.c } __packed *insn; insn 114 arch/x86/kernel/kprobes/core.c insn = (struct __arch_relative_insn *)dest; insn 115 arch/x86/kernel/kprobes/core.c insn->raddr = (s32)((long)(to) - ((long)(from) + 5)); insn 116 arch/x86/kernel/kprobes/core.c insn->op = op; insn 136 arch/x86/kernel/kprobes/core.c static kprobe_opcode_t *skip_prefixes(kprobe_opcode_t *insn) insn 140 arch/x86/kernel/kprobes/core.c attr = inat_get_opcode_attribute((insn_byte_t)*insn); insn 142 arch/x86/kernel/kprobes/core.c insn++; insn 143 arch/x86/kernel/kprobes/core.c attr = inat_get_opcode_attribute((insn_byte_t)*insn); insn 147 arch/x86/kernel/kprobes/core.c insn++; insn 149 arch/x86/kernel/kprobes/core.c return insn; insn 157 arch/x86/kernel/kprobes/core.c int can_boost(struct insn *insn, void *addr) insn 165 arch/x86/kernel/kprobes/core.c if (insn->opcode.nbytes == 2) insn 166 arch/x86/kernel/kprobes/core.c return test_bit(insn->opcode.bytes[1], insn 169 arch/x86/kernel/kprobes/core.c if (insn->opcode.nbytes != 1) insn 173 arch/x86/kernel/kprobes/core.c if (unlikely(inat_is_address_size_prefix(insn->attr))) insn 176 arch/x86/kernel/kprobes/core.c opcode = insn->opcode.bytes[0]; insn 277 arch/x86/kernel/kprobes/core.c struct insn insn; insn 297 arch/x86/kernel/kprobes/core.c kernel_insn_init(&insn, (void *)__addr, MAX_INSN_SIZE); insn 298 arch/x86/kernel/kprobes/core.c insn_get_length(&insn); insn 304 arch/x86/kernel/kprobes/core.c if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION) insn 306 arch/x86/kernel/kprobes/core.c addr += insn.length; insn 315 arch/x86/kernel/kprobes/core.c static int is_IF_modifier(kprobe_opcode_t *insn) insn 318 arch/x86/kernel/kprobes/core.c insn = skip_prefixes(insn); insn 320 arch/x86/kernel/kprobes/core.c switch (*insn) { insn 338 arch/x86/kernel/kprobes/core.c int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn) insn 344 arch/x86/kernel/kprobes/core.c if (!recovered_insn || !insn) insn 351 arch/x86/kernel/kprobes/core.c kernel_insn_init(insn, dest, MAX_INSN_SIZE); insn 352 arch/x86/kernel/kprobes/core.c insn_get_length(insn); insn 355 arch/x86/kernel/kprobes/core.c if (insn->opcode.bytes[0] == BREAKPOINT_INSTRUCTION) insn 359 arch/x86/kernel/kprobes/core.c if (insn_masking_exception(insn)) insn 364 arch/x86/kernel/kprobes/core.c if (insn_rip_relative(insn)) { insn 379 arch/x86/kernel/kprobes/core.c newdisp = (u8 *) src + (s64) insn->displacement.value insn 385 arch/x86/kernel/kprobes/core.c disp = (u8 *) dest + insn_offset_displacement(insn); insn 389 arch/x86/kernel/kprobes/core.c return insn->length; insn 394 arch/x86/kernel/kprobes/core.c struct insn *insn) insn 396 arch/x86/kernel/kprobes/core.c int len = insn->length; insn 398 arch/x86/kernel/kprobes/core.c if (can_boost(insn, p->addr) && insn 404 arch/x86/kernel/kprobes/core.c synthesize_reljump(buf + len, p->ainsn.insn + len, insn 405 arch/x86/kernel/kprobes/core.c p->addr + insn->length); insn 448 arch/x86/kernel/kprobes/core.c struct insn insn; insn 453 arch/x86/kernel/kprobes/core.c len = __copy_instruction(buf, p->addr, p->ainsn.insn, &insn); insn 461 arch/x86/kernel/kprobes/core.c len = prepare_boost(buf, p, &insn); insn 470 arch/x86/kernel/kprobes/core.c text_poke(p->ainsn.insn, buf, len); insn 485 arch/x86/kernel/kprobes/core.c p->ainsn.insn = get_insn_slot(); insn 486 arch/x86/kernel/kprobes/core.c if (!p->ainsn.insn) insn 491 arch/x86/kernel/kprobes/core.c free_insn_slot(p->ainsn.insn, 0); insn 492 arch/x86/kernel/kprobes/core.c p->ainsn.insn = NULL; insn 510 arch/x86/kernel/kprobes/core.c if (p->ainsn.insn) { insn 511 arch/x86/kernel/kprobes/core.c free_insn_slot(p->ainsn.insn, p->ainsn.boostable); insn 512 arch/x86/kernel/kprobes/core.c p->ainsn.insn = NULL; insn 593 arch/x86/kernel/kprobes/core.c regs->ip = (unsigned long)p->ainsn.insn; insn 611 arch/x86/kernel/kprobes/core.c regs->ip = (unsigned long)p->ainsn.insn; insn 911 arch/x86/kernel/kprobes/core.c unsigned long copy_ip = (unsigned long)p->ainsn.insn; insn 913 arch/x86/kernel/kprobes/core.c kprobe_opcode_t *insn = p->ainsn.insn; insn 916 arch/x86/kernel/kprobes/core.c insn = skip_prefixes(insn); insn 919 arch/x86/kernel/kprobes/core.c switch (*insn) { insn 942 arch/x86/kernel/kprobes/core.c if ((insn[1] & 0x30) == 0x10) { insn 950 arch/x86/kernel/kprobes/core.c } else if (((insn[1] & 0x31) == 0x20) || insn 951 arch/x86/kernel/kprobes/core.c ((insn[1] & 0x31) == 0x21)) { insn 1014 arch/x86/kernel/kprobes/core.c if (unlikely(regs->ip == (unsigned long)cur->ainsn.insn)) { insn 60 arch/x86/kernel/kprobes/ftrace.c p->ainsn.insn = NULL; insn 179 arch/x86/kernel/kprobes/opt.c struct insn insn; insn 183 arch/x86/kernel/kprobes/opt.c ret = __copy_instruction(dest + len, src + len, real + len, &insn); insn 184 arch/x86/kernel/kprobes/opt.c if (!ret || !can_boost(&insn, src + len)) insn 198 arch/x86/kernel/kprobes/opt.c static int __insn_is_indirect_jump(struct insn *insn) insn 200 arch/x86/kernel/kprobes/opt.c return ((insn->opcode.bytes[0] == 0xff && insn 201 arch/x86/kernel/kprobes/opt.c (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ insn 202 arch/x86/kernel/kprobes/opt.c insn->opcode.bytes[0] == 0xea); /* Segment based jump */ insn 206 arch/x86/kernel/kprobes/opt.c static int insn_jump_into_range(struct insn *insn, unsigned long start, int len) insn 210 arch/x86/kernel/kprobes/opt.c switch (insn->opcode.bytes[0]) { insn 219 arch/x86/kernel/kprobes/opt.c if ((insn->opcode.bytes[1] & 0xf0) == 0x80) /* jcc near */ insn 223 arch/x86/kernel/kprobes/opt.c if ((insn->opcode.bytes[0] & 0xf0) == 0x70) /* jcc short */ insn 227 arch/x86/kernel/kprobes/opt.c target = (unsigned long)insn->next_byte + insn->immediate.value; insn 232 arch/x86/kernel/kprobes/opt.c static int insn_is_indirect_jump(struct insn *insn) insn 234 arch/x86/kernel/kprobes/opt.c int ret = __insn_is_indirect_jump(insn); insn 244 arch/x86/kernel/kprobes/opt.c ret = insn_jump_into_range(insn, insn 256 arch/x86/kernel/kprobes/opt.c struct insn insn; insn 290 arch/x86/kernel/kprobes/opt.c kernel_insn_init(&insn, (void *)recovered_insn, MAX_INSN_SIZE); insn 291 arch/x86/kernel/kprobes/opt.c insn_get_length(&insn); insn 293 arch/x86/kernel/kprobes/opt.c if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION) insn 296 arch/x86/kernel/kprobes/opt.c insn.kaddr = (void *)addr; insn 297 arch/x86/kernel/kprobes/opt.c insn.next_byte = (void *)(addr + insn.length); insn 299 arch/x86/kernel/kprobes/opt.c if (insn_is_indirect_jump(&insn) || insn 300 arch/x86/kernel/kprobes/opt.c insn_jump_into_range(&insn, paddr + INT3_SIZE, insn 303 arch/x86/kernel/kprobes/opt.c addr += insn.length; insn 336 arch/x86/kernel/kprobes/opt.c if (op->optinsn.insn) { insn 337 arch/x86/kernel/kprobes/opt.c free_optinsn_slot(op->optinsn.insn, dirty); insn 338 arch/x86/kernel/kprobes/opt.c op->optinsn.insn = NULL; insn 367 arch/x86/kernel/kprobes/opt.c op->optinsn.insn = slot = get_optinsn_slot(); insn 428 arch/x86/kernel/kprobes/opt.c s32 rel = (s32)((long)op->optinsn.insn - insn 441 arch/x86/kernel/kprobes/opt.c op->optinsn.insn); insn 456 arch/x86/kernel/kprobes/opt.c op->optinsn.insn); insn 482 arch/x86/kernel/kprobes/opt.c regs->ip = (unsigned long)op->optinsn.insn + TMPL_END_IDX; insn 150 arch/x86/kernel/umip.c static int identify_insn(struct insn *insn) insn 153 arch/x86/kernel/umip.c insn_get_modrm(insn); insn 155 arch/x86/kernel/umip.c if (!insn->modrm.nbytes) insn 159 arch/x86/kernel/umip.c if (insn->opcode.bytes[0] != 0xf) insn 162 arch/x86/kernel/umip.c if (insn->opcode.bytes[1] == 0x1) { insn 163 arch/x86/kernel/umip.c switch (X86_MODRM_REG(insn->modrm.value)) { insn 173 arch/x86/kernel/umip.c } else if (insn->opcode.bytes[1] == 0x0) { insn 174 arch/x86/kernel/umip.c if (X86_MODRM_REG(insn->modrm.value) == 0) insn 176 arch/x86/kernel/umip.c else if (X86_MODRM_REG(insn->modrm.value) == 1) insn 204 arch/x86/kernel/umip.c static int emulate_umip_insn(struct insn *insn, int umip_inst, insn 207 arch/x86/kernel/umip.c if (!data || !data_size || !insn) insn 223 arch/x86/kernel/umip.c if (X86_MODRM_MOD(insn->modrm.value) == 3) insn 258 arch/x86/kernel/umip.c if (X86_MODRM_MOD(insn->modrm.value) == 3) insn 259 arch/x86/kernel/umip.c *data_size = insn->opnd_bytes; insn 326 arch/x86/kernel/umip.c struct insn insn; insn 356 arch/x86/kernel/umip.c insn_init(&insn, buf, nr_copied, user_64bit_mode(regs)); insn 372 arch/x86/kernel/umip.c insn.addr_bytes = INSN_CODE_SEG_ADDR_SZ(seg_defs); insn 373 arch/x86/kernel/umip.c insn.opnd_bytes = INSN_CODE_SEG_OPND_SZ(seg_defs); insn 375 arch/x86/kernel/umip.c insn_get_length(&insn); insn 376 arch/x86/kernel/umip.c if (nr_copied < insn.length) insn 379 arch/x86/kernel/umip.c umip_inst = identify_insn(&insn); insn 392 arch/x86/kernel/umip.c if (emulate_umip_insn(&insn, umip_inst, dummy_data, &dummy_data_size, insn 402 arch/x86/kernel/umip.c if (X86_MODRM_MOD(insn.modrm.value) == 3) { insn 403 arch/x86/kernel/umip.c reg_offset = insn_get_modrm_rm_off(&insn, regs); insn 416 arch/x86/kernel/umip.c uaddr = insn_get_addr_ref(&insn, regs); insn 432 arch/x86/kernel/umip.c regs->ip += insn.length; insn 41 arch/x86/kernel/uprobes.c #define OPCODE1(insn) ((insn)->opcode.bytes[0]) insn 42 arch/x86/kernel/uprobes.c #define OPCODE2(insn) ((insn)->opcode.bytes[1]) insn 43 arch/x86/kernel/uprobes.c #define OPCODE3(insn) ((insn)->opcode.bytes[2]) insn 44 arch/x86/kernel/uprobes.c #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value) insn 256 arch/x86/kernel/uprobes.c static bool is_prefix_bad(struct insn *insn) insn 260 arch/x86/kernel/uprobes.c for (i = 0; i < insn->prefixes.nbytes; i++) { insn 263 arch/x86/kernel/uprobes.c attr = inat_get_opcode_attribute(insn->prefixes.bytes[i]); insn 276 arch/x86/kernel/uprobes.c static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64) insn 280 arch/x86/kernel/uprobes.c insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64); insn 282 arch/x86/kernel/uprobes.c insn_get_length(insn); insn 283 arch/x86/kernel/uprobes.c if (!insn_complete(insn)) insn 286 arch/x86/kernel/uprobes.c if (is_prefix_bad(insn)) insn 290 arch/x86/kernel/uprobes.c if (insn_masking_exception(insn)) insn 298 arch/x86/kernel/uprobes.c if (test_bit(OPCODE1(insn), (unsigned long *)good_insns)) insn 301 arch/x86/kernel/uprobes.c if (insn->opcode.nbytes == 2) { insn 302 arch/x86/kernel/uprobes.c if (test_bit(OPCODE2(insn), (unsigned long *)good_2byte_insns)) insn 334 arch/x86/kernel/uprobes.c static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) insn 340 arch/x86/kernel/uprobes.c if (!insn_rip_relative(insn)) insn 348 arch/x86/kernel/uprobes.c if (insn->rex_prefix.nbytes) { insn 349 arch/x86/kernel/uprobes.c cursor = auprobe->insn + insn_offset_rex_prefix(insn); insn 357 arch/x86/kernel/uprobes.c if (insn->vex_prefix.nbytes >= 3) { insn 368 arch/x86/kernel/uprobes.c cursor = auprobe->insn + insn_offset_vex_prefix(insn) + 1; insn 412 arch/x86/kernel/uprobes.c reg = MODRM_REG(insn); /* Fetch modrm.reg */ insn 414 arch/x86/kernel/uprobes.c if (insn->vex_prefix.nbytes) insn 415 arch/x86/kernel/uprobes.c reg2 = insn->vex_prefix.bytes[2]; insn 446 arch/x86/kernel/uprobes.c cursor = auprobe->insn + insn_offset_modrm(insn); insn 493 arch/x86/kernel/uprobes.c static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) insn 685 arch/x86/kernel/uprobes.c static void branch_clear_offset(struct arch_uprobe *auprobe, struct insn *insn) insn 701 arch/x86/kernel/uprobes.c memset(auprobe->insn + insn_offset_immediate(insn), insn 702 arch/x86/kernel/uprobes.c 0, insn->immediate.nbytes); insn 715 arch/x86/kernel/uprobes.c static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn) insn 717 arch/x86/kernel/uprobes.c u8 opc1 = OPCODE1(insn); insn 727 arch/x86/kernel/uprobes.c branch_clear_offset(auprobe, insn); insn 731 arch/x86/kernel/uprobes.c if (insn->opcode.nbytes != 2) insn 737 arch/x86/kernel/uprobes.c opc1 = OPCODE2(insn) - 0x10; insn 749 arch/x86/kernel/uprobes.c for (i = 0; i < insn->prefixes.nbytes; i++) { insn 750 arch/x86/kernel/uprobes.c if (insn->prefixes.bytes[i] == 0x66) insn 755 arch/x86/kernel/uprobes.c auprobe->branch.ilen = insn->length; insn 756 arch/x86/kernel/uprobes.c auprobe->branch.offs = insn->immediate.value; insn 763 arch/x86/kernel/uprobes.c static int push_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn) insn 765 arch/x86/kernel/uprobes.c u8 opc1 = OPCODE1(insn), reg_offset = 0; insn 770 arch/x86/kernel/uprobes.c if (insn->length > 2) insn 772 arch/x86/kernel/uprobes.c if (insn->length == 2) { insn 775 arch/x86/kernel/uprobes.c if (insn->rex_prefix.nbytes != 1 || insn 776 arch/x86/kernel/uprobes.c insn->rex_prefix.bytes[0] != 0x41) insn 838 arch/x86/kernel/uprobes.c auprobe->push.ilen = insn->length; insn 852 arch/x86/kernel/uprobes.c struct insn insn; insn 856 arch/x86/kernel/uprobes.c ret = uprobe_init_insn(auprobe, &insn, is_64bit_mm(mm)); insn 860 arch/x86/kernel/uprobes.c ret = branch_setup_xol_ops(auprobe, &insn); insn 864 arch/x86/kernel/uprobes.c ret = push_setup_xol_ops(auprobe, &insn); insn 872 arch/x86/kernel/uprobes.c switch (OPCODE1(&insn)) { insn 887 arch/x86/kernel/uprobes.c switch (MODRM_REG(&insn)) { insn 897 arch/x86/kernel/uprobes.c riprel_analyze(auprobe, &insn); insn 900 arch/x86/kernel/uprobes.c auprobe->defparam.ilen = insn.length; insn 478 arch/x86/kvm/emulate.c #define asm_safe(insn, inoutclob...) \ insn 482 arch/x86/kvm/emulate.c asm volatile("1:" insn "\n" \ insn 5183 arch/x86/kvm/emulate.c int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len) insn 5202 arch/x86/kvm/emulate.c memcpy(ctxt->fetch.data, insn, insn_len); insn 4231 arch/x86/kvm/mmu.c u64 fault_address, char *insn, int insn_len) insn 4248 arch/x86/kvm/mmu.c r = kvm_mmu_page_fault(vcpu, fault_address, error_code, insn, insn 5536 arch/x86/kvm/mmu.c void *insn, int insn_len) insn 5600 arch/x86/kvm/mmu.c if (unlikely(insn && !insn_len)) { insn 5605 arch/x86/kvm/mmu.c return x86_emulate_instruction(vcpu, cr2_or_gpa, emulation_type, insn, insn 65 arch/x86/kvm/mmu.h u64 fault_address, char *insn, int insn_len); insn 741 arch/x86/kvm/trace.h __array( __u8, insn, 15 ) insn 751 arch/x86/kvm/trace.h memcpy(__entry->insn, insn 760 arch/x86/kvm/trace.h __print_hex(__entry->insn, __entry->len), insn 140 arch/x86/kvm/vmx/ops.h #define vmx_asm1(insn, op1, error_args...) \ insn 142 arch/x86/kvm/vmx/ops.h asm_volatile_goto("1: " __stringify(insn) " %0\n\t" \ insn 149 arch/x86/kvm/vmx/ops.h insn##_error(error_args); \ insn 155 arch/x86/kvm/vmx/ops.h #define vmx_asm2(insn, op1, op2, error_args...) \ insn 157 arch/x86/kvm/vmx/ops.h asm_volatile_goto("1: " __stringify(insn) " %1, %0\n\t" \ insn 164 arch/x86/kvm/vmx/ops.h insn##_error(error_args); \ insn 6695 arch/x86/kvm/x86.c int emulation_type, void *insn, int insn_len) insn 6731 arch/x86/kvm/x86.c r = x86_decode_insn(ctxt, insn, insn_len); insn 6862 arch/x86/kvm/x86.c void *insn, int insn_len) insn 6864 arch/x86/kvm/x86.c return x86_emulate_instruction(vcpu, 0, 0, insn, insn_len); insn 290 arch/x86/kvm/x86.h int emulation_type, void *insn, int insn_len); insn 37 arch/x86/lib/insn-eval.c static bool is_string_insn(struct insn *insn) insn 39 arch/x86/lib/insn-eval.c insn_get_opcode(insn); insn 42 arch/x86/lib/insn-eval.c if (insn->opcode.nbytes != 1) insn 45 arch/x86/lib/insn-eval.c switch (insn->opcode.bytes[0]) { insn 69 arch/x86/lib/insn-eval.c static int get_seg_reg_override_idx(struct insn *insn) insn 74 arch/x86/lib/insn-eval.c insn_get_prefixes(insn); insn 77 arch/x86/lib/insn-eval.c for (i = 0; i < insn->prefixes.nbytes; i++) { insn 80 arch/x86/lib/insn-eval.c attr = inat_get_opcode_attribute(insn->prefixes.bytes[i]); insn 131 arch/x86/lib/insn-eval.c static bool check_seg_overrides(struct insn *insn, int regoff) insn 133 arch/x86/lib/insn-eval.c if (regoff == offsetof(struct pt_regs, di) && is_string_insn(insn)) insn 156 arch/x86/lib/insn-eval.c static int resolve_default_seg(struct insn *insn, struct pt_regs *regs, int off) insn 179 arch/x86/lib/insn-eval.c if (insn->addr_bytes == 2) insn 190 arch/x86/lib/insn-eval.c if (is_string_insn(insn)) insn 258 arch/x86/lib/insn-eval.c static int resolve_seg_reg(struct insn *insn, struct pt_regs *regs, int regoff) insn 275 arch/x86/lib/insn-eval.c if (!insn) insn 278 arch/x86/lib/insn-eval.c if (!check_seg_overrides(insn, regoff)) insn 279 arch/x86/lib/insn-eval.c return resolve_default_seg(insn, regs, regoff); insn 281 arch/x86/lib/insn-eval.c idx = get_seg_reg_override_idx(insn); insn 286 arch/x86/lib/insn-eval.c return resolve_default_seg(insn, regs, regoff); insn 396 arch/x86/lib/insn-eval.c static int get_reg_offset(struct insn *insn, struct pt_regs *regs, insn 426 arch/x86/lib/insn-eval.c if (IS_ENABLED(CONFIG_X86_64) && !insn->x86_64) insn 431 arch/x86/lib/insn-eval.c regno = X86_MODRM_RM(insn->modrm.value); insn 437 arch/x86/lib/insn-eval.c if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) insn 440 arch/x86/lib/insn-eval.c if (X86_REX_B(insn->rex_prefix.value)) insn 445 arch/x86/lib/insn-eval.c regno = X86_SIB_INDEX(insn->sib.value); insn 446 arch/x86/lib/insn-eval.c if (X86_REX_X(insn->rex_prefix.value)) insn 455 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) != 3 && regno == 4) insn 460 arch/x86/lib/insn-eval.c regno = X86_SIB_BASE(insn->sib.value); insn 466 arch/x86/lib/insn-eval.c if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) insn 469 arch/x86/lib/insn-eval.c if (X86_REX_B(insn->rex_prefix.value)) insn 502 arch/x86/lib/insn-eval.c static int get_reg_offset_16(struct insn *insn, struct pt_regs *regs, insn 536 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) == 3) { insn 537 arch/x86/lib/insn-eval.c *offs1 = insn_get_modrm_rm_off(insn, regs); insn 542 arch/x86/lib/insn-eval.c *offs1 = regoff1[X86_MODRM_RM(insn->modrm.value)]; insn 543 arch/x86/lib/insn-eval.c *offs2 = regoff2[X86_MODRM_RM(insn->modrm.value)]; insn 552 arch/x86/lib/insn-eval.c if ((X86_MODRM_MOD(insn->modrm.value) == 0) && insn 553 arch/x86/lib/insn-eval.c (X86_MODRM_RM(insn->modrm.value) == 6)) insn 803 arch/x86/lib/insn-eval.c int insn_get_modrm_rm_off(struct insn *insn, struct pt_regs *regs) insn 805 arch/x86/lib/insn-eval.c return get_reg_offset(insn, regs, REG_TYPE_RM); insn 829 arch/x86/lib/insn-eval.c static int get_seg_base_limit(struct insn *insn, struct pt_regs *regs, insn 838 arch/x86/lib/insn-eval.c seg_reg_idx = resolve_seg_reg(insn, regs, regoff); insn 879 arch/x86/lib/insn-eval.c static int get_eff_addr_reg(struct insn *insn, struct pt_regs *regs, insn 882 arch/x86/lib/insn-eval.c insn_get_modrm(insn); insn 884 arch/x86/lib/insn-eval.c if (!insn->modrm.nbytes) insn 887 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) != 3) insn 890 arch/x86/lib/insn-eval.c *regoff = get_reg_offset(insn, regs, REG_TYPE_RM); insn 895 arch/x86/lib/insn-eval.c if (insn->addr_bytes == 2) insn 897 arch/x86/lib/insn-eval.c else if (insn->addr_bytes == 4) insn 927 arch/x86/lib/insn-eval.c static int get_eff_addr_modrm(struct insn *insn, struct pt_regs *regs, insn 932 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 8 && insn->addr_bytes != 4) insn 935 arch/x86/lib/insn-eval.c insn_get_modrm(insn); insn 937 arch/x86/lib/insn-eval.c if (!insn->modrm.nbytes) insn 940 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) > 2) insn 943 arch/x86/lib/insn-eval.c *regoff = get_reg_offset(insn, regs, REG_TYPE_RM); insn 952 arch/x86/lib/insn-eval.c tmp = regs->ip + insn->length; insn 961 arch/x86/lib/insn-eval.c if (insn->addr_bytes == 4) { insn 962 arch/x86/lib/insn-eval.c int addr32 = (int)(tmp & 0xffffffff) + insn->displacement.value; insn 966 arch/x86/lib/insn-eval.c *eff_addr = tmp + insn->displacement.value; insn 994 arch/x86/lib/insn-eval.c static int get_eff_addr_modrm_16(struct insn *insn, struct pt_regs *regs, insn 1000 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 2) insn 1003 arch/x86/lib/insn-eval.c insn_get_modrm(insn); insn 1005 arch/x86/lib/insn-eval.c if (!insn->modrm.nbytes) insn 1008 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) > 2) insn 1011 arch/x86/lib/insn-eval.c ret = get_reg_offset_16(insn, regs, &addr_offset1, &addr_offset2); insn 1026 arch/x86/lib/insn-eval.c displacement = insn->displacement.value & 0xffff; insn 1062 arch/x86/lib/insn-eval.c static int get_eff_addr_sib(struct insn *insn, struct pt_regs *regs, insn 1068 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 8 && insn->addr_bytes != 4) insn 1071 arch/x86/lib/insn-eval.c insn_get_modrm(insn); insn 1073 arch/x86/lib/insn-eval.c if (!insn->modrm.nbytes) insn 1076 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) > 2) insn 1079 arch/x86/lib/insn-eval.c insn_get_sib(insn); insn 1081 arch/x86/lib/insn-eval.c if (!insn->sib.nbytes) insn 1084 arch/x86/lib/insn-eval.c *base_offset = get_reg_offset(insn, regs, REG_TYPE_BASE); insn 1085 arch/x86/lib/insn-eval.c indx_offset = get_reg_offset(insn, regs, REG_TYPE_INDEX); insn 1106 arch/x86/lib/insn-eval.c if (insn->addr_bytes == 4) { insn 1112 arch/x86/lib/insn-eval.c addr32 = base32 + idx32 * (1 << X86_SIB_SCALE(insn->sib.value)); insn 1113 arch/x86/lib/insn-eval.c addr32 += insn->displacement.value; insn 1117 arch/x86/lib/insn-eval.c *eff_addr = base + indx * (1 << X86_SIB_SCALE(insn->sib.value)); insn 1118 arch/x86/lib/insn-eval.c *eff_addr += insn->displacement.value; insn 1141 arch/x86/lib/insn-eval.c static void __user *get_addr_ref_16(struct insn *insn, struct pt_regs *regs) insn 1148 arch/x86/lib/insn-eval.c insn_get_modrm(insn); insn 1149 arch/x86/lib/insn-eval.c insn_get_displacement(insn); insn 1151 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 2) insn 1154 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) == 3) { insn 1155 arch/x86/lib/insn-eval.c ret = get_eff_addr_reg(insn, regs, ®off, &tmp); insn 1161 arch/x86/lib/insn-eval.c ret = get_eff_addr_modrm_16(insn, regs, ®off, &eff_addr); insn 1166 arch/x86/lib/insn-eval.c ret = get_seg_base_limit(insn, regs, regoff, &seg_base, &seg_limit); insn 1205 arch/x86/lib/insn-eval.c static void __user *get_addr_ref_32(struct insn *insn, struct pt_regs *regs) insn 1212 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 4) insn 1215 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) == 3) { insn 1216 arch/x86/lib/insn-eval.c ret = get_eff_addr_reg(insn, regs, ®off, &tmp); insn 1223 arch/x86/lib/insn-eval.c if (insn->sib.nbytes) { insn 1224 arch/x86/lib/insn-eval.c ret = get_eff_addr_sib(insn, regs, ®off, &tmp); insn 1230 arch/x86/lib/insn-eval.c ret = get_eff_addr_modrm(insn, regs, ®off, &tmp); insn 1238 arch/x86/lib/insn-eval.c ret = get_seg_base_limit(insn, regs, regoff, &seg_base, &seg_limit); insn 1294 arch/x86/lib/insn-eval.c static void __user *get_addr_ref_64(struct insn *insn, struct pt_regs *regs) insn 1299 arch/x86/lib/insn-eval.c static void __user *get_addr_ref_64(struct insn *insn, struct pt_regs *regs) insn 1305 arch/x86/lib/insn-eval.c if (insn->addr_bytes != 8) insn 1308 arch/x86/lib/insn-eval.c if (X86_MODRM_MOD(insn->modrm.value) == 3) { insn 1309 arch/x86/lib/insn-eval.c ret = get_eff_addr_reg(insn, regs, ®off, &eff_addr); insn 1314 arch/x86/lib/insn-eval.c if (insn->sib.nbytes) { insn 1315 arch/x86/lib/insn-eval.c ret = get_eff_addr_sib(insn, regs, ®off, &eff_addr); insn 1319 arch/x86/lib/insn-eval.c ret = get_eff_addr_modrm(insn, regs, ®off, &eff_addr); insn 1326 arch/x86/lib/insn-eval.c ret = get_seg_base_limit(insn, regs, regoff, &seg_base, NULL); insn 1352 arch/x86/lib/insn-eval.c void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs) insn 1354 arch/x86/lib/insn-eval.c if (!insn || !regs) insn 1357 arch/x86/lib/insn-eval.c switch (insn->addr_bytes) { insn 1359 arch/x86/lib/insn-eval.c return get_addr_ref_16(insn, regs); insn 1361 arch/x86/lib/insn-eval.c return get_addr_ref_32(insn, regs); insn 1363 arch/x86/lib/insn-eval.c return get_addr_ref_64(insn, regs); insn 17 arch/x86/lib/insn.c #define validate_next(t, insn, n) \ insn 18 arch/x86/lib/insn.c ((insn)->next_byte + sizeof(t) + n <= (insn)->end_kaddr) insn 20 arch/x86/lib/insn.c #define __get_next(t, insn) \ insn 21 arch/x86/lib/insn.c ({ t r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; }) insn 23 arch/x86/lib/insn.c #define __peek_nbyte_next(t, insn, n) \ insn 24 arch/x86/lib/insn.c ({ t r = *(t*)((insn)->next_byte + n); r; }) insn 26 arch/x86/lib/insn.c #define get_next(t, insn) \ insn 27 arch/x86/lib/insn.c ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); }) insn 29 arch/x86/lib/insn.c #define peek_nbyte_next(t, insn, n) \ insn 30 arch/x86/lib/insn.c ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); }) insn 32 arch/x86/lib/insn.c #define peek_next(t, insn) peek_nbyte_next(t, insn, 0) insn 40 arch/x86/lib/insn.c void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) insn 49 arch/x86/lib/insn.c memset(insn, 0, sizeof(*insn)); insn 50 arch/x86/lib/insn.c insn->kaddr = kaddr; insn 51 arch/x86/lib/insn.c insn->end_kaddr = kaddr + buf_len; insn 52 arch/x86/lib/insn.c insn->next_byte = kaddr; insn 53 arch/x86/lib/insn.c insn->x86_64 = x86_64 ? 1 : 0; insn 54 arch/x86/lib/insn.c insn->opnd_bytes = 4; insn 56 arch/x86/lib/insn.c insn->addr_bytes = 8; insn 58 arch/x86/lib/insn.c insn->addr_bytes = 4; insn 69 arch/x86/lib/insn.c void insn_get_prefixes(struct insn *insn) insn 71 arch/x86/lib/insn.c struct insn_field *prefixes = &insn->prefixes; insn 81 arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 94 arch/x86/lib/insn.c if (insn->x86_64) insn 95 arch/x86/lib/insn.c insn->addr_bytes ^= 12; insn 97 arch/x86/lib/insn.c insn->addr_bytes ^= 6; insn 100 arch/x86/lib/insn.c insn->opnd_bytes ^= 6; insn 104 arch/x86/lib/insn.c insn->next_byte++; insn 106 arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 110 arch/x86/lib/insn.c if (lb && lb != insn->prefixes.bytes[3]) { insn 111 arch/x86/lib/insn.c if (unlikely(insn->prefixes.bytes[3])) { insn 113 arch/x86/lib/insn.c b = insn->prefixes.bytes[3]; insn 118 arch/x86/lib/insn.c insn->prefixes.bytes[3] = lb; insn 122 arch/x86/lib/insn.c if (insn->x86_64) { insn 123 arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 126 arch/x86/lib/insn.c insn->rex_prefix.value = b; insn 127 arch/x86/lib/insn.c insn->rex_prefix.nbytes = 1; insn 128 arch/x86/lib/insn.c insn->next_byte++; insn 131 arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 134 arch/x86/lib/insn.c insn->rex_prefix.got = 1; insn 137 arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 140 arch/x86/lib/insn.c insn_byte_t b2 = peek_nbyte_next(insn_byte_t, insn, 1); insn 141 arch/x86/lib/insn.c if (!insn->x86_64) { insn 150 arch/x86/lib/insn.c insn->vex_prefix.bytes[0] = b; insn 151 arch/x86/lib/insn.c insn->vex_prefix.bytes[1] = b2; insn 153 arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 2); insn 154 arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2; insn 155 arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 3); insn 156 arch/x86/lib/insn.c insn->vex_prefix.bytes[3] = b2; insn 157 arch/x86/lib/insn.c insn->vex_prefix.nbytes = 4; insn 158 arch/x86/lib/insn.c insn->next_byte += 4; insn 159 arch/x86/lib/insn.c if (insn->x86_64 && X86_VEX_W(b2)) insn 161 arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 163 arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 2); insn 164 arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2; insn 165 arch/x86/lib/insn.c insn->vex_prefix.nbytes = 3; insn 166 arch/x86/lib/insn.c insn->next_byte += 3; insn 167 arch/x86/lib/insn.c if (insn->x86_64 && X86_VEX_W(b2)) insn 169 arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 176 arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2 & 0x7f; insn 177 arch/x86/lib/insn.c insn->vex_prefix.nbytes = 2; insn 178 arch/x86/lib/insn.c insn->next_byte += 2; insn 182 arch/x86/lib/insn.c insn->vex_prefix.got = 1; insn 200 arch/x86/lib/insn.c void insn_get_opcode(struct insn *insn) insn 202 arch/x86/lib/insn.c struct insn_field *opcode = &insn->opcode; insn 207 arch/x86/lib/insn.c if (!insn->prefixes.got) insn 208 arch/x86/lib/insn.c insn_get_prefixes(insn); insn 211 arch/x86/lib/insn.c op = get_next(insn_byte_t, insn); insn 216 arch/x86/lib/insn.c if (insn_is_avx(insn)) { insn 218 arch/x86/lib/insn.c m = insn_vex_m_bits(insn); insn 219 arch/x86/lib/insn.c p = insn_vex_p_bits(insn); insn 220 arch/x86/lib/insn.c insn->attr = inat_get_avx_attribute(op, m, p); insn 221 arch/x86/lib/insn.c if ((inat_must_evex(insn->attr) && !insn_is_evex(insn)) || insn 222 arch/x86/lib/insn.c (!inat_accept_vex(insn->attr) && insn 223 arch/x86/lib/insn.c !inat_is_group(insn->attr))) insn 224 arch/x86/lib/insn.c insn->attr = 0; /* This instruction is bad */ insn 228 arch/x86/lib/insn.c insn->attr = inat_get_opcode_attribute(op); insn 229 arch/x86/lib/insn.c while (inat_is_escape(insn->attr)) { insn 231 arch/x86/lib/insn.c op = get_next(insn_byte_t, insn); insn 233 arch/x86/lib/insn.c pfx_id = insn_last_prefix_id(insn); insn 234 arch/x86/lib/insn.c insn->attr = inat_get_escape_attribute(op, pfx_id, insn->attr); insn 236 arch/x86/lib/insn.c if (inat_must_vex(insn->attr)) insn 237 arch/x86/lib/insn.c insn->attr = 0; /* This instruction is bad */ insn 253 arch/x86/lib/insn.c void insn_get_modrm(struct insn *insn) insn 255 arch/x86/lib/insn.c struct insn_field *modrm = &insn->modrm; insn 259 arch/x86/lib/insn.c if (!insn->opcode.got) insn 260 arch/x86/lib/insn.c insn_get_opcode(insn); insn 262 arch/x86/lib/insn.c if (inat_has_modrm(insn->attr)) { insn 263 arch/x86/lib/insn.c mod = get_next(insn_byte_t, insn); insn 266 arch/x86/lib/insn.c if (inat_is_group(insn->attr)) { insn 267 arch/x86/lib/insn.c pfx_id = insn_last_prefix_id(insn); insn 268 arch/x86/lib/insn.c insn->attr = inat_get_group_attribute(mod, pfx_id, insn 269 arch/x86/lib/insn.c insn->attr); insn 270 arch/x86/lib/insn.c if (insn_is_avx(insn) && !inat_accept_vex(insn->attr)) insn 271 arch/x86/lib/insn.c insn->attr = 0; /* This is bad */ insn 275 arch/x86/lib/insn.c if (insn->x86_64 && inat_is_force64(insn->attr)) insn 276 arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 291 arch/x86/lib/insn.c int insn_rip_relative(struct insn *insn) insn 293 arch/x86/lib/insn.c struct insn_field *modrm = &insn->modrm; insn 295 arch/x86/lib/insn.c if (!insn->x86_64) insn 298 arch/x86/lib/insn.c insn_get_modrm(insn); insn 313 arch/x86/lib/insn.c void insn_get_sib(struct insn *insn) insn 317 arch/x86/lib/insn.c if (insn->sib.got) insn 319 arch/x86/lib/insn.c if (!insn->modrm.got) insn 320 arch/x86/lib/insn.c insn_get_modrm(insn); insn 321 arch/x86/lib/insn.c if (insn->modrm.nbytes) { insn 322 arch/x86/lib/insn.c modrm = (insn_byte_t)insn->modrm.value; insn 323 arch/x86/lib/insn.c if (insn->addr_bytes != 2 && insn 325 arch/x86/lib/insn.c insn->sib.value = get_next(insn_byte_t, insn); insn 326 arch/x86/lib/insn.c insn->sib.nbytes = 1; insn 329 arch/x86/lib/insn.c insn->sib.got = 1; insn 344 arch/x86/lib/insn.c void insn_get_displacement(struct insn *insn) insn 348 arch/x86/lib/insn.c if (insn->displacement.got) insn 350 arch/x86/lib/insn.c if (!insn->sib.got) insn 351 arch/x86/lib/insn.c insn_get_sib(insn); insn 352 arch/x86/lib/insn.c if (insn->modrm.nbytes) { insn 370 arch/x86/lib/insn.c mod = X86_MODRM_MOD(insn->modrm.value); insn 371 arch/x86/lib/insn.c rm = X86_MODRM_RM(insn->modrm.value); insn 372 arch/x86/lib/insn.c base = X86_SIB_BASE(insn->sib.value); insn 376 arch/x86/lib/insn.c insn->displacement.value = get_next(signed char, insn); insn 377 arch/x86/lib/insn.c insn->displacement.nbytes = 1; insn 378 arch/x86/lib/insn.c } else if (insn->addr_bytes == 2) { insn 380 arch/x86/lib/insn.c insn->displacement.value = insn 381 arch/x86/lib/insn.c get_next(short, insn); insn 382 arch/x86/lib/insn.c insn->displacement.nbytes = 2; insn 387 arch/x86/lib/insn.c insn->displacement.value = get_next(int, insn); insn 388 arch/x86/lib/insn.c insn->displacement.nbytes = 4; insn 393 arch/x86/lib/insn.c insn->displacement.got = 1; insn 400 arch/x86/lib/insn.c static int __get_moffset(struct insn *insn) insn 402 arch/x86/lib/insn.c switch (insn->addr_bytes) { insn 404 arch/x86/lib/insn.c insn->moffset1.value = get_next(short, insn); insn 405 arch/x86/lib/insn.c insn->moffset1.nbytes = 2; insn 408 arch/x86/lib/insn.c insn->moffset1.value = get_next(int, insn); insn 409 arch/x86/lib/insn.c insn->moffset1.nbytes = 4; insn 412 arch/x86/lib/insn.c insn->moffset1.value = get_next(int, insn); insn 413 arch/x86/lib/insn.c insn->moffset1.nbytes = 4; insn 414 arch/x86/lib/insn.c insn->moffset2.value = get_next(int, insn); insn 415 arch/x86/lib/insn.c insn->moffset2.nbytes = 4; insn 420 arch/x86/lib/insn.c insn->moffset1.got = insn->moffset2.got = 1; insn 429 arch/x86/lib/insn.c static int __get_immv32(struct insn *insn) insn 431 arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 433 arch/x86/lib/insn.c insn->immediate.value = get_next(short, insn); insn 434 arch/x86/lib/insn.c insn->immediate.nbytes = 2; insn 438 arch/x86/lib/insn.c insn->immediate.value = get_next(int, insn); insn 439 arch/x86/lib/insn.c insn->immediate.nbytes = 4; insn 452 arch/x86/lib/insn.c static int __get_immv(struct insn *insn) insn 454 arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 456 arch/x86/lib/insn.c insn->immediate1.value = get_next(short, insn); insn 457 arch/x86/lib/insn.c insn->immediate1.nbytes = 2; insn 460 arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 461 arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 464 arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 465 arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 466 arch/x86/lib/insn.c insn->immediate2.value = get_next(int, insn); insn 467 arch/x86/lib/insn.c insn->immediate2.nbytes = 4; insn 472 arch/x86/lib/insn.c insn->immediate1.got = insn->immediate2.got = 1; insn 480 arch/x86/lib/insn.c static int __get_immptr(struct insn *insn) insn 482 arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 484 arch/x86/lib/insn.c insn->immediate1.value = get_next(short, insn); insn 485 arch/x86/lib/insn.c insn->immediate1.nbytes = 2; insn 488 arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 489 arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 497 arch/x86/lib/insn.c insn->immediate2.value = get_next(unsigned short, insn); insn 498 arch/x86/lib/insn.c insn->immediate2.nbytes = 2; insn 499 arch/x86/lib/insn.c insn->immediate1.got = insn->immediate2.got = 1; insn 515 arch/x86/lib/insn.c void insn_get_immediate(struct insn *insn) insn 517 arch/x86/lib/insn.c if (insn->immediate.got) insn 519 arch/x86/lib/insn.c if (!insn->displacement.got) insn 520 arch/x86/lib/insn.c insn_get_displacement(insn); insn 522 arch/x86/lib/insn.c if (inat_has_moffset(insn->attr)) { insn 523 arch/x86/lib/insn.c if (!__get_moffset(insn)) insn 528 arch/x86/lib/insn.c if (!inat_has_immediate(insn->attr)) insn 532 arch/x86/lib/insn.c switch (inat_immediate_size(insn->attr)) { insn 534 arch/x86/lib/insn.c insn->immediate.value = get_next(signed char, insn); insn 535 arch/x86/lib/insn.c insn->immediate.nbytes = 1; insn 538 arch/x86/lib/insn.c insn->immediate.value = get_next(short, insn); insn 539 arch/x86/lib/insn.c insn->immediate.nbytes = 2; insn 542 arch/x86/lib/insn.c insn->immediate.value = get_next(int, insn); insn 543 arch/x86/lib/insn.c insn->immediate.nbytes = 4; insn 546 arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 547 arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 548 arch/x86/lib/insn.c insn->immediate2.value = get_next(int, insn); insn 549 arch/x86/lib/insn.c insn->immediate2.nbytes = 4; insn 552 arch/x86/lib/insn.c if (!__get_immptr(insn)) insn 556 arch/x86/lib/insn.c if (!__get_immv32(insn)) insn 560 arch/x86/lib/insn.c if (!__get_immv(insn)) insn 567 arch/x86/lib/insn.c if (inat_has_second_immediate(insn->attr)) { insn 568 arch/x86/lib/insn.c insn->immediate2.value = get_next(signed char, insn); insn 569 arch/x86/lib/insn.c insn->immediate2.nbytes = 1; insn 572 arch/x86/lib/insn.c insn->immediate.got = 1; insn 585 arch/x86/lib/insn.c void insn_get_length(struct insn *insn) insn 587 arch/x86/lib/insn.c if (insn->length) insn 589 arch/x86/lib/insn.c if (!insn->immediate.got) insn 590 arch/x86/lib/insn.c insn_get_immediate(insn); insn 591 arch/x86/lib/insn.c insn->length = (unsigned char)((unsigned long)insn->next_byte insn 592 arch/x86/lib/insn.c - (unsigned long)insn->kaddr); insn 65 arch/x86/mm/mpx.c static int mpx_insn_decode(struct insn *insn, insn 82 arch/x86/mm/mpx.c insn_init(insn, buf, nr_copied, x86_64); insn 83 arch/x86/mm/mpx.c insn_get_length(insn); insn 92 arch/x86/mm/mpx.c if (nr_copied < insn->length) insn 95 arch/x86/mm/mpx.c insn_get_opcode(insn); insn 100 arch/x86/mm/mpx.c if (insn->opcode.bytes[0] != 0x0f) insn 102 arch/x86/mm/mpx.c if ((insn->opcode.bytes[1] != 0x1a) && insn 103 arch/x86/mm/mpx.c (insn->opcode.bytes[1] != 0x1b)) insn 126 arch/x86/mm/mpx.c struct insn insn; insn 130 arch/x86/mm/mpx.c err = mpx_insn_decode(&insn, regs); insn 138 arch/x86/mm/mpx.c insn_get_modrm(&insn); insn 139 arch/x86/mm/mpx.c bndregno = X86_MODRM_REG(insn.modrm.value); insn 165 arch/x86/mm/mpx.c info->addr = insn_get_addr_ref(&insn, regs); insn 396 arch/x86/net/bpf_jit_comp.c struct bpf_insn *insn = bpf_prog->insnsi; insn 408 arch/x86/net/bpf_jit_comp.c for (i = 1; i <= insn_cnt; i++, insn++) { insn 409 arch/x86/net/bpf_jit_comp.c const s32 imm32 = insn->imm; insn 410 arch/x86/net/bpf_jit_comp.c u32 dst_reg = insn->dst_reg; insn 411 arch/x86/net/bpf_jit_comp.c u32 src_reg = insn->src_reg; insn 418 arch/x86/net/bpf_jit_comp.c switch (insn->code) { insn 430 arch/x86/net/bpf_jit_comp.c switch (BPF_OP(insn->code)) { insn 437 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 447 arch/x86/net/bpf_jit_comp.c BPF_CLASS(insn->code) == BPF_ALU64, insn 454 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 471 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 480 arch/x86/net/bpf_jit_comp.c switch (BPF_OP(insn->code)) { insn 513 arch/x86/net/bpf_jit_comp.c emit_mov_imm32(&prog, BPF_CLASS(insn->code) == BPF_ALU64, insn 518 arch/x86/net/bpf_jit_comp.c emit_mov_imm64(&prog, dst_reg, insn[1].imm, insn[0].imm); insn 519 arch/x86/net/bpf_jit_comp.c insn++; insn 535 arch/x86/net/bpf_jit_comp.c if (BPF_SRC(insn->code) == BPF_X) insn 551 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 558 arch/x86/net/bpf_jit_comp.c if (BPF_OP(insn->code) == BPF_MOD) insn 577 arch/x86/net/bpf_jit_comp.c bool is64 = BPF_CLASS(insn->code) == BPF_ALU64; insn 587 arch/x86/net/bpf_jit_comp.c if (BPF_SRC(insn->code) == BPF_X) insn 615 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 620 arch/x86/net/bpf_jit_comp.c switch (BPF_OP(insn->code)) { insn 654 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_ALU64) insn 659 arch/x86/net/bpf_jit_comp.c switch (BPF_OP(insn->code)) { insn 669 arch/x86/net/bpf_jit_comp.c if (insn->dst_reg == BPF_REG_4) insn 671 arch/x86/net/bpf_jit_comp.c EMIT_mov(insn->dst_reg, AUX_REG); insn 753 arch/x86/net/bpf_jit_comp.c st: if (is_imm8(insn->off)) insn 754 arch/x86/net/bpf_jit_comp.c EMIT2(add_1reg(0x40, dst_reg), insn->off); insn 756 arch/x86/net/bpf_jit_comp.c EMIT1_off32(add_1reg(0x80, dst_reg), insn->off); insn 758 arch/x86/net/bpf_jit_comp.c EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); insn 784 arch/x86/net/bpf_jit_comp.c stx: if (is_imm8(insn->off)) insn 785 arch/x86/net/bpf_jit_comp.c EMIT2(add_2reg(0x40, dst_reg, src_reg), insn->off); insn 788 arch/x86/net/bpf_jit_comp.c insn->off); insn 815 arch/x86/net/bpf_jit_comp.c if (is_imm8(insn->off)) insn 816 arch/x86/net/bpf_jit_comp.c EMIT2(add_2reg(0x40, src_reg, dst_reg), insn->off); insn 819 arch/x86/net/bpf_jit_comp.c insn->off); insn 832 arch/x86/net/bpf_jit_comp.c xadd: if (is_imm8(insn->off)) insn 833 arch/x86/net/bpf_jit_comp.c EMIT2(add_2reg(0x40, dst_reg, src_reg), insn->off); insn 836 arch/x86/net/bpf_jit_comp.c insn->off); insn 877 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_JMP) insn 887 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_JMP) insn 897 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_JMP) insn 925 arch/x86/net/bpf_jit_comp.c if (BPF_CLASS(insn->code) == BPF_JMP) insn 936 arch/x86/net/bpf_jit_comp.c switch (BPF_OP(insn->code)) { insn 979 arch/x86/net/bpf_jit_comp.c jmp_offset = addrs[i + insn->off] - addrs[i]; insn 992 arch/x86/net/bpf_jit_comp.c if (insn->off == -1) insn 1001 arch/x86/net/bpf_jit_comp.c jmp_offset = addrs[i + insn->off] - addrs[i]; insn 1042 arch/x86/net/bpf_jit_comp.c pr_err("bpf_jit: unknown opcode %02x\n", insn->code); insn 1465 arch/x86/net/bpf_jit_comp32.c struct bpf_insn *insn = bpf_prog->insnsi; insn 1475 arch/x86/net/bpf_jit_comp32.c for (i = 0; i < insn_cnt; i++, insn++) { insn 1476 arch/x86/net/bpf_jit_comp32.c const s32 imm32 = insn->imm; insn 1477 arch/x86/net/bpf_jit_comp32.c const bool is64 = BPF_CLASS(insn->code) == BPF_ALU64; insn 1478 arch/x86/net/bpf_jit_comp32.c const bool dstk = insn->dst_reg == BPF_REG_AX ? false : true; insn 1479 arch/x86/net/bpf_jit_comp32.c const bool sstk = insn->src_reg == BPF_REG_AX ? false : true; insn 1480 arch/x86/net/bpf_jit_comp32.c const u8 code = insn->code; insn 1481 arch/x86/net/bpf_jit_comp32.c const u8 *dst = bpf2ia32[insn->dst_reg]; insn 1482 arch/x86/net/bpf_jit_comp32.c const u8 *src = bpf2ia32[insn->src_reg]; insn 1701 arch/x86/net/bpf_jit_comp32.c hi = insn[1].imm; insn 1704 arch/x86/net/bpf_jit_comp32.c insn++; insn 1731 arch/x86/net/bpf_jit_comp32.c if (is_imm8(insn->off)) insn 1732 arch/x86/net/bpf_jit_comp32.c EMIT2(add_1reg(0x40, IA32_EAX), insn->off); insn 1735 arch/x86/net/bpf_jit_comp32.c insn->off); insn 1743 arch/x86/net/bpf_jit_comp32.c insn->off + 4); insn 1779 arch/x86/net/bpf_jit_comp32.c if (is_imm8(insn->off)) insn 1781 arch/x86/net/bpf_jit_comp32.c insn->off); insn 1784 arch/x86/net/bpf_jit_comp32.c insn->off); insn 1797 arch/x86/net/bpf_jit_comp32.c if (is_imm8(insn->off + 4)) { insn 1800 arch/x86/net/bpf_jit_comp32.c insn->off + 4); insn 1804 arch/x86/net/bpf_jit_comp32.c EMIT(insn->off + 4, 4); insn 1832 arch/x86/net/bpf_jit_comp32.c if (is_imm8(insn->off)) insn 1834 arch/x86/net/bpf_jit_comp32.c insn->off); insn 1837 arch/x86/net/bpf_jit_comp32.c insn->off); insn 1865 arch/x86/net/bpf_jit_comp32.c insn->off + 4); insn 1888 arch/x86/net/bpf_jit_comp32.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 1946 arch/x86/net/bpf_jit_comp32.c bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP; insn 2017 arch/x86/net/bpf_jit_comp32.c bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP; insn 2061 arch/x86/net/bpf_jit_comp32.c bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP; insn 2117 arch/x86/net/bpf_jit_comp32.c bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP; insn 2150 arch/x86/net/bpf_jit_comp32.c jmp_offset = addrs[i + insn->off] - addrs[i]; insn 2199 arch/x86/net/bpf_jit_comp32.c jmp_offset = addrs[i + insn->off] - addrs[i] + 8; insn 2212 arch/x86/net/bpf_jit_comp32.c jmp_offset = addrs[i + insn->off] - addrs[i]; insn 2222 arch/x86/net/bpf_jit_comp32.c if (insn->off == -1) insn 2231 arch/x86/net/bpf_jit_comp32.c jmp_offset = addrs[i + insn->off] - addrs[i]; insn 70 arch/x86/tools/insn_decoder_test.c static void dump_insn(FILE *fp, struct insn *insn) insn 73 arch/x86/tools/insn_decoder_test.c dump_field(fp, "prefixes", "\t", &insn->prefixes); insn 74 arch/x86/tools/insn_decoder_test.c dump_field(fp, "rex_prefix", "\t", &insn->rex_prefix); insn 75 arch/x86/tools/insn_decoder_test.c dump_field(fp, "vex_prefix", "\t", &insn->vex_prefix); insn 76 arch/x86/tools/insn_decoder_test.c dump_field(fp, "opcode", "\t", &insn->opcode); insn 77 arch/x86/tools/insn_decoder_test.c dump_field(fp, "modrm", "\t", &insn->modrm); insn 78 arch/x86/tools/insn_decoder_test.c dump_field(fp, "sib", "\t", &insn->sib); insn 79 arch/x86/tools/insn_decoder_test.c dump_field(fp, "displacement", "\t", &insn->displacement); insn 80 arch/x86/tools/insn_decoder_test.c dump_field(fp, "immediate1", "\t", &insn->immediate1); insn 81 arch/x86/tools/insn_decoder_test.c dump_field(fp, "immediate2", "\t", &insn->immediate2); insn 83 arch/x86/tools/insn_decoder_test.c insn->attr, insn->opnd_bytes, insn->addr_bytes); insn 85 arch/x86/tools/insn_decoder_test.c insn->length, insn->x86_64, insn->kaddr); insn 115 arch/x86/tools/insn_decoder_test.c struct insn insn; insn 152 arch/x86/tools/insn_decoder_test.c insn_init(&insn, insn_buff, sizeof(insn_buff), x86_64); insn 153 arch/x86/tools/insn_decoder_test.c insn_get_length(&insn); insn 154 arch/x86/tools/insn_decoder_test.c if (insn.length != nb) { insn 160 arch/x86/tools/insn_decoder_test.c "says %d\n", nb, insn.length); insn 162 arch/x86/tools/insn_decoder_test.c dump_insn(stderr, &insn); insn 67 arch/x86/tools/insn_sanity.c static void dump_insn(FILE *fp, struct insn *insn) insn 70 arch/x86/tools/insn_sanity.c dump_field(fp, "prefixes", "\t", &insn->prefixes); insn 71 arch/x86/tools/insn_sanity.c dump_field(fp, "rex_prefix", "\t", &insn->rex_prefix); insn 72 arch/x86/tools/insn_sanity.c dump_field(fp, "vex_prefix", "\t", &insn->vex_prefix); insn 73 arch/x86/tools/insn_sanity.c dump_field(fp, "opcode", "\t", &insn->opcode); insn 74 arch/x86/tools/insn_sanity.c dump_field(fp, "modrm", "\t", &insn->modrm); insn 75 arch/x86/tools/insn_sanity.c dump_field(fp, "sib", "\t", &insn->sib); insn 76 arch/x86/tools/insn_sanity.c dump_field(fp, "displacement", "\t", &insn->displacement); insn 77 arch/x86/tools/insn_sanity.c dump_field(fp, "immediate1", "\t", &insn->immediate1); insn 78 arch/x86/tools/insn_sanity.c dump_field(fp, "immediate2", "\t", &insn->immediate2); insn 80 arch/x86/tools/insn_sanity.c insn->attr, insn->opnd_bytes, insn->addr_bytes); insn 82 arch/x86/tools/insn_sanity.c insn->length, insn->x86_64, insn->kaddr); insn 86 arch/x86/tools/insn_sanity.c unsigned char *insn_buff, struct insn *insn) insn 92 arch/x86/tools/insn_sanity.c dump_insn(fp, insn); insn 225 arch/x86/tools/insn_sanity.c struct insn insn; insn 244 arch/x86/tools/insn_sanity.c insn_init(&insn, insn_buff, sizeof(insn_buff), x86_64); insn 245 arch/x86/tools/insn_sanity.c insn_get_length(&insn); insn 247 arch/x86/tools/insn_sanity.c if (insn.next_byte <= insn.kaddr || insn 248 arch/x86/tools/insn_sanity.c insn.kaddr + MAX_INSN_SIZE < insn.next_byte) { insn 250 arch/x86/tools/insn_sanity.c dump_stream(stderr, "Error: Found an access violation", i, insn_buff, &insn); insn 252 arch/x86/tools/insn_sanity.c } else if (verbose && !insn_complete(&insn)) insn 253 arch/x86/tools/insn_sanity.c dump_stream(stdout, "Info: Found an undecodable input", i, insn_buff, &insn); insn 255 arch/x86/tools/insn_sanity.c dump_insn(stdout, &insn); insn 11 arch/x86/um/fault.c unsigned long insn; insn 35 arch/xtensa/include/asm/cacheasm.h .macro __loop_cache_unroll ar at insn size line_width max_immed insn 56 arch/xtensa/include/asm/cacheasm.h .macro __loop_cache_all ar at insn size line_width max_immed insn 64 arch/xtensa/include/asm/cacheasm.h .macro __loop_cache_range ar as at insn line_width insn 76 arch/xtensa/include/asm/cacheasm.h .macro __loop_cache_page ar at insn line_width max_immed insn 20 arch/xtensa/include/asm/futex.h #define __futex_atomic_op(insn, ret, old, uaddr, arg) \ insn 23 arch/xtensa/include/asm/futex.h insn "\n" \ insn 44 arch/xtensa/include/asm/futex.h #define __futex_atomic_op(insn, ret, old, uaddr, arg) \ insn 47 arch/xtensa/include/asm/futex.h insn "\n" \ insn 154 arch/xtensa/include/asm/uaccess.h #define __put_user_asm(x_, addr_, err_, align, insn, cb)\ insn 157 arch/xtensa/include/asm/uaccess.h "1: "insn" %[x], %[addr], 0 \n" \ insn 220 arch/xtensa/include/asm/uaccess.h #define __get_user_asm(x_, addr_, err_, align, insn, cb) \ insn 225 arch/xtensa/include/asm/uaccess.h "1: "insn" %[x], %[addr], 0 \n" \ insn 78 arch/xtensa/kernel/jump_label.c u32 insn; insn 86 arch/xtensa/kernel/jump_label.c insn = ((d & J_OFFSET_MASK) << 6) | J_INSN; insn 88 arch/xtensa/kernel/jump_label.c insn = ((d & J_OFFSET_MASK) << 8) | J_INSN; insn 91 arch/xtensa/kernel/jump_label.c insn = NOP_INSN; insn 94 arch/xtensa/kernel/jump_label.c patch_text(jump_entry_code(e), &insn, JUMP_LABEL_NOP_SIZE); insn 883 drivers/dma/pl330.c u8 insn[], bool as_manager) insn 888 drivers/dma/pl330.c val = (insn[0] << 16) | (insn[1] << 24); insn 895 drivers/dma/pl330.c val = le32_to_cpu(*((__le32 *)&insn[2])); insn 969 drivers/dma/pl330.c u8 insn[6] = {0, 0, 0, 0, 0, 0}; insn 981 drivers/dma/pl330.c _emit_KILL(0, insn); insn 983 drivers/dma/pl330.c _execute_DBGINSN(thrd, insn, is_manager(thrd)); insn 1000 drivers/dma/pl330.c u8 insn[6] = {0, 0, 0, 0, 0, 0}; insn 1038 drivers/dma/pl330.c _emit_GO(0, insn, &go); insn 1044 drivers/dma/pl330.c _execute_DBGINSN(thrd, insn, true); insn 113 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c u32 insn = nvkm_rd32(device, 0x400308); insn 114 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c nvkm_warn(subdev, "ctxprog timeout %08x\n", insn); insn 280 drivers/misc/lkdtm/bugs.c unsigned char *insn; insn 309 drivers/misc/lkdtm/bugs.c insn = (unsigned char *)native_write_cr4; insn 312 drivers/misc/lkdtm/bugs.c if (insn[i] == 0x0f && insn[i+1] == 0x22 && insn[i+2] == 0xe7) insn 315 drivers/misc/lkdtm/bugs.c if (insn[i] == 0x48 && insn[i+1] == 0x89 && insn 316 drivers/misc/lkdtm/bugs.c insn[i+2] == 0xf8 && insn[i+3] == 0x0f && insn 317 drivers/misc/lkdtm/bugs.c insn[i+4] == 0x22 && insn[i+5] == 0xe0) insn 324 drivers/misc/lkdtm/bugs.c direct_write_cr4 = (void *)(insn + i); insn 47 drivers/net/ethernet/netronome/nfp/bpf/jit.c static void nfp_prog_push(struct nfp_prog *nfp_prog, u64 insn) insn 56 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog->prog[nfp_prog->prog_len] = insn; insn 83 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 85 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = FIELD_PREP(OP_CMD_A_SRC, areg) | insn 96 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 145 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 150 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_BR_BASE | insn 158 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 190 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 195 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_BR_BIT_BASE | insn 204 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 243 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 245 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_BR_ALU_BASE | insn 253 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 277 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 279 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_IMMED_BASE | insn 290 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 324 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 345 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_SHF_BASE | insn 359 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 398 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 400 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_ALU_BASE | insn 411 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 437 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 439 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_MUL_BASE | insn 450 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 492 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 494 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_LDF_BASE | insn 507 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 540 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 insn; insn 542 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = OP_LCSR_BASE | insn 550 drivers/net/ethernet/netronome/nfp/bpf/jit.c nfp_prog_push(nfp_prog, insn); insn 742 drivers/net/ethernet/netronome/nfp/bpf/jit.c off = re_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 744 drivers/net/ethernet/netronome/nfp/bpf/jit.c src_base = reg_a(meta->insn.src_reg * 2); insn 748 drivers/net/ethernet/netronome/nfp/bpf/jit.c addr40_offset(nfp_prog, meta->insn.src_reg * 2, off, &src_base, insn 834 drivers/net/ethernet/netronome/nfp/bpf/jit.c else if (BPF_SIZE(meta->insn.code) != BPF_DW) insn 839 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (BPF_SIZE(meta->insn.code)) { insn 841 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), insn 846 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), insn 850 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_mov(nfp_prog, reg_both(meta->insn.dst_reg * 2), insn 854 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_mov(nfp_prog, reg_both(meta->insn.dst_reg * 2), insn 856 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_mov(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), insn 861 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_SIZE(meta->insn.code) != BPF_DW) insn 862 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), 0); insn 1165 drivers/net/ethernet/netronome/nfp/bpf/jit.c s32 off = nfp_prog->stack_frame_depth + meta->insn.off + ptr_off; insn 1180 drivers/net/ethernet/netronome/nfp/bpf/jit.c stack_off_reg = ur_load_imm_any(nfp_prog, meta->insn.off, insn 1297 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1298 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 1305 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2, alu_op, imm & ~0U); insn 1306 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2 + 1, alu_op, imm >> 32); insn 1315 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = meta->insn.dst_reg * 2, src = meta->insn.src_reg * 2; insn 1328 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1329 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 1331 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, dst, alu_op, insn->imm); insn 1341 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = meta->insn.dst_reg * 2, src = meta->insn.src_reg * 2; insn 1361 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1363 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_test_reg_one(nfp_prog, insn->dst_reg * 2, alu_op, insn 1364 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn->src_reg * 2, br_mask, insn->off); insn 1366 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_test_reg_one(nfp_prog, insn->dst_reg * 2 + 1, alu_op, insn 1367 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn->src_reg * 2 + 1, br_mask, insn->off); insn 1390 drivers/net/ethernet/netronome/nfp/bpf/jit.c op = BPF_OP(meta->insn.code) >> 4; insn 1402 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1403 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 1406 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 reg = insn->dst_reg * 2; insn 1432 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, code->br_mask, insn->off, 0); insn 1439 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1447 drivers/net/ethernet/netronome/nfp/bpf/jit.c areg = insn->dst_reg * 2; insn 1448 drivers/net/ethernet/netronome/nfp/bpf/jit.c breg = insn->src_reg * 2; insn 1460 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, code->br_mask, insn->off, 0); insn 1505 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1509 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst_reg = insn->dst_reg; insn 1515 drivers/net/ethernet/netronome/nfp/bpf/jit.c multiplier = reg_b(insn->src_reg * 2); insn 1518 drivers/net/ethernet/netronome/nfp/bpf/jit.c u32 imm = insn->imm; insn 1811 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_none(), reg_a(meta->insn.src_reg * 2), insn 1820 drivers/net/ethernet/netronome/nfp/bpf/jit.c pv_qsel_val(nfp_prog), 0x1, reg_b(meta->insn.src_reg * 2), insn 1838 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1839 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 1840 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 src = insn->src_reg * 2; insn 1842 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (insn->src_reg == BPF_REG_10) { insn 1861 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = meta->insn.imm; /* sign extend */ insn 1863 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2), imm & ~0U); insn 1864 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), imm >> 32); insn 1876 drivers/net/ethernet/netronome/nfp/bpf/jit.c return wrp_alu64_imm(nfp_prog, meta, ALU_OP_XOR, !meta->insn.imm); insn 1886 drivers/net/ethernet/netronome/nfp/bpf/jit.c return wrp_alu64_imm(nfp_prog, meta, ALU_OP_AND, !~meta->insn.imm); insn 1896 drivers/net/ethernet/netronome/nfp/bpf/jit.c return wrp_alu64_imm(nfp_prog, meta, ALU_OP_OR, !meta->insn.imm); insn 1901 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1903 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2), insn 1904 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2), ALU_OP_ADD, insn 1905 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->src_reg * 2)); insn 1906 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2 + 1), insn 1907 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2 + 1), ALU_OP_ADD_C, insn 1908 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->src_reg * 2 + 1)); insn 1915 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1916 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 1918 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2, ALU_OP_ADD, imm & ~0U); insn 1919 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2 + 1, ALU_OP_ADD_C, imm >> 32); insn 1926 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1928 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2), insn 1929 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2), ALU_OP_SUB, insn 1930 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->src_reg * 2)); insn 1931 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2 + 1), insn 1932 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2 + 1), ALU_OP_SUB_C, insn 1933 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->src_reg * 2 + 1)); insn 1940 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1941 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 1943 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2, ALU_OP_SUB, imm & ~0U); insn 1944 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_alu_imm(nfp_prog, insn->dst_reg * 2 + 1, ALU_OP_SUB_C, imm >> 32); insn 1961 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1963 drivers/net/ethernet/netronome/nfp/bpf/jit.c return wrp_div_imm(nfp_prog, insn->dst_reg * 2, insn->imm); insn 1971 drivers/net/ethernet/netronome/nfp/bpf/jit.c return wrp_div_imm(nfp_prog, meta->insn.dst_reg * 2, meta->umin_src); insn 1976 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 1978 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2), reg_imm(0), insn 1979 drivers/net/ethernet/netronome/nfp/bpf/jit.c ALU_OP_SUB, reg_b(insn->dst_reg * 2)); insn 1980 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_both(insn->dst_reg * 2 + 1), reg_imm(0), insn 1981 drivers/net/ethernet/netronome/nfp/bpf/jit.c ALU_OP_SUB_C, reg_b(insn->dst_reg * 2 + 1)); insn 2021 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2022 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2024 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __shl_imm64(nfp_prog, dst, insn->imm); insn 2060 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2064 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2070 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2135 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2136 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2138 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __shr_imm64(nfp_prog, dst, insn->imm); insn 2172 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2176 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2182 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2247 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2248 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2250 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __ashr_imm64(nfp_prog, dst, insn->imm); insn 2289 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2293 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2299 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2328 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2330 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_reg_mov(nfp_prog, insn->dst_reg * 2, insn->src_reg * 2); insn 2331 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(insn->dst_reg * 2 + 1), 0); insn 2338 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2340 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(insn->dst_reg * 2), insn->imm); insn 2341 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(insn->dst_reg * 2 + 1), 0); insn 2418 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = meta->insn.dst_reg * 2; insn 2444 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2448 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2454 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2468 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2469 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2471 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __ashr_imm(nfp_prog, meta, dst, insn->imm); insn 2487 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2488 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2490 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __shr_imm(nfp_prog, meta, dst, insn->imm); insn 2495 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2499 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2505 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2526 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2527 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst = insn->dst_reg * 2; insn 2529 drivers/net/ethernet/netronome/nfp/bpf/jit.c return __shl_imm(nfp_prog, meta, dst, insn->imm); insn 2534 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2538 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = insn->dst_reg * 2; insn 2544 drivers/net/ethernet/netronome/nfp/bpf/jit.c src = insn->src_reg * 2; insn 2552 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 2553 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 gpr = insn->dst_reg * 2; insn 2555 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (insn->imm) { insn 2585 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst = prev->insn.dst_reg * 2; insn 2586 drivers/net/ethernet/netronome/nfp/bpf/jit.c imm_lo = prev->insn.imm; insn 2587 drivers/net/ethernet/netronome/nfp/bpf/jit.c imm_hi = meta->insn.imm; insn 2608 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ld(nfp_prog, meta, meta->insn.imm, 1); insn 2613 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ld(nfp_prog, meta, meta->insn.imm, 2); insn 2618 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ld(nfp_prog, meta, meta->insn.imm, 4); insn 2623 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ind_ld(nfp_prog, meta, meta->insn.imm, insn 2624 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.src_reg * 2, 1); insn 2629 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ind_ld(nfp_prog, meta, meta->insn.imm, insn 2630 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.src_reg * 2, 2); insn 2635 drivers/net/ethernet/netronome/nfp/bpf/jit.c return construct_data_ind_ld(nfp_prog, meta, meta->insn.imm, insn 2636 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.src_reg * 2, 4); insn 2644 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.dst_reg * 2, meta->insn.src_reg * 2, insn 2651 drivers/net/ethernet/netronome/nfp/bpf/jit.c swreg dst = reg_both(meta->insn.dst_reg * 2); insn 2653 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (meta->insn.off) { insn 2674 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), 0); insn 2682 drivers/net/ethernet/netronome/nfp/bpf/jit.c swreg dst = reg_both(meta->insn.dst_reg * 2); insn 2684 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (meta->insn.off) { insn 2700 drivers/net/ethernet/netronome/nfp/bpf/jit.c wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), 0); insn 2711 drivers/net/ethernet/netronome/nfp/bpf/jit.c tmp_reg = re_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 2713 drivers/net/ethernet/netronome/nfp/bpf/jit.c return data_ld_host_order_addr32(nfp_prog, meta, meta->insn.src_reg * 2, insn 2714 drivers/net/ethernet/netronome/nfp/bpf/jit.c tmp_reg, meta->insn.dst_reg * 2, size); insn 2723 drivers/net/ethernet/netronome/nfp/bpf/jit.c tmp_reg = re_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 2725 drivers/net/ethernet/netronome/nfp/bpf/jit.c return data_ld_host_order_addr40(nfp_prog, meta, meta->insn.src_reg * 2, insn 2726 drivers/net/ethernet/netronome/nfp/bpf/jit.c tmp_reg, meta->insn.dst_reg * 2, size); insn 2740 drivers/net/ethernet/netronome/nfp/bpf/jit.c src_base = reg_a(meta->insn.src_reg * 2); insn 2761 drivers/net/ethernet/netronome/nfp/bpf/jit.c s16 insn_off = meta->insn.off - range_start; insn 2763 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst_gpr = meta->insn.dst_reg * 2; insn 2817 drivers/net/ethernet/netronome/nfp/bpf/jit.c idx = (meta->insn.off - meta->pkt_cache.range_start) / REG_WIDTH; insn 2818 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst_gpr = meta->insn.dst_reg * 2; insn 2843 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 off = meta->insn.off - meta->pkt_cache.range_start; insn 2910 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = meta->insn.imm; /* sign extend */ insn 2913 drivers/net/ethernet/netronome/nfp/bpf/jit.c off_reg = re_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 2915 drivers/net/ethernet/netronome/nfp/bpf/jit.c return data_st_host_order(nfp_prog, meta->insn.dst_reg * 2, off_reg, insn 2954 drivers/net/ethernet/netronome/nfp/bpf/jit.c off_reg = re_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 2956 drivers/net/ethernet/netronome/nfp/bpf/jit.c return data_stx_host_order(nfp_prog, meta->insn.dst_reg * 2, off_reg, insn 2957 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.src_reg * 2, size); insn 2965 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.src_reg * 2, meta->insn.dst_reg * 2, insn 2971 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (meta->insn.off) { insn 3020 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst_gpr = meta->insn.dst_reg * 2; insn 3021 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 src_gpr = meta->insn.src_reg * 2; insn 3025 drivers/net/ethernet/netronome/nfp/bpf/jit.c off = ur_load_imm_any(nfp_prog, meta->insn.off, imm_b(nfp_prog)); insn 3035 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (meta->insn.off) { insn 3059 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BLO, full_add, meta->insn.off ? 2 : 0); insn 3064 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (!meta->insn.off) { insn 3124 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_UNC, meta->insn.off, 0); insn 3131 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 3132 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 3135 drivers/net/ethernet/netronome/nfp/bpf/jit.c or1 = reg_a(insn->dst_reg * 2); insn 3136 drivers/net/ethernet/netronome/nfp/bpf/jit.c or2 = reg_b(insn->dst_reg * 2 + 1); insn 3141 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2), ALU_OP_XOR, tmp_reg); insn 3148 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2 + 1), ALU_OP_XOR, tmp_reg); insn 3153 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BEQ, insn->off, 0); insn 3160 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 3163 drivers/net/ethernet/netronome/nfp/bpf/jit.c tmp_reg = ur_load_imm_any(nfp_prog, insn->imm, imm_b(nfp_prog)); insn 3165 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2), ALU_OP_XOR, tmp_reg); insn 3166 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BEQ, insn->off, 0); insn 3173 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 3174 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 3175 drivers/net/ethernet/netronome/nfp/bpf/jit.c u8 dst_gpr = insn->dst_reg * 2; insn 3188 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BNE, insn->off, 0); insn 3195 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 3196 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 imm = insn->imm; /* sign extend */ insn 3203 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->dst_reg * 2)); insn 3205 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, reg_none(), reg_a(insn->dst_reg * 2), insn 3206 drivers/net/ethernet/netronome/nfp/bpf/jit.c ALU_OP_OR, reg_b(insn->dst_reg * 2 + 1)); insn 3207 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BNE, insn->off, 0); insn 3213 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2), ALU_OP_XOR, tmp_reg); insn 3214 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BNE, insn->off, 0); insn 3221 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2 + 1), ALU_OP_XOR, tmp_reg); insn 3222 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BNE, insn->off, 0); insn 3229 drivers/net/ethernet/netronome/nfp/bpf/jit.c const struct bpf_insn *insn = &meta->insn; insn 3231 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_alu(nfp_prog, imm_a(nfp_prog), reg_a(insn->dst_reg * 2), insn 3232 drivers/net/ethernet/netronome/nfp/bpf/jit.c ALU_OP_XOR, reg_b(insn->src_reg * 2)); insn 3235 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_a(insn->dst_reg * 2 + 1), ALU_OP_XOR, insn 3236 drivers/net/ethernet/netronome/nfp/bpf/jit.c reg_b(insn->src_reg * 2 + 1)); insn 3240 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_BEQ, insn->off, 0); insn 3317 drivers/net/ethernet/netronome/nfp/bpf/jit.c emit_br(nfp_prog, BR_UNC, meta->insn.imm, 1); insn 3343 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (meta->insn.imm) { insn 3559 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (meta->insn.code == (BPF_JMP | BPF_EXIT) && insn 3580 drivers/net/ethernet/netronome/nfp/bpf/jit.c br_idx, meta->insn.code, nfp_prog->prog[br_idx]); insn 3584 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (meta->insn.code == (BPF_JMP | BPF_EXIT)) insn 3839 drivers/net/ethernet/netronome/nfp/bpf/jit.c instr_cb_t cb = instr_cb[meta->insn.code]; insn 3887 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn insn = meta->insn; insn 3890 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (insn.code == (BPF_ALU64 | BPF_XOR | BPF_X) && insn 3891 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn.src_reg == insn.dst_reg) insn 3895 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (insn.code == (BPF_ALU64 | BPF_MOV | BPF_X) && insn 3896 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn.src_reg == 1 && insn.dst_reg == 6) insn 3913 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn insn = meta->insn; insn 3920 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_SRC(insn.code) != BPF_K) insn 3922 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (insn.imm >= 0) insn 3926 drivers/net/ethernet/netronome/nfp/bpf/jit.c switch (BPF_OP(insn.code)) { insn 3937 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_OP(insn.code) == BPF_ADD) insn 3938 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn.code = BPF_CLASS(insn.code) | BPF_SUB; insn 3939 drivers/net/ethernet/netronome/nfp/bpf/jit.c else if (BPF_OP(insn.code) == BPF_SUB) insn 3940 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn.code = BPF_CLASS(insn.code) | BPF_ADD; insn 3944 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.code = insn.code | BPF_K; insn 3947 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta->insn.imm = -insn.imm; insn 3962 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn insn, next; insn 3964 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = meta1->insn; insn 3965 drivers/net/ethernet/netronome/nfp/bpf/jit.c next = meta2->insn; insn 3967 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_CLASS(insn.code) != BPF_LD) insn 3969 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_MODE(insn.code) != BPF_ABS && insn 3970 drivers/net/ethernet/netronome/nfp/bpf/jit.c BPF_MODE(insn.code) != BPF_IND) insn 3976 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (!exp_mask[BPF_SIZE(insn.code)]) insn 3978 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (exp_mask[BPF_SIZE(insn.code)] != next.imm) insn 3996 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn insn, next1, next2; insn 3998 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = meta1->insn; insn 3999 drivers/net/ethernet/netronome/nfp/bpf/jit.c next1 = meta2->insn; insn 4000 drivers/net/ethernet/netronome/nfp/bpf/jit.c next2 = meta3->insn; insn 4002 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_CLASS(insn.code) != BPF_LD) insn 4004 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_MODE(insn.code) != BPF_ABS && insn 4005 drivers/net/ethernet/netronome/nfp/bpf/jit.c BPF_MODE(insn.code) != BPF_IND) insn 4007 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_SIZE(insn.code) != BPF_W) insn 4046 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *ld = &ld_meta->insn; insn 4047 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &st_meta->insn; insn 4086 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *ld = &ld_meta->insn; insn 4087 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &st_meta->insn; insn 4150 drivers/net/ethernet/netronome/nfp/bpf/jit.c head_ld_off = head_ld_meta->insn.off + head_ld_meta->ptr.off; insn 4151 drivers/net/ethernet/netronome/nfp/bpf/jit.c head_st_off = head_st_meta->insn.off + head_st_meta->ptr.off; insn 4190 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *ld = &meta1->insn; insn 4191 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &meta2->insn; insn 4213 drivers/net/ethernet/netronome/nfp/bpf/jit.c s16 head_ld_off = head_ld_meta->insn.off; insn 4216 drivers/net/ethernet/netronome/nfp/bpf/jit.c head_ld_meta->insn.off = prev_ld_off; insn 4217 drivers/net/ethernet/netronome/nfp/bpf/jit.c head_st_meta->insn.off = prev_st_off; insn 4222 drivers/net/ethernet/netronome/nfp/bpf/jit.c head_ld_meta->paired_st = &head_st_meta->insn; insn 4275 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *insn; insn 4286 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn = &meta->insn; insn 4289 drivers/net/ethernet/netronome/nfp/bpf/jit.c insn->code == (BPF_JMP | BPF_CALL) || insn 4325 drivers/net/ethernet/netronome/nfp/bpf/jit.c s16 end, off = insn->off; insn 4334 drivers/net/ethernet/netronome/nfp/bpf/jit.c end = off + BPF_LDST_BYTES(insn); insn 4359 drivers/net/ethernet/netronome/nfp/bpf/jit.c range_start = insn->off; insn 4360 drivers/net/ethernet/netronome/nfp/bpf/jit.c range_end = insn->off + BPF_LDST_BYTES(insn); insn 4409 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (meta1->insn.code != (BPF_LD | BPF_IMM | BPF_DW) || insn 4410 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta1->insn.src_reg != BPF_PSEUDO_MAP_FD) insn 4413 drivers/net/ethernet/netronome/nfp/bpf/jit.c map = (void *)(unsigned long)((u32)meta1->insn.imm | insn 4414 drivers/net/ethernet/netronome/nfp/bpf/jit.c (u64)meta2->insn.imm << 32); insn 4422 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta1->insn.imm = id; insn 4423 drivers/net/ethernet/netronome/nfp/bpf/jit.c meta2->insn.imm = 0; insn 4492 drivers/net/ethernet/netronome/nfp/bpf/jit.c u64 code = meta->insn.code; insn 4509 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst_idx = meta->n + 1 + meta->insn.imm; insn 4511 drivers/net/ethernet/netronome/nfp/bpf/jit.c dst_idx = meta->n + 1 + meta->insn.off; insn 301 drivers/net/ethernet/netronome/nfp/bpf/main.h struct bpf_insn insn; insn 353 drivers/net/ethernet/netronome/nfp/bpf/main.h return BPF_CLASS(meta->insn.code); insn 358 drivers/net/ethernet/netronome/nfp/bpf/main.h return BPF_SRC(meta->insn.code); insn 363 drivers/net/ethernet/netronome/nfp/bpf/main.h return BPF_OP(meta->insn.code); insn 368 drivers/net/ethernet/netronome/nfp/bpf/main.h return BPF_MODE(meta->insn.code); insn 378 drivers/net/ethernet/netronome/nfp/bpf/main.h return (meta->insn.code & ~BPF_SIZE_MASK) == (BPF_LDX | BPF_MEM); insn 398 drivers/net/ethernet/netronome/nfp/bpf/main.h return (meta->insn.code & ~BPF_SIZE_MASK) == (BPF_STX | BPF_MEM); insn 413 drivers/net/ethernet/netronome/nfp/bpf/main.h u8 code = meta->insn.code; insn 421 drivers/net/ethernet/netronome/nfp/bpf/main.h u8 code = meta->insn.code; insn 433 drivers/net/ethernet/netronome/nfp/bpf/main.h return (meta->insn.code & ~BPF_SIZE_MASK) == (BPF_STX | BPF_XADD); insn 462 drivers/net/ethernet/netronome/nfp/bpf/main.h struct bpf_insn insn = meta->insn; insn 464 drivers/net/ethernet/netronome/nfp/bpf/main.h return insn.code == (BPF_JMP | BPF_CALL) && insn 465 drivers/net/ethernet/netronome/nfp/bpf/main.h insn.src_reg != BPF_PSEUDO_CALL; insn 470 drivers/net/ethernet/netronome/nfp/bpf/main.h struct bpf_insn insn = meta->insn; insn 472 drivers/net/ethernet/netronome/nfp/bpf/main.h return insn.code == (BPF_JMP | BPF_CALL) && insn 473 drivers/net/ethernet/netronome/nfp/bpf/main.h insn.src_reg == BPF_PSEUDO_CALL; insn 569 drivers/net/ethernet/netronome/nfp/bpf/main.h struct bpf_insn *insn); insn 158 drivers/net/ethernet/netronome/nfp/bpf/offload.c meta->insn = prog[i]; insn 178 drivers/net/ethernet/netronome/nfp/bpf/verifier.c u32 func_id = meta->insn.imm; insn 431 drivers/net/ethernet/netronome/nfp/bpf/verifier.c off = reg->var_off.value + meta->insn.off + reg->off; insn 432 drivers/net/ethernet/netronome/nfp/bpf/verifier.c size = BPF_LDST_BYTES(&meta->insn); insn 505 drivers/net/ethernet/netronome/nfp/bpf/verifier.c const struct bpf_reg_state *reg = cur_regs(env) + meta->insn.dst_reg; insn 510 drivers/net/ethernet/netronome/nfp/bpf/verifier.c switch (meta->insn.off) { insn 522 drivers/net/ethernet/netronome/nfp/bpf/verifier.c return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); insn 529 drivers/net/ethernet/netronome/nfp/bpf/verifier.c const struct bpf_reg_state *sreg = cur_regs(env) + meta->insn.src_reg; insn 530 drivers/net/ethernet/netronome/nfp/bpf/verifier.c const struct bpf_reg_state *dreg = cur_regs(env) + meta->insn.dst_reg; insn 547 drivers/net/ethernet/netronome/nfp/bpf/verifier.c return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); insn 555 drivers/net/ethernet/netronome/nfp/bpf/verifier.c cur_regs(env) + meta->insn.src_reg; insn 557 drivers/net/ethernet/netronome/nfp/bpf/verifier.c cur_regs(env) + meta->insn.dst_reg; insn 586 drivers/net/ethernet/netronome/nfp/bpf/verifier.c mbpf_src(meta) == BPF_K && meta->insn.imm < 0) { insn 617 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (mbpf_src(meta) == BPF_K && meta->insn.imm < 0) { insn 635 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!nfp_bpf_supported_opcode(meta->insn.code)) { insn 637 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->insn.code); insn 641 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (meta->insn.src_reg >= MAX_BPF_REG || insn 642 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->insn.dst_reg >= MAX_BPF_REG) { insn 649 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (meta->insn.code == (BPF_JMP | BPF_EXIT)) insn 654 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->insn.src_reg); insn 679 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (meta->insn.dst_reg >= BPF_REG_6 && insn 680 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->insn.dst_reg <= BPF_REG_9) insn 728 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->n + 1 + meta->insn.imm); insn 803 drivers/net/ethernet/netronome/nfp/bpf/verifier.c struct bpf_insn *insn) insn 814 drivers/net/ethernet/netronome/nfp/bpf/verifier.c insn->code == (BPF_JMP | BPF_JA | BPF_K)) { insn 817 drivers/net/ethernet/netronome/nfp/bpf/verifier.c tgt_off = off + insn->off + 1; insn 819 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!insn->off) { insn 832 drivers/net/ethernet/netronome/nfp/bpf/verifier.c meta->insn.code, insn->code); insn 303 drivers/net/ethernet/netronome/nfp/nfp_asm.c int nfp_ustore_check_valid_no_ecc(u64 insn) insn 305 drivers/net/ethernet/netronome/nfp/nfp_asm.c if (insn & ~GENMASK_ULL(NFP_USTORE_OP_BITS, 0)) insn 311 drivers/net/ethernet/netronome/nfp/nfp_asm.c u64 nfp_ustore_calc_ecc_insn(u64 insn) insn 317 drivers/net/ethernet/netronome/nfp/nfp_asm.c ecc |= parity(nfp_ustore_ecc_polynomials[i] & insn) << i; insn 319 drivers/net/ethernet/netronome/nfp/nfp_asm.c return insn | (u64)ecc << NFP_USTORE_OP_BITS; insn 64 drivers/net/ethernet/netronome/nfp/nfp_asm.h static inline bool nfp_is_br(u64 insn) insn 66 drivers/net/ethernet/netronome/nfp/nfp_asm.h return (insn & OP_BR_BASE_MASK) == OP_BR_BASE || insn 67 drivers/net/ethernet/netronome/nfp/nfp_asm.h (insn & OP_BR_BIT_BASE_MASK) == OP_BR_BIT_BASE; insn 397 drivers/net/ethernet/netronome/nfp/nfp_asm.h int nfp_ustore_check_valid_no_ecc(u64 insn); insn 398 drivers/net/ethernet/netronome/nfp/nfp_asm.h u64 nfp_ustore_calc_ecc_insn(u64 insn); insn 492 drivers/staging/comedi/comedi.h unsigned int insn; insn 67 drivers/staging/comedi/comedi_compat32.c unsigned int insn; insn 309 drivers/staging/comedi/comedi_compat32.c static int get_compat_insn(struct comedi_insn __user *insn, insn 321 drivers/staging/comedi/comedi_compat32.c !access_ok(insn, sizeof(*insn))) insn 324 drivers/staging/comedi/comedi_compat32.c err |= __get_user(temp.uint, &insn32->insn); insn 325 drivers/staging/comedi/comedi_compat32.c err |= __put_user(temp.uint, &insn->insn); insn 327 drivers/staging/comedi/comedi_compat32.c err |= __put_user(temp.uint, &insn->n); insn 329 drivers/staging/comedi/comedi_compat32.c err |= __put_user(compat_ptr(temp.uptr), &insn->data); insn 331 drivers/staging/comedi/comedi_compat32.c err |= __put_user(temp.uint, &insn->subdev); insn 333 drivers/staging/comedi/comedi_compat32.c err |= __put_user(temp.uint, &insn->chanspec); insn 342 drivers/staging/comedi/comedi_compat32.c struct comedi_insn insn[1]; insn 365 drivers/staging/comedi/comedi_compat32.c insn[n_insns])); insn 372 drivers/staging/comedi/comedi_compat32.c err |= __put_user(&s->insn[0], &s->insnlist.insns); insn 378 drivers/staging/comedi/comedi_compat32.c rc = get_compat_insn(&s->insn[n], &insn32[n]); insn 390 drivers/staging/comedi/comedi_compat32.c struct comedi_insn __user *insn; insn 395 drivers/staging/comedi/comedi_compat32.c insn = compat_alloc_user_space(sizeof(*insn)); insn 397 drivers/staging/comedi/comedi_compat32.c rc = get_compat_insn(insn, insn32); insn 401 drivers/staging/comedi/comedi_compat32.c return translated_ioctl(file, COMEDI_INSN, (unsigned long)insn); insn 1182 drivers/staging/comedi/comedi_fops.c static int check_insn_config_length(struct comedi_insn *insn, insn 1185 drivers/staging/comedi/comedi_fops.c if (insn->n < 1) insn 1193 drivers/staging/comedi/comedi_fops.c if (insn->n == 1) insn 1210 drivers/staging/comedi/comedi_fops.c if (insn->n == 2) insn 1222 drivers/staging/comedi/comedi_fops.c if (insn->n == 3) insn 1228 drivers/staging/comedi/comedi_fops.c if (insn->n == 5) insn 1232 drivers/staging/comedi/comedi_fops.c if (insn->n == 6) insn 1236 drivers/staging/comedi/comedi_fops.c if (insn->n >= 4) insn 1247 drivers/staging/comedi/comedi_fops.c pr_warn("Assuming n=%i is correct\n", insn->n); insn 1253 drivers/staging/comedi/comedi_fops.c static int check_insn_device_config_length(struct comedi_insn *insn, insn 1256 drivers/staging/comedi/comedi_fops.c if (insn->n < 1) insn 1263 drivers/staging/comedi/comedi_fops.c if (insn->n == 3) insn 1272 drivers/staging/comedi/comedi_fops.c if (insn->n >= 2) insn 1305 drivers/staging/comedi/comedi_fops.c static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, insn 1313 drivers/staging/comedi/comedi_fops.c if (insn->insn & INSN_MASK_SPECIAL) { insn 1316 drivers/staging/comedi/comedi_fops.c switch (insn->insn) { insn 1321 drivers/staging/comedi/comedi_fops.c if (insn->n != 2) { insn 1335 drivers/staging/comedi/comedi_fops.c if (insn->n != 1 || data[0] >= 100000) { insn 1343 drivers/staging/comedi/comedi_fops.c if (insn->n != 1) { insn 1347 drivers/staging/comedi/comedi_fops.c if (insn->subdev >= dev->n_subdevices) { insn 1350 drivers/staging/comedi/comedi_fops.c insn->subdev); insn 1354 drivers/staging/comedi/comedi_fops.c s = &dev->subdevices[insn->subdev]; insn 1370 drivers/staging/comedi/comedi_fops.c ret = check_insn_device_config_length(insn, data); insn 1379 drivers/staging/comedi/comedi_fops.c data[1] = (insn->n - 2) / 2; insn 1385 drivers/staging/comedi/comedi_fops.c ret = dev->insn_device_config(dev, insn, data); insn 1396 drivers/staging/comedi/comedi_fops.c if (insn->subdev >= dev->n_subdevices) { insn 1398 drivers/staging/comedi/comedi_fops.c insn->subdev); insn 1402 drivers/staging/comedi/comedi_fops.c s = &dev->subdevices[insn->subdev]; insn 1406 drivers/staging/comedi/comedi_fops.c insn->subdev); insn 1418 drivers/staging/comedi/comedi_fops.c ret = comedi_check_chanlist(s, 1, &insn->chanspec); insn 1431 drivers/staging/comedi/comedi_fops.c switch (insn->insn) { insn 1433 drivers/staging/comedi/comedi_fops.c ret = s->insn_read(dev, s, insn, data); insn 1442 drivers/staging/comedi/comedi_fops.c ? s->maxdata_list[CR_CHAN(insn->chanspec)] insn 1444 drivers/staging/comedi/comedi_fops.c for (i = 0; i < insn->n; ++i) { insn 1453 drivers/staging/comedi/comedi_fops.c ret = s->insn_write(dev, s, insn, data); insn 1462 drivers/staging/comedi/comedi_fops.c if (insn->n != 2) { insn 1474 drivers/staging/comedi/comedi_fops.c shift = CR_CHAN(insn->chanspec); insn 1476 drivers/staging/comedi/comedi_fops.c insn->chanspec = 0; insn 1481 drivers/staging/comedi/comedi_fops.c ret = s->insn_bits(dev, s, insn, data); insn 1488 drivers/staging/comedi/comedi_fops.c ret = check_insn_config_length(insn, data); insn 1491 drivers/staging/comedi/comedi_fops.c ret = s->insn_config(dev, s, insn, data); insn 1570 drivers/staging/comedi/comedi_fops.c if (insns[i].insn & INSN_MASK_WRITE) { insn 1582 drivers/staging/comedi/comedi_fops.c if (insns[i].insn & INSN_MASK_READ) { insn 1621 drivers/staging/comedi/comedi_fops.c struct comedi_insn insn; insn 1627 drivers/staging/comedi/comedi_fops.c if (copy_from_user(&insn, arg, sizeof(insn))) insn 1630 drivers/staging/comedi/comedi_fops.c n_data = max(n_data, insn.n); insn 1633 drivers/staging/comedi/comedi_fops.c if (insn.n > MAX_SAMPLES) { insn 1634 drivers/staging/comedi/comedi_fops.c insn.n = MAX_SAMPLES; insn 1644 drivers/staging/comedi/comedi_fops.c if (insn.insn & INSN_MASK_WRITE) { insn 1646 drivers/staging/comedi/comedi_fops.c insn.data, insn 1647 drivers/staging/comedi/comedi_fops.c insn.n * sizeof(unsigned int))) { insn 1652 drivers/staging/comedi/comedi_fops.c ret = parse_insn(dev, &insn, data, file); insn 1655 drivers/staging/comedi/comedi_fops.c if (insn.insn & INSN_MASK_READ) { insn 1656 drivers/staging/comedi/comedi_fops.c if (copy_to_user(insn.data, insn 1658 drivers/staging/comedi/comedi_fops.c insn.n * sizeof(unsigned int))) { insn 1663 drivers/staging/comedi/comedi_fops.c ret = insn.n; insn 51 drivers/staging/comedi/comedi_internal.h struct comedi_insn *insn, unsigned int *data); insn 181 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data); insn 183 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data); insn 185 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data); insn 188 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, insn 578 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data); insn 989 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, insn 992 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned long context), insn 1000 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data, insn 1020 drivers/staging/comedi/comedidev.h struct comedi_insn *insn, unsigned int *data); insn 218 drivers/staging/comedi/drivers.c struct comedi_insn *insn, unsigned int *data) insn 231 drivers/staging/comedi/drivers.c struct comedi_insn *insn, unsigned int *data) insn 255 drivers/staging/comedi/drivers.c struct comedi_insn *insn, insn 258 drivers/staging/comedi/drivers.c unsigned int chan = CR_CHAN(insn->chanspec); insn 264 drivers/staging/comedi/drivers.c for (i = 0; i < insn->n; i++) insn 267 drivers/staging/comedi/drivers.c return insn->n; insn 290 drivers/staging/comedi/drivers.c struct comedi_insn *insn, insn 293 drivers/staging/comedi/drivers.c struct comedi_insn *insn, insn 301 drivers/staging/comedi/drivers.c ret = cb(dev, s, insn, context); insn 338 drivers/staging/comedi/drivers.c struct comedi_insn *insn, insn 342 drivers/staging/comedi/drivers.c unsigned int chan_mask = 1 << CR_CHAN(insn->chanspec); insn 358 drivers/staging/comedi/drivers.c return insn->n; insn 609 drivers/staging/comedi/drivers.c struct comedi_insn *insn, insn 613 drivers/staging/comedi/drivers.c unsigned int chan = CR_CHAN(insn->chanspec); insn 620 drivers/staging/comedi/drivers.c _insn.insn = INSN_BITS; insn 623 drivers/staging/comedi/drivers.c _insn.subdev = insn->subdev; insn 625 drivers/staging/comedi/drivers.c if (insn->insn == INSN_WRITE) { insn 636 drivers/staging/comedi/drivers.c if (insn->insn == INSN_READ) insn 105 drivers/staging/comedi/drivers/addi_apci_1032.c struct comedi_insn *insn, insn 168 drivers/staging/comedi/drivers/addi_apci_1032.c return insn->n; insn 173 drivers/staging/comedi/drivers/addi_apci_1032.c struct comedi_insn *insn, insn 281 drivers/staging/comedi/drivers/addi_apci_1032.c struct comedi_insn *insn, insn 286 drivers/staging/comedi/drivers/addi_apci_1032.c return insn->n; insn 449 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 525 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 530 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 535 drivers/staging/comedi/drivers/addi_apci_1500.c return apci1500_di_cfg_trig(dev, s, insn, data); insn 543 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 550 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 555 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 565 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 570 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 574 drivers/staging/comedi/drivers/addi_apci_1500.c unsigned int chan = CR_CHAN(insn->chanspec); insn 696 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 701 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 704 drivers/staging/comedi/drivers/addi_apci_1500.c unsigned int chan = CR_CHAN(insn->chanspec); insn 712 drivers/staging/comedi/drivers/addi_apci_1500.c if (insn->n) insn 715 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 720 drivers/staging/comedi/drivers/addi_apci_1500.c struct comedi_insn *insn, insn 723 drivers/staging/comedi/drivers/addi_apci_1500.c unsigned int chan = CR_CHAN(insn->chanspec); insn 732 drivers/staging/comedi/drivers/addi_apci_1500.c for (i = 0; i < insn->n; i++) { insn 741 drivers/staging/comedi/drivers/addi_apci_1500.c return insn->n; insn 69 drivers/staging/comedi/drivers/addi_apci_1516.c struct comedi_insn *insn, insn 74 drivers/staging/comedi/drivers/addi_apci_1516.c return insn->n; insn 79 drivers/staging/comedi/drivers/addi_apci_1516.c struct comedi_insn *insn, insn 89 drivers/staging/comedi/drivers/addi_apci_1516.c return insn->n; insn 265 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 270 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 275 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 285 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 290 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 295 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 330 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 397 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 402 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 485 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 529 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 534 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 540 drivers/staging/comedi/drivers/addi_apci_1564.c if (insn->n) { insn 541 drivers/staging/comedi/drivers/addi_apci_1564.c unsigned int val = data[insn->n - 1]; insn 546 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 551 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 558 drivers/staging/comedi/drivers/addi_apci_1564.c for (i = 0; i < insn->n; i++) insn 561 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 566 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 570 drivers/staging/comedi/drivers/addi_apci_1564.c unsigned int chan = CR_CHAN(insn->chanspec); insn 611 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 616 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 620 drivers/staging/comedi/drivers/addi_apci_1564.c unsigned int chan = CR_CHAN(insn->chanspec); insn 624 drivers/staging/comedi/drivers/addi_apci_1564.c if (insn->n) { insn 625 drivers/staging/comedi/drivers/addi_apci_1564.c unsigned int val = data[insn->n - 1]; insn 630 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 635 drivers/staging/comedi/drivers/addi_apci_1564.c struct comedi_insn *insn, insn 639 drivers/staging/comedi/drivers/addi_apci_1564.c unsigned int chan = CR_CHAN(insn->chanspec); insn 644 drivers/staging/comedi/drivers/addi_apci_1564.c for (i = 0; i < insn->n; i++) insn 647 drivers/staging/comedi/drivers/addi_apci_1564.c return insn->n; insn 50 drivers/staging/comedi/drivers/addi_apci_16xx.c struct comedi_insn *insn, insn 53 drivers/staging/comedi/drivers/addi_apci_16xx.c unsigned int chan = CR_CHAN(insn->chanspec); insn 66 drivers/staging/comedi/drivers/addi_apci_16xx.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 72 drivers/staging/comedi/drivers/addi_apci_16xx.c return insn->n; insn 77 drivers/staging/comedi/drivers/addi_apci_16xx.c struct comedi_insn *insn, insn 85 drivers/staging/comedi/drivers/addi_apci_16xx.c return insn->n; insn 45 drivers/staging/comedi/drivers/addi_apci_2032.c struct comedi_insn *insn, insn 55 drivers/staging/comedi/drivers/addi_apci_2032.c return insn->n; insn 60 drivers/staging/comedi/drivers/addi_apci_2032.c struct comedi_insn *insn, insn 64 drivers/staging/comedi/drivers/addi_apci_2032.c return insn->n; insn 30 drivers/staging/comedi/drivers/addi_apci_2200.c struct comedi_insn *insn, insn 35 drivers/staging/comedi/drivers/addi_apci_2200.c return insn->n; insn 40 drivers/staging/comedi/drivers/addi_apci_2200.c struct comedi_insn *insn, insn 50 drivers/staging/comedi/drivers/addi_apci_2200.c return insn->n; insn 692 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 705 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 719 drivers/staging/comedi/drivers/addi_apci_3120.c apci3120_set_chanlist(dev, s, 1, &insn->chanspec); insn 733 drivers/staging/comedi/drivers/addi_apci_3120.c for (i = 0; i < insn->n; i++) { insn 737 drivers/staging/comedi/drivers/addi_apci_3120.c ret = comedi_timeout(dev, s, insn, apci3120_ai_eoc, 0); insn 744 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 749 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 762 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 765 drivers/staging/comedi/drivers/addi_apci_3120.c unsigned int chan = CR_CHAN(insn->chanspec); insn 768 drivers/staging/comedi/drivers/addi_apci_3120.c for (i = 0; i < insn->n; i++) { insn 772 drivers/staging/comedi/drivers/addi_apci_3120.c ret = comedi_timeout(dev, s, insn, apci3120_ao_ready, 0); insn 782 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 787 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 795 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 800 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 813 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 818 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 890 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 895 drivers/staging/comedi/drivers/addi_apci_3120.c struct comedi_insn *insn, insn 900 drivers/staging/comedi/drivers/addi_apci_3120.c for (i = 0; i < insn->n; i++) insn 903 drivers/staging/comedi/drivers/addi_apci_3120.c return insn->n; insn 108 drivers/staging/comedi/drivers/addi_apci_3501.c struct comedi_insn *insn, insn 111 drivers/staging/comedi/drivers/addi_apci_3501.c unsigned int chan = CR_CHAN(insn->chanspec); insn 112 drivers/staging/comedi/drivers/addi_apci_3501.c unsigned int range = CR_RANGE(insn->chanspec); insn 131 drivers/staging/comedi/drivers/addi_apci_3501.c for (i = 0; i < insn->n; i++) { insn 152 drivers/staging/comedi/drivers/addi_apci_3501.c return insn->n; insn 157 drivers/staging/comedi/drivers/addi_apci_3501.c struct comedi_insn *insn, insn 162 drivers/staging/comedi/drivers/addi_apci_3501.c return insn->n; insn 167 drivers/staging/comedi/drivers/addi_apci_3501.c struct comedi_insn *insn, insn 177 drivers/staging/comedi/drivers/addi_apci_3501.c return insn->n; insn 256 drivers/staging/comedi/drivers/addi_apci_3501.c struct comedi_insn *insn, insn 260 drivers/staging/comedi/drivers/addi_apci_3501.c unsigned short addr = CR_CHAN(insn->chanspec); insn 264 drivers/staging/comedi/drivers/addi_apci_3501.c if (insn->n) { insn 267 drivers/staging/comedi/drivers/addi_apci_3501.c for (i = 0; i < insn->n; i++) insn 271 drivers/staging/comedi/drivers/addi_apci_3501.c return insn->n; insn 421 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 434 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 440 drivers/staging/comedi/drivers/addi_apci_3xxx.c ret = apci3xxx_ai_setup(dev, insn->chanspec); insn 444 drivers/staging/comedi/drivers/addi_apci_3xxx.c for (i = 0; i < insn->n; i++) { insn 449 drivers/staging/comedi/drivers/addi_apci_3xxx.c ret = comedi_timeout(dev, s, insn, apci3xxx_ai_eoc, 0); insn 457 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 598 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 611 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 614 drivers/staging/comedi/drivers/addi_apci_3xxx.c unsigned int chan = CR_CHAN(insn->chanspec); insn 615 drivers/staging/comedi/drivers/addi_apci_3xxx.c unsigned int range = CR_RANGE(insn->chanspec); insn 619 drivers/staging/comedi/drivers/addi_apci_3xxx.c for (i = 0; i < insn->n; i++) { insn 629 drivers/staging/comedi/drivers/addi_apci_3xxx.c ret = comedi_timeout(dev, s, insn, apci3xxx_ao_eoc, 0); insn 636 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 641 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 646 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 651 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 661 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 666 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 669 drivers/staging/comedi/drivers/addi_apci_3xxx.c unsigned int chan = CR_CHAN(insn->chanspec); insn 687 drivers/staging/comedi/drivers/addi_apci_3xxx.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 694 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 699 drivers/staging/comedi/drivers/addi_apci_3xxx.c struct comedi_insn *insn, insn 722 drivers/staging/comedi/drivers/addi_apci_3xxx.c return insn->n; insn 34 drivers/staging/comedi/drivers/addi_watchdog.c struct comedi_insn *insn, insn 59 drivers/staging/comedi/drivers/addi_watchdog.c return insn->n; insn 64 drivers/staging/comedi/drivers/addi_watchdog.c struct comedi_insn *insn, insn 70 drivers/staging/comedi/drivers/addi_watchdog.c for (i = 0; i < insn->n; i++) insn 73 drivers/staging/comedi/drivers/addi_watchdog.c return insn->n; insn 78 drivers/staging/comedi/drivers/addi_watchdog.c struct comedi_insn *insn, insn 90 drivers/staging/comedi/drivers/addi_watchdog.c for (i = 0; i < insn->n; i++) { insn 95 drivers/staging/comedi/drivers/addi_watchdog.c return insn->n; insn 44 drivers/staging/comedi/drivers/adl_pci6208.c struct comedi_insn *insn, insn 57 drivers/staging/comedi/drivers/adl_pci6208.c struct comedi_insn *insn, insn 60 drivers/staging/comedi/drivers/adl_pci6208.c unsigned int chan = CR_CHAN(insn->chanspec); insn 64 drivers/staging/comedi/drivers/adl_pci6208.c for (i = 0; i < insn->n; i++) { insn 68 drivers/staging/comedi/drivers/adl_pci6208.c ret = comedi_timeout(dev, s, insn, pci6208_ao_eoc, 0); insn 79 drivers/staging/comedi/drivers/adl_pci6208.c return insn->n; insn 84 drivers/staging/comedi/drivers/adl_pci6208.c struct comedi_insn *insn, insn 94 drivers/staging/comedi/drivers/adl_pci6208.c return insn->n; insn 99 drivers/staging/comedi/drivers/adl_pci6208.c struct comedi_insn *insn, insn 107 drivers/staging/comedi/drivers/adl_pci6208.c return insn->n; insn 109 drivers/staging/comedi/drivers/adl_pci7x3x.c struct comedi_insn *insn, insn 131 drivers/staging/comedi/drivers/adl_pci7x3x.c return insn->n; insn 136 drivers/staging/comedi/drivers/adl_pci7x3x.c struct comedi_insn *insn, insn 143 drivers/staging/comedi/drivers/adl_pci7x3x.c return insn->n; insn 33 drivers/staging/comedi/drivers/adl_pci8164.c struct comedi_insn *insn, insn 37 drivers/staging/comedi/drivers/adl_pci8164.c unsigned int chan = CR_CHAN(insn->chanspec); insn 40 drivers/staging/comedi/drivers/adl_pci8164.c for (i = 0; i < insn->n; i++) insn 43 drivers/staging/comedi/drivers/adl_pci8164.c return insn->n; insn 48 drivers/staging/comedi/drivers/adl_pci8164.c struct comedi_insn *insn, insn 52 drivers/staging/comedi/drivers/adl_pci8164.c unsigned int chan = CR_CHAN(insn->chanspec); insn 55 drivers/staging/comedi/drivers/adl_pci8164.c for (i = 0; i < insn->n; i++) insn 58 drivers/staging/comedi/drivers/adl_pci8164.c return insn->n; insn 518 drivers/staging/comedi/drivers/adl_pci9111.c struct comedi_insn *insn, insn 531 drivers/staging/comedi/drivers/adl_pci9111.c struct comedi_insn *insn, unsigned int *data) insn 533 drivers/staging/comedi/drivers/adl_pci9111.c unsigned int chan = CR_CHAN(insn->chanspec); insn 534 drivers/staging/comedi/drivers/adl_pci9111.c unsigned int range = CR_RANGE(insn->chanspec); insn 552 drivers/staging/comedi/drivers/adl_pci9111.c for (i = 0; i < insn->n; i++) { insn 556 drivers/staging/comedi/drivers/adl_pci9111.c ret = comedi_timeout(dev, s, insn, pci9111_ai_eoc, 0); insn 571 drivers/staging/comedi/drivers/adl_pci9111.c struct comedi_insn *insn, insn 574 drivers/staging/comedi/drivers/adl_pci9111.c unsigned int chan = CR_CHAN(insn->chanspec); insn 578 drivers/staging/comedi/drivers/adl_pci9111.c for (i = 0; i < insn->n; i++) { insn 584 drivers/staging/comedi/drivers/adl_pci9111.c return insn->n; insn 589 drivers/staging/comedi/drivers/adl_pci9111.c struct comedi_insn *insn, insn 594 drivers/staging/comedi/drivers/adl_pci9111.c return insn->n; insn 599 drivers/staging/comedi/drivers/adl_pci9111.c struct comedi_insn *insn, insn 607 drivers/staging/comedi/drivers/adl_pci9111.c return insn->n; insn 1304 drivers/staging/comedi/drivers/adl_pci9118.c struct comedi_insn *insn, insn 1323 drivers/staging/comedi/drivers/adl_pci9118.c struct comedi_insn *insn, insn 1335 drivers/staging/comedi/drivers/adl_pci9118.c pci9118_set_chanlist(dev, s, 1, &insn->chanspec, 0, 0); insn 1343 drivers/staging/comedi/drivers/adl_pci9118.c for (i = 0; i < insn->n; i++) { insn 1346 drivers/staging/comedi/drivers/adl_pci9118.c ret = comedi_timeout(dev, s, insn, pci9118_ai_eoc, 0); insn 1357 drivers/staging/comedi/drivers/adl_pci9118.c return insn->n; insn 1362 drivers/staging/comedi/drivers/adl_pci9118.c struct comedi_insn *insn, insn 1365 drivers/staging/comedi/drivers/adl_pci9118.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1369 drivers/staging/comedi/drivers/adl_pci9118.c for (i = 0; i < insn->n; i++) { insn 1375 drivers/staging/comedi/drivers/adl_pci9118.c return insn->n; insn 1380 drivers/staging/comedi/drivers/adl_pci9118.c struct comedi_insn *insn, insn 1390 drivers/staging/comedi/drivers/adl_pci9118.c return insn->n; insn 1395 drivers/staging/comedi/drivers/adl_pci9118.c struct comedi_insn *insn, insn 1409 drivers/staging/comedi/drivers/adl_pci9118.c return insn->n; insn 95 drivers/staging/comedi/drivers/adq12b.c struct comedi_insn *insn, insn 108 drivers/staging/comedi/drivers/adq12b.c struct comedi_insn *insn, insn 112 drivers/staging/comedi/drivers/adq12b.c unsigned int chan = CR_CHAN(insn->chanspec); insn 113 drivers/staging/comedi/drivers/adq12b.c unsigned int range = CR_RANGE(insn->chanspec); insn 128 drivers/staging/comedi/drivers/adq12b.c for (i = 0; i < insn->n; i++) { insn 129 drivers/staging/comedi/drivers/adq12b.c ret = comedi_timeout(dev, s, insn, adq12b_ai_eoc, 0); insn 139 drivers/staging/comedi/drivers/adq12b.c return insn->n; insn 144 drivers/staging/comedi/drivers/adq12b.c struct comedi_insn *insn, unsigned int *data) insn 149 drivers/staging/comedi/drivers/adq12b.c return insn->n; insn 154 drivers/staging/comedi/drivers/adq12b.c struct comedi_insn *insn, insn 174 drivers/staging/comedi/drivers/adq12b.c return insn->n; insn 289 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 331 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 345 drivers/staging/comedi/drivers/adv_pci1710.c pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1); insn 347 drivers/staging/comedi/drivers/adv_pci1710.c for (i = 0; i < insn->n; i++) { insn 353 drivers/staging/comedi/drivers/adv_pci1710.c ret = comedi_timeout(dev, s, insn, pci1710_ai_eoc, 0); insn 371 drivers/staging/comedi/drivers/adv_pci1710.c return ret ? ret : insn->n; insn 637 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 641 drivers/staging/comedi/drivers/adv_pci1710.c unsigned int chan = CR_CHAN(insn->chanspec); insn 642 drivers/staging/comedi/drivers/adv_pci1710.c unsigned int range = CR_RANGE(insn->chanspec); insn 650 drivers/staging/comedi/drivers/adv_pci1710.c for (i = 0; i < insn->n; i++) { insn 657 drivers/staging/comedi/drivers/adv_pci1710.c return insn->n; insn 662 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 667 drivers/staging/comedi/drivers/adv_pci1710.c return insn->n; insn 672 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 680 drivers/staging/comedi/drivers/adv_pci1710.c return insn->n; insn 685 drivers/staging/comedi/drivers/adv_pci1710.c struct comedi_insn *insn, insn 717 drivers/staging/comedi/drivers/adv_pci1710.c return insn->n; insn 72 drivers/staging/comedi/drivers/adv_pci1720.c struct comedi_insn *insn, insn 75 drivers/staging/comedi/drivers/adv_pci1720.c unsigned int chan = CR_CHAN(insn->chanspec); insn 76 drivers/staging/comedi/drivers/adv_pci1720.c unsigned int range = CR_RANGE(insn->chanspec); insn 87 drivers/staging/comedi/drivers/adv_pci1720.c for (i = 0; i < insn->n; i++) { insn 99 drivers/staging/comedi/drivers/adv_pci1720.c return insn->n; insn 104 drivers/staging/comedi/drivers/adv_pci1720.c struct comedi_insn *insn, insn 109 drivers/staging/comedi/drivers/adv_pci1720.c return insn->n; insn 80 drivers/staging/comedi/drivers/adv_pci1723.c struct comedi_insn *insn, insn 83 drivers/staging/comedi/drivers/adv_pci1723.c unsigned int chan = CR_CHAN(insn->chanspec); insn 86 drivers/staging/comedi/drivers/adv_pci1723.c for (i = 0; i < insn->n; i++) { insn 93 drivers/staging/comedi/drivers/adv_pci1723.c return insn->n; insn 98 drivers/staging/comedi/drivers/adv_pci1723.c struct comedi_insn *insn, insn 101 drivers/staging/comedi/drivers/adv_pci1723.c unsigned int chan = CR_CHAN(insn->chanspec); insn 106 drivers/staging/comedi/drivers/adv_pci1723.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 116 drivers/staging/comedi/drivers/adv_pci1723.c return insn->n; insn 121 drivers/staging/comedi/drivers/adv_pci1723.c struct comedi_insn *insn, insn 129 drivers/staging/comedi/drivers/adv_pci1723.c return insn->n; insn 75 drivers/staging/comedi/drivers/adv_pci1724.c struct comedi_insn *insn, insn 88 drivers/staging/comedi/drivers/adv_pci1724.c struct comedi_insn *insn, insn 92 drivers/staging/comedi/drivers/adv_pci1724.c unsigned int chan = CR_CHAN(insn->chanspec); insn 102 drivers/staging/comedi/drivers/adv_pci1724.c for (i = 0; i < insn->n; ++i) { insn 105 drivers/staging/comedi/drivers/adv_pci1724.c ret = comedi_timeout(dev, s, insn, adv_pci1724_dac_idle, 0); insn 115 drivers/staging/comedi/drivers/adv_pci1724.c return insn->n; insn 151 drivers/staging/comedi/drivers/adv_pci1760.c struct comedi_insn *insn, insn 156 drivers/staging/comedi/drivers/adv_pci1760.c return insn->n; insn 161 drivers/staging/comedi/drivers/adv_pci1760.c struct comedi_insn *insn, insn 174 drivers/staging/comedi/drivers/adv_pci1760.c return insn->n; insn 222 drivers/staging/comedi/drivers/adv_pci1760.c struct comedi_insn *insn, insn 225 drivers/staging/comedi/drivers/adv_pci1760.c unsigned int chan = CR_CHAN(insn->chanspec); insn 296 drivers/staging/comedi/drivers/adv_pci1760.c return insn->n; insn 210 drivers/staging/comedi/drivers/adv_pci_dio.c struct comedi_insn *insn, insn 224 drivers/staging/comedi/drivers/adv_pci_dio.c return insn->n; insn 229 drivers/staging/comedi/drivers/adv_pci_dio.c struct comedi_insn *insn, insn 239 drivers/staging/comedi/drivers/adv_pci_dio.c return insn->n; insn 244 drivers/staging/comedi/drivers/adv_pci_dio.c struct comedi_insn *insn, insn 262 drivers/staging/comedi/drivers/adv_pci_dio.c return insn->n; insn 267 drivers/staging/comedi/drivers/adv_pci_dio.c struct comedi_insn *insn, insn 281 drivers/staging/comedi/drivers/adv_pci_dio.c return insn->n; insn 101 drivers/staging/comedi/drivers/aio_aio12_8.c struct comedi_insn *insn, insn 114 drivers/staging/comedi/drivers/aio_aio12_8.c struct comedi_insn *insn, insn 117 drivers/staging/comedi/drivers/aio_aio12_8.c unsigned int chan = CR_CHAN(insn->chanspec); insn 118 drivers/staging/comedi/drivers/aio_aio12_8.c unsigned int range = CR_RANGE(insn->chanspec); insn 134 drivers/staging/comedi/drivers/aio_aio12_8.c for (i = 0; i < insn->n; i++) { insn 139 drivers/staging/comedi/drivers/aio_aio12_8.c ret = comedi_timeout(dev, s, insn, aio_aio12_8_ai_eoc, 0); insn 152 drivers/staging/comedi/drivers/aio_aio12_8.c return insn->n; insn 157 drivers/staging/comedi/drivers/aio_aio12_8.c struct comedi_insn *insn, insn 160 drivers/staging/comedi/drivers/aio_aio12_8.c unsigned int chan = CR_CHAN(insn->chanspec); insn 167 drivers/staging/comedi/drivers/aio_aio12_8.c for (i = 0; i < insn->n; i++) { insn 173 drivers/staging/comedi/drivers/aio_aio12_8.c return insn->n; insn 178 drivers/staging/comedi/drivers/aio_aio12_8.c struct comedi_insn *insn, insn 181 drivers/staging/comedi/drivers/aio_aio12_8.c unsigned int chan = CR_CHAN(insn->chanspec); insn 196 drivers/staging/comedi/drivers/aio_aio12_8.c return insn->n; insn 141 drivers/staging/comedi/drivers/aio_iiro_16.c struct comedi_insn *insn, insn 152 drivers/staging/comedi/drivers/aio_iiro_16.c return insn->n; insn 157 drivers/staging/comedi/drivers/aio_iiro_16.c struct comedi_insn *insn, insn 162 drivers/staging/comedi/drivers/aio_iiro_16.c return insn->n; insn 167 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 181 drivers/staging/comedi/drivers/amplc_dio200_common.c return insn->n; insn 496 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 501 drivers/staging/comedi/drivers/amplc_dio200_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 536 drivers/staging/comedi/drivers/amplc_dio200_common.c return insn->n; insn 616 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 645 drivers/staging/comedi/drivers/amplc_dio200_common.c return insn->n; insn 650 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 653 drivers/staging/comedi/drivers/amplc_dio200_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 666 drivers/staging/comedi/drivers/amplc_dio200_common.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 672 drivers/staging/comedi/drivers/amplc_dio200_common.c return insn->n; insn 700 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 705 drivers/staging/comedi/drivers/amplc_dio200_common.c for (n = 0; n < insn->n; n++) insn 745 drivers/staging/comedi/drivers/amplc_dio200_common.c struct comedi_insn *insn, insn 766 drivers/staging/comedi/drivers/amplc_dio200_common.c return ret < 0 ? ret : insn->n; insn 60 drivers/staging/comedi/drivers/amplc_pc236_common.c struct comedi_subdevice *s, struct comedi_insn *insn, insn 64 drivers/staging/comedi/drivers/amplc_pc236_common.c return insn->n; insn 46 drivers/staging/comedi/drivers/amplc_pc263.c struct comedi_insn *insn, insn 56 drivers/staging/comedi/drivers/amplc_pc263.c return insn->n; insn 420 drivers/staging/comedi/drivers/amplc_pci224.c struct comedi_insn *insn, insn 423 drivers/staging/comedi/drivers/amplc_pci224.c unsigned int chan = CR_CHAN(insn->chanspec); insn 424 drivers/staging/comedi/drivers/amplc_pci224.c unsigned int range = CR_RANGE(insn->chanspec); insn 428 drivers/staging/comedi/drivers/amplc_pci224.c for (i = 0; i < insn->n; i++) { insn 434 drivers/staging/comedi/drivers/amplc_pci224.c return insn->n; insn 710 drivers/staging/comedi/drivers/amplc_pci230.c struct comedi_insn *insn, insn 724 drivers/staging/comedi/drivers/amplc_pci230.c struct comedi_insn *insn, unsigned int *data) insn 734 drivers/staging/comedi/drivers/amplc_pci230.c chan = CR_CHAN(insn->chanspec); insn 735 drivers/staging/comedi/drivers/amplc_pci230.c range = CR_RANGE(insn->chanspec); insn 736 drivers/staging/comedi/drivers/amplc_pci230.c aref = CR_AREF(insn->chanspec); insn 801 drivers/staging/comedi/drivers/amplc_pci230.c for (n = 0; n < insn->n; n++) { insn 810 drivers/staging/comedi/drivers/amplc_pci230.c ret = comedi_timeout(dev, s, insn, pci230_ai_eoc, 0); insn 824 drivers/staging/comedi/drivers/amplc_pci230.c struct comedi_insn *insn, insn 828 drivers/staging/comedi/drivers/amplc_pci230.c unsigned int chan = CR_CHAN(insn->chanspec); insn 829 drivers/staging/comedi/drivers/amplc_pci230.c unsigned int range = CR_RANGE(insn->chanspec); insn 840 drivers/staging/comedi/drivers/amplc_pci230.c for (i = 0; i < insn->n; i++) { insn 846 drivers/staging/comedi/drivers/amplc_pci230.c return insn->n; insn 36 drivers/staging/comedi/drivers/amplc_pci263.c struct comedi_insn *insn, insn 46 drivers/staging/comedi/drivers/amplc_pci263.c return insn->n; insn 151 drivers/staging/comedi/drivers/c6xdigio.c struct comedi_insn *insn, insn 154 drivers/staging/comedi/drivers/c6xdigio.c unsigned int chan = CR_CHAN(insn->chanspec); insn 158 drivers/staging/comedi/drivers/c6xdigio.c for (i = 0; i < insn->n; i++) { insn 172 drivers/staging/comedi/drivers/c6xdigio.c return insn->n; insn 177 drivers/staging/comedi/drivers/c6xdigio.c struct comedi_insn *insn, insn 180 drivers/staging/comedi/drivers/c6xdigio.c unsigned int chan = CR_CHAN(insn->chanspec); insn 186 drivers/staging/comedi/drivers/c6xdigio.c for (i = 0; i < insn->n; i++) insn 189 drivers/staging/comedi/drivers/c6xdigio.c return insn->n; insn 194 drivers/staging/comedi/drivers/c6xdigio.c struct comedi_insn *insn, insn 197 drivers/staging/comedi/drivers/c6xdigio.c unsigned int chan = CR_CHAN(insn->chanspec); insn 201 drivers/staging/comedi/drivers/c6xdigio.c for (i = 0; i < insn->n; i++) { insn 208 drivers/staging/comedi/drivers/c6xdigio.c return insn->n; insn 128 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 141 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 145 drivers/staging/comedi/drivers/cb_das16_cs.c int chan = CR_CHAN(insn->chanspec); insn 146 drivers/staging/comedi/drivers/cb_das16_cs.c int range = CR_RANGE(insn->chanspec); insn 147 drivers/staging/comedi/drivers/cb_das16_cs.c int aref = CR_AREF(insn->chanspec); insn 180 drivers/staging/comedi/drivers/cb_das16_cs.c for (i = 0; i < insn->n; i++) { insn 183 drivers/staging/comedi/drivers/cb_das16_cs.c ret = comedi_timeout(dev, s, insn, das16cs_ai_eoc, 0); insn 195 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 199 drivers/staging/comedi/drivers/cb_das16_cs.c unsigned int chan = CR_CHAN(insn->chanspec); insn 205 drivers/staging/comedi/drivers/cb_das16_cs.c for (i = 0; i < insn->n; i++) { insn 241 drivers/staging/comedi/drivers/cb_das16_cs.c return insn->n; insn 246 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 254 drivers/staging/comedi/drivers/cb_das16_cs.c return insn->n; insn 259 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 263 drivers/staging/comedi/drivers/cb_das16_cs.c unsigned int chan = CR_CHAN(insn->chanspec); insn 272 drivers/staging/comedi/drivers/cb_das16_cs.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 286 drivers/staging/comedi/drivers/cb_das16_cs.c return insn->n; insn 291 drivers/staging/comedi/drivers/cb_das16_cs.c struct comedi_insn *insn, insn 323 drivers/staging/comedi/drivers/cb_das16_cs.c return insn->n; insn 312 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 326 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 330 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 331 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int range = CR_RANGE(insn->chanspec); insn 332 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int aref = CR_AREF(insn->chanspec); insn 338 drivers/staging/comedi/drivers/cb_pcidas.c if (insn->chanspec & CR_ALT_SOURCE) { insn 360 drivers/staging/comedi/drivers/cb_pcidas.c for (n = 0; n < insn->n; n++) { insn 365 drivers/staging/comedi/drivers/cb_pcidas.c ret = comedi_timeout(dev, s, insn, cb_pcidas_ai_eoc, 0); insn 379 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 399 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 405 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 409 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 410 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int range = CR_RANGE(insn->chanspec); insn 423 drivers/staging/comedi/drivers/cb_pcidas.c for (i = 0; i < insn->n; i++) { insn 430 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 436 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 440 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 441 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int range = CR_RANGE(insn->chanspec); insn 458 drivers/staging/comedi/drivers/cb_pcidas.c for (i = 0; i < insn->n; i++) { insn 465 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 470 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 484 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 488 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 492 drivers/staging/comedi/drivers/cb_pcidas.c for (i = 0; i < insn->n; i++) { insn 494 drivers/staging/comedi/drivers/cb_pcidas.c ret = comedi_timeout(dev, s, insn, cb_pcidas_eeprom_ready, 0); insn 510 drivers/staging/comedi/drivers/cb_pcidas.c ret = comedi_timeout(dev, s, insn, cb_pcidas_eeprom_ready, 0); insn 517 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 561 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 564 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 566 drivers/staging/comedi/drivers/cb_pcidas.c if (insn->n) { insn 567 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int val = data[insn->n - 1]; insn 577 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 598 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 601 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 603 drivers/staging/comedi/drivers/cb_pcidas.c if (insn->n) { insn 604 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int val = data[insn->n - 1]; insn 612 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 631 drivers/staging/comedi/drivers/cb_pcidas.c struct comedi_insn *insn, insn 634 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 636 drivers/staging/comedi/drivers/cb_pcidas.c if (insn->n) { insn 637 drivers/staging/comedi/drivers/cb_pcidas.c unsigned int val = data[insn->n - 1]; insn 645 drivers/staging/comedi/drivers/cb_pcidas.c return insn->n; insn 1733 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 1753 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, unsigned int *data) insn 1762 drivers/staging/comedi/drivers/cb_pcidas64.c channel = CR_CHAN(insn->chanspec); insn 1763 drivers/staging/comedi/drivers/cb_pcidas64.c range = CR_RANGE(insn->chanspec); insn 1764 drivers/staging/comedi/drivers/cb_pcidas64.c aref = CR_AREF(insn->chanspec); insn 1771 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->chanspec & CR_ALT_FILTER) insn 1786 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->chanspec & CR_ALT_SOURCE) { insn 1810 drivers/staging/comedi/drivers/cb_pcidas64.c bits |= ai_range_bits_6xxx(dev, CR_RANGE(insn->chanspec)); insn 1825 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->chanspec & CR_ALT_SOURCE) { insn 1857 drivers/staging/comedi/drivers/cb_pcidas64.c for (n = 0; n < insn->n; n++) { insn 1862 drivers/staging/comedi/drivers/cb_pcidas64.c writew(adc_convert_chan_4020_bits(CR_CHAN(insn->chanspec)), insn 1866 drivers/staging/comedi/drivers/cb_pcidas64.c ret = comedi_timeout(dev, s, insn, cb_pcidas64_ai_eoc, 0); insn 1970 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, unsigned int *data) insn 3096 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, unsigned int *data) insn 3100 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int chan = CR_CHAN(insn->chanspec); insn 3101 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int range = CR_RANGE(insn->chanspec); insn 3113 drivers/staging/comedi/drivers/cb_pcidas64.c for (i = 0; i < insn->n; i++) { insn 3130 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3441 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, unsigned int *data) insn 3450 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3455 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 3463 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3468 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 3473 drivers/staging/comedi/drivers/cb_pcidas64.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 3479 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3484 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 3492 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3630 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 3633 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int chan = CR_CHAN(insn->chanspec); insn 3639 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->n) { insn 3640 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int val = data[insn->n - 1]; insn 3648 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3683 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, insn 3686 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int chan = CR_CHAN(insn->chanspec); insn 3692 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->n) { insn 3693 drivers/staging/comedi/drivers/cb_pcidas64.c unsigned int val = data[insn->n - 1]; insn 3701 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 3769 drivers/staging/comedi/drivers/cb_pcidas64.c struct comedi_insn *insn, unsigned int *data) insn 3774 drivers/staging/comedi/drivers/cb_pcidas64.c if (insn->n) { insn 3776 drivers/staging/comedi/drivers/cb_pcidas64.c val = read_eeprom(dev, CR_CHAN(insn->chanspec)); insn 3777 drivers/staging/comedi/drivers/cb_pcidas64.c for (i = 0; i < insn->n; i++) insn 3781 drivers/staging/comedi/drivers/cb_pcidas64.c return insn->n; insn 287 drivers/staging/comedi/drivers/cb_pcidda.c struct comedi_insn *insn, insn 291 drivers/staging/comedi/drivers/cb_pcidda.c unsigned int channel = CR_CHAN(insn->chanspec); insn 292 drivers/staging/comedi/drivers/cb_pcidda.c unsigned int range = CR_RANGE(insn->chanspec); insn 321 drivers/staging/comedi/drivers/cb_pcidda.c for (i = 0; i < insn->n; i++) insn 324 drivers/staging/comedi/drivers/cb_pcidda.c return insn->n; insn 159 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 173 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 177 drivers/staging/comedi/drivers/cb_pcimdas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 178 drivers/staging/comedi/drivers/cb_pcimdas.c unsigned int range = CR_RANGE(insn->chanspec); insn 203 drivers/staging/comedi/drivers/cb_pcimdas.c for (n = 0; n < insn->n; n++) { insn 208 drivers/staging/comedi/drivers/cb_pcimdas.c ret = comedi_timeout(dev, s, insn, cb_pcimdas_ai_eoc, 0); insn 222 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 226 drivers/staging/comedi/drivers/cb_pcimdas.c unsigned int chan = CR_CHAN(insn->chanspec); insn 230 drivers/staging/comedi/drivers/cb_pcimdas.c for (i = 0; i < insn->n; i++) { insn 236 drivers/staging/comedi/drivers/cb_pcimdas.c return insn->n; insn 241 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 251 drivers/staging/comedi/drivers/cb_pcimdas.c return insn->n; insn 256 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 266 drivers/staging/comedi/drivers/cb_pcimdas.c return insn->n; insn 271 drivers/staging/comedi/drivers/cb_pcimdas.c struct comedi_insn *insn, insn 305 drivers/staging/comedi/drivers/cb_pcimdas.c return insn->n; insn 86 drivers/staging/comedi/drivers/cb_pcimdda.c struct comedi_insn *insn, insn 89 drivers/staging/comedi/drivers/cb_pcimdda.c unsigned int chan = CR_CHAN(insn->chanspec); insn 94 drivers/staging/comedi/drivers/cb_pcimdda.c for (i = 0; i < insn->n; i++) { insn 111 drivers/staging/comedi/drivers/cb_pcimdda.c return insn->n; insn 116 drivers/staging/comedi/drivers/cb_pcimdda.c struct comedi_insn *insn, insn 119 drivers/staging/comedi/drivers/cb_pcimdda.c unsigned int chan = CR_CHAN(insn->chanspec); insn 124 drivers/staging/comedi/drivers/cb_pcimdda.c return comedi_readback_insn_read(dev, s, insn, data); insn 481 drivers/staging/comedi/drivers/comedi_8254.c struct comedi_insn *insn, insn 485 drivers/staging/comedi/drivers/comedi_8254.c unsigned int chan = CR_CHAN(insn->chanspec); insn 491 drivers/staging/comedi/drivers/comedi_8254.c for (i = 0; i < insn->n; i++) insn 494 drivers/staging/comedi/drivers/comedi_8254.c return insn->n; insn 499 drivers/staging/comedi/drivers/comedi_8254.c struct comedi_insn *insn, insn 503 drivers/staging/comedi/drivers/comedi_8254.c unsigned int chan = CR_CHAN(insn->chanspec); insn 508 drivers/staging/comedi/drivers/comedi_8254.c if (insn->n) insn 509 drivers/staging/comedi/drivers/comedi_8254.c comedi_8254_write(i8254, chan, data[insn->n - 1]); insn 511 drivers/staging/comedi/drivers/comedi_8254.c return insn->n; insn 516 drivers/staging/comedi/drivers/comedi_8254.c struct comedi_insn *insn, insn 520 drivers/staging/comedi/drivers/comedi_8254.c unsigned int chan = CR_CHAN(insn->chanspec); insn 547 drivers/staging/comedi/drivers/comedi_8254.c return i8254->insn_config(dev, s, insn, data); insn 552 drivers/staging/comedi/drivers/comedi_8254.c return insn->n; insn 96 drivers/staging/comedi/drivers/comedi_8254.h struct comedi_insn *insn, unsigned int *data); insn 64 drivers/staging/comedi/drivers/comedi_8255.c struct comedi_insn *insn, insn 91 drivers/staging/comedi/drivers/comedi_8255.c return insn->n; insn 117 drivers/staging/comedi/drivers/comedi_8255.c struct comedi_insn *insn, insn 120 drivers/staging/comedi/drivers/comedi_8255.c unsigned int chan = CR_CHAN(insn->chanspec); insn 133 drivers/staging/comedi/drivers/comedi_8255.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 139 drivers/staging/comedi/drivers/comedi_8255.c return insn->n; insn 63 drivers/staging/comedi/drivers/comedi_bond.c struct comedi_insn *insn, unsigned int *data) insn 72 drivers/staging/comedi/drivers/comedi_bond.c base_chan = CR_CHAN(insn->chanspec); insn 121 drivers/staging/comedi/drivers/comedi_bond.c return insn->n; insn 126 drivers/staging/comedi/drivers/comedi_bond.c struct comedi_insn *insn, unsigned int *data) insn 129 drivers/staging/comedi/drivers/comedi_bond.c unsigned int chan = CR_CHAN(insn->chanspec); insn 165 drivers/staging/comedi/drivers/comedi_bond.c ret = insn->n; insn 74 drivers/staging/comedi/drivers/comedi_parport.c struct comedi_insn *insn, insn 82 drivers/staging/comedi/drivers/comedi_parport.c return insn->n; insn 87 drivers/staging/comedi/drivers/comedi_parport.c struct comedi_insn *insn, insn 93 drivers/staging/comedi/drivers/comedi_parport.c ret = comedi_dio_insn_config(dev, s, insn, data, 0xff); insn 104 drivers/staging/comedi/drivers/comedi_parport.c return insn->n; insn 109 drivers/staging/comedi/drivers/comedi_parport.c struct comedi_insn *insn, insn 114 drivers/staging/comedi/drivers/comedi_parport.c return insn->n; insn 119 drivers/staging/comedi/drivers/comedi_parport.c struct comedi_insn *insn, insn 133 drivers/staging/comedi/drivers/comedi_parport.c return insn->n; insn 138 drivers/staging/comedi/drivers/comedi_parport.c struct comedi_insn *insn, insn 142 drivers/staging/comedi/drivers/comedi_parport.c return insn->n; insn 418 drivers/staging/comedi/drivers/comedi_test.c struct comedi_insn *insn, unsigned int *data) insn 421 drivers/staging/comedi/drivers/comedi_test.c int i, chan = CR_CHAN(insn->chanspec); insn 423 drivers/staging/comedi/drivers/comedi_test.c for (i = 0; i < insn->n; i++) insn 426 drivers/staging/comedi/drivers/comedi_test.c return insn->n; insn 618 drivers/staging/comedi/drivers/comedi_test.c struct comedi_insn *insn, unsigned int *data) insn 621 drivers/staging/comedi/drivers/comedi_test.c int i, chan = CR_CHAN(insn->chanspec); insn 623 drivers/staging/comedi/drivers/comedi_test.c for (i = 0; i < insn->n; i++) insn 626 drivers/staging/comedi/drivers/comedi_test.c return insn->n; insn 631 drivers/staging/comedi/drivers/comedi_test.c struct comedi_insn *insn, insn 658 drivers/staging/comedi/drivers/comedi_test.c struct comedi_insn *insn, insn 32 drivers/staging/comedi/drivers/contec_pci_dio.c struct comedi_insn *insn, insn 40 drivers/staging/comedi/drivers/contec_pci_dio.c return insn->n; insn 45 drivers/staging/comedi/drivers/contec_pci_dio.c struct comedi_insn *insn, unsigned int *data) insn 49 drivers/staging/comedi/drivers/contec_pci_dio.c return insn->n; insn 70 drivers/staging/comedi/drivers/dac02.c struct comedi_insn *insn, insn 73 drivers/staging/comedi/drivers/dac02.c unsigned int chan = CR_CHAN(insn->chanspec); insn 74 drivers/staging/comedi/drivers/dac02.c unsigned int range = CR_RANGE(insn->chanspec); insn 78 drivers/staging/comedi/drivers/dac02.c for (i = 0; i < insn->n; i++) { insn 99 drivers/staging/comedi/drivers/dac02.c return insn->n; insn 308 drivers/staging/comedi/drivers/daqboard2000.c struct comedi_insn *insn, unsigned long context) insn 320 drivers/staging/comedi/drivers/daqboard2000.c struct comedi_insn *insn, unsigned int *data) insn 339 drivers/staging/comedi/drivers/daqboard2000.c gain = CR_RANGE(insn->chanspec); insn 340 drivers/staging/comedi/drivers/daqboard2000.c chan = CR_CHAN(insn->chanspec); insn 348 drivers/staging/comedi/drivers/daqboard2000.c for (i = 0; i < insn->n; i++) { insn 354 drivers/staging/comedi/drivers/daqboard2000.c ret = comedi_timeout(dev, s, insn, db2k_ai_status, insn 362 drivers/staging/comedi/drivers/daqboard2000.c ret = comedi_timeout(dev, s, insn, db2k_ai_status, insn 368 drivers/staging/comedi/drivers/daqboard2000.c comedi_timeout(dev, s, insn, db2k_ai_status, insn 384 drivers/staging/comedi/drivers/daqboard2000.c struct comedi_insn *insn, unsigned long context) insn 386 drivers/staging/comedi/drivers/daqboard2000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 397 drivers/staging/comedi/drivers/daqboard2000.c struct comedi_insn *insn, unsigned int *data) insn 399 drivers/staging/comedi/drivers/daqboard2000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 402 drivers/staging/comedi/drivers/daqboard2000.c for (i = 0; i < insn->n; i++) { insn 408 drivers/staging/comedi/drivers/daqboard2000.c ret = comedi_timeout(dev, s, insn, db2k_ao_eoc, 0); insn 415 drivers/staging/comedi/drivers/daqboard2000.c return insn->n; insn 157 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, insn 170 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, unsigned int *data) insn 180 drivers/staging/comedi/drivers/das08.c chan = CR_CHAN(insn->chanspec); insn 181 drivers/staging/comedi/drivers/das08.c range = CR_RANGE(insn->chanspec); insn 197 drivers/staging/comedi/drivers/das08.c range = CR_RANGE(insn->chanspec); insn 202 drivers/staging/comedi/drivers/das08.c for (n = 0; n < insn->n; n++) { insn 211 drivers/staging/comedi/drivers/das08.c ret = comedi_timeout(dev, s, insn, das08_ai_eoc, 0); insn 253 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, unsigned int *data) insn 258 drivers/staging/comedi/drivers/das08.c return insn->n; insn 263 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, unsigned int *data) insn 278 drivers/staging/comedi/drivers/das08.c return insn->n; insn 283 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, unsigned int *data) insn 288 drivers/staging/comedi/drivers/das08.c return insn->n; insn 293 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, unsigned int *data) insn 300 drivers/staging/comedi/drivers/das08.c return insn->n; insn 327 drivers/staging/comedi/drivers/das08.c struct comedi_insn *insn, insn 330 drivers/staging/comedi/drivers/das08.c unsigned int chan = CR_CHAN(insn->chanspec); insn 334 drivers/staging/comedi/drivers/das08.c for (i = 0; i < insn->n; i++) { insn 340 drivers/staging/comedi/drivers/das08.c return insn->n; insn 811 drivers/staging/comedi/drivers/das16.c struct comedi_insn *insn, insn 824 drivers/staging/comedi/drivers/das16.c struct comedi_insn *insn, insn 827 drivers/staging/comedi/drivers/das16.c unsigned int chan = CR_CHAN(insn->chanspec); insn 828 drivers/staging/comedi/drivers/das16.c unsigned int range = CR_RANGE(insn->chanspec); insn 836 drivers/staging/comedi/drivers/das16.c for (i = 0; i < insn->n; i++) { insn 840 drivers/staging/comedi/drivers/das16.c ret = comedi_timeout(dev, s, insn, das16_ai_eoc, 0); insn 853 drivers/staging/comedi/drivers/das16.c return insn->n; insn 858 drivers/staging/comedi/drivers/das16.c struct comedi_insn *insn, insn 861 drivers/staging/comedi/drivers/das16.c unsigned int chan = CR_CHAN(insn->chanspec); insn 864 drivers/staging/comedi/drivers/das16.c for (i = 0; i < insn->n; i++) { insn 875 drivers/staging/comedi/drivers/das16.c return insn->n; insn 880 drivers/staging/comedi/drivers/das16.c struct comedi_insn *insn, insn 885 drivers/staging/comedi/drivers/das16.c return insn->n; insn 890 drivers/staging/comedi/drivers/das16.c struct comedi_insn *insn, insn 898 drivers/staging/comedi/drivers/das16.c return insn->n; insn 311 drivers/staging/comedi/drivers/das16m1.c struct comedi_insn *insn, insn 324 drivers/staging/comedi/drivers/das16m1.c struct comedi_insn *insn, insn 330 drivers/staging/comedi/drivers/das16m1.c das16m1_ai_set_queue(dev, &insn->chanspec, 1); insn 332 drivers/staging/comedi/drivers/das16m1.c for (i = 0; i < insn->n; i++) { insn 340 drivers/staging/comedi/drivers/das16m1.c ret = comedi_timeout(dev, s, insn, das16m1_ai_eoc, 0); insn 348 drivers/staging/comedi/drivers/das16m1.c return insn->n; insn 353 drivers/staging/comedi/drivers/das16m1.c struct comedi_insn *insn, insn 358 drivers/staging/comedi/drivers/das16m1.c return insn->n; insn 363 drivers/staging/comedi/drivers/das16m1.c struct comedi_insn *insn, insn 371 drivers/staging/comedi/drivers/das16m1.c return insn->n; insn 929 drivers/staging/comedi/drivers/das1800.c struct comedi_insn *insn, insn 942 drivers/staging/comedi/drivers/das1800.c struct comedi_insn *insn, insn 945 drivers/staging/comedi/drivers/das1800.c unsigned int range = CR_RANGE(insn->chanspec); insn 952 drivers/staging/comedi/drivers/das1800.c outb(das1800_ai_chanspec_bits(s, insn->chanspec), insn 958 drivers/staging/comedi/drivers/das1800.c das1800_ai_set_chanlist(dev, &insn->chanspec, 1); insn 966 drivers/staging/comedi/drivers/das1800.c for (n = 0; n < insn->n; n++) { insn 970 drivers/staging/comedi/drivers/das1800.c ret = comedi_timeout(dev, s, insn, das1800_ai_eoc, 0); insn 981 drivers/staging/comedi/drivers/das1800.c return ret ? ret : insn->n; insn 986 drivers/staging/comedi/drivers/das1800.c struct comedi_insn *insn, insn 989 drivers/staging/comedi/drivers/das1800.c unsigned int chan = CR_CHAN(insn->chanspec); insn 997 drivers/staging/comedi/drivers/das1800.c for (i = 0; i < insn->n; i++) { insn 1018 drivers/staging/comedi/drivers/das1800.c return insn->n; insn 1023 drivers/staging/comedi/drivers/das1800.c struct comedi_insn *insn, insn 1029 drivers/staging/comedi/drivers/das1800.c return insn->n; insn 1034 drivers/staging/comedi/drivers/das1800.c struct comedi_insn *insn, insn 1042 drivers/staging/comedi/drivers/das1800.c return insn->n; insn 367 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 380 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 383 drivers/staging/comedi/drivers/das6402.c unsigned int chan = CR_CHAN(insn->chanspec); insn 384 drivers/staging/comedi/drivers/das6402.c unsigned int aref = CR_AREF(insn->chanspec); insn 394 drivers/staging/comedi/drivers/das6402.c das6402_ai_set_mode(dev, s, insn->chanspec, DAS6402_MODE_POLLED); insn 400 drivers/staging/comedi/drivers/das6402.c for (i = 0; i < insn->n; i++) { insn 404 drivers/staging/comedi/drivers/das6402.c ret = comedi_timeout(dev, s, insn, das6402_ai_eoc, 0); insn 413 drivers/staging/comedi/drivers/das6402.c return insn->n; insn 418 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 422 drivers/staging/comedi/drivers/das6402.c unsigned int chan = CR_CHAN(insn->chanspec); insn 423 drivers/staging/comedi/drivers/das6402.c unsigned int range = CR_RANGE(insn->chanspec); insn 448 drivers/staging/comedi/drivers/das6402.c for (i = 0; i < insn->n; i++) { insn 473 drivers/staging/comedi/drivers/das6402.c return insn->n; insn 478 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 481 drivers/staging/comedi/drivers/das6402.c unsigned int chan = CR_CHAN(insn->chanspec); insn 489 drivers/staging/comedi/drivers/das6402.c return comedi_readback_insn_read(dev, s, insn, data); insn 494 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 499 drivers/staging/comedi/drivers/das6402.c return insn->n; insn 504 drivers/staging/comedi/drivers/das6402.c struct comedi_insn *insn, insn 512 drivers/staging/comedi/drivers/das6402.c return insn->n; insn 510 drivers/staging/comedi/drivers/das800.c struct comedi_insn *insn, insn 523 drivers/staging/comedi/drivers/das800.c struct comedi_insn *insn, insn 527 drivers/staging/comedi/drivers/das800.c unsigned int chan = CR_CHAN(insn->chanspec); insn 528 drivers/staging/comedi/drivers/das800.c unsigned int range = CR_RANGE(insn->chanspec); insn 549 drivers/staging/comedi/drivers/das800.c for (i = 0; i < insn->n; i++) { insn 553 drivers/staging/comedi/drivers/das800.c ret = comedi_timeout(dev, s, insn, das800_ai_eoc, 0); insn 563 drivers/staging/comedi/drivers/das800.c return insn->n; insn 568 drivers/staging/comedi/drivers/das800.c struct comedi_insn *insn, insn 573 drivers/staging/comedi/drivers/das800.c return insn->n; insn 578 drivers/staging/comedi/drivers/das800.c struct comedi_insn *insn, insn 595 drivers/staging/comedi/drivers/das800.c return insn->n; insn 192 drivers/staging/comedi/drivers/dmm32at.c struct comedi_insn *insn, insn 205 drivers/staging/comedi/drivers/dmm32at.c struct comedi_insn *insn, insn 211 drivers/staging/comedi/drivers/dmm32at.c dmm32at_ai_set_chanspec(dev, s, insn->chanspec, 1); insn 214 drivers/staging/comedi/drivers/dmm32at.c ret = comedi_timeout(dev, s, insn, dmm32at_ai_status, insn 219 drivers/staging/comedi/drivers/dmm32at.c for (i = 0; i < insn->n; i++) { insn 222 drivers/staging/comedi/drivers/dmm32at.c ret = comedi_timeout(dev, s, insn, dmm32at_ai_status, insn 230 drivers/staging/comedi/drivers/dmm32at.c return insn->n; insn 440 drivers/staging/comedi/drivers/dmm32at.c struct comedi_insn *insn, insn 453 drivers/staging/comedi/drivers/dmm32at.c struct comedi_insn *insn, insn 456 drivers/staging/comedi/drivers/dmm32at.c unsigned int chan = CR_CHAN(insn->chanspec); insn 459 drivers/staging/comedi/drivers/dmm32at.c for (i = 0; i < insn->n; i++) { insn 469 drivers/staging/comedi/drivers/dmm32at.c ret = comedi_timeout(dev, s, insn, dmm32at_ao_eoc, 0); insn 479 drivers/staging/comedi/drivers/dmm32at.c return insn->n; insn 448 drivers/staging/comedi/drivers/dt2801.c struct comedi_insn *insn, unsigned int *data) insn 454 drivers/staging/comedi/drivers/dt2801.c for (i = 0; i < insn->n; i++) { insn 456 drivers/staging/comedi/drivers/dt2801.c dt2801_writedata(dev, CR_RANGE(insn->chanspec)); insn 457 drivers/staging/comedi/drivers/dt2801.c dt2801_writedata(dev, CR_CHAN(insn->chanspec)); insn 471 drivers/staging/comedi/drivers/dt2801.c struct comedi_insn *insn, insn 474 drivers/staging/comedi/drivers/dt2801.c unsigned int chan = CR_CHAN(insn->chanspec); insn 487 drivers/staging/comedi/drivers/dt2801.c struct comedi_insn *insn, insn 505 drivers/staging/comedi/drivers/dt2801.c return insn->n; insn 510 drivers/staging/comedi/drivers/dt2801.c struct comedi_insn *insn, insn 515 drivers/staging/comedi/drivers/dt2801.c ret = comedi_dio_insn_config(dev, s, insn, data, 0xff); insn 522 drivers/staging/comedi/drivers/dt2801.c return insn->n; insn 461 drivers/staging/comedi/drivers/dt2811.c struct comedi_insn *insn, insn 474 drivers/staging/comedi/drivers/dt2811.c struct comedi_insn *insn, insn 481 drivers/staging/comedi/drivers/dt2811.c for (i = 0; i < insn->n; i++) { insn 483 drivers/staging/comedi/drivers/dt2811.c dt2811_ai_set_chanspec(dev, insn->chanspec); insn 485 drivers/staging/comedi/drivers/dt2811.c ret = comedi_timeout(dev, s, insn, dt2811_ai_eoc, 0); insn 492 drivers/staging/comedi/drivers/dt2811.c return insn->n; insn 497 drivers/staging/comedi/drivers/dt2811.c struct comedi_insn *insn, insn 500 drivers/staging/comedi/drivers/dt2811.c unsigned int chan = CR_CHAN(insn->chanspec); insn 504 drivers/staging/comedi/drivers/dt2811.c for (i = 0; i < insn->n; i++) { insn 512 drivers/staging/comedi/drivers/dt2811.c return insn->n; insn 517 drivers/staging/comedi/drivers/dt2811.c struct comedi_insn *insn, insn 522 drivers/staging/comedi/drivers/dt2811.c return insn->n; insn 527 drivers/staging/comedi/drivers/dt2811.c struct comedi_insn *insn, insn 535 drivers/staging/comedi/drivers/dt2811.c return insn->n; insn 57 drivers/staging/comedi/drivers/dt2814.c struct comedi_insn *insn, insn 70 drivers/staging/comedi/drivers/dt2814.c struct comedi_insn *insn, unsigned int *data) insn 76 drivers/staging/comedi/drivers/dt2814.c for (n = 0; n < insn->n; n++) { insn 77 drivers/staging/comedi/drivers/dt2814.c chan = CR_CHAN(insn->chanspec); insn 81 drivers/staging/comedi/drivers/dt2814.c ret = comedi_timeout(dev, s, insn, dt2814_ai_eoc, 0); insn 60 drivers/staging/comedi/drivers/dt2815.c struct comedi_insn *insn, insn 73 drivers/staging/comedi/drivers/dt2815.c struct comedi_insn *insn, unsigned int *data) insn 77 drivers/staging/comedi/drivers/dt2815.c int chan = CR_CHAN(insn->chanspec); insn 79 drivers/staging/comedi/drivers/dt2815.c for (i = 0; i < insn->n; i++) insn 86 drivers/staging/comedi/drivers/dt2815.c struct comedi_insn *insn, unsigned int *data) insn 90 drivers/staging/comedi/drivers/dt2815.c int chan = CR_CHAN(insn->chanspec); insn 94 drivers/staging/comedi/drivers/dt2815.c for (i = 0; i < insn->n; i++) { insn 99 drivers/staging/comedi/drivers/dt2815.c ret = comedi_timeout(dev, s, insn, dt2815_ao_status, 0x00); insn 105 drivers/staging/comedi/drivers/dt2815.c ret = comedi_timeout(dev, s, insn, dt2815_ao_status, 0x10); insn 35 drivers/staging/comedi/drivers/dt2817.c struct comedi_insn *insn, insn 38 drivers/staging/comedi/drivers/dt2817.c unsigned int chan = CR_CHAN(insn->chanspec); insn 52 drivers/staging/comedi/drivers/dt2817.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 67 drivers/staging/comedi/drivers/dt2817.c return insn->n; insn 72 drivers/staging/comedi/drivers/dt2817.c struct comedi_insn *insn, insn 98 drivers/staging/comedi/drivers/dt2817.c return insn->n; insn 588 drivers/staging/comedi/drivers/dt282x.c struct comedi_insn *insn, insn 617 drivers/staging/comedi/drivers/dt282x.c struct comedi_insn *insn, insn 629 drivers/staging/comedi/drivers/dt282x.c dt282x_load_changain(dev, 1, &insn->chanspec); insn 633 drivers/staging/comedi/drivers/dt282x.c ret = comedi_timeout(dev, s, insn, insn 638 drivers/staging/comedi/drivers/dt282x.c for (i = 0; i < insn->n; i++) { insn 642 drivers/staging/comedi/drivers/dt282x.c ret = comedi_timeout(dev, s, insn, insn 796 drivers/staging/comedi/drivers/dt282x.c struct comedi_insn *insn, insn 800 drivers/staging/comedi/drivers/dt282x.c unsigned int chan = CR_CHAN(insn->chanspec); insn 801 drivers/staging/comedi/drivers/dt282x.c unsigned int range = CR_RANGE(insn->chanspec); insn 806 drivers/staging/comedi/drivers/dt282x.c for (i = 0; i < insn->n; i++) { insn 822 drivers/staging/comedi/drivers/dt282x.c return insn->n; insn 963 drivers/staging/comedi/drivers/dt282x.c struct comedi_insn *insn, insn 971 drivers/staging/comedi/drivers/dt282x.c return insn->n; insn 976 drivers/staging/comedi/drivers/dt282x.c struct comedi_insn *insn, insn 980 drivers/staging/comedi/drivers/dt282x.c unsigned int chan = CR_CHAN(insn->chanspec); insn 989 drivers/staging/comedi/drivers/dt282x.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 1001 drivers/staging/comedi/drivers/dt282x.c return insn->n; insn 507 drivers/staging/comedi/drivers/dt3000.c struct comedi_insn *insn, insn 513 drivers/staging/comedi/drivers/dt3000.c chan = CR_CHAN(insn->chanspec); insn 514 drivers/staging/comedi/drivers/dt3000.c gain = CR_RANGE(insn->chanspec); insn 516 drivers/staging/comedi/drivers/dt3000.c aref = CR_AREF(insn->chanspec); insn 518 drivers/staging/comedi/drivers/dt3000.c for (i = 0; i < insn->n; i++) insn 526 drivers/staging/comedi/drivers/dt3000.c struct comedi_insn *insn, insn 529 drivers/staging/comedi/drivers/dt3000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 533 drivers/staging/comedi/drivers/dt3000.c for (i = 0; i < insn->n; i++) { insn 539 drivers/staging/comedi/drivers/dt3000.c return insn->n; insn 556 drivers/staging/comedi/drivers/dt3000.c struct comedi_insn *insn, insn 559 drivers/staging/comedi/drivers/dt3000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 568 drivers/staging/comedi/drivers/dt3000.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 574 drivers/staging/comedi/drivers/dt3000.c return insn->n; insn 579 drivers/staging/comedi/drivers/dt3000.c struct comedi_insn *insn, insn 587 drivers/staging/comedi/drivers/dt3000.c return insn->n; insn 592 drivers/staging/comedi/drivers/dt3000.c struct comedi_insn *insn, insn 595 drivers/staging/comedi/drivers/dt3000.c unsigned int addr = CR_CHAN(insn->chanspec); insn 598 drivers/staging/comedi/drivers/dt3000.c for (i = 0; i < insn->n; i++) { insn 544 drivers/staging/comedi/drivers/dt9812.c struct comedi_insn *insn, insn 556 drivers/staging/comedi/drivers/dt9812.c return insn->n; insn 561 drivers/staging/comedi/drivers/dt9812.c struct comedi_insn *insn, insn 569 drivers/staging/comedi/drivers/dt9812.c return insn->n; insn 574 drivers/staging/comedi/drivers/dt9812.c struct comedi_insn *insn, insn 577 drivers/staging/comedi/drivers/dt9812.c unsigned int chan = CR_CHAN(insn->chanspec); insn 582 drivers/staging/comedi/drivers/dt9812.c for (i = 0; i < insn->n; i++) { insn 589 drivers/staging/comedi/drivers/dt9812.c return insn->n; insn 594 drivers/staging/comedi/drivers/dt9812.c struct comedi_insn *insn, insn 601 drivers/staging/comedi/drivers/dt9812.c ret = comedi_readback_insn_read(dev, s, insn, data); insn 609 drivers/staging/comedi/drivers/dt9812.c struct comedi_insn *insn, insn 612 drivers/staging/comedi/drivers/dt9812.c unsigned int chan = CR_CHAN(insn->chanspec); insn 615 drivers/staging/comedi/drivers/dt9812.c for (i = 0; i < insn->n; i++) { insn 626 drivers/staging/comedi/drivers/dt9812.c return insn->n; insn 51 drivers/staging/comedi/drivers/dyna_pci10xx.c struct comedi_insn *insn, insn 64 drivers/staging/comedi/drivers/dyna_pci10xx.c struct comedi_insn *insn, insn 74 drivers/staging/comedi/drivers/dyna_pci10xx.c chan = CR_CHAN(insn->chanspec); insn 75 drivers/staging/comedi/drivers/dyna_pci10xx.c range = range_codes_pci1050_ai[CR_RANGE((insn->chanspec))]; insn 79 drivers/staging/comedi/drivers/dyna_pci10xx.c for (n = 0; n < insn->n; n++) { insn 85 drivers/staging/comedi/drivers/dyna_pci10xx.c ret = comedi_timeout(dev, s, insn, dyna_pci10xx_ai_eoc, 0); insn 104 drivers/staging/comedi/drivers/dyna_pci10xx.c struct comedi_insn *insn, insn 111 drivers/staging/comedi/drivers/dyna_pci10xx.c for (n = 0; n < insn->n; n++) { insn 124 drivers/staging/comedi/drivers/dyna_pci10xx.c struct comedi_insn *insn, insn 139 drivers/staging/comedi/drivers/dyna_pci10xx.c return insn->n; insn 144 drivers/staging/comedi/drivers/dyna_pci10xx.c struct comedi_insn *insn, insn 159 drivers/staging/comedi/drivers/dyna_pci10xx.c return insn->n; insn 52 drivers/staging/comedi/drivers/fl512.c struct comedi_insn *insn, insn 55 drivers/staging/comedi/drivers/fl512.c unsigned int chan = CR_CHAN(insn->chanspec); insn 61 drivers/staging/comedi/drivers/fl512.c for (i = 0; i < insn->n; i++) { insn 74 drivers/staging/comedi/drivers/fl512.c return insn->n; insn 79 drivers/staging/comedi/drivers/fl512.c struct comedi_insn *insn, insn 82 drivers/staging/comedi/drivers/fl512.c unsigned int chan = CR_CHAN(insn->chanspec); insn 86 drivers/staging/comedi/drivers/fl512.c for (i = 0; i < insn->n; i++) { insn 96 drivers/staging/comedi/drivers/fl512.c return insn->n; insn 456 drivers/staging/comedi/drivers/gsc_hpdi.c struct comedi_insn *insn, insn 470 drivers/staging/comedi/drivers/gsc_hpdi.c ret = comedi_dio_insn_config(dev, s, insn, data, 0xffffffff); insn 476 drivers/staging/comedi/drivers/gsc_hpdi.c return insn->n; insn 90 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 103 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 106 drivers/staging/comedi/drivers/icp_multi.c unsigned int chan = CR_CHAN(insn->chanspec); insn 107 drivers/staging/comedi/drivers/icp_multi.c unsigned int range = CR_RANGE(insn->chanspec); insn 108 drivers/staging/comedi/drivers/icp_multi.c unsigned int aref = CR_AREF(insn->chanspec); insn 123 drivers/staging/comedi/drivers/icp_multi.c for (n = 0; n < insn->n; n++) { insn 131 drivers/staging/comedi/drivers/icp_multi.c ret = comedi_timeout(dev, s, insn, icp_multi_ai_eoc, 0); insn 143 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 156 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 159 drivers/staging/comedi/drivers/icp_multi.c unsigned int chan = CR_CHAN(insn->chanspec); insn 160 drivers/staging/comedi/drivers/icp_multi.c unsigned int range = CR_RANGE(insn->chanspec); insn 169 drivers/staging/comedi/drivers/icp_multi.c for (i = 0; i < insn->n; i++) { insn 174 drivers/staging/comedi/drivers/icp_multi.c ret = comedi_timeout(dev, s, insn, icp_multi_ao_ready, 0); insn 187 drivers/staging/comedi/drivers/icp_multi.c return insn->n; insn 192 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 197 drivers/staging/comedi/drivers/icp_multi.c return insn->n; insn 202 drivers/staging/comedi/drivers/icp_multi.c struct comedi_insn *insn, insn 210 drivers/staging/comedi/drivers/icp_multi.c return insn->n; insn 145 drivers/staging/comedi/drivers/ii_pci20kc.c struct comedi_insn *insn, insn 149 drivers/staging/comedi/drivers/ii_pci20kc.c unsigned int chan = CR_CHAN(insn->chanspec); insn 152 drivers/staging/comedi/drivers/ii_pci20kc.c for (i = 0; i < insn->n; i++) { insn 165 drivers/staging/comedi/drivers/ii_pci20kc.c return insn->n; insn 170 drivers/staging/comedi/drivers/ii_pci20kc.c struct comedi_insn *insn, insn 224 drivers/staging/comedi/drivers/ii_pci20kc.c struct comedi_insn *insn, insn 231 drivers/staging/comedi/drivers/ii_pci20kc.c ii20k_ai_setup(dev, s, insn->chanspec); insn 233 drivers/staging/comedi/drivers/ii_pci20kc.c for (i = 0; i < insn->n; i++) { insn 239 drivers/staging/comedi/drivers/ii_pci20kc.c ret = comedi_timeout(dev, s, insn, ii20k_ai_eoc, 0); insn 250 drivers/staging/comedi/drivers/ii_pci20kc.c return insn->n; insn 319 drivers/staging/comedi/drivers/ii_pci20kc.c struct comedi_insn *insn, insn 322 drivers/staging/comedi/drivers/ii_pci20kc.c unsigned int chan = CR_CHAN(insn->chanspec); insn 335 drivers/staging/comedi/drivers/ii_pci20kc.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 341 drivers/staging/comedi/drivers/ii_pci20kc.c return insn->n; insn 346 drivers/staging/comedi/drivers/ii_pci20kc.c struct comedi_insn *insn, insn 372 drivers/staging/comedi/drivers/ii_pci20kc.c return insn->n; insn 267 drivers/staging/comedi/drivers/jr3_pci.c struct comedi_insn *insn, insn 271 drivers/staging/comedi/drivers/jr3_pci.c unsigned int chan = CR_CHAN(insn->chanspec); insn 286 drivers/staging/comedi/drivers/jr3_pci.c for (i = 0; i < insn->n; i++) insn 289 drivers/staging/comedi/drivers/jr3_pci.c return insn->n; insn 43 drivers/staging/comedi/drivers/ke_counter.c struct comedi_insn *insn, insn 46 drivers/staging/comedi/drivers/ke_counter.c unsigned int chan = CR_CHAN(insn->chanspec); insn 50 drivers/staging/comedi/drivers/ke_counter.c for (i = 0; i < insn->n; i++) { insn 60 drivers/staging/comedi/drivers/ke_counter.c return insn->n; insn 65 drivers/staging/comedi/drivers/ke_counter.c struct comedi_insn *insn, insn 68 drivers/staging/comedi/drivers/ke_counter.c unsigned int chan = CR_CHAN(insn->chanspec); insn 72 drivers/staging/comedi/drivers/ke_counter.c for (i = 0; i < insn->n; i++) { insn 84 drivers/staging/comedi/drivers/ke_counter.c return insn->n; insn 97 drivers/staging/comedi/drivers/ke_counter.c struct comedi_insn *insn, insn 145 drivers/staging/comedi/drivers/ke_counter.c return insn->n; insn 150 drivers/staging/comedi/drivers/ke_counter.c struct comedi_insn *insn, insn 158 drivers/staging/comedi/drivers/ke_counter.c return insn->n; insn 449 drivers/staging/comedi/drivers/me4000.c struct comedi_insn *insn, insn 462 drivers/staging/comedi/drivers/me4000.c struct comedi_insn *insn, insn 465 drivers/staging/comedi/drivers/me4000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 466 drivers/staging/comedi/drivers/me4000.c unsigned int range = CR_RANGE(insn->chanspec); insn 467 drivers/staging/comedi/drivers/me4000.c unsigned int aref = CR_AREF(insn->chanspec); insn 507 drivers/staging/comedi/drivers/me4000.c for (i = 0; i < insn->n; i++) { insn 513 drivers/staging/comedi/drivers/me4000.c ret = comedi_timeout(dev, s, insn, me4000_ai_eoc, 0); insn 523 drivers/staging/comedi/drivers/me4000.c return ret ? ret : insn->n; insn 994 drivers/staging/comedi/drivers/me4000.c struct comedi_insn *insn, insn 997 drivers/staging/comedi/drivers/me4000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1019 drivers/staging/comedi/drivers/me4000.c struct comedi_insn *insn, insn 1038 drivers/staging/comedi/drivers/me4000.c return insn->n; insn 1043 drivers/staging/comedi/drivers/me4000.c struct comedi_insn *insn, insn 1046 drivers/staging/comedi/drivers/me4000.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1060 drivers/staging/comedi/drivers/me4000.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 1092 drivers/staging/comedi/drivers/me4000.c return insn->n; insn 151 drivers/staging/comedi/drivers/me_daq.c struct comedi_insn *insn, insn 155 drivers/staging/comedi/drivers/me_daq.c unsigned int chan = CR_CHAN(insn->chanspec); insn 164 drivers/staging/comedi/drivers/me_daq.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 179 drivers/staging/comedi/drivers/me_daq.c return insn->n; insn 184 drivers/staging/comedi/drivers/me_daq.c struct comedi_insn *insn, insn 212 drivers/staging/comedi/drivers/me_daq.c return insn->n; insn 217 drivers/staging/comedi/drivers/me_daq.c struct comedi_insn *insn, insn 230 drivers/staging/comedi/drivers/me_daq.c struct comedi_insn *insn, insn 234 drivers/staging/comedi/drivers/me_daq.c unsigned int chan = CR_CHAN(insn->chanspec); insn 235 drivers/staging/comedi/drivers/me_daq.c unsigned int range = CR_RANGE(insn->chanspec); insn 236 drivers/staging/comedi/drivers/me_daq.c unsigned int aref = CR_AREF(insn->chanspec); insn 272 drivers/staging/comedi/drivers/me_daq.c for (i = 0; i < insn->n; i++) { insn 277 drivers/staging/comedi/drivers/me_daq.c ret = comedi_timeout(dev, s, insn, me_ai_eoc, 0); insn 292 drivers/staging/comedi/drivers/me_daq.c return ret ? ret : insn->n; insn 297 drivers/staging/comedi/drivers/me_daq.c struct comedi_insn *insn, insn 301 drivers/staging/comedi/drivers/me_daq.c unsigned int chan = CR_CHAN(insn->chanspec); insn 302 drivers/staging/comedi/drivers/me_daq.c unsigned int range = CR_RANGE(insn->chanspec); insn 326 drivers/staging/comedi/drivers/me_daq.c for (i = 0; i < insn->n; i++) { insn 336 drivers/staging/comedi/drivers/me_daq.c return insn->n; insn 86 drivers/staging/comedi/drivers/mf6x4.c struct comedi_insn *insn, insn 91 drivers/staging/comedi/drivers/mf6x4.c return insn->n; insn 96 drivers/staging/comedi/drivers/mf6x4.c struct comedi_insn *insn, insn 104 drivers/staging/comedi/drivers/mf6x4.c return insn->n; insn 109 drivers/staging/comedi/drivers/mf6x4.c struct comedi_insn *insn, insn 123 drivers/staging/comedi/drivers/mf6x4.c struct comedi_insn *insn, insn 126 drivers/staging/comedi/drivers/mf6x4.c unsigned int chan = CR_CHAN(insn->chanspec); insn 134 drivers/staging/comedi/drivers/mf6x4.c for (i = 0; i < insn->n; i++) { insn 138 drivers/staging/comedi/drivers/mf6x4.c ret = comedi_timeout(dev, s, insn, mf6x4_ai_eoc, 0); insn 151 drivers/staging/comedi/drivers/mf6x4.c return insn->n; insn 156 drivers/staging/comedi/drivers/mf6x4.c struct comedi_insn *insn, insn 160 drivers/staging/comedi/drivers/mf6x4.c unsigned int chan = CR_CHAN(insn->chanspec); insn 170 drivers/staging/comedi/drivers/mf6x4.c for (i = 0; i < insn->n; i++) { insn 176 drivers/staging/comedi/drivers/mf6x4.c return insn->n; insn 190 drivers/staging/comedi/drivers/mpc624.c struct comedi_insn *insn, insn 203 drivers/staging/comedi/drivers/mpc624.c struct comedi_insn *insn, insn 213 drivers/staging/comedi/drivers/mpc624.c outb(insn->chanspec, dev->iobase + MPC624_GNMUXCH); insn 215 drivers/staging/comedi/drivers/mpc624.c for (i = 0; i < insn->n; i++) { insn 225 drivers/staging/comedi/drivers/mpc624.c ret = comedi_timeout(dev, s, insn, mpc624_ai_eoc, 0); insn 232 drivers/staging/comedi/drivers/mpc624.c return insn->n; insn 83 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 96 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 99 drivers/staging/comedi/drivers/multiq3.c unsigned int chan = CR_CHAN(insn->chanspec); insn 106 drivers/staging/comedi/drivers/multiq3.c ret = comedi_timeout(dev, s, insn, multiq3_ai_status, insn 111 drivers/staging/comedi/drivers/multiq3.c for (i = 0; i < insn->n; i++) { insn 114 drivers/staging/comedi/drivers/multiq3.c ret = comedi_timeout(dev, s, insn, multiq3_ai_status, insn 128 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 133 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 136 drivers/staging/comedi/drivers/multiq3.c unsigned int chan = CR_CHAN(insn->chanspec); insn 140 drivers/staging/comedi/drivers/multiq3.c for (i = 0; i < insn->n; i++) { insn 149 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 154 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, unsigned int *data) insn 158 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 163 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 171 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 176 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 179 drivers/staging/comedi/drivers/multiq3.c unsigned int chan = CR_CHAN(insn->chanspec); insn 183 drivers/staging/comedi/drivers/multiq3.c for (i = 0; i < insn->n; i++) { insn 217 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 235 drivers/staging/comedi/drivers/multiq3.c struct comedi_insn *insn, insn 238 drivers/staging/comedi/drivers/multiq3.c unsigned int chan = CR_CHAN(insn->chanspec); insn 248 drivers/staging/comedi/drivers/multiq3.c return insn->n; insn 112 drivers/staging/comedi/drivers/ni_6527.c struct comedi_insn *insn, insn 116 drivers/staging/comedi/drivers/ni_6527.c unsigned int chan = CR_CHAN(insn->chanspec); insn 141 drivers/staging/comedi/drivers/ni_6527.c return insn->n; insn 146 drivers/staging/comedi/drivers/ni_6527.c struct comedi_insn *insn, insn 157 drivers/staging/comedi/drivers/ni_6527.c return insn->n; insn 162 drivers/staging/comedi/drivers/ni_6527.c struct comedi_insn *insn, insn 184 drivers/staging/comedi/drivers/ni_6527.c return insn->n; insn 265 drivers/staging/comedi/drivers/ni_6527.c struct comedi_insn *insn, unsigned int *data) insn 268 drivers/staging/comedi/drivers/ni_6527.c return insn->n; insn 307 drivers/staging/comedi/drivers/ni_6527.c struct comedi_insn *insn, insn 316 drivers/staging/comedi/drivers/ni_6527.c if (insn->n != 3) insn 354 drivers/staging/comedi/drivers/ni_6527.c return insn->n; insn 348 drivers/staging/comedi/drivers/ni_65xx.c struct comedi_insn *insn, insn 352 drivers/staging/comedi/drivers/ni_65xx.c unsigned int chan = CR_CHAN(insn->chanspec); insn 411 drivers/staging/comedi/drivers/ni_65xx.c return insn->n; insn 416 drivers/staging/comedi/drivers/ni_65xx.c struct comedi_insn *insn, insn 420 drivers/staging/comedi/drivers/ni_65xx.c unsigned int base_chan = CR_CHAN(insn->chanspec); insn 467 drivers/staging/comedi/drivers/ni_65xx.c return insn->n; insn 552 drivers/staging/comedi/drivers/ni_65xx.c struct comedi_insn *insn, insn 556 drivers/staging/comedi/drivers/ni_65xx.c return insn->n; insn 561 drivers/staging/comedi/drivers/ni_65xx.c struct comedi_insn *insn, insn 567 drivers/staging/comedi/drivers/ni_65xx.c if (insn->n != 3) insn 602 drivers/staging/comedi/drivers/ni_65xx.c return insn->n; insn 533 drivers/staging/comedi/drivers/ni_660x.c struct comedi_insn *insn, insn 536 drivers/staging/comedi/drivers/ni_660x.c unsigned int shift = CR_CHAN(insn->chanspec); insn 558 drivers/staging/comedi/drivers/ni_660x.c return insn->n; insn 696 drivers/staging/comedi/drivers/ni_660x.c struct comedi_insn *insn, insn 699 drivers/staging/comedi/drivers/ni_660x.c unsigned int chan = CR_CHAN(insn->chanspec); insn 733 drivers/staging/comedi/drivers/ni_660x.c return insn->n; insn 949 drivers/staging/comedi/drivers/ni_660x.c struct comedi_insn *insn, insn 74 drivers/staging/comedi/drivers/ni_670x.c struct comedi_insn *insn, insn 77 drivers/staging/comedi/drivers/ni_670x.c unsigned int chan = CR_CHAN(insn->chanspec); insn 91 drivers/staging/comedi/drivers/ni_670x.c for (i = 0; i < insn->n; i++) { insn 101 drivers/staging/comedi/drivers/ni_670x.c return insn->n; insn 106 drivers/staging/comedi/drivers/ni_670x.c struct comedi_insn *insn, insn 114 drivers/staging/comedi/drivers/ni_670x.c return insn->n; insn 119 drivers/staging/comedi/drivers/ni_670x.c struct comedi_insn *insn, insn 124 drivers/staging/comedi/drivers/ni_670x.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 130 drivers/staging/comedi/drivers/ni_670x.c return insn->n; insn 567 drivers/staging/comedi/drivers/ni_at_a2150.c struct comedi_insn *insn, insn 579 drivers/staging/comedi/drivers/ni_at_a2150.c struct comedi_insn *insn, unsigned int *data) insn 589 drivers/staging/comedi/drivers/ni_at_a2150.c if (a2150_set_chanlist(dev, CR_CHAN(insn->chanspec), 1) < 0) insn 614 drivers/staging/comedi/drivers/ni_at_a2150.c ret = comedi_timeout(dev, s, insn, a2150_ai_eoc, 0); insn 622 drivers/staging/comedi/drivers/ni_at_a2150.c for (n = 0; n < insn->n; n++) { insn 623 drivers/staging/comedi/drivers/ni_at_a2150.c ret = comedi_timeout(dev, s, insn, a2150_ai_eoc, 0); insn 128 drivers/staging/comedi/drivers/ni_at_ao.c struct comedi_insn *insn, insn 131 drivers/staging/comedi/drivers/ni_at_ao.c unsigned int chan = CR_CHAN(insn->chanspec); insn 138 drivers/staging/comedi/drivers/ni_at_ao.c for (i = 0; i < insn->n; i++) { insn 150 drivers/staging/comedi/drivers/ni_at_ao.c return insn->n; insn 155 drivers/staging/comedi/drivers/ni_at_ao.c struct comedi_insn *insn, insn 163 drivers/staging/comedi/drivers/ni_at_ao.c return insn->n; insn 168 drivers/staging/comedi/drivers/ni_at_ao.c struct comedi_insn *insn, insn 172 drivers/staging/comedi/drivers/ni_at_ao.c unsigned int chan = CR_CHAN(insn->chanspec); insn 181 drivers/staging/comedi/drivers/ni_at_ao.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 196 drivers/staging/comedi/drivers/ni_at_ao.c return insn->n; insn 234 drivers/staging/comedi/drivers/ni_at_ao.c struct comedi_insn *insn, insn 237 drivers/staging/comedi/drivers/ni_at_ao.c unsigned int chan = CR_CHAN(insn->chanspec); insn 239 drivers/staging/comedi/drivers/ni_at_ao.c if (insn->n) { insn 240 drivers/staging/comedi/drivers/ni_at_ao.c unsigned int val = data[insn->n - 1]; insn 262 drivers/staging/comedi/drivers/ni_at_ao.c return insn->n; insn 453 drivers/staging/comedi/drivers/ni_atmio16d.c struct comedi_insn *insn, insn 470 drivers/staging/comedi/drivers/ni_atmio16d.c struct comedi_insn *insn, unsigned int *data) insn 478 drivers/staging/comedi/drivers/ni_atmio16d.c chan = CR_CHAN(insn->chanspec); insn 479 drivers/staging/comedi/drivers/ni_atmio16d.c gain = CR_RANGE(insn->chanspec); insn 489 drivers/staging/comedi/drivers/ni_atmio16d.c for (i = 0; i < insn->n; i++) { insn 494 drivers/staging/comedi/drivers/ni_atmio16d.c ret = comedi_timeout(dev, s, insn, atmio16d_ai_eoc, 0); insn 510 drivers/staging/comedi/drivers/ni_atmio16d.c struct comedi_insn *insn, insn 514 drivers/staging/comedi/drivers/ni_atmio16d.c unsigned int chan = CR_CHAN(insn->chanspec); insn 524 drivers/staging/comedi/drivers/ni_atmio16d.c for (i = 0; i < insn->n; i++) { insn 535 drivers/staging/comedi/drivers/ni_atmio16d.c return insn->n; insn 540 drivers/staging/comedi/drivers/ni_atmio16d.c struct comedi_insn *insn, insn 548 drivers/staging/comedi/drivers/ni_atmio16d.c return insn->n; insn 553 drivers/staging/comedi/drivers/ni_atmio16d.c struct comedi_insn *insn, insn 557 drivers/staging/comedi/drivers/ni_atmio16d.c unsigned int chan = CR_CHAN(insn->chanspec); insn 566 drivers/staging/comedi/drivers/ni_atmio16d.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 577 drivers/staging/comedi/drivers/ni_atmio16d.c return insn->n; insn 76 drivers/staging/comedi/drivers/ni_daq_700.c struct comedi_insn *insn, insn 93 drivers/staging/comedi/drivers/ni_daq_700.c return insn->n; insn 98 drivers/staging/comedi/drivers/ni_daq_700.c struct comedi_insn *insn, insn 103 drivers/staging/comedi/drivers/ni_daq_700.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 110 drivers/staging/comedi/drivers/ni_daq_700.c return insn->n; insn 115 drivers/staging/comedi/drivers/ni_daq_700.c struct comedi_insn *insn, insn 133 drivers/staging/comedi/drivers/ni_daq_700.c struct comedi_insn *insn, unsigned int *data) insn 138 drivers/staging/comedi/drivers/ni_daq_700.c unsigned int chan = CR_CHAN(insn->chanspec); insn 139 drivers/staging/comedi/drivers/ni_daq_700.c unsigned int aref = CR_AREF(insn->chanspec); insn 140 drivers/staging/comedi/drivers/ni_daq_700.c unsigned int range = CR_RANGE(insn->chanspec); insn 158 drivers/staging/comedi/drivers/ni_daq_700.c for (n = 0; n < insn->n; n++) { insn 169 drivers/staging/comedi/drivers/ni_daq_700.c ret = comedi_timeout(dev, s, insn, daq700_ai_eoc, 0); insn 214 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 227 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 231 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 232 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int range = CR_RANGE(insn->chanspec); insn 233 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int aref = CR_AREF(insn->chanspec); insn 258 drivers/staging/comedi/drivers/ni_labpc_common.c for (i = 0; i < insn->n; i++) { insn 262 drivers/staging/comedi/drivers/ni_labpc_common.c ret = comedi_timeout(dev, s, insn, labpc_ai_eoc, 0); insn 269 drivers/staging/comedi/drivers/ni_labpc_common.c return insn->n; insn 904 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 914 drivers/staging/comedi/drivers/ni_labpc_common.c channel = CR_CHAN(insn->chanspec); insn 928 drivers/staging/comedi/drivers/ni_labpc_common.c range = CR_RANGE(insn->chanspec); insn 937 drivers/staging/comedi/drivers/ni_labpc_common.c for (i = 0; i < insn->n; i++) insn 940 drivers/staging/comedi/drivers/ni_labpc_common.c return insn->n; insn 1123 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 1126 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1132 drivers/staging/comedi/drivers/ni_labpc_common.c if (insn->n > 0) { insn 1133 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int val = data[insn->n - 1]; insn 1141 drivers/staging/comedi/drivers/ni_labpc_common.c return insn->n; insn 1146 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 1160 drivers/staging/comedi/drivers/ni_labpc_common.c struct comedi_insn *insn, insn 1163 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1174 drivers/staging/comedi/drivers/ni_labpc_common.c if (insn->n > 0) { insn 1175 drivers/staging/comedi/drivers/ni_labpc_common.c unsigned int val = data[insn->n - 1]; insn 1177 drivers/staging/comedi/drivers/ni_labpc_common.c ret = comedi_timeout(dev, s, insn, labpc_eeprom_ready, 0); insn 1185 drivers/staging/comedi/drivers/ni_labpc_common.c return insn->n; insn 1824 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 1833 drivers/staging/comedi/drivers/ni_mio_common.c ni_load_channelgain_list(dev, s, 1, &insn->chanspec); insn 1844 drivers/staging/comedi/drivers/ni_mio_common.c for (n = 0; n < insn->n; n++) { insn 1873 drivers/staging/comedi/drivers/ni_mio_common.c for (n = 0; n < insn->n; n++) { insn 1901 drivers/staging/comedi/drivers/ni_mio_common.c for (n = 0; n < insn->n; n++) { insn 1924 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 2463 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, unsigned int *data) insn 2468 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n < 1) insn 2679 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 2683 drivers/staging/comedi/drivers/ni_mio_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 2684 drivers/staging/comedi/drivers/ni_mio_common.c unsigned int range = CR_RANGE(insn->chanspec); insn 2698 drivers/staging/comedi/drivers/ni_mio_common.c ni_ao_config_chanlist(dev, s, &insn->chanspec, 1, 0); insn 2700 drivers/staging/comedi/drivers/ni_mio_common.c for (i = 0; i < insn->n; i++) { insn 2731 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 2820 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, unsigned int *data) insn 3450 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 3456 drivers/staging/comedi/drivers/ni_mio_common.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 3464 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 3469 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 3487 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 3493 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 3507 drivers/staging/comedi/drivers/ni_mio_common.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 3513 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 3518 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 3526 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 3848 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 3853 drivers/staging/comedi/drivers/ni_mio_common.c int err = insn->n; insn 3856 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n != 2) insn 3931 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4081 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4088 drivers/staging/comedi/drivers/ni_mio_common.c for (i = 0; i < insn->n; i++) insn 4091 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4096 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4101 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n) { insn 4102 drivers/staging/comedi/drivers/ni_mio_common.c unsigned int val = data[insn->n - 1]; insn 4114 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4119 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4150 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4175 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4235 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4399 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4402 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n) { insn 4404 drivers/staging/comedi/drivers/ni_mio_common.c ni_write_caldac(dev, CR_CHAN(insn->chanspec), insn 4405 drivers/staging/comedi/drivers/ni_mio_common.c data[insn->n - 1]); insn 4408 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4413 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4419 drivers/staging/comedi/drivers/ni_mio_common.c for (i = 0; i < insn->n; i++) insn 4420 drivers/staging/comedi/drivers/ni_mio_common.c data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)]; insn 4422 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4512 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4518 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n) { insn 4519 drivers/staging/comedi/drivers/ni_mio_common.c val = ni_read_eeprom(dev, CR_CHAN(insn->chanspec)); insn 4520 drivers/staging/comedi/drivers/ni_mio_common.c for (i = 0; i < insn->n; i++) insn 4523 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4528 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4534 drivers/staging/comedi/drivers/ni_mio_common.c for (i = 0; i < insn->n; i++) insn 4535 drivers/staging/comedi/drivers/ni_mio_common.c data[i] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)]; insn 4537 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4685 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4690 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->n < 1) insn 4693 drivers/staging/comedi/drivers/ni_mio_common.c chan = CR_CHAN(insn->chanspec); insn 4718 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4731 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 4809 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 4823 drivers/staging/comedi/drivers/ni_mio_common.c if (insn->chanspec & CR_ALT_SOURCE) insn 4826 drivers/staging/comedi/drivers/ni_mio_common.c channel_select = CR_CHAN(insn->chanspec); insn 4829 drivers/staging/comedi/drivers/ni_mio_common.c for (n = 0; n < insn->n; n++) { insn 4835 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 5196 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 5200 drivers/staging/comedi/drivers/ni_mio_common.c unsigned int chan = CR_CHAN(insn->chanspec); insn 5239 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 5244 drivers/staging/comedi/drivers/ni_mio_common.c return insn->n; insn 5831 drivers/staging/comedi/drivers/ni_mio_common.c struct comedi_insn *insn, insn 469 drivers/staging/comedi/drivers/ni_pcidio.c struct comedi_insn *insn, insn 483 drivers/staging/comedi/drivers/ni_pcidio.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 489 drivers/staging/comedi/drivers/ni_pcidio.c return insn->n; insn 494 drivers/staging/comedi/drivers/ni_pcidio.c struct comedi_insn *insn, insn 502 drivers/staging/comedi/drivers/ni_pcidio.c return insn->n; insn 1451 drivers/staging/comedi/drivers/ni_tio.c struct comedi_insn *insn, insn 1500 drivers/staging/comedi/drivers/ni_tio.c return ret ? ret : insn->n; insn 1634 drivers/staging/comedi/drivers/ni_tio.c struct comedi_insn *insn, insn 1639 drivers/staging/comedi/drivers/ni_tio.c unsigned int channel = CR_CHAN(insn->chanspec); insn 1644 drivers/staging/comedi/drivers/ni_tio.c for (i = 0; i < insn->n; i++) { insn 1659 drivers/staging/comedi/drivers/ni_tio.c return insn->n; insn 1675 drivers/staging/comedi/drivers/ni_tio.c struct comedi_insn *insn, insn 1680 drivers/staging/comedi/drivers/ni_tio.c unsigned int channel = CR_CHAN(insn->chanspec); insn 1686 drivers/staging/comedi/drivers/ni_tio.c if (insn->n < 1) insn 1688 drivers/staging/comedi/drivers/ni_tio.c load_val = data[insn->n - 1]; insn 1719 drivers/staging/comedi/drivers/ni_tio.c return insn->n; insn 130 drivers/staging/comedi/drivers/ni_tio.h struct comedi_insn *insn, unsigned int *data); insn 132 drivers/staging/comedi/drivers/ni_tio.h struct comedi_insn *insn, unsigned int *data); insn 134 drivers/staging/comedi/drivers/ni_tio.h struct comedi_insn *insn, unsigned int *data); insn 339 drivers/staging/comedi/drivers/ni_usb6501.c struct comedi_insn *insn, insn 344 drivers/staging/comedi/drivers/ni_usb6501.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 352 drivers/staging/comedi/drivers/ni_usb6501.c return insn->n; insn 357 drivers/staging/comedi/drivers/ni_usb6501.c struct comedi_insn *insn, insn 386 drivers/staging/comedi/drivers/ni_usb6501.c return insn->n; insn 391 drivers/staging/comedi/drivers/ni_usb6501.c struct comedi_insn *insn, insn 414 drivers/staging/comedi/drivers/ni_usb6501.c return ret ? ret : insn->n; insn 419 drivers/staging/comedi/drivers/ni_usb6501.c struct comedi_insn *insn, insn 426 drivers/staging/comedi/drivers/ni_usb6501.c for (i = 0; i < insn->n; i++) { insn 433 drivers/staging/comedi/drivers/ni_usb6501.c return insn->n; insn 438 drivers/staging/comedi/drivers/ni_usb6501.c struct comedi_insn *insn, insn 443 drivers/staging/comedi/drivers/ni_usb6501.c if (insn->n) { insn 444 drivers/staging/comedi/drivers/ni_usb6501.c u32 val = data[insn->n - 1]; insn 451 drivers/staging/comedi/drivers/ni_usb6501.c return insn->n; insn 237 drivers/staging/comedi/drivers/pcl711.c struct comedi_insn *insn, insn 250 drivers/staging/comedi/drivers/pcl711.c struct comedi_insn *insn, insn 256 drivers/staging/comedi/drivers/pcl711.c pcl711_set_changain(dev, s, insn->chanspec); insn 260 drivers/staging/comedi/drivers/pcl711.c for (i = 0; i < insn->n; i++) { insn 263 drivers/staging/comedi/drivers/pcl711.c ret = comedi_timeout(dev, s, insn, pcl711_ai_eoc, 0); insn 270 drivers/staging/comedi/drivers/pcl711.c return insn->n; insn 366 drivers/staging/comedi/drivers/pcl711.c struct comedi_insn *insn, insn 369 drivers/staging/comedi/drivers/pcl711.c unsigned int chan = CR_CHAN(insn->chanspec); insn 373 drivers/staging/comedi/drivers/pcl711.c for (i = 0; i < insn->n; i++) { insn 379 drivers/staging/comedi/drivers/pcl711.c return insn->n; insn 384 drivers/staging/comedi/drivers/pcl711.c struct comedi_insn *insn, insn 394 drivers/staging/comedi/drivers/pcl711.c return insn->n; insn 399 drivers/staging/comedi/drivers/pcl711.c struct comedi_insn *insn, insn 414 drivers/staging/comedi/drivers/pcl711.c return insn->n; insn 150 drivers/staging/comedi/drivers/pcl726.c struct comedi_insn *insn, insn 154 drivers/staging/comedi/drivers/pcl726.c return insn->n; insn 234 drivers/staging/comedi/drivers/pcl726.c struct comedi_insn *insn, insn 237 drivers/staging/comedi/drivers/pcl726.c unsigned int chan = CR_CHAN(insn->chanspec); insn 238 drivers/staging/comedi/drivers/pcl726.c unsigned int range = CR_RANGE(insn->chanspec); insn 241 drivers/staging/comedi/drivers/pcl726.c for (i = 0; i < insn->n; i++) { insn 255 drivers/staging/comedi/drivers/pcl726.c return insn->n; insn 260 drivers/staging/comedi/drivers/pcl726.c struct comedi_insn *insn, insn 276 drivers/staging/comedi/drivers/pcl726.c return insn->n; insn 281 drivers/staging/comedi/drivers/pcl726.c struct comedi_insn *insn, insn 305 drivers/staging/comedi/drivers/pcl726.c return insn->n; insn 214 drivers/staging/comedi/drivers/pcl730.c struct comedi_insn *insn, insn 234 drivers/staging/comedi/drivers/pcl730.c return insn->n; insn 256 drivers/staging/comedi/drivers/pcl730.c struct comedi_insn *insn, insn 261 drivers/staging/comedi/drivers/pcl730.c return insn->n; insn 614 drivers/staging/comedi/drivers/pcl812.c struct comedi_insn *insn, insn 911 drivers/staging/comedi/drivers/pcl812.c struct comedi_insn *insn, insn 921 drivers/staging/comedi/drivers/pcl812.c pcl812_ai_set_chan_range(dev, insn->chanspec, 1); insn 923 drivers/staging/comedi/drivers/pcl812.c for (i = 0; i < insn->n; i++) { insn 927 drivers/staging/comedi/drivers/pcl812.c ret = comedi_timeout(dev, s, insn, pcl812_ai_eoc, 0); insn 937 drivers/staging/comedi/drivers/pcl812.c return ret ? ret : insn->n; insn 942 drivers/staging/comedi/drivers/pcl812.c struct comedi_insn *insn, insn 945 drivers/staging/comedi/drivers/pcl812.c unsigned int chan = CR_CHAN(insn->chanspec); insn 949 drivers/staging/comedi/drivers/pcl812.c for (i = 0; i < insn->n; i++) { insn 956 drivers/staging/comedi/drivers/pcl812.c return insn->n; insn 961 drivers/staging/comedi/drivers/pcl812.c struct comedi_insn *insn, insn 967 drivers/staging/comedi/drivers/pcl812.c return insn->n; insn 972 drivers/staging/comedi/drivers/pcl812.c struct comedi_insn *insn, insn 982 drivers/staging/comedi/drivers/pcl812.c return insn->n; insn 199 drivers/staging/comedi/drivers/pcl816.c struct comedi_insn *insn, insn 504 drivers/staging/comedi/drivers/pcl816.c struct comedi_insn *insn, insn 507 drivers/staging/comedi/drivers/pcl816.c unsigned int chan = CR_CHAN(insn->chanspec); insn 508 drivers/staging/comedi/drivers/pcl816.c unsigned int range = CR_RANGE(insn->chanspec); insn 517 drivers/staging/comedi/drivers/pcl816.c for (i = 0; i < insn->n; i++) { insn 521 drivers/staging/comedi/drivers/pcl816.c ret = comedi_timeout(dev, s, insn, pcl816_ai_eoc, 0); insn 530 drivers/staging/comedi/drivers/pcl816.c return ret ? ret : insn->n; insn 535 drivers/staging/comedi/drivers/pcl816.c struct comedi_insn *insn, insn 541 drivers/staging/comedi/drivers/pcl816.c return insn->n; insn 546 drivers/staging/comedi/drivers/pcl816.c struct comedi_insn *insn, insn 556 drivers/staging/comedi/drivers/pcl816.c return insn->n; insn 413 drivers/staging/comedi/drivers/pcl818.c struct comedi_insn *insn, insn 802 drivers/staging/comedi/drivers/pcl818.c struct comedi_insn *insn, insn 805 drivers/staging/comedi/drivers/pcl818.c unsigned int chan = CR_CHAN(insn->chanspec); insn 806 drivers/staging/comedi/drivers/pcl818.c unsigned int range = CR_RANGE(insn->chanspec); insn 815 drivers/staging/comedi/drivers/pcl818.c for (i = 0; i < insn->n; i++) { insn 819 drivers/staging/comedi/drivers/pcl818.c ret = comedi_timeout(dev, s, insn, pcl818_ai_eoc, 0); insn 827 drivers/staging/comedi/drivers/pcl818.c return ret ? ret : insn->n; insn 832 drivers/staging/comedi/drivers/pcl818.c struct comedi_insn *insn, insn 835 drivers/staging/comedi/drivers/pcl818.c unsigned int chan = CR_CHAN(insn->chanspec); insn 839 drivers/staging/comedi/drivers/pcl818.c for (i = 0; i < insn->n; i++) { insn 848 drivers/staging/comedi/drivers/pcl818.c return insn->n; insn 853 drivers/staging/comedi/drivers/pcl818.c struct comedi_insn *insn, insn 859 drivers/staging/comedi/drivers/pcl818.c return insn->n; insn 864 drivers/staging/comedi/drivers/pcl818.c struct comedi_insn *insn, insn 874 drivers/staging/comedi/drivers/pcl818.c return insn->n; insn 162 drivers/staging/comedi/drivers/pcm3724.c struct comedi_insn *insn, insn 165 drivers/staging/comedi/drivers/pcm3724.c unsigned int chan = CR_CHAN(insn->chanspec); insn 178 drivers/staging/comedi/drivers/pcm3724.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 182 drivers/staging/comedi/drivers/pcm3724.c do_3724_config(dev, s, insn->chanspec); insn 183 drivers/staging/comedi/drivers/pcm3724.c enable_chan(dev, s, insn->chanspec); insn 185 drivers/staging/comedi/drivers/pcm3724.c return insn->n; insn 56 drivers/staging/comedi/drivers/pcmad.c struct comedi_insn *insn, insn 69 drivers/staging/comedi/drivers/pcmad.c struct comedi_insn *insn, insn 72 drivers/staging/comedi/drivers/pcmad.c unsigned int chan = CR_CHAN(insn->chanspec); insn 73 drivers/staging/comedi/drivers/pcmad.c unsigned int range = CR_RANGE(insn->chanspec); insn 78 drivers/staging/comedi/drivers/pcmad.c for (i = 0; i < insn->n; i++) { insn 81 drivers/staging/comedi/drivers/pcmad.c ret = comedi_timeout(dev, s, insn, pcmad_ai_eoc, 0); insn 100 drivers/staging/comedi/drivers/pcmad.c return insn->n; insn 60 drivers/staging/comedi/drivers/pcmda12.c struct comedi_insn *insn, insn 64 drivers/staging/comedi/drivers/pcmda12.c unsigned int chan = CR_CHAN(insn->chanspec); insn 69 drivers/staging/comedi/drivers/pcmda12.c for (i = 0; i < insn->n; ++i) { insn 83 drivers/staging/comedi/drivers/pcmda12.c return insn->n; insn 88 drivers/staging/comedi/drivers/pcmda12.c struct comedi_insn *insn, insn 100 drivers/staging/comedi/drivers/pcmda12.c return comedi_readback_insn_read(dev, s, insn, data); insn 244 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 274 drivers/staging/comedi/drivers/pcmmio.c return insn->n; insn 279 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 286 drivers/staging/comedi/drivers/pcmmio.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 293 drivers/staging/comedi/drivers/pcmmio.c return insn->n; insn 519 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 532 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 536 drivers/staging/comedi/drivers/pcmmio.c unsigned int chan = CR_CHAN(insn->chanspec); insn 537 drivers/staging/comedi/drivers/pcmmio.c unsigned int range = CR_RANGE(insn->chanspec); insn 538 drivers/staging/comedi/drivers/pcmmio.c unsigned int aref = CR_AREF(insn->chanspec); insn 573 drivers/staging/comedi/drivers/pcmmio.c ret = comedi_timeout(dev, s, insn, pcmmio_ai_eoc, 0); insn 580 drivers/staging/comedi/drivers/pcmmio.c for (i = 0; i < insn->n; i++) { insn 583 drivers/staging/comedi/drivers/pcmmio.c ret = comedi_timeout(dev, s, insn, pcmmio_ai_eoc, 0); insn 597 drivers/staging/comedi/drivers/pcmmio.c return insn->n; insn 602 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 615 drivers/staging/comedi/drivers/pcmmio.c struct comedi_insn *insn, insn 619 drivers/staging/comedi/drivers/pcmmio.c unsigned int chan = CR_CHAN(insn->chanspec); insn 620 drivers/staging/comedi/drivers/pcmmio.c unsigned int range = CR_RANGE(insn->chanspec); insn 642 drivers/staging/comedi/drivers/pcmmio.c ret = comedi_timeout(dev, s, insn, pcmmio_ao_eoc, 0); insn 646 drivers/staging/comedi/drivers/pcmmio.c for (i = 0; i < insn->n; i++) { insn 655 drivers/staging/comedi/drivers/pcmmio.c ret = comedi_timeout(dev, s, insn, pcmmio_ao_eoc, 0); insn 662 drivers/staging/comedi/drivers/pcmmio.c return insn->n; insn 214 drivers/staging/comedi/drivers/pcmuio.c struct comedi_insn *insn, insn 244 drivers/staging/comedi/drivers/pcmuio.c return insn->n; insn 249 drivers/staging/comedi/drivers/pcmuio.c struct comedi_insn *insn, insn 256 drivers/staging/comedi/drivers/pcmuio.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 263 drivers/staging/comedi/drivers/pcmuio.c return insn->n; insn 284 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 297 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 313 drivers/staging/comedi/drivers/quatech_daqp_cs.c daqp_ai_set_one_scanlist_entry(dev, insn->chanspec, 1); insn 325 drivers/staging/comedi/drivers/quatech_daqp_cs.c for (i = 0; i < insn->n; i++) { insn 330 drivers/staging/comedi/drivers/quatech_daqp_cs.c ret = comedi_timeout(dev, s, insn, daqp_ai_eos, 0); insn 344 drivers/staging/comedi/drivers/quatech_daqp_cs.c return ret ? ret : insn->n; insn 620 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 633 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 637 drivers/staging/comedi/drivers/quatech_daqp_cs.c unsigned int chan = CR_CHAN(insn->chanspec); insn 646 drivers/staging/comedi/drivers/quatech_daqp_cs.c for (i = 0; i < insn->n; i++) { insn 651 drivers/staging/comedi/drivers/quatech_daqp_cs.c ret = comedi_timeout(dev, s, insn, daqp_ao_empty, 0); insn 662 drivers/staging/comedi/drivers/quatech_daqp_cs.c return insn->n; insn 667 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 677 drivers/staging/comedi/drivers/quatech_daqp_cs.c return insn->n; insn 682 drivers/staging/comedi/drivers/quatech_daqp_cs.c struct comedi_insn *insn, insn 695 drivers/staging/comedi/drivers/quatech_daqp_cs.c return insn->n; insn 521 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 533 drivers/staging/comedi/drivers/rtd520.c struct comedi_subdevice *s, struct comedi_insn *insn, insn 537 drivers/staging/comedi/drivers/rtd520.c unsigned int range = CR_RANGE(insn->chanspec); insn 545 drivers/staging/comedi/drivers/rtd520.c rtd_load_channelgain_list(dev, 1, &insn->chanspec); insn 551 drivers/staging/comedi/drivers/rtd520.c for (n = 0; n < insn->n; n++) { insn 556 drivers/staging/comedi/drivers/rtd520.c ret = comedi_timeout(dev, s, insn, rtd_ai_eoc, 0); insn 996 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 999 drivers/staging/comedi/drivers/rtd520.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1011 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 1015 drivers/staging/comedi/drivers/rtd520.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1016 drivers/staging/comedi/drivers/rtd520.c unsigned int range = CR_RANGE(insn->chanspec); insn 1023 drivers/staging/comedi/drivers/rtd520.c for (i = 0; i < insn->n; ++i) { insn 1038 drivers/staging/comedi/drivers/rtd520.c ret = comedi_timeout(dev, s, insn, rtd_ao_eoc, 0); insn 1045 drivers/staging/comedi/drivers/rtd520.c return insn->n; insn 1050 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 1058 drivers/staging/comedi/drivers/rtd520.c return insn->n; insn 1063 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 1068 drivers/staging/comedi/drivers/rtd520.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 1085 drivers/staging/comedi/drivers/rtd520.c return insn->n; insn 1090 drivers/staging/comedi/drivers/rtd520.c struct comedi_insn *insn, insn 1094 drivers/staging/comedi/drivers/rtd520.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1160 drivers/staging/comedi/drivers/rtd520.c return insn->n; insn 135 drivers/staging/comedi/drivers/rti800.c struct comedi_insn *insn, insn 152 drivers/staging/comedi/drivers/rti800.c struct comedi_insn *insn, insn 156 drivers/staging/comedi/drivers/rti800.c unsigned int chan = CR_CHAN(insn->chanspec); insn 157 drivers/staging/comedi/drivers/rti800.c unsigned int gain = CR_RANGE(insn->chanspec); insn 173 drivers/staging/comedi/drivers/rti800.c if (insn->n > 0) { insn 182 drivers/staging/comedi/drivers/rti800.c for (i = 0; i < insn->n; i++) { insn 187 drivers/staging/comedi/drivers/rti800.c ret = comedi_timeout(dev, s, insn, rti800_ai_eoc, 0); insn 200 drivers/staging/comedi/drivers/rti800.c return insn->n; insn 205 drivers/staging/comedi/drivers/rti800.c struct comedi_insn *insn, insn 209 drivers/staging/comedi/drivers/rti800.c unsigned int chan = CR_CHAN(insn->chanspec); insn 214 drivers/staging/comedi/drivers/rti800.c for (i = 0; i < insn->n; i++) { insn 226 drivers/staging/comedi/drivers/rti800.c return insn->n; insn 231 drivers/staging/comedi/drivers/rti800.c struct comedi_insn *insn, insn 235 drivers/staging/comedi/drivers/rti800.c return insn->n; insn 240 drivers/staging/comedi/drivers/rti800.c struct comedi_insn *insn, insn 250 drivers/staging/comedi/drivers/rti800.c return insn->n; insn 43 drivers/staging/comedi/drivers/rti802.c struct comedi_insn *insn, insn 47 drivers/staging/comedi/drivers/rti802.c unsigned int chan = CR_CHAN(insn->chanspec); insn 52 drivers/staging/comedi/drivers/rti802.c for (i = 0; i < insn->n; i++) { insn 65 drivers/staging/comedi/drivers/rti802.c return insn->n; insn 197 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 200 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 203 drivers/staging/comedi/drivers/s526.c for (i = 0; i < insn->n; i++) insn 206 drivers/staging/comedi/drivers/s526.c return insn->n; insn 211 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 215 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 377 drivers/staging/comedi/drivers/s526.c return insn->n; insn 382 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 386 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 413 drivers/staging/comedi/drivers/s526.c return insn->n; insn 418 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 434 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 438 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 455 drivers/staging/comedi/drivers/s526.c for (i = 0; i < insn->n; i++) { insn 461 drivers/staging/comedi/drivers/s526.c ret = comedi_timeout(dev, s, insn, s526_eoc, S526_INT_AI); insn 469 drivers/staging/comedi/drivers/s526.c return insn->n; insn 474 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 477 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 486 drivers/staging/comedi/drivers/s526.c for (i = 0; i < insn->n; i++) { insn 492 drivers/staging/comedi/drivers/s526.c ret = comedi_timeout(dev, s, insn, s526_eoc, S526_INT_AO); insn 498 drivers/staging/comedi/drivers/s526.c return insn->n; insn 503 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 511 drivers/staging/comedi/drivers/s526.c return insn->n; insn 516 drivers/staging/comedi/drivers/s526.c struct comedi_insn *insn, insn 519 drivers/staging/comedi/drivers/s526.c unsigned int chan = CR_CHAN(insn->chanspec); insn 532 drivers/staging/comedi/drivers/s526.c ret = comedi_dio_insn_config(dev, s, insn, data, mask); insn 547 drivers/staging/comedi/drivers/s526.c return insn->n; insn 230 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 320 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1474 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1487 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1490 drivers/staging/comedi/drivers/s626.c u16 chan = CR_CHAN(insn->chanspec); insn 1491 drivers/staging/comedi/drivers/s626.c u16 range = CR_RANGE(insn->chanspec); insn 1513 drivers/staging/comedi/drivers/s626.c for (n = 0; n < insn->n; n++) { insn 1534 drivers/staging/comedi/drivers/s626.c ret = comedi_timeout(dev, s, insn, s626_ai_eoc, 0); insn 1572 drivers/staging/comedi/drivers/s626.c ret = comedi_timeout(dev, s, insn, s626_ai_eoc, 0); insn 1923 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1926 drivers/staging/comedi/drivers/s626.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1929 drivers/staging/comedi/drivers/s626.c for (i = 0; i < insn->n; i++) { insn 1942 drivers/staging/comedi/drivers/s626.c return insn->n; insn 1975 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1985 drivers/staging/comedi/drivers/s626.c return insn->n; insn 1990 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 1996 drivers/staging/comedi/drivers/s626.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 2002 drivers/staging/comedi/drivers/s626.c return insn->n; insn 2016 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, unsigned int *data) insn 2018 drivers/staging/comedi/drivers/s626.c unsigned int chan = CR_CHAN(insn->chanspec); insn 2045 drivers/staging/comedi/drivers/s626.c return insn->n; insn 2050 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, insn 2053 drivers/staging/comedi/drivers/s626.c unsigned int chan = CR_CHAN(insn->chanspec); insn 2057 drivers/staging/comedi/drivers/s626.c for (i = 0; i < insn->n; i++) { insn 2069 drivers/staging/comedi/drivers/s626.c return insn->n; insn 2074 drivers/staging/comedi/drivers/s626.c struct comedi_insn *insn, unsigned int *data) insn 2076 drivers/staging/comedi/drivers/s626.c unsigned int chan = CR_CHAN(insn->chanspec); insn 43 drivers/staging/comedi/drivers/ssv_dnp.c struct comedi_insn *insn, insn 77 drivers/staging/comedi/drivers/ssv_dnp.c return insn->n; insn 82 drivers/staging/comedi/drivers/ssv_dnp.c struct comedi_insn *insn, insn 85 drivers/staging/comedi/drivers/ssv_dnp.c unsigned int chan = CR_CHAN(insn->chanspec); insn 90 drivers/staging/comedi/drivers/ssv_dnp.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 121 drivers/staging/comedi/drivers/ssv_dnp.c return insn->n; insn 738 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 742 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 743 drivers/staging/comedi/drivers/usbdux.c unsigned int range = CR_RANGE(insn->chanspec); insn 761 drivers/staging/comedi/drivers/usbdux.c for (i = 0; i < insn->n; i++) { insn 778 drivers/staging/comedi/drivers/usbdux.c return ret ? ret : insn->n; insn 783 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 790 drivers/staging/comedi/drivers/usbdux.c ret = comedi_readback_insn_read(dev, s, insn, data); insn 798 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 802 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 817 drivers/staging/comedi/drivers/usbdux.c for (i = 0; i < insn->n; i++) { insn 833 drivers/staging/comedi/drivers/usbdux.c return ret ? ret : insn->n; insn 1002 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1007 drivers/staging/comedi/drivers/usbdux.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 1015 drivers/staging/comedi/drivers/usbdux.c return insn->n; insn 1020 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1050 drivers/staging/comedi/drivers/usbdux.c return ret ? ret : insn->n; insn 1055 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1059 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1065 drivers/staging/comedi/drivers/usbdux.c for (i = 0; i < insn->n; i++) { insn 1079 drivers/staging/comedi/drivers/usbdux.c return ret ? ret : insn->n; insn 1084 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1088 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1097 drivers/staging/comedi/drivers/usbdux.c for (i = 0; i < insn->n; i++) { insn 1107 drivers/staging/comedi/drivers/usbdux.c return ret ? ret : insn->n; insn 1112 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, unsigned int *data) insn 1303 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1306 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1312 drivers/staging/comedi/drivers/usbdux.c if (insn->n != 1) insn 1321 drivers/staging/comedi/drivers/usbdux.c return insn->n; insn 1326 drivers/staging/comedi/drivers/usbdux.c struct comedi_insn *insn, insn 1330 drivers/staging/comedi/drivers/usbdux.c unsigned int chan = CR_CHAN(insn->chanspec); insn 762 drivers/staging/comedi/drivers/usbduxfast.c struct comedi_insn *insn, insn 767 drivers/staging/comedi/drivers/usbduxfast.c unsigned int chan = CR_CHAN(insn->chanspec); insn 768 drivers/staging/comedi/drivers/usbduxfast.c unsigned int range = CR_RANGE(insn->chanspec); insn 815 drivers/staging/comedi/drivers/usbduxfast.c for (i = 0; i < insn->n;) { insn 830 drivers/staging/comedi/drivers/usbduxfast.c for (j = chan; (j < n) && (i < insn->n); j = j + 16) { insn 838 drivers/staging/comedi/drivers/usbduxfast.c return insn->n; insn 695 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 699 drivers/staging/comedi/drivers/usbduxsigma.c unsigned int chan = CR_CHAN(insn->chanspec); insn 729 drivers/staging/comedi/drivers/usbduxsigma.c for (i = 0; i < insn->n; i++) { insn 746 drivers/staging/comedi/drivers/usbduxsigma.c return insn->n; insn 751 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 758 drivers/staging/comedi/drivers/usbduxsigma.c ret = comedi_readback_insn_read(dev, s, insn, data); insn 766 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 770 drivers/staging/comedi/drivers/usbduxsigma.c unsigned int chan = CR_CHAN(insn->chanspec); insn 780 drivers/staging/comedi/drivers/usbduxsigma.c for (i = 0; i < insn->n; i++) { insn 793 drivers/staging/comedi/drivers/usbduxsigma.c return insn->n; insn 933 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 938 drivers/staging/comedi/drivers/usbduxsigma.c ret = comedi_dio_insn_config(dev, s, insn, data, 0); insn 946 drivers/staging/comedi/drivers/usbduxsigma.c return insn->n; insn 951 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 981 drivers/staging/comedi/drivers/usbduxsigma.c ret = insn->n; insn 1146 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 1149 drivers/staging/comedi/drivers/usbduxsigma.c unsigned int chan = CR_CHAN(insn->chanspec); insn 1155 drivers/staging/comedi/drivers/usbduxsigma.c if (insn->n != 1) insn 1164 drivers/staging/comedi/drivers/usbduxsigma.c return insn->n; insn 1169 drivers/staging/comedi/drivers/usbduxsigma.c struct comedi_insn *insn, insn 1173 drivers/staging/comedi/drivers/usbduxsigma.c unsigned int chan = CR_CHAN(insn->chanspec); insn 235 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 244 drivers/staging/comedi/drivers/vmk80xx.c chan = CR_CHAN(insn->chanspec); insn 262 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 283 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 293 drivers/staging/comedi/drivers/vmk80xx.c chan = CR_CHAN(insn->chanspec); insn 310 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 324 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 333 drivers/staging/comedi/drivers/vmk80xx.c chan = CR_CHAN(insn->chanspec); insn 339 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 353 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 392 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 431 drivers/staging/comedi/drivers/vmk80xx.c return ret ? ret : insn->n; insn 436 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 445 drivers/staging/comedi/drivers/vmk80xx.c chan = CR_CHAN(insn->chanspec); insn 462 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 480 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 484 drivers/staging/comedi/drivers/vmk80xx.c unsigned int chan = CR_CHAN(insn->chanspec); insn 512 drivers/staging/comedi/drivers/vmk80xx.c return ret ? ret : insn->n; insn 517 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 528 drivers/staging/comedi/drivers/vmk80xx.c chan = CR_CHAN(insn->chanspec); insn 535 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 561 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 580 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 594 drivers/staging/comedi/drivers/vmk80xx.c struct comedi_insn *insn, insn 625 drivers/staging/comedi/drivers/vmk80xx.c for (n = 0; n < insn->n; n++) { insn 67 drivers/staging/comedi/kcomedilib/kcomedilib_main.c struct comedi_insn *insn, insn 81 drivers/staging/comedi/kcomedilib/kcomedilib_main.c if (insn->subdev >= dev->n_subdevices) { insn 85 drivers/staging/comedi/kcomedilib/kcomedilib_main.c s = &dev->subdevices[insn->subdev]; insn 89 drivers/staging/comedi/kcomedilib/kcomedilib_main.c "%d not usable subdevice\n", insn->subdev); insn 96 drivers/staging/comedi/kcomedilib/kcomedilib_main.c ret = comedi_check_chanlist(s, 1, &insn->chanspec); insn 109 drivers/staging/comedi/kcomedilib/kcomedilib_main.c switch (insn->insn) { insn 111 drivers/staging/comedi/kcomedilib/kcomedilib_main.c ret = s->insn_bits(dev, s, insn, data); insn 115 drivers/staging/comedi/kcomedilib/kcomedilib_main.c ret = s->insn_config(dev, s, insn, data); insn 132 drivers/staging/comedi/kcomedilib/kcomedilib_main.c struct comedi_insn insn; insn 136 drivers/staging/comedi/kcomedilib/kcomedilib_main.c memset(&insn, 0, sizeof(insn)); insn 137 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.insn = INSN_CONFIG; insn 138 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.n = 2; insn 139 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.subdev = subdev; insn 140 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.chanspec = CR_PACK(chan, 0, 0); insn 143 drivers/staging/comedi/kcomedilib/kcomedilib_main.c ret = comedi_do_insn(dev, &insn, data); insn 153 drivers/staging/comedi/kcomedilib/kcomedilib_main.c struct comedi_insn insn; insn 155 drivers/staging/comedi/kcomedilib/kcomedilib_main.c memset(&insn, 0, sizeof(insn)); insn 156 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.insn = INSN_CONFIG; insn 157 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.n = 1; insn 158 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.subdev = subdev; insn 159 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.chanspec = CR_PACK(chan, 0, 0); insn 161 drivers/staging/comedi/kcomedilib/kcomedilib_main.c return comedi_do_insn(dev, &insn, &io); insn 169 drivers/staging/comedi/kcomedilib/kcomedilib_main.c struct comedi_insn insn; insn 180 drivers/staging/comedi/kcomedilib/kcomedilib_main.c memset(&insn, 0, sizeof(insn)); insn 181 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.insn = INSN_BITS; insn 182 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.chanspec = base_channel; insn 183 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.n = 2; insn 184 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.subdev = subdev; insn 196 drivers/staging/comedi/kcomedilib/kcomedilib_main.c insn.chanspec = 0; insn 204 drivers/staging/comedi/kcomedilib/kcomedilib_main.c ret = comedi_do_insn(dev, &insn, data); insn 20 include/asm-generic/extable.h unsigned long insn, fixup; insn 317 include/linux/bpf.h int (*gen_prologue)(struct bpf_insn *insn, bool direct_write, insn 334 include/linux/bpf.h struct bpf_insn *insn); insn 714 include/linux/bpf.h void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth); insn 419 include/linux/bpf_verifier.h struct bpf_insn *insn); insn 173 include/linux/filter.h static inline bool insn_is_zext(const struct bpf_insn *insn) insn 175 include/linux/filter.h return insn->code == (BPF_ALU | BPF_MOV | BPF_X) && insn->imm == 1; insn 425 include/linux/filter.h #define BPF_LDST_BYTES(insn) \ insn 427 include/linux/filter.h const int __size = bpf_size_to_bytes(BPF_SIZE((insn)->code)); \ insn 540 include/linux/filter.h const struct bpf_insn *insn); insn 954 include/linux/filter.h const struct bpf_insn *insn, bool extra_pass, insn 283 include/linux/kprobes.h DEFINE_INSN_CACHE_OPS(insn); insn 108 include/linux/uprobes.h extern bool is_swbp_insn(uprobe_opcode_t *insn); insn 109 include/linux/uprobes.h extern bool is_trap_insn(uprobe_opcode_t *insn); insn 188 kernel/bpf/arraymap.c struct bpf_insn *insn = insn_buf; insn 194 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_ADD, map_ptr, offsetof(struct bpf_array, value)); insn 195 kernel/bpf/arraymap.c *insn++ = BPF_LDX_MEM(BPF_W, ret, index, 0); insn 197 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 4); insn 198 kernel/bpf/arraymap.c *insn++ = BPF_ALU32_IMM(BPF_AND, ret, array->index_mask); insn 200 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 3); insn 204 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_LSH, ret, ilog2(elem_size)); insn 206 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_MUL, ret, elem_size); insn 208 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_REG(BPF_ADD, ret, map_ptr); insn 209 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 1); insn 210 kernel/bpf/arraymap.c *insn++ = BPF_MOV64_IMM(ret, 0); insn 211 kernel/bpf/arraymap.c return insn - insn_buf; insn 808 kernel/bpf/arraymap.c struct bpf_insn *insn = insn_buf; insn 813 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_ADD, map_ptr, offsetof(struct bpf_array, value)); insn 814 kernel/bpf/arraymap.c *insn++ = BPF_LDX_MEM(BPF_W, ret, index, 0); insn 816 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 6); insn 817 kernel/bpf/arraymap.c *insn++ = BPF_ALU32_IMM(BPF_AND, ret, array->index_mask); insn 819 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 5); insn 822 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_LSH, ret, ilog2(elem_size)); insn 824 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_IMM(BPF_MUL, ret, elem_size); insn 825 kernel/bpf/arraymap.c *insn++ = BPF_ALU64_REG(BPF_ADD, ret, map_ptr); insn 826 kernel/bpf/arraymap.c *insn++ = BPF_LDX_MEM(BPF_DW, ret, ret, 0); insn 827 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 1); insn 828 kernel/bpf/arraymap.c *insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 1); insn 829 kernel/bpf/arraymap.c *insn++ = BPF_MOV64_IMM(ret, 0); insn 831 kernel/bpf/arraymap.c return insn - insn_buf; insn 1346 kernel/bpf/cgroup.c struct bpf_insn *insn = insn_buf; insn 1351 kernel/bpf/cgroup.c *insn++ = BPF_LDX_MEM( insn 1371 kernel/bpf/cgroup.c *insn++ = BPF_STX_MEM( insn 1374 kernel/bpf/cgroup.c *insn++ = BPF_LDX_MEM( insn 1378 kernel/bpf/cgroup.c *insn++ = BPF_STX_MEM( insn 1382 kernel/bpf/cgroup.c *insn++ = BPF_LDX_MEM( insn 1386 kernel/bpf/cgroup.c *insn++ = BPF_LDX_MEM( insn 1391 kernel/bpf/cgroup.c *insn++ = BPF_LDX_MEM( insn 1400 kernel/bpf/cgroup.c return insn - insn_buf; insn 1504 kernel/bpf/cgroup.c struct bpf_insn *insn = insn_buf; insn 1508 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, sk); insn 1512 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_STX_MEM, level); insn 1514 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, level); insn 1518 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_STX_MEM, optname); insn 1520 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, optname); insn 1524 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_STX_MEM, optlen); insn 1526 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, optlen); insn 1530 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_STX_MEM, retval); insn 1532 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, retval); insn 1535 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, optval); insn 1538 kernel/bpf/cgroup.c *insn++ = CG_SOCKOPT_ACCESS_FIELD(BPF_LDX_MEM, optval_end); insn 1542 kernel/bpf/cgroup.c return insn - insn_buf; insn 50 kernel/bpf/core.c #define DST regs[insn->dst_reg] insn 51 kernel/bpf/core.c #define SRC regs[insn->src_reg] insn 56 kernel/bpf/core.c #define IMM insn->imm insn 336 kernel/bpf/core.c static int bpf_adj_delta_to_imm(struct bpf_insn *insn, u32 pos, s32 end_old, insn 341 kernel/bpf/core.c s64 imm = insn->imm; insn 350 kernel/bpf/core.c insn->imm = imm; insn 354 kernel/bpf/core.c static int bpf_adj_delta_to_off(struct bpf_insn *insn, u32 pos, s32 end_old, insn 359 kernel/bpf/core.c s32 off = insn->off; insn 368 kernel/bpf/core.c insn->off = off; insn 376 kernel/bpf/core.c struct bpf_insn *insn = prog->insnsi; insn 379 kernel/bpf/core.c for (i = 0; i < insn_cnt; i++, insn++) { insn 388 kernel/bpf/core.c insn = prog->insnsi + end_old; insn 390 kernel/bpf/core.c code = insn->code; insn 397 kernel/bpf/core.c if (insn->src_reg != BPF_PSEUDO_CALL) insn 399 kernel/bpf/core.c ret = bpf_adj_delta_to_imm(insn, pos, end_old, insn 402 kernel/bpf/core.c ret = bpf_adj_delta_to_off(insn, pos, end_old, insn 858 kernel/bpf/core.c const struct bpf_insn *insn, bool extra_pass, insn 861 kernel/bpf/core.c s16 off = insn->off; insn 862 kernel/bpf/core.c s32 imm = insn->imm; insn 865 kernel/bpf/core.c *func_addr_fixed = insn->src_reg != BPF_PSEUDO_CALL; insn 1072 kernel/bpf/core.c struct bpf_insn *insn; insn 1083 kernel/bpf/core.c insn = clone->insnsi; insn 1085 kernel/bpf/core.c for (i = 0; i < insn_cnt; i++, insn++) { insn 1090 kernel/bpf/core.c if (insn[0].code == (BPF_LD | BPF_IMM | BPF_DW) && insn 1091 kernel/bpf/core.c insn[1].code == 0) insn 1092 kernel/bpf/core.c memcpy(aux, insn, sizeof(aux)); insn 1094 kernel/bpf/core.c rewritten = bpf_jit_blind_insn(insn, aux, insn_buff, insn 1113 kernel/bpf/core.c insn = clone->insnsi + i + insn_delta; insn 1302 kernel/bpf/core.c static u64 __no_fgcse ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn, u64 *stack) insn 1318 kernel/bpf/core.c #define CONT ({ insn++; goto select_insn; }) insn 1319 kernel/bpf/core.c #define CONT_JMP ({ insn++; goto select_insn; }) insn 1322 kernel/bpf/core.c goto *jumptable[insn->code]; insn 1367 kernel/bpf/core.c DST = (u64) (u32) insn[0].imm | ((u64) (u32) insn[1].imm) << 32; insn 1368 kernel/bpf/core.c insn++; insn 1447 kernel/bpf/core.c BPF_R0 = (__bpf_call_base + insn->imm)(BPF_R1, BPF_R2, BPF_R3, insn 1452 kernel/bpf/core.c BPF_R0 = (__bpf_call_base_args + insn->imm)(BPF_R1, BPF_R2, insn 1455 kernel/bpf/core.c insn + insn->off + 1); insn 1480 kernel/bpf/core.c insn = prog->insnsi; insn 1486 kernel/bpf/core.c insn += insn->off; insn 1494 kernel/bpf/core.c insn += insn->off; \ insn 1500 kernel/bpf/core.c insn += insn->off; \ insn 1506 kernel/bpf/core.c insn += insn->off; \ insn 1512 kernel/bpf/core.c insn += insn->off; \ insn 1531 kernel/bpf/core.c *(SIZE *)(unsigned long) (DST + insn->off) = SRC; \ insn 1534 kernel/bpf/core.c *(SIZE *)(unsigned long) (DST + insn->off) = IMM; \ insn 1537 kernel/bpf/core.c DST = *(SIZE *)(unsigned long) (SRC + insn->off); \ insn 1547 kernel/bpf/core.c (DST + insn->off)); insn 1551 kernel/bpf/core.c (DST + insn->off)); insn 1561 kernel/bpf/core.c pr_warn("BPF interpreter: unknown opcode %02x\n", insn->code); insn 1568 kernel/bpf/core.c static unsigned int PROG_NAME(stack_size)(const void *ctx, const struct bpf_insn *insn) \ insn 1575 kernel/bpf/core.c return ___bpf_prog_run(regs, insn, stack); \ insn 1581 kernel/bpf/core.c const struct bpf_insn *insn) \ insn 1592 kernel/bpf/core.c return ___bpf_prog_run(regs, insn, stack); \ insn 1613 kernel/bpf/core.c const struct bpf_insn *insn) = { insn 1621 kernel/bpf/core.c const struct bpf_insn *insn) = { insn 1628 kernel/bpf/core.c void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth) insn 1631 kernel/bpf/core.c insn->off = (s16) insn->imm; insn 1632 kernel/bpf/core.c insn->imm = interpreters_args[(round_up(stack_depth, 32) / 32) - 1] - insn 1634 kernel/bpf/core.c insn->code = BPF_JMP | BPF_CALL_ARGS; insn 1639 kernel/bpf/core.c const struct bpf_insn *insn) insn 1760 kernel/bpf/core.c const struct bpf_insn *insn) insn 17 kernel/bpf/disasm.c const struct bpf_insn *insn, insn 22 kernel/bpf/disasm.c if (insn->src_reg != BPF_PSEUDO_CALL && insn 23 kernel/bpf/disasm.c insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID && insn 24 kernel/bpf/disasm.c func_id_str[insn->imm]) insn 25 kernel/bpf/disasm.c return func_id_str[insn->imm]; insn 28 kernel/bpf/disasm.c return cbs->cb_call(cbs->private_data, insn); insn 30 kernel/bpf/disasm.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 31 kernel/bpf/disasm.c snprintf(buff, len, "%+d", insn->imm); insn 37 kernel/bpf/disasm.c const struct bpf_insn *insn, insn 41 kernel/bpf/disasm.c return cbs->cb_imm(cbs->private_data, insn, full_imm); insn 109 kernel/bpf/disasm.c const struct bpf_insn *insn) insn 112 kernel/bpf/disasm.c insn->code, insn->dst_reg, insn 113 kernel/bpf/disasm.c BPF_SRC(insn->code) == BPF_TO_BE ? "be" : "le", insn 114 kernel/bpf/disasm.c insn->imm, insn->dst_reg); insn 118 kernel/bpf/disasm.c const struct bpf_insn *insn, insn 122 kernel/bpf/disasm.c u8 class = BPF_CLASS(insn->code); insn 125 kernel/bpf/disasm.c if (BPF_OP(insn->code) == BPF_END) { insn 127 kernel/bpf/disasm.c verbose(cbs->private_data, "BUG_alu64_%02x\n", insn->code); insn 129 kernel/bpf/disasm.c print_bpf_end_insn(verbose, cbs->private_data, insn); insn 130 kernel/bpf/disasm.c } else if (BPF_OP(insn->code) == BPF_NEG) { insn 132 kernel/bpf/disasm.c insn->code, class == BPF_ALU ? 'w' : 'r', insn 133 kernel/bpf/disasm.c insn->dst_reg, class == BPF_ALU ? 'w' : 'r', insn 134 kernel/bpf/disasm.c insn->dst_reg); insn 135 kernel/bpf/disasm.c } else if (BPF_SRC(insn->code) == BPF_X) { insn 137 kernel/bpf/disasm.c insn->code, class == BPF_ALU ? 'w' : 'r', insn 138 kernel/bpf/disasm.c insn->dst_reg, insn 139 kernel/bpf/disasm.c bpf_alu_string[BPF_OP(insn->code) >> 4], insn 141 kernel/bpf/disasm.c insn->src_reg); insn 144 kernel/bpf/disasm.c insn->code, class == BPF_ALU ? 'w' : 'r', insn 145 kernel/bpf/disasm.c insn->dst_reg, insn 146 kernel/bpf/disasm.c bpf_alu_string[BPF_OP(insn->code) >> 4], insn 147 kernel/bpf/disasm.c insn->imm); insn 150 kernel/bpf/disasm.c if (BPF_MODE(insn->code) == BPF_MEM) insn 152 kernel/bpf/disasm.c insn->code, insn 153 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 154 kernel/bpf/disasm.c insn->dst_reg, insn 155 kernel/bpf/disasm.c insn->off, insn->src_reg); insn 156 kernel/bpf/disasm.c else if (BPF_MODE(insn->code) == BPF_XADD) insn 158 kernel/bpf/disasm.c insn->code, insn 159 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 160 kernel/bpf/disasm.c insn->dst_reg, insn->off, insn 161 kernel/bpf/disasm.c insn->src_reg); insn 163 kernel/bpf/disasm.c verbose(cbs->private_data, "BUG_%02x\n", insn->code); insn 165 kernel/bpf/disasm.c if (BPF_MODE(insn->code) != BPF_MEM) { insn 166 kernel/bpf/disasm.c verbose(cbs->private_data, "BUG_st_%02x\n", insn->code); insn 170 kernel/bpf/disasm.c insn->code, insn 171 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 172 kernel/bpf/disasm.c insn->dst_reg, insn 173 kernel/bpf/disasm.c insn->off, insn->imm); insn 175 kernel/bpf/disasm.c if (BPF_MODE(insn->code) != BPF_MEM) { insn 176 kernel/bpf/disasm.c verbose(cbs->private_data, "BUG_ldx_%02x\n", insn->code); insn 180 kernel/bpf/disasm.c insn->code, insn->dst_reg, insn 181 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 182 kernel/bpf/disasm.c insn->src_reg, insn->off); insn 184 kernel/bpf/disasm.c if (BPF_MODE(insn->code) == BPF_ABS) { insn 186 kernel/bpf/disasm.c insn->code, insn 187 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 188 kernel/bpf/disasm.c insn->imm); insn 189 kernel/bpf/disasm.c } else if (BPF_MODE(insn->code) == BPF_IND) { insn 191 kernel/bpf/disasm.c insn->code, insn 192 kernel/bpf/disasm.c bpf_ldst_string[BPF_SIZE(insn->code) >> 3], insn 193 kernel/bpf/disasm.c insn->src_reg, insn->imm); insn 194 kernel/bpf/disasm.c } else if (BPF_MODE(insn->code) == BPF_IMM && insn 195 kernel/bpf/disasm.c BPF_SIZE(insn->code) == BPF_DW) { insn 199 kernel/bpf/disasm.c u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm; insn 200 kernel/bpf/disasm.c bool is_ptr = insn->src_reg == BPF_PSEUDO_MAP_FD || insn 201 kernel/bpf/disasm.c insn->src_reg == BPF_PSEUDO_MAP_VALUE; insn 208 kernel/bpf/disasm.c insn->code, insn->dst_reg, insn 209 kernel/bpf/disasm.c __func_imm_name(cbs, insn, imm, insn 212 kernel/bpf/disasm.c verbose(cbs->private_data, "BUG_ld_%02x\n", insn->code); insn 216 kernel/bpf/disasm.c u8 opcode = BPF_OP(insn->code); insn 221 kernel/bpf/disasm.c if (insn->src_reg == BPF_PSEUDO_CALL) { insn 223 kernel/bpf/disasm.c insn->code, insn 224 kernel/bpf/disasm.c __func_get_name(cbs, insn, insn 228 kernel/bpf/disasm.c verbose(cbs->private_data, "(%02x) call %s#%d\n", insn->code, insn 229 kernel/bpf/disasm.c __func_get_name(cbs, insn, insn 231 kernel/bpf/disasm.c insn->imm); insn 233 kernel/bpf/disasm.c } else if (insn->code == (BPF_JMP | BPF_JA)) { insn 235 kernel/bpf/disasm.c insn->code, insn->off); insn 236 kernel/bpf/disasm.c } else if (insn->code == (BPF_JMP | BPF_EXIT)) { insn 237 kernel/bpf/disasm.c verbose(cbs->private_data, "(%02x) exit\n", insn->code); insn 238 kernel/bpf/disasm.c } else if (BPF_SRC(insn->code) == BPF_X) { insn 241 kernel/bpf/disasm.c insn->code, class == BPF_JMP32 ? 'w' : 'r', insn 242 kernel/bpf/disasm.c insn->dst_reg, insn 243 kernel/bpf/disasm.c bpf_jmp_string[BPF_OP(insn->code) >> 4], insn 245 kernel/bpf/disasm.c insn->src_reg, insn->off); insn 249 kernel/bpf/disasm.c insn->code, class == BPF_JMP32 ? 'w' : 'r', insn 250 kernel/bpf/disasm.c insn->dst_reg, insn 251 kernel/bpf/disasm.c bpf_jmp_string[BPF_OP(insn->code) >> 4], insn 252 kernel/bpf/disasm.c insn->imm, insn->off); insn 256 kernel/bpf/disasm.c insn->code, bpf_class_string[class]); insn 25 kernel/bpf/disasm.h const struct bpf_insn *insn); insn 27 kernel/bpf/disasm.h const struct bpf_insn *insn, insn 38 kernel/bpf/disasm.h const struct bpf_insn *insn, insn 505 kernel/bpf/hashtab.c struct bpf_insn *insn = insn_buf; insn 510 kernel/bpf/hashtab.c *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); insn 511 kernel/bpf/hashtab.c *insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 1); insn 512 kernel/bpf/hashtab.c *insn++ = BPF_ALU64_IMM(BPF_ADD, ret, insn 515 kernel/bpf/hashtab.c return insn - insn_buf; insn 545 kernel/bpf/hashtab.c struct bpf_insn *insn = insn_buf; insn 551 kernel/bpf/hashtab.c *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); insn 552 kernel/bpf/hashtab.c *insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 4); insn 553 kernel/bpf/hashtab.c *insn++ = BPF_LDX_MEM(BPF_B, ref_reg, ret, insn 556 kernel/bpf/hashtab.c *insn++ = BPF_JMP_IMM(BPF_JNE, ref_reg, 0, 1); insn 557 kernel/bpf/hashtab.c *insn++ = BPF_ST_MEM(BPF_B, ret, insn 561 kernel/bpf/hashtab.c *insn++ = BPF_ALU64_IMM(BPF_ADD, ret, insn 564 kernel/bpf/hashtab.c return insn - insn_buf; insn 1483 kernel/bpf/hashtab.c struct bpf_insn *insn = insn_buf; insn 1488 kernel/bpf/hashtab.c *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); insn 1489 kernel/bpf/hashtab.c *insn++ = BPF_JMP_IMM(BPF_JEQ, ret, 0, 2); insn 1490 kernel/bpf/hashtab.c *insn++ = BPF_ALU64_IMM(BPF_ADD, ret, insn 1493 kernel/bpf/hashtab.c *insn++ = BPF_LDX_MEM(BPF_DW, ret, ret, 0); insn 1495 kernel/bpf/hashtab.c return insn - insn_buf; insn 179 kernel/bpf/offload.c struct bpf_insn *insn) insn 190 kernel/bpf/offload.c ret = ops->replace_insn(env, off, insn); insn 250 kernel/bpf/offload.c const struct bpf_insn *insn) insn 1125 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 1135 kernel/bpf/verifier.c if (insn[i].code != (BPF_JMP | BPF_CALL)) insn 1137 kernel/bpf/verifier.c if (insn[i].src_reg != BPF_PSEUDO_CALL) insn 1143 kernel/bpf/verifier.c ret = add_subprog(env, i + insn[i].imm + 1); insn 1161 kernel/bpf/verifier.c u8 code = insn[i].code; insn 1167 kernel/bpf/verifier.c off = i + insn[i].off + 1; insn 1247 kernel/bpf/verifier.c static bool is_reg64(struct bpf_verifier_env *env, struct bpf_insn *insn, insn 1252 kernel/bpf/verifier.c code = insn->code; insn 1267 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 1281 kernel/bpf/verifier.c (class == BPF_ALU && op == BPF_END && insn->imm == 64)) insn 1328 kernel/bpf/verifier.c static bool insn_no_def(struct bpf_insn *insn) insn 1330 kernel/bpf/verifier.c u8 class = BPF_CLASS(insn->code); insn 1337 kernel/bpf/verifier.c static bool insn_has_def32(struct bpf_verifier_env *env, struct bpf_insn *insn) insn 1339 kernel/bpf/verifier.c if (insn_no_def(insn)) insn 1342 kernel/bpf/verifier.c return !is_reg64(env, insn, insn->dst_reg, NULL, DST_OP); insn 1363 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi + env->insn_idx; insn 1373 kernel/bpf/verifier.c rw64 = is_reg64(env, insn, regno, reg, t); insn 1449 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi + idx; insn 1450 kernel/bpf/verifier.c u8 class = BPF_CLASS(insn->code); insn 1451 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 1452 kernel/bpf/verifier.c u8 mode = BPF_MODE(insn->code); insn 1453 kernel/bpf/verifier.c u32 dreg = 1u << insn->dst_reg; insn 1454 kernel/bpf/verifier.c u32 sreg = 1u << insn->src_reg; insn 1457 kernel/bpf/verifier.c if (insn->code == 0) insn 1462 kernel/bpf/verifier.c print_bpf_insn(&cbs, insn, env->allow_ptr_leaks); insn 1469 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 1486 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 1507 kernel/bpf/verifier.c if (insn->src_reg != BPF_REG_FP) insn 1509 kernel/bpf/verifier.c if (BPF_SIZE(insn->code) != BPF_DW) insn 1516 kernel/bpf/verifier.c spi = (-insn->off - 1) / BPF_REG_SIZE; insn 1531 kernel/bpf/verifier.c if (insn->dst_reg != BPF_REG_FP) insn 1533 kernel/bpf/verifier.c if (BPF_SIZE(insn->code) != BPF_DW) insn 1535 kernel/bpf/verifier.c spi = (-insn->off - 1) / BPF_REG_SIZE; insn 1548 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 2610 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 2627 kernel/bpf/verifier.c if (insn[i].code != (BPF_JMP | BPF_CALL)) insn 2629 kernel/bpf/verifier.c if (insn[i].src_reg != BPF_PSEUDO_CALL) insn 2636 kernel/bpf/verifier.c i = i + insn[i].imm + 1; insn 2665 kernel/bpf/verifier.c const struct bpf_insn *insn, int idx) insn 2667 kernel/bpf/verifier.c int start = idx + insn->imm + 1, subprog; insn 2897 kernel/bpf/verifier.c static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) insn 2901 kernel/bpf/verifier.c if ((BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) || insn 2902 kernel/bpf/verifier.c insn->imm != 0) { insn 2908 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 2913 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 2917 kernel/bpf/verifier.c if (is_pointer_value(env, insn->src_reg)) { insn 2918 kernel/bpf/verifier.c verbose(env, "R%d leaks addr into mem\n", insn->src_reg); insn 2922 kernel/bpf/verifier.c if (is_ctx_reg(env, insn->dst_reg) || insn 2923 kernel/bpf/verifier.c is_pkt_reg(env, insn->dst_reg) || insn 2924 kernel/bpf/verifier.c is_flow_key_reg(env, insn->dst_reg) || insn 2925 kernel/bpf/verifier.c is_sk_reg(env, insn->dst_reg)) { insn 2927 kernel/bpf/verifier.c insn->dst_reg, insn 2928 kernel/bpf/verifier.c reg_type_str[reg_state(env, insn->dst_reg)->type]); insn 2933 kernel/bpf/verifier.c err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, insn 2934 kernel/bpf/verifier.c BPF_SIZE(insn->code), BPF_READ, -1, true); insn 2939 kernel/bpf/verifier.c return check_mem_access(env, insn_idx, insn->dst_reg, insn->off, insn 2940 kernel/bpf/verifier.c BPF_SIZE(insn->code), BPF_WRITE, -1, true); insn 3759 kernel/bpf/verifier.c static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, insn 3772 kernel/bpf/verifier.c target_insn = *insn_idx + insn->imm; insn 4269 kernel/bpf/verifier.c const struct bpf_insn *insn) insn 4271 kernel/bpf/verifier.c return env->allow_ptr_leaks || BPF_SRC(insn->code) == BPF_K; insn 4292 kernel/bpf/verifier.c struct bpf_insn *insn) insn 4296 kernel/bpf/verifier.c if (can_skip_alu_sanitation(env, insn)) insn 4303 kernel/bpf/verifier.c struct bpf_insn *insn, insn 4311 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 4316 kernel/bpf/verifier.c if (can_skip_alu_sanitation(env, insn)) insn 4360 kernel/bpf/verifier.c struct bpf_insn *insn, insn 4372 kernel/bpf/verifier.c u32 dst = insn->dst_reg, src = insn->src_reg; insn 4373 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 4387 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) != BPF_ALU64) { insn 4435 kernel/bpf/verifier.c ret = sanitize_ptr_alu(env, insn, ptr_reg, dst_reg, smin_val < 0); insn 4490 kernel/bpf/verifier.c ret = sanitize_ptr_alu(env, insn, ptr_reg, dst_reg, smin_val < 0); insn 4601 kernel/bpf/verifier.c struct bpf_insn *insn, insn 4606 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 4610 kernel/bpf/verifier.c u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32; insn 4611 kernel/bpf/verifier.c u32 dst = insn->dst_reg; insn 4647 kernel/bpf/verifier.c ret = sanitize_val_alu(env, insn); insn 4671 kernel/bpf/verifier.c ret = sanitize_val_alu(env, insn); insn 4787 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 4812 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 4842 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 4868 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 4872 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) != BPF_ALU64) { insn 4886 kernel/bpf/verifier.c struct bpf_insn *insn) insn 4892 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 4895 kernel/bpf/verifier.c dst_reg = ®s[insn->dst_reg]; insn 4899 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 4900 kernel/bpf/verifier.c src_reg = ®s[insn->src_reg]; insn 4908 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 4912 kernel/bpf/verifier.c insn->dst_reg, insn 4920 kernel/bpf/verifier.c err = mark_chain_precision(env, insn->dst_reg); insn 4923 kernel/bpf/verifier.c return adjust_ptr_min_max_vals(env, insn, insn 4928 kernel/bpf/verifier.c err = mark_chain_precision(env, insn->src_reg); insn 4931 kernel/bpf/verifier.c return adjust_ptr_min_max_vals(env, insn, insn 4939 kernel/bpf/verifier.c __mark_reg_known(&off_reg, insn->imm); insn 4942 kernel/bpf/verifier.c return adjust_ptr_min_max_vals(env, insn, insn 4957 kernel/bpf/verifier.c return adjust_scalar_min_max_vals(env, insn, dst_reg, *src_reg); insn 4961 kernel/bpf/verifier.c static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) insn 4964 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 4969 kernel/bpf/verifier.c if (BPF_SRC(insn->code) != 0 || insn 4970 kernel/bpf/verifier.c insn->src_reg != BPF_REG_0 || insn 4971 kernel/bpf/verifier.c insn->off != 0 || insn->imm != 0) { insn 4976 kernel/bpf/verifier.c if (insn->src_reg != BPF_REG_0 || insn->off != 0 || insn 4977 kernel/bpf/verifier.c (insn->imm != 16 && insn->imm != 32 && insn->imm != 64) || insn 4978 kernel/bpf/verifier.c BPF_CLASS(insn->code) == BPF_ALU64) { insn 4985 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 4989 kernel/bpf/verifier.c if (is_pointer_value(env, insn->dst_reg)) { insn 4991 kernel/bpf/verifier.c insn->dst_reg); insn 4996 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, DST_OP); insn 5002 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 5003 kernel/bpf/verifier.c if (insn->imm != 0 || insn->off != 0) { insn 5009 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 5013 kernel/bpf/verifier.c if (insn->src_reg != BPF_REG_0 || insn->off != 0) { insn 5020 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK); insn 5024 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 5025 kernel/bpf/verifier.c struct bpf_reg_state *src_reg = regs + insn->src_reg; insn 5026 kernel/bpf/verifier.c struct bpf_reg_state *dst_reg = regs + insn->dst_reg; insn 5028 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_ALU64) { insn 5037 kernel/bpf/verifier.c if (is_pointer_value(env, insn->src_reg)) { insn 5040 kernel/bpf/verifier.c insn->src_reg); insn 5048 kernel/bpf/verifier.c insn->dst_reg); insn 5057 kernel/bpf/verifier.c mark_reg_unknown(env, regs, insn->dst_reg); insn 5058 kernel/bpf/verifier.c regs[insn->dst_reg].type = SCALAR_VALUE; insn 5059 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_ALU64) { insn 5060 kernel/bpf/verifier.c __mark_reg_known(regs + insn->dst_reg, insn 5061 kernel/bpf/verifier.c insn->imm); insn 5063 kernel/bpf/verifier.c __mark_reg_known(regs + insn->dst_reg, insn 5064 kernel/bpf/verifier.c (u32)insn->imm); insn 5074 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 5075 kernel/bpf/verifier.c if (insn->imm != 0 || insn->off != 0) { insn 5080 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 5084 kernel/bpf/verifier.c if (insn->src_reg != BPF_REG_0 || insn->off != 0) { insn 5091 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 5096 kernel/bpf/verifier.c BPF_SRC(insn->code) == BPF_K && insn->imm == 0) { insn 5102 kernel/bpf/verifier.c opcode == BPF_ARSH) && BPF_SRC(insn->code) == BPF_K) { insn 5103 kernel/bpf/verifier.c int size = BPF_CLASS(insn->code) == BPF_ALU64 ? 64 : 32; insn 5105 kernel/bpf/verifier.c if (insn->imm < 0 || insn->imm >= size) { insn 5106 kernel/bpf/verifier.c verbose(env, "invalid shift %d\n", insn->imm); insn 5112 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK); insn 5116 kernel/bpf/verifier.c return adjust_reg_min_max_vals(env, insn); insn 5769 kernel/bpf/verifier.c static bool try_match_pkt_pointers(const struct bpf_insn *insn, insn 5775 kernel/bpf/verifier.c if (BPF_SRC(insn->code) != BPF_X) insn 5779 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_JMP32) insn 5782 kernel/bpf/verifier.c switch (BPF_OP(insn->code)) { insn 5867 kernel/bpf/verifier.c struct bpf_insn *insn, int *insn_idx) insn 5873 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 5884 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 5885 kernel/bpf/verifier.c if (insn->imm != 0) { insn 5891 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 5895 kernel/bpf/verifier.c if (is_pointer_value(env, insn->src_reg)) { insn 5897 kernel/bpf/verifier.c insn->src_reg); insn 5900 kernel/bpf/verifier.c src_reg = ®s[insn->src_reg]; insn 5902 kernel/bpf/verifier.c if (insn->src_reg != BPF_REG_0) { insn 5909 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 5913 kernel/bpf/verifier.c dst_reg = ®s[insn->dst_reg]; insn 5914 kernel/bpf/verifier.c is_jmp32 = BPF_CLASS(insn->code) == BPF_JMP32; insn 5916 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_K) insn 5917 kernel/bpf/verifier.c pred = is_branch_taken(dst_reg, insn->imm, insn 5924 kernel/bpf/verifier.c err = mark_chain_precision(env, insn->dst_reg); insn 5925 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X && !err) insn 5926 kernel/bpf/verifier.c err = mark_chain_precision(env, insn->src_reg); insn 5932 kernel/bpf/verifier.c *insn_idx += insn->off; insn 5941 kernel/bpf/verifier.c other_branch = push_stack(env, *insn_idx + insn->off + 1, *insn_idx, insn 5954 kernel/bpf/verifier.c if (BPF_SRC(insn->code) == BPF_X) { insn 5955 kernel/bpf/verifier.c struct bpf_reg_state *src_reg = ®s[insn->src_reg]; insn 5969 kernel/bpf/verifier.c reg_set_min_max(&other_branch_regs[insn->dst_reg], insn 5977 kernel/bpf/verifier.c reg_set_min_max_inv(&other_branch_regs[insn->src_reg], insn 5986 kernel/bpf/verifier.c reg_combine_min_max(&other_branch_regs[insn->src_reg], insn 5987 kernel/bpf/verifier.c &other_branch_regs[insn->dst_reg], insn 5991 kernel/bpf/verifier.c reg_set_min_max(&other_branch_regs[insn->dst_reg], insn 5992 kernel/bpf/verifier.c dst_reg, insn->imm, opcode, is_jmp32); insn 5999 kernel/bpf/verifier.c if (!is_jmp32 && BPF_SRC(insn->code) == BPF_K && insn 6000 kernel/bpf/verifier.c insn->imm == 0 && (opcode == BPF_JEQ || opcode == BPF_JNE) && insn 6005 kernel/bpf/verifier.c mark_ptr_or_null_regs(this_branch, insn->dst_reg, insn 6007 kernel/bpf/verifier.c mark_ptr_or_null_regs(other_branch, insn->dst_reg, insn 6009 kernel/bpf/verifier.c } else if (!try_match_pkt_pointers(insn, dst_reg, ®s[insn->src_reg], insn 6011 kernel/bpf/verifier.c is_pointer_value(env, insn->dst_reg)) { insn 6013 kernel/bpf/verifier.c insn->dst_reg); insn 6022 kernel/bpf/verifier.c static int check_ld_imm(struct bpf_verifier_env *env, struct bpf_insn *insn) insn 6029 kernel/bpf/verifier.c if (BPF_SIZE(insn->code) != BPF_DW) { insn 6033 kernel/bpf/verifier.c if (insn->off != 0) { insn 6038 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, DST_OP); insn 6042 kernel/bpf/verifier.c if (insn->src_reg == 0) { insn 6043 kernel/bpf/verifier.c u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm; insn 6045 kernel/bpf/verifier.c regs[insn->dst_reg].type = SCALAR_VALUE; insn 6046 kernel/bpf/verifier.c __mark_reg_known(®s[insn->dst_reg], imm); insn 6051 kernel/bpf/verifier.c mark_reg_known_zero(env, regs, insn->dst_reg); insn 6052 kernel/bpf/verifier.c regs[insn->dst_reg].map_ptr = map; insn 6054 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_MAP_VALUE) { insn 6055 kernel/bpf/verifier.c regs[insn->dst_reg].type = PTR_TO_MAP_VALUE; insn 6056 kernel/bpf/verifier.c regs[insn->dst_reg].off = aux->map_off; insn 6058 kernel/bpf/verifier.c regs[insn->dst_reg].id = ++env->id_gen; insn 6059 kernel/bpf/verifier.c } else if (insn->src_reg == BPF_PSEUDO_MAP_FD) { insn 6060 kernel/bpf/verifier.c regs[insn->dst_reg].type = CONST_PTR_TO_MAP; insn 6096 kernel/bpf/verifier.c static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn) insn 6100 kernel/bpf/verifier.c u8 mode = BPF_MODE(insn->code); insn 6125 kernel/bpf/verifier.c if (insn->dst_reg != BPF_REG_0 || insn->off != 0 || insn 6126 kernel/bpf/verifier.c BPF_SIZE(insn->code) == BPF_DW || insn 6127 kernel/bpf/verifier.c (mode == BPF_ABS && insn->src_reg != BPF_REG_0)) { insn 6160 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 6872 kernel/bpf/verifier.c static void clean_live_states(struct bpf_verifier_env *env, int insn, insn 6878 kernel/bpf/verifier.c sl = *explored_state(env, insn); insn 6882 kernel/bpf/verifier.c if (sl->state.insn_idx != insn || insn 7578 kernel/bpf/verifier.c struct bpf_insn *insn; insn 7589 kernel/bpf/verifier.c insn = &insns[env->insn_idx]; insn 7590 kernel/bpf/verifier.c class = BPF_CLASS(insn->code); insn 7643 kernel/bpf/verifier.c print_bpf_insn(&cbs, insn, env->allow_ptr_leaks); insn 7658 kernel/bpf/verifier.c err = check_alu_op(env, insn); insn 7668 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 7672 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK); insn 7676 kernel/bpf/verifier.c src_reg_type = regs[insn->src_reg].type; insn 7681 kernel/bpf/verifier.c err = check_mem_access(env, env->insn_idx, insn->src_reg, insn 7682 kernel/bpf/verifier.c insn->off, BPF_SIZE(insn->code), insn 7683 kernel/bpf/verifier.c BPF_READ, insn->dst_reg, false); insn 7711 kernel/bpf/verifier.c if (BPF_MODE(insn->code) == BPF_XADD) { insn 7712 kernel/bpf/verifier.c err = check_xadd(env, env->insn_idx, insn); insn 7720 kernel/bpf/verifier.c err = check_reg_arg(env, insn->src_reg, SRC_OP); insn 7724 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 7728 kernel/bpf/verifier.c dst_reg_type = regs[insn->dst_reg].type; insn 7731 kernel/bpf/verifier.c err = check_mem_access(env, env->insn_idx, insn->dst_reg, insn 7732 kernel/bpf/verifier.c insn->off, BPF_SIZE(insn->code), insn 7733 kernel/bpf/verifier.c BPF_WRITE, insn->src_reg, false); insn 7747 kernel/bpf/verifier.c if (BPF_MODE(insn->code) != BPF_MEM || insn 7748 kernel/bpf/verifier.c insn->src_reg != BPF_REG_0) { insn 7753 kernel/bpf/verifier.c err = check_reg_arg(env, insn->dst_reg, SRC_OP); insn 7757 kernel/bpf/verifier.c if (is_ctx_reg(env, insn->dst_reg)) { insn 7759 kernel/bpf/verifier.c insn->dst_reg, insn 7760 kernel/bpf/verifier.c reg_type_str[reg_state(env, insn->dst_reg)->type]); insn 7765 kernel/bpf/verifier.c err = check_mem_access(env, env->insn_idx, insn->dst_reg, insn 7766 kernel/bpf/verifier.c insn->off, BPF_SIZE(insn->code), insn 7772 kernel/bpf/verifier.c u8 opcode = BPF_OP(insn->code); insn 7776 kernel/bpf/verifier.c if (BPF_SRC(insn->code) != BPF_K || insn 7777 kernel/bpf/verifier.c insn->off != 0 || insn 7778 kernel/bpf/verifier.c (insn->src_reg != BPF_REG_0 && insn 7779 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) || insn 7780 kernel/bpf/verifier.c insn->dst_reg != BPF_REG_0 || insn 7787 kernel/bpf/verifier.c (insn->src_reg == BPF_PSEUDO_CALL || insn 7788 kernel/bpf/verifier.c insn->imm != BPF_FUNC_spin_unlock)) { insn 7792 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 7793 kernel/bpf/verifier.c err = check_func_call(env, insn, &env->insn_idx); insn 7795 kernel/bpf/verifier.c err = check_helper_call(env, insn->imm, env->insn_idx); insn 7800 kernel/bpf/verifier.c if (BPF_SRC(insn->code) != BPF_K || insn 7801 kernel/bpf/verifier.c insn->imm != 0 || insn 7802 kernel/bpf/verifier.c insn->src_reg != BPF_REG_0 || insn 7803 kernel/bpf/verifier.c insn->dst_reg != BPF_REG_0 || insn 7809 kernel/bpf/verifier.c env->insn_idx += insn->off + 1; insn 7813 kernel/bpf/verifier.c if (BPF_SRC(insn->code) != BPF_K || insn 7814 kernel/bpf/verifier.c insn->imm != 0 || insn 7815 kernel/bpf/verifier.c insn->src_reg != BPF_REG_0 || insn 7816 kernel/bpf/verifier.c insn->dst_reg != BPF_REG_0 || insn 7871 kernel/bpf/verifier.c err = check_cond_jmp_op(env, insn, &env->insn_idx); insn 7876 kernel/bpf/verifier.c u8 mode = BPF_MODE(insn->code); insn 7879 kernel/bpf/verifier.c err = check_ld_abs(env, insn); insn 7884 kernel/bpf/verifier.c err = check_ld_imm(env, insn); insn 7976 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 7984 kernel/bpf/verifier.c for (i = 0; i < insn_cnt; i++, insn++) { insn 7985 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_LDX && insn 7986 kernel/bpf/verifier.c (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) { insn 7991 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_STX && insn 7992 kernel/bpf/verifier.c ((BPF_MODE(insn->code) != BPF_MEM && insn 7993 kernel/bpf/verifier.c BPF_MODE(insn->code) != BPF_XADD) || insn->imm != 0)) { insn 7998 kernel/bpf/verifier.c if (insn[0].code == (BPF_LD | BPF_IMM | BPF_DW)) { insn 8004 kernel/bpf/verifier.c if (i == insn_cnt - 1 || insn[1].code != 0 || insn 8005 kernel/bpf/verifier.c insn[1].dst_reg != 0 || insn[1].src_reg != 0 || insn 8006 kernel/bpf/verifier.c insn[1].off != 0) { insn 8011 kernel/bpf/verifier.c if (insn[0].src_reg == 0) insn 8018 kernel/bpf/verifier.c if ((insn[0].src_reg != BPF_PSEUDO_MAP_FD && insn 8019 kernel/bpf/verifier.c insn[0].src_reg != BPF_PSEUDO_MAP_VALUE) || insn 8020 kernel/bpf/verifier.c (insn[0].src_reg == BPF_PSEUDO_MAP_FD && insn 8021 kernel/bpf/verifier.c insn[1].imm != 0)) { insn 8027 kernel/bpf/verifier.c f = fdget(insn[0].imm); insn 8031 kernel/bpf/verifier.c insn[0].imm); insn 8042 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_MAP_FD) { insn 8045 kernel/bpf/verifier.c u32 off = insn[1].imm; insn 8071 kernel/bpf/verifier.c insn[0].imm = (u32)addr; insn 8072 kernel/bpf/verifier.c insn[1].imm = addr >> 32; insn 8111 kernel/bpf/verifier.c insn++; insn 8117 kernel/bpf/verifier.c if (!bpf_opcode_in_insntable(insn->code)) { insn 8118 kernel/bpf/verifier.c verbose(env, "unknown opcode %02x\n", insn->code); insn 8150 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 8154 kernel/bpf/verifier.c for (i = 0; i < insn_cnt; i++, insn++) insn 8155 kernel/bpf/verifier.c if (insn->code == (BPF_LD | BPF_IMM | BPF_DW)) insn 8156 kernel/bpf/verifier.c insn->src_reg = 0; insn 8167 kernel/bpf/verifier.c struct bpf_insn *insn = new_prog->insnsi; insn 8175 kernel/bpf/verifier.c old_data[off].zext_dst = insn_has_def32(env, insn + off + cnt - 1); insn 8189 kernel/bpf/verifier.c new_data[i].zext_dst = insn_has_def32(env, insn + i); insn 8391 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 8398 kernel/bpf/verifier.c memcpy(insn + i, &trap, sizeof(trap)); insn 8420 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 8424 kernel/bpf/verifier.c for (i = 0; i < insn_cnt; i++, insn++) { insn 8425 kernel/bpf/verifier.c if (!insn_is_cond_jump(insn->code)) insn 8429 kernel/bpf/verifier.c ja.off = insn->off; insn 8430 kernel/bpf/verifier.c else if (!aux_data[i + 1 + insn->off].seen) insn 8438 kernel/bpf/verifier.c memcpy(insn, &ja, sizeof(ja)); insn 8469 kernel/bpf/verifier.c struct bpf_insn *insn = env->prog->insnsi; insn 8474 kernel/bpf/verifier.c if (memcmp(&insn[i], &ja, sizeof(ja))) insn 8504 kernel/bpf/verifier.c struct bpf_insn insn; insn 8506 kernel/bpf/verifier.c insn = insns[adj_idx]; insn 8514 kernel/bpf/verifier.c code = insn.code; insn 8516 kernel/bpf/verifier.c if (insn_no_def(&insn)) insn 8523 kernel/bpf/verifier.c if (is_reg64(env, &insn, insn.dst_reg, NULL, DST_OP)) { insn 8536 kernel/bpf/verifier.c rnd_hi32_patch[0] = insn; insn 8538 kernel/bpf/verifier.c rnd_hi32_patch[3].dst_reg = insn.dst_reg; insn 8547 kernel/bpf/verifier.c zext_patch[0] = insn; insn 8548 kernel/bpf/verifier.c zext_patch[1].dst_reg = insn.dst_reg; insn 8549 kernel/bpf/verifier.c zext_patch[1].src_reg = insn.dst_reg; insn 8575 kernel/bpf/verifier.c struct bpf_insn insn_buf[16], *insn; insn 8604 kernel/bpf/verifier.c insn = env->prog->insnsi + delta; insn 8606 kernel/bpf/verifier.c for (i = 0; i < insn_cnt; i++, insn++) { insn 8609 kernel/bpf/verifier.c if (insn->code == (BPF_LDX | BPF_MEM | BPF_B) || insn 8610 kernel/bpf/verifier.c insn->code == (BPF_LDX | BPF_MEM | BPF_H) || insn 8611 kernel/bpf/verifier.c insn->code == (BPF_LDX | BPF_MEM | BPF_W) || insn 8612 kernel/bpf/verifier.c insn->code == (BPF_LDX | BPF_MEM | BPF_DW)) insn 8614 kernel/bpf/verifier.c else if (insn->code == (BPF_STX | BPF_MEM | BPF_B) || insn 8615 kernel/bpf/verifier.c insn->code == (BPF_STX | BPF_MEM | BPF_H) || insn 8616 kernel/bpf/verifier.c insn->code == (BPF_STX | BPF_MEM | BPF_W) || insn 8617 kernel/bpf/verifier.c insn->code == (BPF_STX | BPF_MEM | BPF_DW)) insn 8636 kernel/bpf/verifier.c *insn, insn 8646 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 8671 kernel/bpf/verifier.c size = BPF_LDST_BYTES(insn); insn 8680 kernel/bpf/verifier.c off = insn->off; insn 8695 kernel/bpf/verifier.c insn->off = off & ~(size_default - 1); insn 8696 kernel/bpf/verifier.c insn->code = BPF_LDX | BPF_MEM | size_code; insn 8700 kernel/bpf/verifier.c cnt = convert_ctx_access(type, insn, insn_buf, env->prog, insn 8714 kernel/bpf/verifier.c insn->dst_reg, insn 8716 kernel/bpf/verifier.c insn_buf[cnt++] = BPF_ALU32_IMM(BPF_AND, insn->dst_reg, insn 8721 kernel/bpf/verifier.c insn->dst_reg, insn 8723 kernel/bpf/verifier.c insn_buf[cnt++] = BPF_ALU64_IMM(BPF_AND, insn->dst_reg, insn 8736 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 8746 kernel/bpf/verifier.c struct bpf_insn *insn; insn 8753 kernel/bpf/verifier.c for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) { insn 8754 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL) || insn 8755 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) insn 8761 kernel/bpf/verifier.c subprog = find_subprog(env, i + insn->imm + 1); insn 8764 kernel/bpf/verifier.c i + insn->imm + 1); insn 8770 kernel/bpf/verifier.c insn->off = subprog; insn 8774 kernel/bpf/verifier.c env->insn_aux_data[i].call_imm = insn->imm; insn 8776 kernel/bpf/verifier.c insn->imm = 1; insn 8835 kernel/bpf/verifier.c insn = func[i]->insnsi; insn 8836 kernel/bpf/verifier.c for (j = 0; j < func[i]->len; j++, insn++) { insn 8837 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL) || insn 8838 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) insn 8840 kernel/bpf/verifier.c subprog = insn->off; insn 8841 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) - insn 8882 kernel/bpf/verifier.c for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) { insn 8883 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL) || insn 8884 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) insn 8886 kernel/bpf/verifier.c insn->off = env->insn_aux_data[i].call_imm; insn 8887 kernel/bpf/verifier.c subprog = find_subprog(env, i + insn->off + 1); insn 8888 kernel/bpf/verifier.c insn->imm = subprog; insn 8905 kernel/bpf/verifier.c for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) { insn 8906 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL) || insn 8907 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) insn 8909 kernel/bpf/verifier.c insn->off = 0; insn 8910 kernel/bpf/verifier.c insn->imm = env->insn_aux_data[i].call_imm; insn 8920 kernel/bpf/verifier.c struct bpf_insn *insn = prog->insnsi; insn 8934 kernel/bpf/verifier.c for (i = 0; i < prog->len; i++, insn++) { insn 8935 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL) || insn 8936 kernel/bpf/verifier.c insn->src_reg != BPF_PSEUDO_CALL) insn 8938 kernel/bpf/verifier.c depth = get_callee_stack_depth(env, insn, i); insn 8941 kernel/bpf/verifier.c bpf_patch_call_args(insn, depth); insn 8956 kernel/bpf/verifier.c struct bpf_insn *insn = prog->insnsi; insn 8966 kernel/bpf/verifier.c for (i = 0; i < insn_cnt; i++, insn++) { insn 8967 kernel/bpf/verifier.c if (insn->code == (BPF_ALU64 | BPF_MOD | BPF_X) || insn 8968 kernel/bpf/verifier.c insn->code == (BPF_ALU64 | BPF_DIV | BPF_X) || insn 8969 kernel/bpf/verifier.c insn->code == (BPF_ALU | BPF_MOD | BPF_X) || insn 8970 kernel/bpf/verifier.c insn->code == (BPF_ALU | BPF_DIV | BPF_X)) { insn 8971 kernel/bpf/verifier.c bool is64 = BPF_CLASS(insn->code) == BPF_ALU64; insn 8973 kernel/bpf/verifier.c BPF_MOV32_REG(insn->src_reg, insn->src_reg), insn 8975 kernel/bpf/verifier.c BPF_JMP_IMM(BPF_JNE, insn->src_reg, 0, 2), insn 8976 kernel/bpf/verifier.c BPF_ALU32_REG(BPF_XOR, insn->dst_reg, insn->dst_reg), insn 8978 kernel/bpf/verifier.c *insn, insn 8981 kernel/bpf/verifier.c BPF_MOV32_REG(insn->src_reg, insn->src_reg), insn 8983 kernel/bpf/verifier.c BPF_JMP_IMM(BPF_JEQ, insn->src_reg, 0, 1), insn 8984 kernel/bpf/verifier.c *insn, insn 8988 kernel/bpf/verifier.c if (insn->code == (BPF_ALU64 | BPF_DIV | BPF_X) || insn 8989 kernel/bpf/verifier.c insn->code == (BPF_ALU | BPF_DIV | BPF_X)) { insn 9003 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 9007 kernel/bpf/verifier.c if (BPF_CLASS(insn->code) == BPF_LD && insn 9008 kernel/bpf/verifier.c (BPF_MODE(insn->code) == BPF_ABS || insn 9009 kernel/bpf/verifier.c BPF_MODE(insn->code) == BPF_IND)) { insn 9010 kernel/bpf/verifier.c cnt = env->ops->gen_ld_abs(insn, insn_buf); insn 9022 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 9026 kernel/bpf/verifier.c if (insn->code == (BPF_ALU64 | BPF_ADD | BPF_X) || insn 9027 kernel/bpf/verifier.c insn->code == (BPF_ALU64 | BPF_SUB | BPF_X)) { insn 9044 kernel/bpf/verifier.c off_reg = issrc ? insn->src_reg : insn->dst_reg; insn 9055 kernel/bpf/verifier.c insn->src_reg = BPF_REG_AX; insn 9061 kernel/bpf/verifier.c insn->code = insn->code == code_add ? insn 9063 kernel/bpf/verifier.c *patch++ = *insn; insn 9074 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 9078 kernel/bpf/verifier.c if (insn->code != (BPF_JMP | BPF_CALL)) insn 9080 kernel/bpf/verifier.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 9083 kernel/bpf/verifier.c if (insn->imm == BPF_FUNC_get_route_realm) insn 9085 kernel/bpf/verifier.c if (insn->imm == BPF_FUNC_get_prandom_u32) insn 9087 kernel/bpf/verifier.c if (insn->imm == BPF_FUNC_override_return) insn 9089 kernel/bpf/verifier.c if (insn->imm == BPF_FUNC_tail_call) { insn 9104 kernel/bpf/verifier.c insn->imm = 0; insn 9105 kernel/bpf/verifier.c insn->code = BPF_JMP | BPF_TAIL_CALL; insn 9129 kernel/bpf/verifier.c insn_buf[2] = *insn; insn 9137 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 9146 kernel/bpf/verifier.c (insn->imm == BPF_FUNC_map_lookup_elem || insn 9147 kernel/bpf/verifier.c insn->imm == BPF_FUNC_map_update_elem || insn 9148 kernel/bpf/verifier.c insn->imm == BPF_FUNC_map_delete_elem || insn 9149 kernel/bpf/verifier.c insn->imm == BPF_FUNC_map_push_elem || insn 9150 kernel/bpf/verifier.c insn->imm == BPF_FUNC_map_pop_elem || insn 9151 kernel/bpf/verifier.c insn->imm == BPF_FUNC_map_peek_elem)) { insn 9158 kernel/bpf/verifier.c if (insn->imm == BPF_FUNC_map_lookup_elem && insn 9173 kernel/bpf/verifier.c insn = new_prog->insnsi + i + delta; insn 9192 kernel/bpf/verifier.c switch (insn->imm) { insn 9194 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) - insn 9198 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_update_elem) - insn 9202 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_delete_elem) - insn 9206 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_push_elem) - insn 9210 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_pop_elem) - insn 9214 kernel/bpf/verifier.c insn->imm = BPF_CAST_CALL(ops->map_peek_elem) - insn 9223 kernel/bpf/verifier.c fn = env->ops->get_func_proto(insn->imm, env->prog); insn 9230 kernel/bpf/verifier.c func_id_name(insn->imm), insn->imm); insn 9233 kernel/bpf/verifier.c insn->imm = fn->func - __bpf_call_base; insn 231 kernel/events/uprobes.c bool __weak is_swbp_insn(uprobe_opcode_t *insn) insn 233 kernel/events/uprobes.c return *insn == UPROBE_SWBP_INSN; insn 245 kernel/events/uprobes.c bool __weak is_trap_insn(uprobe_opcode_t *insn) insn 247 kernel/events/uprobes.c return is_swbp_insn(insn); insn 598 kernel/events/uprobes.c *(uprobe_opcode_t *)&auprobe->insn); insn 798 kernel/events/uprobes.c void *insn, int nbytes, loff_t offset) insn 813 kernel/events/uprobes.c copy_from_page(page, offset, insn, nbytes); insn 823 kernel/events/uprobes.c void *insn = &uprobe->arch.insn; insn 824 kernel/events/uprobes.c int size = sizeof(uprobe->arch.insn); insn 833 kernel/events/uprobes.c err = __copy_insn(mapping, filp, insn, len, offs); insn 837 kernel/events/uprobes.c insn += len; insn 863 kernel/events/uprobes.c if (is_trap_insn((uprobe_opcode_t *)&uprobe->arch.insn)) insn 1491 kernel/events/uprobes.c uprobe_opcode_t insn = UPROBE_SWBP_INSN; insn 1516 kernel/events/uprobes.c arch_uprobe_copy_ixol(area->pages[0], 0, &insn, UPROBE_SWBP_INSN_SIZE); insn 1254 kernel/signal.c unsigned char insn; insn 1256 kernel/signal.c if (get_user(insn, (unsigned char *)(regs->ip + i))) insn 1258 kernel/signal.c pr_cont("%02x ", insn); insn 1150 kernel/trace/bpf_trace.c struct bpf_insn *insn = insn_buf; insn 1154 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_perf_event_data_kern, insn 1157 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, insn 1162 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_perf_event_data_kern, insn 1165 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, insn 1170 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_perf_event_data_kern, insn 1173 kernel/trace/bpf_trace.c *insn++ = BPF_LDX_MEM(BPF_SIZEOF(long), si->dst_reg, si->dst_reg, insn 1178 kernel/trace/bpf_trace.c return insn - insn_buf; insn 16 lib/extable.c #define ex_to_insn(x) ((x)->insn) insn 20 lib/extable.c return (unsigned long)&x->insn + x->insn; insn 34 lib/extable.c x->insn = y->insn + delta; insn 35 lib/extable.c y->insn = tmp.insn - delta; insn 90 lib/test_bpf.c struct sock_filter *insn; insn 94 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 95 lib/test_bpf.c if (!insn) insn 99 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_RET | BPF_K, k); insn 101 lib/test_bpf.c self->u.ptr.insns = insn; insn 110 lib/test_bpf.c struct sock_filter *insn; insn 113 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 114 lib/test_bpf.c if (!insn) insn 118 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_RET | BPF_K, 0xfefefefe); insn 120 lib/test_bpf.c self->u.ptr.insns = insn; insn 129 lib/test_bpf.c struct sock_filter *insn; insn 133 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 134 lib/test_bpf.c if (!insn) insn 142 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, k); insn 145 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_A, 0); insn 147 lib/test_bpf.c self->u.ptr.insns = insn; insn 156 lib/test_bpf.c struct sock_filter *insn; insn 159 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 160 lib/test_bpf.c if (!insn) insn 164 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_RET | BPF_K, 0xfefefefe); insn 166 lib/test_bpf.c self->u.ptr.insns = insn; insn 175 lib/test_bpf.c struct sock_filter *insn; insn 178 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 179 lib/test_bpf.c if (!insn) insn 182 lib/test_bpf.c insn[0] = __BPF_JUMP(BPF_JMP | BPF_JA, len - 2, 0, 0); insn 185 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_RET | BPF_K, 0xfefefefe); insn 187 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_K, 0xabababab); insn 189 lib/test_bpf.c self->u.ptr.insns = insn; insn 198 lib/test_bpf.c struct sock_filter *insn; insn 201 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 202 lib/test_bpf.c if (!insn) insn 206 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_LD | BPF_W | BPF_ABS, SKF_AD_OFF + insn 209 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_A, 0); insn 211 lib/test_bpf.c self->u.ptr.insns = insn; insn 220 lib/test_bpf.c struct sock_filter *insn; insn 223 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 224 lib/test_bpf.c if (!insn) insn 228 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_LD | BPF_W | BPF_ABS, SKF_AD_OFF + insn 231 lib/test_bpf.c insn[len - 4] = __BPF_STMT(BPF_MISC | BPF_TAX, 0); insn 232 lib/test_bpf.c insn[len - 3] = __BPF_STMT(BPF_LD | BPF_W | BPF_ABS, SKF_AD_OFF + insn 234 lib/test_bpf.c insn[len - 2] = __BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0); insn 235 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_A, 0); insn 237 lib/test_bpf.c self->u.ptr.insns = insn; insn 246 lib/test_bpf.c struct sock_filter *insn; insn 249 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 250 lib/test_bpf.c if (!insn) insn 253 lib/test_bpf.c insn[0] = __BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff); insn 256 lib/test_bpf.c insn[i] = __BPF_JUMP(BPF_JMP | BPF_JGT, 0xffffffff, jmp_off--, 0); insn 258 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_A, 0); insn 260 lib/test_bpf.c self->u.ptr.insns = insn; insn 269 lib/test_bpf.c struct bpf_insn *insn; insn 272 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 273 lib/test_bpf.c if (!insn) insn 276 lib/test_bpf.c insn[0] = BPF_JMP_IMM(BPF_JA, 0, 0, len - 2); insn 277 lib/test_bpf.c insn[1] = BPF_ALU32_IMM(BPF_MOV, R0, 0xcbababab); insn 278 lib/test_bpf.c insn[2] = BPF_EXIT_INSN(); insn 281 lib/test_bpf.c insn[i] = BPF_ALU32_IMM(BPF_MOV, R0, 0xfefefefe); insn 283 lib/test_bpf.c insn[len - 2] = BPF_EXIT_INSN(); insn 284 lib/test_bpf.c insn[len - 1] = BPF_JMP_IMM(BPF_JA, 0, 0, -(len - 1)); insn 286 lib/test_bpf.c self->u.ptr.insns = insn; insn 295 lib/test_bpf.c struct bpf_insn *insn; insn 298 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 299 lib/test_bpf.c if (!insn) insn 303 lib/test_bpf.c insn[i] = BPF_JMP_IMM(BPF_JA, 0, 0, hlen - 2 - 2 * i); insn 305 lib/test_bpf.c insn[i] = BPF_JMP_IMM(BPF_JA, 0, 0, hlen - 1 - 2 * i); insn 307 lib/test_bpf.c insn[hlen / 2] = BPF_JMP_IMM(BPF_JA, 0, 0, hlen / 2 - 1); insn 308 lib/test_bpf.c insn[hlen] = BPF_ALU32_IMM(BPF_MOV, R0, 0xabababac); insn 309 lib/test_bpf.c insn[hlen + 1] = BPF_EXIT_INSN(); insn 311 lib/test_bpf.c self->u.ptr.insns = insn; insn 320 lib/test_bpf.c struct sock_filter *insn; insn 324 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 325 lib/test_bpf.c if (!insn) insn 332 lib/test_bpf.c insn[i + j] = __BPF_JUMP(BPF_JMP | BPF_JA, insn 335 lib/test_bpf.c insn[i + j] = __BPF_JUMP(BPF_JMP | BPF_JA, rlen - 1 - j, insn 338 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_K, 0xababcbac); insn 340 lib/test_bpf.c self->u.ptr.insns = insn; insn 355 lib/test_bpf.c struct sock_filter *insn; insn 358 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 359 lib/test_bpf.c if (!insn) insn 362 lib/test_bpf.c insn[0] = __BPF_JUMP(BPF_JMP | BPF_JA, len - 2, 0, 0); insn 365 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 0); insn 367 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_K, 0xabababab); insn 369 lib/test_bpf.c self->u.ptr.insns = insn; insn 378 lib/test_bpf.c struct sock_filter *insn; insn 381 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 382 lib/test_bpf.c if (!insn) insn 386 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 0); insn 388 lib/test_bpf.c insn[len - 3] = __BPF_STMT(BPF_LD | BPF_IMM, 0xabababab); insn 389 lib/test_bpf.c insn[len - 2] = __BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0); insn 390 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_A, 0); insn 392 lib/test_bpf.c self->u.ptr.insns = insn; insn 407 lib/test_bpf.c struct sock_filter *insn; insn 410 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 411 lib/test_bpf.c if (!insn) insn 415 lib/test_bpf.c insn[i] = __BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 0); insn 416 lib/test_bpf.c insn[i + 1] = __BPF_STMT(BPF_LD | BPF_W | BPF_ABS, insn 420 lib/test_bpf.c insn[len - 1] = __BPF_STMT(BPF_RET | BPF_K, 0xbee); insn 422 lib/test_bpf.c self->u.ptr.insns = insn; insn 431 lib/test_bpf.c struct bpf_insn *insn; insn 434 lib/test_bpf.c insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL); insn 435 lib/test_bpf.c if (!insn) insn 438 lib/test_bpf.c insn[0] = BPF_ALU32_IMM(BPF_MOV, R0, 1); insn 439 lib/test_bpf.c insn[1] = BPF_ST_MEM(size, R10, -40, 42); insn 442 lib/test_bpf.c insn[i] = BPF_STX_XADD(size, R10, R0, -40); insn 444 lib/test_bpf.c insn[len - 2] = BPF_LDX_MEM(size, R0, R10, -40); insn 445 lib/test_bpf.c insn[len - 1] = BPF_EXIT_INSN(); insn 447 lib/test_bpf.c self->u.ptr.insns = insn; insn 273 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 279 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, insn 284 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_TYPE_OFFSET()); insn 285 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, PKT_TYPE_MAX); insn 287 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, 5); insn 294 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, insn 302 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, insn 306 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_VLAN_PRESENT_OFFSET()); insn 308 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, PKT_VLAN_PRESENT_BIT); insn 310 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, 1); insn 314 net/core/filter.c return insn - insn_buf; insn 320 net/core/filter.c struct bpf_insn *insn = *insnp; insn 328 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX, insn 331 net/core/filter.c *insn = BPF_ENDIAN(BPF_FROM_BE, BPF_REG_A, 16); insn 335 net/core/filter.c cnt = convert_skb_access(SKF_AD_PKTTYPE, BPF_REG_A, BPF_REG_CTX, insn); insn 336 net/core/filter.c insn += cnt - 1; insn 344 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, dev), insn 348 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JNE, BPF_REG_TMP, 0, 1); insn 349 net/core/filter.c *insn++ = BPF_EXIT_INSN(); insn 351 net/core/filter.c *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_TMP, insn 354 net/core/filter.c *insn = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_TMP, insn 359 net/core/filter.c cnt = convert_skb_access(SKF_AD_MARK, BPF_REG_A, BPF_REG_CTX, insn); insn 360 net/core/filter.c insn += cnt - 1; insn 366 net/core/filter.c *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, insn 371 net/core/filter.c cnt = convert_skb_access(SKF_AD_QUEUE, BPF_REG_A, BPF_REG_CTX, insn); insn 372 net/core/filter.c insn += cnt - 1; insn 377 net/core/filter.c BPF_REG_A, BPF_REG_CTX, insn); insn 378 net/core/filter.c insn += cnt - 1; insn 383 net/core/filter.c BPF_REG_A, BPF_REG_CTX, insn); insn 384 net/core/filter.c insn += cnt - 1; insn 391 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, BPF_REG_A, BPF_REG_CTX, insn 394 net/core/filter.c *insn = BPF_ENDIAN(BPF_FROM_BE, BPF_REG_A, 16); insn 403 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG1, BPF_REG_CTX); insn 405 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG2, BPF_REG_A); insn 407 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG3, BPF_REG_X); insn 411 net/core/filter.c *insn = BPF_EMIT_CALL(bpf_skb_get_pay_offset); insn 414 net/core/filter.c *insn = BPF_EMIT_CALL(bpf_skb_get_nlattr); insn 417 net/core/filter.c *insn = BPF_EMIT_CALL(bpf_skb_get_nlattr_nest); insn 420 net/core/filter.c *insn = BPF_EMIT_CALL(bpf_get_raw_cpu_id); insn 423 net/core/filter.c *insn = BPF_EMIT_CALL(bpf_user_rnd_u32); insn 431 net/core/filter.c *insn = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_X); insn 443 net/core/filter.c *insnp = insn; insn 455 net/core/filter.c struct bpf_insn *insn = *insnp; insn 465 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_TMP, BPF_REG_H); insn 467 net/core/filter.c *insn++ = BPF_ALU64_IMM(BPF_SUB, BPF_REG_TMP, offset); insn 468 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JSLT, BPF_REG_TMP, insn 471 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, insn 474 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_TMP, BPF_REG_D); insn 475 net/core/filter.c *insn++ = BPF_ALU64_IMM(BPF_ADD, BPF_REG_TMP, offset); insn 476 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, insn 480 net/core/filter.c *insn++ = BPF_ENDIAN(BPF_FROM_BE, BPF_REG_A, size * 8); insn 481 net/core/filter.c *insn++ = BPF_JMP_A(8); insn 484 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG1, BPF_REG_CTX); insn 485 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG2, BPF_REG_D); insn 486 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG3, BPF_REG_H); insn 488 net/core/filter.c *insn++ = BPF_MOV64_IMM(BPF_REG_ARG4, offset); insn 490 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_ARG4, BPF_REG_X); insn 492 net/core/filter.c *insn++ = BPF_ALU64_IMM(BPF_ADD, BPF_REG_ARG4, offset); insn 497 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_8); insn 500 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_16); insn 503 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_32); insn 509 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JSGE, BPF_REG_A, 0, 2); insn 510 net/core/filter.c *insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_A); insn 511 net/core/filter.c *insn = BPF_EXIT_INSN(); insn 513 net/core/filter.c *insnp = insn; insn 598 net/core/filter.c struct bpf_insn *insn = tmp_insns; insn 638 net/core/filter.c convert_bpf_extensions(fp, &insn)) insn 641 net/core/filter.c convert_bpf_ld_abs(fp, &insn)) { insn 648 net/core/filter.c *insn++ = BPF_MOV32_REG(BPF_REG_X, BPF_REG_X); insn 652 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JNE, BPF_REG_X, 0, 2); insn 653 net/core/filter.c *insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_A); insn 654 net/core/filter.c *insn++ = BPF_EXIT_INSN(); insn 657 net/core/filter.c *insn = BPF_RAW_INSN(fp->code, BPF_REG_A, BPF_REG_X, 0, fp->k); insn 675 net/core/filter.c off -= insn - tmp_insns; \ insn 679 net/core/filter.c insn->off = off; \ insn 684 net/core/filter.c insn->code = fp->code; insn 701 net/core/filter.c *insn++ = BPF_MOV32_IMM(BPF_REG_TMP, fp->k); insn 703 net/core/filter.c insn->dst_reg = BPF_REG_A; insn 704 net/core/filter.c insn->src_reg = BPF_REG_TMP; insn 707 net/core/filter.c insn->dst_reg = BPF_REG_A; insn 708 net/core/filter.c insn->imm = fp->k; insn 710 net/core/filter.c insn->src_reg = bpf_src == BPF_X ? BPF_REG_X : 0; insn 715 net/core/filter.c insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; insn 725 net/core/filter.c insn->code = BPF_JMP | BPF_JNE | bpf_src; insn 728 net/core/filter.c insn->code = BPF_JMP | BPF_JLE | bpf_src; insn 731 net/core/filter.c insn->code = BPF_JMP | BPF_JLT | bpf_src; insn 744 net/core/filter.c insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src; insn 746 net/core/filter.c insn++; insn 748 net/core/filter.c insn->code = BPF_JMP | BPF_JA; insn 763 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A); insn 765 net/core/filter.c convert_bpf_ld_abs(&tmp, &insn); insn 766 net/core/filter.c insn++; insn 768 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, 0xf); insn 770 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_LSH, BPF_REG_A, 2); insn 772 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_TMP, BPF_REG_X); insn 774 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A); insn 776 net/core/filter.c *insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_TMP); insn 785 net/core/filter.c *insn++ = BPF_MOV32_RAW(BPF_K, BPF_REG_0, insn 787 net/core/filter.c *insn = BPF_EXIT_INSN(); insn 794 net/core/filter.c *insn = BPF_STX_MEM(BPF_W, BPF_REG_FP, BPF_CLASS(fp->code) == insn 809 net/core/filter.c *insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ? insn 817 net/core/filter.c *insn = BPF_MOV32_IMM(BPF_CLASS(fp->code) == BPF_LD ? insn 823 net/core/filter.c *insn = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A); insn 828 net/core/filter.c *insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_X); insn 834 net/core/filter.c *insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ? insn 842 net/core/filter.c *insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, fp->k); insn 850 net/core/filter.c insn++; insn 853 net/core/filter.c sizeof(*insn) * (insn - tmp_insns)); insn 854 net/core/filter.c new_insn += insn - tmp_insns; insn 5576 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 5582 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct tcp_sock, FIELD),\ insn 5592 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( \ insn 5601 net/core/filter.c if (insn > insn_buf) insn 5602 net/core/filter.c return insn - insn_buf; insn 5611 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 5692 net/core/filter.c return insn - insn_buf; insn 5767 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 5773 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_sock, FIELD),\ insn 5784 net/core/filter.c return insn - insn_buf; insn 6745 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 6756 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, BPF_REG_6, BPF_REG_1, CLONED_OFFSET()); insn 6757 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, BPF_REG_6, CLONED_MASK); insn 6758 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, BPF_REG_6, 0, 7); insn 6761 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_6, BPF_REG_1); insn 6762 net/core/filter.c *insn++ = BPF_ALU64_REG(BPF_XOR, BPF_REG_2, BPF_REG_2); insn 6763 net/core/filter.c *insn++ = BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, insn 6769 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2); insn 6770 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_MOV, BPF_REG_0, drop_verdict); insn 6771 net/core/filter.c *insn++ = BPF_EXIT_INSN(); insn 6774 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_6); insn 6776 net/core/filter.c *insn++ = prog->insnsi[0]; insn 6778 net/core/filter.c return insn - insn_buf; insn 6785 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 6788 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_CTX); insn 6790 net/core/filter.c *insn++ = BPF_MOV64_IMM(BPF_REG_2, orig->imm); insn 6792 net/core/filter.c *insn++ = BPF_MOV64_REG(BPF_REG_2, orig->src_reg); insn 6794 net/core/filter.c *insn++ = BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, orig->imm); insn 6799 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_8_no_cache); insn 6802 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_16_no_cache); insn 6805 net/core/filter.c *insn++ = BPF_EMIT_CALL(bpf_skb_load_helper_32_no_cache); insn 6809 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JSGE, BPF_REG_0, 0, 2); insn 6810 net/core/filter.c *insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_0, BPF_REG_0); insn 6811 net/core/filter.c *insn++ = BPF_EXIT_INSN(); insn 6813 net/core/filter.c return insn - insn_buf; insn 7196 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7200 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_flow_dissector, data), insn 7206 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_flow_dissector, data_end), insn 7212 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_flow_dissector, flow_keys), insn 7218 net/core/filter.c return insn - insn_buf; insn 7226 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7231 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7237 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7243 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7250 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7254 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7260 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7266 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, dev), insn 7269 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, si->dst_reg, 0, 1); insn 7270 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7276 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7283 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7287 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7294 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, si->dst_reg, si->src_reg, insn 7296 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, PKT_TYPE_MAX); insn 7298 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, 5); insn 7304 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JGE, si->src_reg, NO_QUEUE_MAPPING, 1); insn 7305 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7310 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7319 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, si->dst_reg, si->src_reg, insn 7322 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, PKT_VLAN_PRESENT_BIT); insn 7324 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, 1); insn 7328 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7346 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_SIZE(si->code), si->dst_reg, insn 7349 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZE(si->code), si->dst_reg, insn 7362 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_H, si->dst_reg, insn 7365 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, insn 7370 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, data), insn 7380 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZEOF(void *), si->dst_reg, insn 7389 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZEOF(void *), si->dst_reg, insn 7396 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7400 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg, insn 7406 net/core/filter.c *insn++ = BPF_MOV64_REG(si->dst_reg, si->dst_reg); insn 7408 net/core/filter.c *insn++ = BPF_MOV64_IMM(si->dst_reg, 0); insn 7414 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7417 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JGE, si->dst_reg, MIN_NAPI_ID, 1); insn 7418 net/core/filter.c *insn++ = BPF_MOV64_IMM(si->dst_reg, 0); insn 7421 net/core/filter.c *insn++ = BPF_MOV64_IMM(si->dst_reg, 0); insn 7427 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7430 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 7438 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7441 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7450 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7453 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7467 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7470 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7475 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 7487 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7490 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7495 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 7502 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7505 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 7510 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_LSH, si->dst_reg, 16); insn 7517 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7520 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 7529 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_DW, insn 7535 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_DW, insn 7545 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, end), insn 7548 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, head), insn 7551 net/core/filter.c *insn++ = BPF_ALU64_REG(BPF_ADD, si->dst_reg, BPF_REG_AX); insn 7553 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, end), insn 7557 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct skb_shared_info, gso_segs), insn 7571 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, off); insn 7575 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, sk), insn 7581 net/core/filter.c return insn - insn_buf; insn 7589 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7597 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7600 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7608 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7611 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7619 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7622 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7627 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7639 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7641 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, SK_FL_TYPE_MASK); insn 7642 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, SK_FL_TYPE_SHIFT); insn 7648 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 7650 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, SK_FL_PROTO_MASK); insn 7651 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, SK_FL_PROTO_SHIFT); insn 7656 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7665 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7677 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7687 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 7695 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7703 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 7709 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7719 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7729 net/core/filter.c *insn++ = BPF_LDX_MEM( insn 7739 net/core/filter.c return insn - insn_buf; insn 7747 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7751 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_buff, dev), insn 7754 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7763 net/core/filter.c return insn - insn_buf; insn 7771 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7775 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_buff, data), insn 7780 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_buff, data_meta), insn 7785 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_buff, data_end), insn 7790 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_buff, rxq), insn 7793 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_rxq_info, dev), insn 7796 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7800 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct xdp_buff, rxq), insn 7803 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 7809 net/core/filter.c return insn - insn_buf; insn 7824 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg, \ insn 7826 net/core/filter.c *insn++ = BPF_LDX_MEM( \ insn 7854 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_DW, si->dst_reg, tmp_reg, \ insn 7856 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), tmp_reg, \ insn 7858 net/core/filter.c *insn++ = BPF_STX_MEM(SIZE, tmp_reg, si->src_reg, \ insn 7862 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_DW, tmp_reg, si->dst_reg, \ insn 7887 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7937 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, SK_FL_TYPE_MASK); insn 7938 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, SK_FL_TYPE_SHIFT); insn 7945 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, SK_FL_PROTO_MASK); insn 7946 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, insn 7967 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct bpf_sock_addr_kern, sk), insn 7973 net/core/filter.c return insn - insn_buf; insn 7982 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 7990 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( \ insn 7996 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, si->dst_reg, 0, 2); \ insn 7997 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( \ insn 8001 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(OBJ, \ insn 8028 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_DW, si->dst_reg, reg, \ insn 8031 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( \ insn 8037 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, reg, 0, 2); \ insn 8038 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( \ insn 8042 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_FIELD_SIZEOF(OBJ, OBJ_FIELD), \ insn 8045 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_DW, reg, si->dst_reg, \ insn 8058 net/core/filter.c if (insn > insn_buf) insn 8059 net/core/filter.c return insn - insn_buf; insn 8074 net/core/filter.c *insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 8077 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg, insn 8084 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8088 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8095 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8099 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8107 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8111 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8124 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8128 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8133 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 8145 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8149 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8154 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 8161 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8165 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8168 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_LSH, si->dst_reg, 16); insn 8175 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8179 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8184 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8195 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8199 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_B, si->dst_reg, si->dst_reg, insn 8209 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8213 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8291 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8297 net/core/filter.c *insn++ = BPF_JMP_IMM(BPF_JEQ, si->dst_reg, 0, 1); insn 8298 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8304 net/core/filter.c return insn - insn_buf; insn 8312 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 8321 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_SIZEOF(void *), si->dst_reg, insn 8329 net/core/filter.c return insn - insn_buf; insn 8337 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 8347 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_msg, data), insn 8352 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_msg, data_end), insn 8359 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8363 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8370 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8374 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8382 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8386 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8399 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8403 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8408 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 8420 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8424 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->dst_reg, insn 8429 net/core/filter.c *insn++ = BPF_MOV32_IMM(si->dst_reg, 0); insn 8436 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8440 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8443 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_LSH, si->dst_reg, 16); insn 8450 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF( insn 8454 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->dst_reg, insn 8459 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_msg_sg, size), insn 8465 net/core/filter.c return insn - insn_buf; insn 8863 net/core/filter.c *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \ insn 8888 net/core/filter.c struct bpf_insn *insn = insn_buf; insn 8907 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_AND, si->dst_reg, SK_FL_PROTO_MASK); insn 8908 net/core/filter.c *insn++ = BPF_ALU32_IMM(BPF_RSH, si->dst_reg, insn 8929 net/core/filter.c return insn - insn_buf; insn 340 samples/bpf/bpf_load.c GElf_Shdr *shdr, struct bpf_insn *insn, insn 360 samples/bpf/bpf_load.c if (insn[insn_idx].code != (BPF_LD | BPF_IMM | BPF_DW)) { insn 362 samples/bpf/bpf_load.c insn_idx, insn[insn_idx].code); insn 365 samples/bpf/bpf_load.c insn[insn_idx].src_reg = BPF_PSEUDO_MAP_FD; insn 375 samples/bpf/bpf_load.c insn[insn_idx].imm = maps[map_idx].fd; insn 11 scripts/gcc-plugins/arm_ssp_per_task_plugin.c rtx_insn *insn; insn 13 scripts/gcc-plugins/arm_ssp_per_task_plugin.c for (insn = get_insns(); insn; insn = NEXT_INSN(insn)) { insn 21 scripts/gcc-plugins/arm_ssp_per_task_plugin.c if (!INSN_P(insn)) insn 23 scripts/gcc-plugins/arm_ssp_per_task_plugin.c body = PATTERN(insn); insn 43 scripts/gcc-plugins/arm_ssp_per_task_plugin.c insn); insn 708 scripts/gcc-plugins/gcc-common.h #define INSN_DELETED_P(insn) (insn)->deleted() insn 193 scripts/gcc-plugins/stackleak_plugin.c rtx_insn *insn, *next; insn 212 scripts/gcc-plugins/stackleak_plugin.c for (insn = get_insns(); insn; insn = next) { insn 215 scripts/gcc-plugins/stackleak_plugin.c next = NEXT_INSN(insn); insn 218 scripts/gcc-plugins/stackleak_plugin.c if (!CALL_P(insn)) insn 226 scripts/gcc-plugins/stackleak_plugin.c body = PATTERN(insn); insn 251 scripts/gcc-plugins/stackleak_plugin.c delete_insn_and_edges(insn); insn 255 scripts/gcc-plugins/stackleak_plugin.c insn = next; insn 256 scripts/gcc-plugins/stackleak_plugin.c next = NEXT_INSN(insn); insn 257 scripts/gcc-plugins/stackleak_plugin.c delete_insn_and_edges(insn); insn 230 tools/arch/s390/include/uapi/asm/sie.h #define INSN_DECODE_IPA0(ipa0, insn, rshift, mask) \ insn 231 tools/arch/s390/include/uapi/asm/sie.h (insn >> 56) == (ipa0) ? \ insn 232 tools/arch/s390/include/uapi/asm/sie.h ((ipa0 << 8) | ((insn >> rshift) & mask)) : insn 234 tools/arch/s390/include/uapi/asm/sie.h #define INSN_DECODE(insn) (insn >> 56) insn 241 tools/arch/s390/include/uapi/asm/sie.h #define icpt_insn_decoder(insn) ( \ insn 242 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0x01, insn, 48, 0xff) \ insn 243 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xaa, insn, 48, 0x0f) \ insn 244 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xb2, insn, 48, 0xff) \ insn 245 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xb9, insn, 48, 0xff) \ insn 246 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xe3, insn, 48, 0xff) \ insn 247 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xe5, insn, 48, 0xff) \ insn 248 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xeb, insn, 16, 0xff) \ insn 249 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE_IPA0(0xc8, insn, 48, 0x0f) \ insn 250 tools/arch/s390/include/uapi/asm/sie.h INSN_DECODE(insn)) insn 88 tools/arch/x86/include/asm/insn.h extern void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64); insn 89 tools/arch/x86/include/asm/insn.h extern void insn_get_prefixes(struct insn *insn); insn 90 tools/arch/x86/include/asm/insn.h extern void insn_get_opcode(struct insn *insn); insn 91 tools/arch/x86/include/asm/insn.h extern void insn_get_modrm(struct insn *insn); insn 92 tools/arch/x86/include/asm/insn.h extern void insn_get_sib(struct insn *insn); insn 93 tools/arch/x86/include/asm/insn.h extern void insn_get_displacement(struct insn *insn); insn 94 tools/arch/x86/include/asm/insn.h extern void insn_get_immediate(struct insn *insn); insn 95 tools/arch/x86/include/asm/insn.h extern void insn_get_length(struct insn *insn); insn 98 tools/arch/x86/include/asm/insn.h static inline void insn_get_attribute(struct insn *insn) insn 100 tools/arch/x86/include/asm/insn.h insn_get_modrm(insn); insn 104 tools/arch/x86/include/asm/insn.h extern int insn_rip_relative(struct insn *insn); insn 107 tools/arch/x86/include/asm/insn.h static inline void kernel_insn_init(struct insn *insn, insn 111 tools/arch/x86/include/asm/insn.h insn_init(insn, kaddr, buf_len, 1); insn 113 tools/arch/x86/include/asm/insn.h insn_init(insn, kaddr, buf_len, 0); insn 117 tools/arch/x86/include/asm/insn.h static inline int insn_is_avx(struct insn *insn) insn 119 tools/arch/x86/include/asm/insn.h if (!insn->prefixes.got) insn 120 tools/arch/x86/include/asm/insn.h insn_get_prefixes(insn); insn 121 tools/arch/x86/include/asm/insn.h return (insn->vex_prefix.value != 0); insn 124 tools/arch/x86/include/asm/insn.h static inline int insn_is_evex(struct insn *insn) insn 126 tools/arch/x86/include/asm/insn.h if (!insn->prefixes.got) insn 127 tools/arch/x86/include/asm/insn.h insn_get_prefixes(insn); insn 128 tools/arch/x86/include/asm/insn.h return (insn->vex_prefix.nbytes == 4); insn 132 tools/arch/x86/include/asm/insn.h static inline int insn_complete(struct insn *insn) insn 134 tools/arch/x86/include/asm/insn.h return insn->opcode.got && insn->modrm.got && insn->sib.got && insn 135 tools/arch/x86/include/asm/insn.h insn->displacement.got && insn->immediate.got; insn 138 tools/arch/x86/include/asm/insn.h static inline insn_byte_t insn_vex_m_bits(struct insn *insn) insn 140 tools/arch/x86/include/asm/insn.h if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn 142 tools/arch/x86/include/asm/insn.h else if (insn->vex_prefix.nbytes == 3) /* 3 bytes VEX */ insn 143 tools/arch/x86/include/asm/insn.h return X86_VEX3_M(insn->vex_prefix.bytes[1]); insn 145 tools/arch/x86/include/asm/insn.h return X86_EVEX_M(insn->vex_prefix.bytes[1]); insn 148 tools/arch/x86/include/asm/insn.h static inline insn_byte_t insn_vex_p_bits(struct insn *insn) insn 150 tools/arch/x86/include/asm/insn.h if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn 151 tools/arch/x86/include/asm/insn.h return X86_VEX_P(insn->vex_prefix.bytes[1]); insn 153 tools/arch/x86/include/asm/insn.h return X86_VEX_P(insn->vex_prefix.bytes[2]); insn 157 tools/arch/x86/include/asm/insn.h static inline int insn_last_prefix_id(struct insn *insn) insn 159 tools/arch/x86/include/asm/insn.h if (insn_is_avx(insn)) insn 160 tools/arch/x86/include/asm/insn.h return insn_vex_p_bits(insn); /* VEX_p is a SIMD prefix id */ insn 162 tools/arch/x86/include/asm/insn.h if (insn->prefixes.bytes[3]) insn 163 tools/arch/x86/include/asm/insn.h return inat_get_last_prefix_id(insn->prefixes.bytes[3]); insn 169 tools/arch/x86/include/asm/insn.h static inline int insn_offset_rex_prefix(struct insn *insn) insn 171 tools/arch/x86/include/asm/insn.h return insn->prefixes.nbytes; insn 173 tools/arch/x86/include/asm/insn.h static inline int insn_offset_vex_prefix(struct insn *insn) insn 175 tools/arch/x86/include/asm/insn.h return insn_offset_rex_prefix(insn) + insn->rex_prefix.nbytes; insn 177 tools/arch/x86/include/asm/insn.h static inline int insn_offset_opcode(struct insn *insn) insn 179 tools/arch/x86/include/asm/insn.h return insn_offset_vex_prefix(insn) + insn->vex_prefix.nbytes; insn 181 tools/arch/x86/include/asm/insn.h static inline int insn_offset_modrm(struct insn *insn) insn 183 tools/arch/x86/include/asm/insn.h return insn_offset_opcode(insn) + insn->opcode.nbytes; insn 185 tools/arch/x86/include/asm/insn.h static inline int insn_offset_sib(struct insn *insn) insn 187 tools/arch/x86/include/asm/insn.h return insn_offset_modrm(insn) + insn->modrm.nbytes; insn 189 tools/arch/x86/include/asm/insn.h static inline int insn_offset_displacement(struct insn *insn) insn 191 tools/arch/x86/include/asm/insn.h return insn_offset_sib(insn) + insn->sib.nbytes; insn 193 tools/arch/x86/include/asm/insn.h static inline int insn_offset_immediate(struct insn *insn) insn 195 tools/arch/x86/include/asm/insn.h return insn_offset_displacement(insn) + insn->displacement.nbytes; insn 209 tools/arch/x86/include/asm/insn.h static inline int insn_masking_exception(struct insn *insn) insn 211 tools/arch/x86/include/asm/insn.h return insn->opcode.bytes[0] == POP_SS_OPCODE || insn 212 tools/arch/x86/include/asm/insn.h (insn->opcode.bytes[0] == MOV_SREG_OPCODE && insn 213 tools/arch/x86/include/asm/insn.h X86_MODRM_REG(insn->modrm.bytes[0]) == 2); insn 17 tools/arch/x86/lib/insn.c #define validate_next(t, insn, n) \ insn 18 tools/arch/x86/lib/insn.c ((insn)->next_byte + sizeof(t) + n <= (insn)->end_kaddr) insn 20 tools/arch/x86/lib/insn.c #define __get_next(t, insn) \ insn 21 tools/arch/x86/lib/insn.c ({ t r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; }) insn 23 tools/arch/x86/lib/insn.c #define __peek_nbyte_next(t, insn, n) \ insn 24 tools/arch/x86/lib/insn.c ({ t r = *(t*)((insn)->next_byte + n); r; }) insn 26 tools/arch/x86/lib/insn.c #define get_next(t, insn) \ insn 27 tools/arch/x86/lib/insn.c ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); }) insn 29 tools/arch/x86/lib/insn.c #define peek_nbyte_next(t, insn, n) \ insn 30 tools/arch/x86/lib/insn.c ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); }) insn 32 tools/arch/x86/lib/insn.c #define peek_next(t, insn) peek_nbyte_next(t, insn, 0) insn 40 tools/arch/x86/lib/insn.c void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) insn 49 tools/arch/x86/lib/insn.c memset(insn, 0, sizeof(*insn)); insn 50 tools/arch/x86/lib/insn.c insn->kaddr = kaddr; insn 51 tools/arch/x86/lib/insn.c insn->end_kaddr = kaddr + buf_len; insn 52 tools/arch/x86/lib/insn.c insn->next_byte = kaddr; insn 53 tools/arch/x86/lib/insn.c insn->x86_64 = x86_64 ? 1 : 0; insn 54 tools/arch/x86/lib/insn.c insn->opnd_bytes = 4; insn 56 tools/arch/x86/lib/insn.c insn->addr_bytes = 8; insn 58 tools/arch/x86/lib/insn.c insn->addr_bytes = 4; insn 69 tools/arch/x86/lib/insn.c void insn_get_prefixes(struct insn *insn) insn 71 tools/arch/x86/lib/insn.c struct insn_field *prefixes = &insn->prefixes; insn 81 tools/arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 94 tools/arch/x86/lib/insn.c if (insn->x86_64) insn 95 tools/arch/x86/lib/insn.c insn->addr_bytes ^= 12; insn 97 tools/arch/x86/lib/insn.c insn->addr_bytes ^= 6; insn 100 tools/arch/x86/lib/insn.c insn->opnd_bytes ^= 6; insn 104 tools/arch/x86/lib/insn.c insn->next_byte++; insn 106 tools/arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 110 tools/arch/x86/lib/insn.c if (lb && lb != insn->prefixes.bytes[3]) { insn 111 tools/arch/x86/lib/insn.c if (unlikely(insn->prefixes.bytes[3])) { insn 113 tools/arch/x86/lib/insn.c b = insn->prefixes.bytes[3]; insn 118 tools/arch/x86/lib/insn.c insn->prefixes.bytes[3] = lb; insn 122 tools/arch/x86/lib/insn.c if (insn->x86_64) { insn 123 tools/arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 126 tools/arch/x86/lib/insn.c insn->rex_prefix.value = b; insn 127 tools/arch/x86/lib/insn.c insn->rex_prefix.nbytes = 1; insn 128 tools/arch/x86/lib/insn.c insn->next_byte++; insn 131 tools/arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 134 tools/arch/x86/lib/insn.c insn->rex_prefix.got = 1; insn 137 tools/arch/x86/lib/insn.c b = peek_next(insn_byte_t, insn); insn 140 tools/arch/x86/lib/insn.c insn_byte_t b2 = peek_nbyte_next(insn_byte_t, insn, 1); insn 141 tools/arch/x86/lib/insn.c if (!insn->x86_64) { insn 150 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[0] = b; insn 151 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[1] = b2; insn 153 tools/arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 2); insn 154 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2; insn 155 tools/arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 3); insn 156 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[3] = b2; insn 157 tools/arch/x86/lib/insn.c insn->vex_prefix.nbytes = 4; insn 158 tools/arch/x86/lib/insn.c insn->next_byte += 4; insn 159 tools/arch/x86/lib/insn.c if (insn->x86_64 && X86_VEX_W(b2)) insn 161 tools/arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 163 tools/arch/x86/lib/insn.c b2 = peek_nbyte_next(insn_byte_t, insn, 2); insn 164 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2; insn 165 tools/arch/x86/lib/insn.c insn->vex_prefix.nbytes = 3; insn 166 tools/arch/x86/lib/insn.c insn->next_byte += 3; insn 167 tools/arch/x86/lib/insn.c if (insn->x86_64 && X86_VEX_W(b2)) insn 169 tools/arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 176 tools/arch/x86/lib/insn.c insn->vex_prefix.bytes[2] = b2 & 0x7f; insn 177 tools/arch/x86/lib/insn.c insn->vex_prefix.nbytes = 2; insn 178 tools/arch/x86/lib/insn.c insn->next_byte += 2; insn 182 tools/arch/x86/lib/insn.c insn->vex_prefix.got = 1; insn 200 tools/arch/x86/lib/insn.c void insn_get_opcode(struct insn *insn) insn 202 tools/arch/x86/lib/insn.c struct insn_field *opcode = &insn->opcode; insn 207 tools/arch/x86/lib/insn.c if (!insn->prefixes.got) insn 208 tools/arch/x86/lib/insn.c insn_get_prefixes(insn); insn 211 tools/arch/x86/lib/insn.c op = get_next(insn_byte_t, insn); insn 216 tools/arch/x86/lib/insn.c if (insn_is_avx(insn)) { insn 218 tools/arch/x86/lib/insn.c m = insn_vex_m_bits(insn); insn 219 tools/arch/x86/lib/insn.c p = insn_vex_p_bits(insn); insn 220 tools/arch/x86/lib/insn.c insn->attr = inat_get_avx_attribute(op, m, p); insn 221 tools/arch/x86/lib/insn.c if ((inat_must_evex(insn->attr) && !insn_is_evex(insn)) || insn 222 tools/arch/x86/lib/insn.c (!inat_accept_vex(insn->attr) && insn 223 tools/arch/x86/lib/insn.c !inat_is_group(insn->attr))) insn 224 tools/arch/x86/lib/insn.c insn->attr = 0; /* This instruction is bad */ insn 228 tools/arch/x86/lib/insn.c insn->attr = inat_get_opcode_attribute(op); insn 229 tools/arch/x86/lib/insn.c while (inat_is_escape(insn->attr)) { insn 231 tools/arch/x86/lib/insn.c op = get_next(insn_byte_t, insn); insn 233 tools/arch/x86/lib/insn.c pfx_id = insn_last_prefix_id(insn); insn 234 tools/arch/x86/lib/insn.c insn->attr = inat_get_escape_attribute(op, pfx_id, insn->attr); insn 236 tools/arch/x86/lib/insn.c if (inat_must_vex(insn->attr)) insn 237 tools/arch/x86/lib/insn.c insn->attr = 0; /* This instruction is bad */ insn 253 tools/arch/x86/lib/insn.c void insn_get_modrm(struct insn *insn) insn 255 tools/arch/x86/lib/insn.c struct insn_field *modrm = &insn->modrm; insn 259 tools/arch/x86/lib/insn.c if (!insn->opcode.got) insn 260 tools/arch/x86/lib/insn.c insn_get_opcode(insn); insn 262 tools/arch/x86/lib/insn.c if (inat_has_modrm(insn->attr)) { insn 263 tools/arch/x86/lib/insn.c mod = get_next(insn_byte_t, insn); insn 266 tools/arch/x86/lib/insn.c if (inat_is_group(insn->attr)) { insn 267 tools/arch/x86/lib/insn.c pfx_id = insn_last_prefix_id(insn); insn 268 tools/arch/x86/lib/insn.c insn->attr = inat_get_group_attribute(mod, pfx_id, insn 269 tools/arch/x86/lib/insn.c insn->attr); insn 270 tools/arch/x86/lib/insn.c if (insn_is_avx(insn) && !inat_accept_vex(insn->attr)) insn 271 tools/arch/x86/lib/insn.c insn->attr = 0; /* This is bad */ insn 275 tools/arch/x86/lib/insn.c if (insn->x86_64 && inat_is_force64(insn->attr)) insn 276 tools/arch/x86/lib/insn.c insn->opnd_bytes = 8; insn 291 tools/arch/x86/lib/insn.c int insn_rip_relative(struct insn *insn) insn 293 tools/arch/x86/lib/insn.c struct insn_field *modrm = &insn->modrm; insn 295 tools/arch/x86/lib/insn.c if (!insn->x86_64) insn 298 tools/arch/x86/lib/insn.c insn_get_modrm(insn); insn 313 tools/arch/x86/lib/insn.c void insn_get_sib(struct insn *insn) insn 317 tools/arch/x86/lib/insn.c if (insn->sib.got) insn 319 tools/arch/x86/lib/insn.c if (!insn->modrm.got) insn 320 tools/arch/x86/lib/insn.c insn_get_modrm(insn); insn 321 tools/arch/x86/lib/insn.c if (insn->modrm.nbytes) { insn 322 tools/arch/x86/lib/insn.c modrm = (insn_byte_t)insn->modrm.value; insn 323 tools/arch/x86/lib/insn.c if (insn->addr_bytes != 2 && insn 325 tools/arch/x86/lib/insn.c insn->sib.value = get_next(insn_byte_t, insn); insn 326 tools/arch/x86/lib/insn.c insn->sib.nbytes = 1; insn 329 tools/arch/x86/lib/insn.c insn->sib.got = 1; insn 344 tools/arch/x86/lib/insn.c void insn_get_displacement(struct insn *insn) insn 348 tools/arch/x86/lib/insn.c if (insn->displacement.got) insn 350 tools/arch/x86/lib/insn.c if (!insn->sib.got) insn 351 tools/arch/x86/lib/insn.c insn_get_sib(insn); insn 352 tools/arch/x86/lib/insn.c if (insn->modrm.nbytes) { insn 370 tools/arch/x86/lib/insn.c mod = X86_MODRM_MOD(insn->modrm.value); insn 371 tools/arch/x86/lib/insn.c rm = X86_MODRM_RM(insn->modrm.value); insn 372 tools/arch/x86/lib/insn.c base = X86_SIB_BASE(insn->sib.value); insn 376 tools/arch/x86/lib/insn.c insn->displacement.value = get_next(signed char, insn); insn 377 tools/arch/x86/lib/insn.c insn->displacement.nbytes = 1; insn 378 tools/arch/x86/lib/insn.c } else if (insn->addr_bytes == 2) { insn 380 tools/arch/x86/lib/insn.c insn->displacement.value = insn 381 tools/arch/x86/lib/insn.c get_next(short, insn); insn 382 tools/arch/x86/lib/insn.c insn->displacement.nbytes = 2; insn 387 tools/arch/x86/lib/insn.c insn->displacement.value = get_next(int, insn); insn 388 tools/arch/x86/lib/insn.c insn->displacement.nbytes = 4; insn 393 tools/arch/x86/lib/insn.c insn->displacement.got = 1; insn 400 tools/arch/x86/lib/insn.c static int __get_moffset(struct insn *insn) insn 402 tools/arch/x86/lib/insn.c switch (insn->addr_bytes) { insn 404 tools/arch/x86/lib/insn.c insn->moffset1.value = get_next(short, insn); insn 405 tools/arch/x86/lib/insn.c insn->moffset1.nbytes = 2; insn 408 tools/arch/x86/lib/insn.c insn->moffset1.value = get_next(int, insn); insn 409 tools/arch/x86/lib/insn.c insn->moffset1.nbytes = 4; insn 412 tools/arch/x86/lib/insn.c insn->moffset1.value = get_next(int, insn); insn 413 tools/arch/x86/lib/insn.c insn->moffset1.nbytes = 4; insn 414 tools/arch/x86/lib/insn.c insn->moffset2.value = get_next(int, insn); insn 415 tools/arch/x86/lib/insn.c insn->moffset2.nbytes = 4; insn 420 tools/arch/x86/lib/insn.c insn->moffset1.got = insn->moffset2.got = 1; insn 429 tools/arch/x86/lib/insn.c static int __get_immv32(struct insn *insn) insn 431 tools/arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 433 tools/arch/x86/lib/insn.c insn->immediate.value = get_next(short, insn); insn 434 tools/arch/x86/lib/insn.c insn->immediate.nbytes = 2; insn 438 tools/arch/x86/lib/insn.c insn->immediate.value = get_next(int, insn); insn 439 tools/arch/x86/lib/insn.c insn->immediate.nbytes = 4; insn 452 tools/arch/x86/lib/insn.c static int __get_immv(struct insn *insn) insn 454 tools/arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 456 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(short, insn); insn 457 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 2; insn 460 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 461 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 464 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 465 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 466 tools/arch/x86/lib/insn.c insn->immediate2.value = get_next(int, insn); insn 467 tools/arch/x86/lib/insn.c insn->immediate2.nbytes = 4; insn 472 tools/arch/x86/lib/insn.c insn->immediate1.got = insn->immediate2.got = 1; insn 480 tools/arch/x86/lib/insn.c static int __get_immptr(struct insn *insn) insn 482 tools/arch/x86/lib/insn.c switch (insn->opnd_bytes) { insn 484 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(short, insn); insn 485 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 2; insn 488 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 489 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 497 tools/arch/x86/lib/insn.c insn->immediate2.value = get_next(unsigned short, insn); insn 498 tools/arch/x86/lib/insn.c insn->immediate2.nbytes = 2; insn 499 tools/arch/x86/lib/insn.c insn->immediate1.got = insn->immediate2.got = 1; insn 515 tools/arch/x86/lib/insn.c void insn_get_immediate(struct insn *insn) insn 517 tools/arch/x86/lib/insn.c if (insn->immediate.got) insn 519 tools/arch/x86/lib/insn.c if (!insn->displacement.got) insn 520 tools/arch/x86/lib/insn.c insn_get_displacement(insn); insn 522 tools/arch/x86/lib/insn.c if (inat_has_moffset(insn->attr)) { insn 523 tools/arch/x86/lib/insn.c if (!__get_moffset(insn)) insn 528 tools/arch/x86/lib/insn.c if (!inat_has_immediate(insn->attr)) insn 532 tools/arch/x86/lib/insn.c switch (inat_immediate_size(insn->attr)) { insn 534 tools/arch/x86/lib/insn.c insn->immediate.value = get_next(signed char, insn); insn 535 tools/arch/x86/lib/insn.c insn->immediate.nbytes = 1; insn 538 tools/arch/x86/lib/insn.c insn->immediate.value = get_next(short, insn); insn 539 tools/arch/x86/lib/insn.c insn->immediate.nbytes = 2; insn 542 tools/arch/x86/lib/insn.c insn->immediate.value = get_next(int, insn); insn 543 tools/arch/x86/lib/insn.c insn->immediate.nbytes = 4; insn 546 tools/arch/x86/lib/insn.c insn->immediate1.value = get_next(int, insn); insn 547 tools/arch/x86/lib/insn.c insn->immediate1.nbytes = 4; insn 548 tools/arch/x86/lib/insn.c insn->immediate2.value = get_next(int, insn); insn 549 tools/arch/x86/lib/insn.c insn->immediate2.nbytes = 4; insn 552 tools/arch/x86/lib/insn.c if (!__get_immptr(insn)) insn 556 tools/arch/x86/lib/insn.c if (!__get_immv32(insn)) insn 560 tools/arch/x86/lib/insn.c if (!__get_immv(insn)) insn 567 tools/arch/x86/lib/insn.c if (inat_has_second_immediate(insn->attr)) { insn 568 tools/arch/x86/lib/insn.c insn->immediate2.value = get_next(signed char, insn); insn 569 tools/arch/x86/lib/insn.c insn->immediate2.nbytes = 1; insn 572 tools/arch/x86/lib/insn.c insn->immediate.got = 1; insn 585 tools/arch/x86/lib/insn.c void insn_get_length(struct insn *insn) insn 587 tools/arch/x86/lib/insn.c if (insn->length) insn 589 tools/arch/x86/lib/insn.c if (!insn->immediate.got) insn 590 tools/arch/x86/lib/insn.c insn_get_immediate(insn); insn 591 tools/arch/x86/lib/insn.c insn->length = (unsigned char)((unsigned long)insn->next_byte insn 592 tools/arch/x86/lib/insn.c - (unsigned long)insn->kaddr); insn 63 tools/bpf/bpftool/cfg.c static struct func_node *cfg_append_func(struct cfg *cfg, struct bpf_insn *insn) insn 68 tools/bpf/bpftool/cfg.c if (func->start == insn) insn 70 tools/bpf/bpftool/cfg.c else if (func->start > insn) insn 80 tools/bpf/bpftool/cfg.c new_func->start = insn; insn 89 tools/bpf/bpftool/cfg.c struct bpf_insn *insn) insn 94 tools/bpf/bpftool/cfg.c if (bb->head == insn) insn 96 tools/bpf/bpftool/cfg.c else if (bb->head > insn) insn 106 tools/bpf/bpftool/cfg.c new_bb->head = insn; insn 244 tools/bpf/bpftool/cfg.c struct bpf_insn *insn) insn 249 tools/bpf/bpftool/cfg.c if (bb->head == insn) insn 279 tools/bpf/bpftool/cfg.c struct bpf_insn *insn; insn 303 tools/bpf/bpftool/cfg.c insn = bb->tail; insn 304 tools/bpf/bpftool/cfg.c if (!is_jmp_insn(insn->code) || insn 305 tools/bpf/bpftool/cfg.c BPF_OP(insn->code) == BPF_EXIT) { insn 310 tools/bpf/bpftool/cfg.c } else if (BPF_OP(insn->code) == BPF_JA) { insn 312 tools/bpf/bpftool/cfg.c insn + insn->off + 1); insn 326 tools/bpf/bpftool/cfg.c e->dst = func_search_bb_with_head(func, insn + insn->off + 1); insn 333 tools/bpf/bpftool/cfg.c static bool cfg_build(struct cfg *cfg, struct bpf_insn *insn, unsigned int len) insn 335 tools/bpf/bpftool/cfg.c int cnt = len / sizeof(*insn); insn 340 tools/bpf/bpftool/cfg.c if (cfg_partition_funcs(cfg, insn, insn + cnt)) insn 475 tools/bpf/bpftool/cfg.c struct bpf_insn *insn = buf; insn 479 tools/bpf/bpftool/cfg.c if (cfg_build(&cfg, insn, len)) insn 141 tools/bpf/bpftool/xlated_dumper.c const struct bpf_insn *insn) insn 146 tools/bpf/bpftool/xlated_dumper.c "%+d", insn->off); insn 149 tools/bpf/bpftool/xlated_dumper.c "%+d#%s", insn->off, sym->name); insn 152 tools/bpf/bpftool/xlated_dumper.c "%+d#0x%lx", insn->off, address); insn 170 tools/bpf/bpftool/xlated_dumper.c const struct bpf_insn *insn) insn 173 tools/bpf/bpftool/xlated_dumper.c unsigned long address = dd->address_call_base + insn->imm; insn 176 tools/bpf/bpftool/xlated_dumper.c if (insn->src_reg == BPF_PSEUDO_CALL && insn 177 tools/bpf/bpftool/xlated_dumper.c (__u32) insn->imm < dd->nr_jited_ksyms && dd->jited_ksyms) insn 178 tools/bpf/bpftool/xlated_dumper.c address = dd->jited_ksyms[insn->imm]; insn 181 tools/bpf/bpftool/xlated_dumper.c if (insn->src_reg == BPF_PSEUDO_CALL) insn 182 tools/bpf/bpftool/xlated_dumper.c return print_call_pcrel(dd, sym, address, insn); insn 188 tools/bpf/bpftool/xlated_dumper.c const struct bpf_insn *insn, insn 193 tools/bpf/bpftool/xlated_dumper.c if (insn->src_reg == BPF_PSEUDO_MAP_FD) insn 195 tools/bpf/bpftool/xlated_dumper.c "map[id:%u]", insn->imm); insn 196 tools/bpf/bpftool/xlated_dumper.c else if (insn->src_reg == BPF_PSEUDO_MAP_VALUE) insn 198 tools/bpf/bpftool/xlated_dumper.c "map[id:%u][0]+%u", insn->imm, (insn + 1)->imm); insn 216 tools/bpf/bpftool/xlated_dumper.c struct bpf_insn *insn = buf; insn 225 tools/bpf/bpftool/xlated_dumper.c for (i = 0; i < len / sizeof(*insn); i++) { insn 230 tools/bpf/bpftool/xlated_dumper.c double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW); insn 258 tools/bpf/bpftool/xlated_dumper.c print_bpf_insn(&cbs, insn + i, true); insn 265 tools/bpf/bpftool/xlated_dumper.c jsonw_printf(json_wtr, "\"0x%02hhx\"", insn[i].code); insn 268 tools/bpf/bpftool/xlated_dumper.c jsonw_printf(json_wtr, "\"0x%hhx\"", insn[i].src_reg); insn 271 tools/bpf/bpftool/xlated_dumper.c jsonw_printf(json_wtr, "\"0x%hhx\"", insn[i].dst_reg); insn 274 tools/bpf/bpftool/xlated_dumper.c print_hex_data_json((uint8_t *)(&insn[i].off), 2); insn 278 tools/bpf/bpftool/xlated_dumper.c print_hex_data_json((uint8_t *)(&insn[i].imm), insn 281 tools/bpf/bpftool/xlated_dumper.c print_hex_data_json((uint8_t *)(&insn[i].imm), insn 301 tools/bpf/bpftool/xlated_dumper.c struct bpf_insn *insn = buf; insn 309 tools/bpf/bpftool/xlated_dumper.c for (i = 0; i < len / sizeof(*insn); i++) { insn 337 tools/bpf/bpftool/xlated_dumper.c double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW); insn 340 tools/bpf/bpftool/xlated_dumper.c print_bpf_insn(&cbs, insn + i, true); insn 344 tools/bpf/bpftool/xlated_dumper.c fprint_hex(stdout, insn + i, 8, " "); insn 347 tools/bpf/bpftool/xlated_dumper.c fprint_hex(stdout, insn + i + 1, 8, " "); insn 2794 tools/lib/bpf/libbpf.c struct bpf_insn *insn; insn 2802 tools/lib/bpf/libbpf.c insn = &prog->insns[insn_idx]; insn 2803 tools/lib/bpf/libbpf.c class = BPF_CLASS(insn->code); insn 2806 tools/lib/bpf/libbpf.c if (BPF_SRC(insn->code) != BPF_K) insn 2808 tools/lib/bpf/libbpf.c if (insn->imm != orig_off) insn 2810 tools/lib/bpf/libbpf.c insn->imm = new_off; insn 2817 tools/lib/bpf/libbpf.c insn_idx, insn->code, insn->src_reg, insn->dst_reg, insn 2818 tools/lib/bpf/libbpf.c insn->off, insn->imm); insn 3199 tools/lib/bpf/libbpf.c struct bpf_insn *insn, *new_insn; insn 3220 tools/lib/bpf/libbpf.c new_insn = reallocarray(prog->insns, new_cnt, sizeof(*insn)); insn 3236 tools/lib/bpf/libbpf.c text->insns_cnt * sizeof(*insn)); insn 3243 tools/lib/bpf/libbpf.c insn = &prog->insns[relo->insn_idx]; insn 3244 tools/lib/bpf/libbpf.c insn->imm += prog->main_prog_cnt - relo->insn_idx; insn 40 tools/lib/traceevent/plugins/plugin_kvm.c static const char *disassemble(unsigned char *insn, int len, uint64_t rip, insn 59 tools/lib/traceevent/plugins/plugin_kvm.c ud_set_input_buffer(&ud, insn, len); insn 70 tools/lib/traceevent/plugins/plugin_kvm.c static const char *disassemble(unsigned char *insn, int len, uint64_t rip, insn 78 tools/lib/traceevent/plugins/plugin_kvm.c sprintf(out + i * 3, "%02x ", insn[i]); insn 300 tools/lib/traceevent/plugins/plugin_kvm.c uint8_t *insn; insn 318 tools/lib/traceevent/plugins/plugin_kvm.c insn = tep_get_field_raw(s, event, "insn", record, &llen, 1); insn 319 tools/lib/traceevent/plugins/plugin_kvm.c if (!insn) insn 322 tools/lib/traceevent/plugins/plugin_kvm.c disasm = disassemble(insn, len, rip, insn 74 tools/objtool/arch/x86/decode.c struct insn insn; insn 84 tools/objtool/arch/x86/decode.c insn_init(&insn, sec->data->d_buf + offset, maxlen, x86_64); insn 85 tools/objtool/arch/x86/decode.c insn_get_length(&insn); insn 87 tools/objtool/arch/x86/decode.c if (!insn_complete(&insn)) { insn 92 tools/objtool/arch/x86/decode.c *len = insn.length; insn 95 tools/objtool/arch/x86/decode.c if (insn.vex_prefix.nbytes) insn 98 tools/objtool/arch/x86/decode.c op1 = insn.opcode.bytes[0]; insn 99 tools/objtool/arch/x86/decode.c op2 = insn.opcode.bytes[1]; insn 101 tools/objtool/arch/x86/decode.c if (insn.rex_prefix.nbytes) { insn 102 tools/objtool/arch/x86/decode.c rex = insn.rex_prefix.bytes[0]; insn 109 tools/objtool/arch/x86/decode.c if (insn.modrm.nbytes) { insn 110 tools/objtool/arch/x86/decode.c modrm = insn.modrm.bytes[0]; insn 116 tools/objtool/arch/x86/decode.c if (insn.sib.nbytes) insn 117 tools/objtool/arch/x86/decode.c sib = insn.sib.bytes[0]; insn 176 tools/objtool/arch/x86/decode.c op->src.offset = insn.immediate.value; insn 193 tools/objtool/arch/x86/decode.c op->src.offset = insn.immediate.value * sign; insn 232 tools/objtool/arch/x86/decode.c op->dest.offset = insn.displacement.value; insn 242 tools/objtool/arch/x86/decode.c op->dest.offset = insn.displacement.value; insn 254 tools/objtool/arch/x86/decode.c op->src.offset = insn.displacement.value; insn 265 tools/objtool/arch/x86/decode.c op->src.offset = insn.displacement.value; insn 276 tools/objtool/arch/x86/decode.c if (!insn.displacement.value) { insn 282 tools/objtool/arch/x86/decode.c op->src.offset = insn.displacement.value; insn 294 tools/objtool/arch/x86/decode.c op->src.offset = insn.displacement.value; insn 299 tools/objtool/arch/x86/decode.c insn.displacement.value == -8) { insn 315 tools/objtool/arch/x86/decode.c insn.displacement.value == -16) { insn 478 tools/objtool/arch/x86/decode.c *immediate = insn.immediate.nbytes ? insn.immediate.value : 0; insn 25 tools/objtool/check.c struct instruction *insn; insn 35 tools/objtool/check.c struct instruction *insn; insn 37 tools/objtool/check.c hash_for_each_possible(file->insn_hash, insn, hash, offset) insn 38 tools/objtool/check.c if (insn->sec == sec && insn->offset == offset) insn 39 tools/objtool/check.c return insn; insn 45 tools/objtool/check.c struct instruction *insn) insn 47 tools/objtool/check.c struct instruction *next = list_next_entry(insn, list); insn 49 tools/objtool/check.c if (!next || &next->list == &file->insn_list || next->sec != insn->sec) insn 56 tools/objtool/check.c struct instruction *insn) insn 58 tools/objtool/check.c struct instruction *next = list_next_entry(insn, list); insn 59 tools/objtool/check.c struct symbol *func = insn->func; insn 75 tools/objtool/check.c #define func_for_each_insn_all(file, func, insn) \ insn 76 tools/objtool/check.c for (insn = find_insn(file, func->sec, func->offset); \ insn 77 tools/objtool/check.c insn; \ insn 78 tools/objtool/check.c insn = next_insn_same_func(file, insn)) insn 80 tools/objtool/check.c #define func_for_each_insn(file, func, insn) \ insn 81 tools/objtool/check.c for (insn = find_insn(file, func->sec, func->offset); \ insn 82 tools/objtool/check.c insn && &insn->list != &file->insn_list && \ insn 83 tools/objtool/check.c insn->sec == func->sec && \ insn 84 tools/objtool/check.c insn->offset < func->offset + func->len; \ insn 85 tools/objtool/check.c insn = list_next_entry(insn, list)) insn 87 tools/objtool/check.c #define func_for_each_insn_continue_reverse(file, func, insn) \ insn 88 tools/objtool/check.c for (insn = list_prev_entry(insn, list); \ insn 89 tools/objtool/check.c &insn->list != &file->insn_list && \ insn 90 tools/objtool/check.c insn->sec == func->sec && insn->offset >= func->offset; \ insn 91 tools/objtool/check.c insn = list_prev_entry(insn, list)) insn 93 tools/objtool/check.c #define sec_for_each_insn_from(file, insn) \ insn 94 tools/objtool/check.c for (; insn; insn = next_insn_same_sec(file, insn)) insn 96 tools/objtool/check.c #define sec_for_each_insn_continue(file, insn) \ insn 97 tools/objtool/check.c for (insn = next_insn_same_sec(file, insn); insn; \ insn 98 tools/objtool/check.c insn = next_insn_same_sec(file, insn)) insn 100 tools/objtool/check.c static bool is_sibling_call(struct instruction *insn) insn 103 tools/objtool/check.c if (insn->type == INSN_JUMP_DYNAMIC) insn 104 tools/objtool/check.c return list_empty(&insn->alts); insn 106 tools/objtool/check.c if (insn->type != INSN_JUMP_CONDITIONAL && insn 107 tools/objtool/check.c insn->type != INSN_JUMP_UNCONDITIONAL) insn 111 tools/objtool/check.c return !!insn->call_dest; insn 127 tools/objtool/check.c struct instruction *insn; insn 163 tools/objtool/check.c insn = find_insn(file, func->sec, func->offset); insn 164 tools/objtool/check.c if (!insn->func) insn 167 tools/objtool/check.c func_for_each_insn_all(file, func, insn) { insn 170 tools/objtool/check.c if (insn->type == INSN_RETURN) insn 182 tools/objtool/check.c func_for_each_insn_all(file, func, insn) { insn 183 tools/objtool/check.c if (is_sibling_call(insn)) { insn 184 tools/objtool/check.c struct instruction *dest = insn->jump_dest; insn 235 tools/objtool/check.c struct instruction *insn; insn 248 tools/objtool/check.c for (offset = 0; offset < sec->len; offset += insn->len) { insn 249 tools/objtool/check.c insn = malloc(sizeof(*insn)); insn 250 tools/objtool/check.c if (!insn) { insn 254 tools/objtool/check.c memset(insn, 0, sizeof(*insn)); insn 255 tools/objtool/check.c INIT_LIST_HEAD(&insn->alts); insn 256 tools/objtool/check.c clear_insn_state(&insn->state); insn 258 tools/objtool/check.c insn->sec = sec; insn 259 tools/objtool/check.c insn->offset = offset; insn 263 tools/objtool/check.c &insn->len, &insn->type, insn 264 tools/objtool/check.c &insn->immediate, insn 265 tools/objtool/check.c &insn->stack_op); insn 269 tools/objtool/check.c hash_add(file->insn_hash, &insn->hash, insn->offset); insn 270 tools/objtool/check.c list_add_tail(&insn->list, &file->insn_list); insn 283 tools/objtool/check.c func_for_each_insn(file, func, insn) insn 284 tools/objtool/check.c insn->func = func; insn 291 tools/objtool/check.c free(insn); insn 302 tools/objtool/check.c struct instruction *insn; insn 309 tools/objtool/check.c for_each_insn(file, insn) insn 310 tools/objtool/check.c if (insn->type == INSN_BUG) insn 311 tools/objtool/check.c insn->dead_end = true; insn 325 tools/objtool/check.c insn = find_insn(file, rela->sym->sec, rela->addend); insn 326 tools/objtool/check.c if (insn) insn 327 tools/objtool/check.c insn = list_prev_entry(insn, list); insn 330 tools/objtool/check.c list_for_each_entry_reverse(insn, &file->insn_list, list) { insn 331 tools/objtool/check.c if (insn->sec == rela->sym->sec) { insn 348 tools/objtool/check.c insn->dead_end = true; insn 367 tools/objtool/check.c insn = find_insn(file, rela->sym->sec, rela->addend); insn 368 tools/objtool/check.c if (insn) insn 369 tools/objtool/check.c insn = list_prev_entry(insn, list); insn 372 tools/objtool/check.c list_for_each_entry_reverse(insn, &file->insn_list, list) { insn 373 tools/objtool/check.c if (insn->sec == rela->sym->sec) { insn 390 tools/objtool/check.c insn->dead_end = false; insn 401 tools/objtool/check.c struct instruction *insn; insn 427 tools/objtool/check.c func_for_each_insn_all(file, func, insn) insn 428 tools/objtool/check.c insn->ignore = true; insn 520 tools/objtool/check.c struct instruction *insn; insn 532 tools/objtool/check.c insn = find_insn(file, rela->sym->sec, rela->addend); insn 533 tools/objtool/check.c if (!insn) { insn 538 tools/objtool/check.c insn->ignore_alts = true; insn 549 tools/objtool/check.c struct instruction *insn; insn 554 tools/objtool/check.c for_each_insn(file, insn) { insn 555 tools/objtool/check.c if (insn->type != INSN_JUMP_CONDITIONAL && insn 556 tools/objtool/check.c insn->type != INSN_JUMP_UNCONDITIONAL) insn 559 tools/objtool/check.c if (insn->ignore || insn->offset == FAKE_JUMP_OFFSET) insn 562 tools/objtool/check.c rela = find_rela_by_dest_range(insn->sec, insn->offset, insn 563 tools/objtool/check.c insn->len); insn 565 tools/objtool/check.c dest_sec = insn->sec; insn 566 tools/objtool/check.c dest_off = insn->offset + insn->len + insn->immediate; insn 578 tools/objtool/check.c if (insn->type == INSN_JUMP_UNCONDITIONAL) insn 579 tools/objtool/check.c insn->type = INSN_JUMP_DYNAMIC; insn 581 tools/objtool/check.c insn->type = INSN_JUMP_DYNAMIC_CONDITIONAL; insn 583 tools/objtool/check.c insn->retpoline_safe = true; insn 587 tools/objtool/check.c insn->call_dest = rela->sym; insn 591 tools/objtool/check.c insn->jump_dest = find_insn(file, dest_sec, dest_off); insn 592 tools/objtool/check.c if (!insn->jump_dest) { insn 599 tools/objtool/check.c if (!strcmp(insn->sec->name, ".altinstr_replacement")) insn 603 tools/objtool/check.c insn->sec, insn->offset, dest_sec->name, insn 611 tools/objtool/check.c if (insn->func && insn->jump_dest->func && insn 612 tools/objtool/check.c insn->func != insn->jump_dest->func) { insn 629 tools/objtool/check.c if (!strstr(insn->func->name, ".cold.") && insn 630 tools/objtool/check.c strstr(insn->jump_dest->func->name, ".cold.")) { insn 631 tools/objtool/check.c insn->func->cfunc = insn->jump_dest->func; insn 632 tools/objtool/check.c insn->jump_dest->func->pfunc = insn->func; insn 634 tools/objtool/check.c } else if (insn->jump_dest->func->pfunc != insn->func->pfunc && insn 635 tools/objtool/check.c insn->jump_dest->offset == insn->jump_dest->func->offset) { insn 638 tools/objtool/check.c insn->call_dest = insn->jump_dest->func; insn 651 tools/objtool/check.c struct instruction *insn; insn 655 tools/objtool/check.c for_each_insn(file, insn) { insn 656 tools/objtool/check.c if (insn->type != INSN_CALL) insn 659 tools/objtool/check.c rela = find_rela_by_dest_range(insn->sec, insn->offset, insn 660 tools/objtool/check.c insn->len); insn 662 tools/objtool/check.c dest_off = insn->offset + insn->len + insn->immediate; insn 663 tools/objtool/check.c insn->call_dest = find_symbol_by_offset(insn->sec, insn 666 tools/objtool/check.c if (!insn->call_dest && !insn->ignore) { insn 668 tools/objtool/check.c insn->sec, insn->offset); insn 675 tools/objtool/check.c insn->call_dest = find_symbol_by_offset(rela->sym->sec, insn 677 tools/objtool/check.c if (!insn->call_dest || insn 678 tools/objtool/check.c insn->call_dest->type != STT_FUNC) { insn 680 tools/objtool/check.c insn->sec, insn->offset, insn 686 tools/objtool/check.c insn->call_dest = rela->sym; insn 714 tools/objtool/check.c struct instruction *last_orig_insn, *last_new_insn, *insn, *fake_jump = NULL; insn 718 tools/objtool/check.c insn = orig_insn; insn 719 tools/objtool/check.c sec_for_each_insn_from(file, insn) { insn 720 tools/objtool/check.c if (insn->offset >= special_alt->orig_off + special_alt->orig_len) insn 723 tools/objtool/check.c insn->alt_group = true; insn 724 tools/objtool/check.c last_orig_insn = insn; insn 756 tools/objtool/check.c insn = *new_insn; insn 757 tools/objtool/check.c sec_for_each_insn_from(file, insn) { insn 758 tools/objtool/check.c if (insn->offset >= special_alt->new_off + special_alt->new_len) insn 761 tools/objtool/check.c last_new_insn = insn; insn 763 tools/objtool/check.c insn->ignore = orig_insn->ignore_alts; insn 764 tools/objtool/check.c insn->func = orig_insn->func; insn 766 tools/objtool/check.c if (insn->type != INSN_JUMP_CONDITIONAL && insn 767 tools/objtool/check.c insn->type != INSN_JUMP_UNCONDITIONAL) insn 770 tools/objtool/check.c if (!insn->immediate) insn 773 tools/objtool/check.c dest_off = insn->offset + insn->len + insn->immediate; insn 780 tools/objtool/check.c insn->jump_dest = fake_jump; insn 783 tools/objtool/check.c if (!insn->jump_dest) { insn 785 tools/objtool/check.c insn->sec, insn->offset); insn 886 tools/objtool/check.c alt->insn = new_insn; insn 899 tools/objtool/check.c static int add_jump_table(struct objtool_file *file, struct instruction *insn, insn 905 tools/objtool/check.c struct symbol *pfunc = insn->func->pfunc; insn 941 tools/objtool/check.c alt->insn = dest_insn; insn 942 tools/objtool/check.c list_add_tail(&alt->list, &insn->alts); insn 948 tools/objtool/check.c insn->sec, insn->offset); insn 1000 tools/objtool/check.c struct instruction *insn) insn 1003 tools/objtool/check.c struct instruction *orig_insn = insn; insn 1013 tools/objtool/check.c &insn->list != &file->insn_list && insn->func && insn->func->pfunc == func; insn 1014 tools/objtool/check.c insn = insn->first_jump_src ?: list_prev_entry(insn, list)) { insn 1016 tools/objtool/check.c if (insn != orig_insn && insn->type == INSN_JUMP_DYNAMIC) insn 1020 tools/objtool/check.c if (insn->type == INSN_JUMP_UNCONDITIONAL && insn 1021 tools/objtool/check.c insn->jump_dest && insn 1022 tools/objtool/check.c (insn->jump_dest->offset <= insn->offset || insn 1023 tools/objtool/check.c insn->jump_dest->offset > orig_insn->offset)) insn 1027 tools/objtool/check.c text_rela = find_rela_by_dest_range(insn->sec, insn->offset, insn 1028 tools/objtool/check.c insn->len); insn 1078 tools/objtool/check.c struct instruction *insn, *last = NULL; insn 1081 tools/objtool/check.c func_for_each_insn_all(file, func, insn) { insn 1083 tools/objtool/check.c last = insn; insn 1090 tools/objtool/check.c if (insn->type == INSN_JUMP_UNCONDITIONAL && insn->jump_dest && insn 1091 tools/objtool/check.c insn->offset > last->offset && insn 1092 tools/objtool/check.c insn->jump_dest->offset > insn->offset && insn 1093 tools/objtool/check.c !insn->jump_dest->first_jump_src) { insn 1095 tools/objtool/check.c insn->jump_dest->first_jump_src = insn; insn 1096 tools/objtool/check.c last = insn->jump_dest; insn 1099 tools/objtool/check.c if (insn->type != INSN_JUMP_DYNAMIC) insn 1102 tools/objtool/check.c rela = find_jump_table(file, func, insn); insn 1105 tools/objtool/check.c insn->jump_table = rela; insn 1113 tools/objtool/check.c struct instruction *insn; insn 1116 tools/objtool/check.c func_for_each_insn_all(file, func, insn) { insn 1117 tools/objtool/check.c if (!insn->jump_table) insn 1120 tools/objtool/check.c ret = add_jump_table(file, insn, insn->jump_table); insn 1162 tools/objtool/check.c struct instruction *insn; insn 1192 tools/objtool/check.c insn = find_insn(file, rela->sym->sec, rela->addend); insn 1193 tools/objtool/check.c if (!insn) { insn 1198 tools/objtool/check.c cfa = &insn->state.cfa; insn 1201 tools/objtool/check.c insn->save = true; insn 1205 tools/objtool/check.c insn->restore = true; insn 1206 tools/objtool/check.c insn->hint = true; insn 1210 tools/objtool/check.c insn->hint = true; insn 1239 tools/objtool/check.c insn->sec, insn->offset, hint->sp_reg); insn 1244 tools/objtool/check.c insn->state.type = hint->type; insn 1245 tools/objtool/check.c insn->state.end = hint->end; insn 1254 tools/objtool/check.c struct instruction *insn; insn 1267 tools/objtool/check.c insn = find_insn(file, rela->sym->sec, rela->addend); insn 1268 tools/objtool/check.c if (!insn) { insn 1273 tools/objtool/check.c if (insn->type != INSN_JUMP_DYNAMIC && insn 1274 tools/objtool/check.c insn->type != INSN_CALL_DYNAMIC) { insn 1276 tools/objtool/check.c insn->sec, insn->offset); insn 1280 tools/objtool/check.c insn->retpoline_safe = true; insn 1360 tools/objtool/check.c static bool is_fentry_call(struct instruction *insn) insn 1362 tools/objtool/check.c if (insn->type == INSN_CALL && insn 1363 tools/objtool/check.c insn->call_dest->type == STT_NOTYPE && insn 1364 tools/objtool/check.c !strcmp(insn->call_dest->name, "__fentry__")) insn 1400 tools/objtool/check.c static int update_insn_state_regs(struct instruction *insn, struct insn_state *state) insn 1403 tools/objtool/check.c struct stack_op *op = &insn->stack_op; insn 1493 tools/objtool/check.c static int update_insn_state(struct instruction *insn, struct insn_state *state) insn 1495 tools/objtool/check.c struct stack_op *op = &insn->stack_op; insn 1501 tools/objtool/check.c if (insn->func) { insn 1502 tools/objtool/check.c WARN_FUNC("undefined stack state", insn->sec, insn->offset); insn 1509 tools/objtool/check.c return update_insn_state_regs(insn, state); insn 1640 tools/objtool/check.c insn->sec, insn->offset); insn 1651 tools/objtool/check.c insn->sec, insn->offset); insn 1728 tools/objtool/check.c insn->sec, insn->offset); insn 1771 tools/objtool/check.c if (!no_fp && insn->func && op->src.reg == CFI_BP && insn 1809 tools/objtool/check.c insn->sec, insn->offset); insn 1828 tools/objtool/check.c insn->sec, insn->offset); insn 1841 tools/objtool/check.c insn->sec, insn->offset); insn 1848 tools/objtool/check.c static bool insn_state_match(struct instruction *insn, struct insn_state *state) insn 1850 tools/objtool/check.c struct insn_state *state1 = &insn->state, *state2 = state; insn 1855 tools/objtool/check.c insn->sec, insn->offset, insn 1866 tools/objtool/check.c insn->sec, insn->offset, insn 1874 tools/objtool/check.c insn->sec, insn->offset, state1->type, state2->type); insn 1880 tools/objtool/check.c insn->sec, insn->offset, insn 1898 tools/objtool/check.c static inline const char *call_dest_name(struct instruction *insn) insn 1900 tools/objtool/check.c if (insn->call_dest) insn 1901 tools/objtool/check.c return insn->call_dest->name; insn 1906 tools/objtool/check.c static int validate_call(struct instruction *insn, struct insn_state *state) insn 1908 tools/objtool/check.c if (state->uaccess && !func_uaccess_safe(insn->call_dest)) { insn 1910 tools/objtool/check.c insn->sec, insn->offset, call_dest_name(insn)); insn 1916 tools/objtool/check.c insn->sec, insn->offset, call_dest_name(insn)); insn 1923 tools/objtool/check.c static int validate_sibling_call(struct instruction *insn, struct insn_state *state) insn 1927 tools/objtool/check.c insn->sec, insn->offset); insn 1931 tools/objtool/check.c return validate_call(insn, state); insn 1944 tools/objtool/check.c struct instruction *insn, *next_insn; insn 1949 tools/objtool/check.c insn = first; insn 1950 tools/objtool/check.c sec = insn->sec; insn 1952 tools/objtool/check.c if (insn->alt_group && list_empty(&insn->alts)) { insn 1954 tools/objtool/check.c sec, insn->offset); insn 1959 tools/objtool/check.c next_insn = next_insn_same_sec(file, insn); insn 1961 tools/objtool/check.c if (file->c_file && func && insn->func && func != insn->func->pfunc) { insn 1963 tools/objtool/check.c func->name, insn->func->name); insn 1967 tools/objtool/check.c if (func && insn->ignore) { insn 1969 tools/objtool/check.c sec, insn->offset); insn 1974 tools/objtool/check.c if (insn->visited) { insn 1975 tools/objtool/check.c if (!insn->hint && !insn_state_match(insn, &state)) insn 1978 tools/objtool/check.c if (insn->visited & visited) insn 1982 tools/objtool/check.c if (insn->hint) { insn 1983 tools/objtool/check.c if (insn->restore) { insn 1986 tools/objtool/check.c i = insn; insn 1997 tools/objtool/check.c sec, insn->offset); insn 2009 tools/objtool/check.c if (insn == first) insn 2013 tools/objtool/check.c sec, insn->offset); insn 2017 tools/objtool/check.c insn->state = save_insn->state; insn 2020 tools/objtool/check.c state = insn->state; insn 2023 tools/objtool/check.c insn->state = state; insn 2025 tools/objtool/check.c insn->visited |= visited; insn 2027 tools/objtool/check.c if (!insn->ignore_alts) { insn 2030 tools/objtool/check.c list_for_each_entry(alt, &insn->alts, list) { insn 2034 tools/objtool/check.c ret = validate_branch(file, func, alt->insn, state); insn 2037 tools/objtool/check.c BT_FUNC("(alt)", insn); insn 2046 tools/objtool/check.c switch (insn->type) { insn 2050 tools/objtool/check.c WARN_FUNC("return with UACCESS enabled", sec, insn->offset); insn 2055 tools/objtool/check.c WARN_FUNC("return with UACCESS disabled from a UACCESS-safe function", sec, insn->offset); insn 2060 tools/objtool/check.c WARN_FUNC("return with DF set", sec, insn->offset); insn 2066 tools/objtool/check.c sec, insn->offset); insn 2080 tools/objtool/check.c ret = validate_call(insn, &state); insn 2084 tools/objtool/check.c if (!no_fp && func && !is_fentry_call(insn) && insn 2087 tools/objtool/check.c sec, insn->offset); insn 2091 tools/objtool/check.c if (dead_end_function(file, insn->call_dest)) insn 2098 tools/objtool/check.c if (func && is_sibling_call(insn)) { insn 2099 tools/objtool/check.c ret = validate_sibling_call(insn, &state); insn 2103 tools/objtool/check.c } else if (insn->jump_dest) { insn 2105 tools/objtool/check.c insn->jump_dest, state); insn 2108 tools/objtool/check.c BT_FUNC("(branch)", insn); insn 2113 tools/objtool/check.c if (insn->type == INSN_JUMP_UNCONDITIONAL) insn 2120 tools/objtool/check.c if (func && is_sibling_call(insn)) { insn 2121 tools/objtool/check.c ret = validate_sibling_call(insn, &state); insn 2126 tools/objtool/check.c if (insn->type == INSN_JUMP_DYNAMIC) insn 2134 tools/objtool/check.c sec, insn->offset); insn 2140 tools/objtool/check.c if (update_insn_state(insn, &state)) insn 2143 tools/objtool/check.c if (insn->stack_op.dest.type == OP_DEST_PUSHF) { insn 2147 tools/objtool/check.c WARN_FUNC("PUSHF stack exhausted", sec, insn->offset); insn 2154 tools/objtool/check.c if (insn->stack_op.src.type == OP_SRC_POPF) { insn 2167 tools/objtool/check.c WARN_FUNC("recursive UACCESS enable", sec, insn->offset); insn 2176 tools/objtool/check.c WARN_FUNC("redundant UACCESS disable", sec, insn->offset); insn 2181 tools/objtool/check.c WARN_FUNC("UACCESS-safe disables UACCESS", sec, insn->offset); insn 2190 tools/objtool/check.c WARN_FUNC("recursive STD", sec, insn->offset); insn 2197 tools/objtool/check.c WARN_FUNC("redundant CLD", sec, insn->offset); insn 2206 tools/objtool/check.c if (insn->dead_end) insn 2216 tools/objtool/check.c insn = next_insn; insn 2224 tools/objtool/check.c struct instruction *insn; insn 2233 tools/objtool/check.c for_each_insn(file, insn) { insn 2234 tools/objtool/check.c if (insn->hint && !insn->visited) { insn 2235 tools/objtool/check.c ret = validate_branch(file, insn->func, insn, state); insn 2237 tools/objtool/check.c BT_FUNC("<=== (hint)", insn); insn 2247 tools/objtool/check.c struct instruction *insn; insn 2250 tools/objtool/check.c for_each_insn(file, insn) { insn 2251 tools/objtool/check.c if (insn->type != INSN_JUMP_DYNAMIC && insn 2252 tools/objtool/check.c insn->type != INSN_CALL_DYNAMIC) insn 2255 tools/objtool/check.c if (insn->retpoline_safe) insn 2264 tools/objtool/check.c if (!strcmp(insn->sec->name, ".init.text") && !module) insn 2268 tools/objtool/check.c insn->sec, insn->offset, insn 2269 tools/objtool/check.c insn->type == INSN_JUMP_DYNAMIC ? "jump" : "call"); insn 2277 tools/objtool/check.c static bool is_kasan_insn(struct instruction *insn) insn 2279 tools/objtool/check.c return (insn->type == INSN_CALL && insn 2280 tools/objtool/check.c !strcmp(insn->call_dest->name, "__asan_handle_no_return")); insn 2283 tools/objtool/check.c static bool is_ubsan_insn(struct instruction *insn) insn 2285 tools/objtool/check.c return (insn->type == INSN_CALL && insn 2286 tools/objtool/check.c !strcmp(insn->call_dest->name, insn 2290 tools/objtool/check.c static bool ignore_unreachable_insn(struct instruction *insn) insn 2294 tools/objtool/check.c if (insn->ignore || insn->type == INSN_NOP) insn 2304 tools/objtool/check.c if (!strcmp(insn->sec->name, ".fixup") || insn 2305 tools/objtool/check.c !strcmp(insn->sec->name, ".altinstr_replacement") || insn 2306 tools/objtool/check.c !strcmp(insn->sec->name, ".altinstr_aux")) insn 2309 tools/objtool/check.c if (!insn->func) insn 2318 tools/objtool/check.c if (list_prev_entry(insn, list)->dead_end && insn 2319 tools/objtool/check.c (insn->type == INSN_BUG || insn 2320 tools/objtool/check.c (insn->type == INSN_JUMP_UNCONDITIONAL && insn 2321 tools/objtool/check.c insn->jump_dest && insn->jump_dest->type == INSN_BUG))) insn 2332 tools/objtool/check.c if (is_kasan_insn(insn) || is_ubsan_insn(insn)) insn 2335 tools/objtool/check.c if (insn->type == INSN_JUMP_UNCONDITIONAL) { insn 2336 tools/objtool/check.c if (insn->jump_dest && insn 2337 tools/objtool/check.c insn->jump_dest->func == insn->func) { insn 2338 tools/objtool/check.c insn = insn->jump_dest; insn 2345 tools/objtool/check.c if (insn->offset + insn->len >= insn->func->offset + insn->func->len) insn 2348 tools/objtool/check.c insn = list_next_entry(insn, list); insn 2358 tools/objtool/check.c struct instruction *insn; insn 2383 tools/objtool/check.c insn = find_insn(file, sec, func->offset); insn 2384 tools/objtool/check.c if (!insn || insn->ignore || insn->visited) insn 2389 tools/objtool/check.c ret = validate_branch(file, func, insn, state); insn 2391 tools/objtool/check.c BT_FUNC("<=== (func)", insn); insn 2401 tools/objtool/check.c struct instruction *insn; insn 2406 tools/objtool/check.c for_each_insn(file, insn) { insn 2407 tools/objtool/check.c if (insn->visited || ignore_unreachable_insn(insn)) insn 2410 tools/objtool/check.c WARN_FUNC("unreachable instruction", insn->sec, insn->offset); insn 2419 tools/objtool/check.c struct instruction *insn, *tmpinsn; insn 2422 tools/objtool/check.c list_for_each_entry_safe(insn, tmpinsn, &file->insn_list, list) { insn 2423 tools/objtool/check.c list_for_each_entry_safe(alt, tmpalt, &insn->alts, list) { insn 2427 tools/objtool/check.c list_del(&insn->list); insn 2428 tools/objtool/check.c hash_del(&insn->hash); insn 2429 tools/objtool/check.c free(insn); insn 62 tools/objtool/check.h #define for_each_insn(file, insn) \ insn 63 tools/objtool/check.h list_for_each_entry(insn, &file->insn_list, list) insn 65 tools/objtool/check.h #define sec_for_each_insn(file, sec, insn) \ insn 66 tools/objtool/check.h for (insn = find_insn(file, sec, 0); \ insn 67 tools/objtool/check.h insn && &insn->list != &file->insn_list && \ insn 68 tools/objtool/check.h insn->sec == sec; \ insn 69 tools/objtool/check.h insn = list_next_entry(insn, list)) insn 15 tools/objtool/orc_gen.c struct instruction *insn; insn 17 tools/objtool/orc_gen.c for_each_insn(file, insn) { insn 18 tools/objtool/orc_gen.c struct orc_entry *orc = &insn->orc; insn 19 tools/objtool/orc_gen.c struct cfi_reg *cfa = &insn->state.cfa; insn 20 tools/objtool/orc_gen.c struct cfi_reg *bp = &insn->state.regs[CFI_BP]; insn 22 tools/objtool/orc_gen.c orc->end = insn->state.end; insn 56 tools/objtool/orc_gen.c insn->sec, insn->offset, cfa->base); insn 72 tools/objtool/orc_gen.c insn->sec, insn->offset, bp->base); insn 78 tools/objtool/orc_gen.c orc->type = insn->state.type; insn 121 tools/objtool/orc_gen.c struct instruction *insn, *prev_insn; insn 144 tools/objtool/orc_gen.c sec_for_each_insn(file, sec, insn) { insn 146 tools/objtool/orc_gen.c memcmp(&insn->orc, &prev_insn->orc, insn 150 tools/objtool/orc_gen.c prev_insn = insn; insn 181 tools/objtool/orc_gen.c sec_for_each_insn(file, sec, insn) { insn 182 tools/objtool/orc_gen.c if (!prev_insn || memcmp(&insn->orc, &prev_insn->orc, insn 186 tools/objtool/orc_gen.c insn->sec, insn->offset, insn 187 tools/objtool/orc_gen.c &insn->orc)) insn 192 tools/objtool/orc_gen.c prev_insn = insn; insn 55 tools/objtool/warn.h #define BT_FUNC(format, insn, ...) \ insn 57 tools/objtool/warn.h struct instruction *_insn = (insn); \ insn 31 tools/perf/arch/s390/util/kvm-stat.c unsigned long insn; insn 33 tools/perf/arch/s390/util/kvm-stat.c insn = perf_evsel__intval(evsel, sample, "instruction"); insn 34 tools/perf/arch/s390/util/kvm-stat.c key->key = icpt_insn_decoder(insn); insn 98 tools/perf/arch/x86/tests/insn-x86.c struct insn insn; insn 101 tools/perf/arch/x86/tests/insn-x86.c insn_init(&insn, dat->data, MAX_INSN_SIZE, x86_64); insn 102 tools/perf/arch/x86/tests/insn-x86.c insn_get_length(&insn); insn 104 tools/perf/arch/x86/tests/insn-x86.c if (!insn_complete(&insn)) { insn 109 tools/perf/arch/x86/tests/insn-x86.c if (insn.length != dat->expected_length) { insn 111 tools/perf/arch/x86/tests/insn-x86.c insn.length, dat->expected_length, dat->asm_rep); insn 13 tools/perf/arch/x86/util/archinsn.c struct insn insn; insn 19 tools/perf/arch/x86/util/archinsn.c len = thread__memcpy(thread, machine, sample->insn, sample->ip, sizeof(sample->insn), &is64bit); insn 22 tools/perf/arch/x86/util/archinsn.c insn_init(&insn, sample->insn, len, is64bit); insn 23 tools/perf/arch/x86/util/archinsn.c insn_get_length(&insn); insn 24 tools/perf/arch/x86/util/archinsn.c if (insn_complete(&insn) && insn.length <= len) insn 25 tools/perf/arch/x86/util/archinsn.c sample->insn_len = insn.length; insn 953 tools/perf/builtin-script.c int insn, FILE *fp, int *total_cycles) insn 964 tools/perf/builtin-script.c if (insn) insn 965 tools/perf/builtin-script.c printed += fprintf(fp, " %.2f IPC", (float)insn / en->flags.cycles); insn 1015 tools/perf/builtin-script.c int i, insn, len, nr, ilen, printed = 0; insn 1065 tools/perf/builtin-script.c insn = 0; insn 1071 tools/perf/builtin-script.c printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, ++insn, fp, insn 1084 tools/perf/builtin-script.c insn++; insn 1278 tools/perf/builtin-script.c printed += fprintf(fp, " %02x", (unsigned char)sample->insn[i]); insn 322 tools/perf/util/bpf-prologue.c struct bpf_insn *insn; insn 327 tools/perf/util/bpf-prologue.c for (insn = pos->begin; insn < pos->pos; insn++) { insn 329 tools/perf/util/bpf-prologue.c u8 class = BPF_CLASS(insn->code); insn 334 tools/perf/util/bpf-prologue.c opcode = BPF_OP(insn->code); insn 338 tools/perf/util/bpf-prologue.c switch (insn->off) { insn 353 tools/perf/util/bpf-prologue.c insn->off = target - (insn + 1); insn 1109 tools/perf/util/cs-etm.c sample->insn_len, (void *)sample->insn); insn 137 tools/perf/util/event.h char insn[MAX_INSN]; insn 295 tools/perf/util/intel-bts.c memcpy(sample.insn, btsq->intel_pt_insn.buf, INTEL_PT_INSN_BUF_SZ); insn 1076 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c memcpy(decoder->state.insn, intel_pt_insn->buf, insn 220 tools/perf/util/intel-pt-decoder/intel-pt-decoder.h char insn[INTEL_PT_INSN_BUF_SZ]; insn 27 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c static void intel_pt_insn_decoder(struct insn *insn, insn 36 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c if (insn_is_avx(insn)) { insn 39 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn->length = insn->length; insn 43 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c switch (insn->opcode.bytes[0]) { insn 45 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c switch (insn->opcode.bytes[1]) { insn 109 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c ext = (insn->modrm.bytes[0] >> 3) & 0x7; insn 131 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn->length = insn->length; insn 136 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c switch (insn->immediate.nbytes) { insn 138 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn->rel = insn->immediate.value; insn 142 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c bswap_16((short)insn->immediate.value); insn 145 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn->rel = bswap_32(insn->immediate.value); insn 152 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn->rel = insn->immediate.value; insn 160 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c struct insn insn; insn 162 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c insn_init(&insn, buf, len, x86_64); insn 163 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c insn_get_length(&insn); insn 164 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c if (!insn_complete(&insn) || insn.length > len) insn 166 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c intel_pt_insn_decoder(&insn, intel_pt_insn); insn 167 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c if (insn.length < INTEL_PT_INSN_BUF_SZ) insn 168 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c memcpy(intel_pt_insn->buf, buf, insn.length); insn 185 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c struct insn insn; insn 189 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c insn_init(&insn, inbuf, inlen, x->is64bit); insn 190 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c insn_get_length(&insn); insn 191 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c if (!insn_complete(&insn) || insn.length > inlen) insn 194 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c *lenp = insn.length; insn 198 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c for (i = 0; i < insn.length; i++) { insn 176 tools/perf/util/intel-pt.c char insn[INTEL_PT_INSN_BUF_SZ]; insn 401 tools/perf/util/intel-pt.c char insn[INTEL_PT_INSN_BUF_SZ]; insn 487 tools/perf/util/intel-pt.c memcpy(e->insn, intel_pt_insn->buf, INTEL_PT_INSN_BUF_SZ); insn 568 tools/perf/util/intel-pt.c memcpy(intel_pt_insn->buf, e->insn, insn 1012 tools/perf/util/intel-pt.c memcpy(ptq->insn, ptq->state->insn, INTEL_PT_INSN_BUF_SZ); insn 1213 tools/perf/util/intel-pt.c memcpy(sample->insn, ptq->insn, INTEL_PT_INSN_BUF_SZ); insn 139 tools/testing/selftests/bpf/test_verifier.c struct bpf_insn *insn = self->fill_insns; insn 142 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_6, BPF_REG_1); insn 145 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_LD_ABS(BPF_B, 0); insn 147 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_JMP32_IMM(BPF_JNE, BPF_REG_0, 0x34, len - i - 3); insn 149 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_6); insn 150 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_IMM(BPF_REG_2, 1); insn 151 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_IMM(BPF_REG_3, 2); insn 152 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, insn 154 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, len - i - 3); insn 159 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_LD_ABS(BPF_B, 0); insn 160 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_JMP32_IMM(BPF_JNE, BPF_REG_0, 0x34, len - i - 3); insn 162 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_6); insn 163 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, insn 165 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, len - i - 3); insn 172 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_ALU64_IMM(BPF_MOV, BPF_REG_0, 0xbef); insn 173 tools/testing/selftests/bpf/test_verifier.c insn[len - 3] = BPF_JMP_A(1); insn 175 tools/testing/selftests/bpf/test_verifier.c insn[len - 2] = BPF_MOV32_IMM(BPF_REG_0, 0); insn 176 tools/testing/selftests/bpf/test_verifier.c insn[len - 1] = BPF_EXIT_INSN(); insn 182 tools/testing/selftests/bpf/test_verifier.c struct bpf_insn *insn = self->fill_insns; insn 192 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_6, BPF_REG_1); insn 193 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_LD_ABS(BPF_B, 0); insn 194 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 10, len - i - 2); insn 197 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_LD_ABS(BPF_B, 1); insn 198 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_EXIT_INSN(); insn 204 tools/testing/selftests/bpf/test_verifier.c struct bpf_insn *insn = self->fill_insns; insn 208 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV32_IMM(BPF_REG_0, 0); insn 214 tools/testing/selftests/bpf/test_verifier.c insn[i++] = tmp[0]; insn 215 tools/testing/selftests/bpf/test_verifier.c insn[i++] = tmp[1]; insn 216 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_ALU64_REG(BPF_XOR, BPF_REG_0, BPF_REG_1); insn 218 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0); insn 219 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 32); insn 220 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_ALU64_REG(BPF_XOR, BPF_REG_0, BPF_REG_1); insn 221 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_EXIT_INSN(); insn 232 tools/testing/selftests/bpf/test_verifier.c struct bpf_insn *insn = self->fill_insns; insn 235 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_6, BPF_REG_1); insn 238 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, insn 240 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, bpf_semi_rand_get(), 2); insn 241 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_10); insn 242 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_6, insn 249 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_ALU64_IMM(BPF_MOV, BPF_REG_0, 42); insn 250 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_EXIT_INSN(); insn 258 tools/testing/selftests/bpf/test_verifier.c struct bpf_insn *insn = self->fill_insns; insn 263 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_CALL_REL(1); insn 264 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_EXIT_INSN(); insn 266 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_6, BPF_REG_1); insn 270 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, insn 272 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, bpf_semi_rand_get(), 2); insn 273 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_MOV64_REG(BPF_REG_1, BPF_REG_10); insn 274 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_6, insn 278 tools/testing/selftests/bpf/test_verifier.c insn[i++] = BPF_ALU64_IMM(BPF_MOV, BPF_REG_0, 42); insn 279 tools/testing/selftests/bpf/test_verifier.c insn[i] = BPF_EXIT_INSN(); insn 29 tools/testing/selftests/powerpc/copyloops/exc_validate.c unsigned long insn, fixup; insn 31 tools/testing/selftests/powerpc/copyloops/exc_validate.c insn = *ex_p++; insn 34 tools/testing/selftests/powerpc/copyloops/exc_validate.c if (insn == *ip) { insn 65 tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c int insn; insn 77 tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c unsigned long insn, fixup; insn 79 tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c insn = (unsigned long)&entry->insn + entry->insn; insn 82 tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c if (insn == *ip) { insn 16 tools/testing/selftests/x86/test_FCMOV.c #define TEST(insn) \ insn 17 tools/testing/selftests/x86/test_FCMOV.c long double __attribute__((noinline)) insn(long flags) \ insn 25 tools/testing/selftests/x86/test_FCMOV.c " " #insn " %%st(1), %%st" "\n" \