H A D | atom.c | 63 struct atom_context *ctx; member in struct:__anon166 74 static int amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size); 75 int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size); 110 static uint32_t atom_iio_execute(struct atom_context *ctx, int base, argument 121 temp = ctx->card->reg_read(ctx->card, CU16(base + 1)); 125 ctx->card->reg_write(ctx->card, CU16(base + 1), temp); 165 ((ctx-> 182 static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_ argument 373 atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr) argument 408 atom_get_src(atom_exec_context *ctx, uint8_t attr, int *ptr) argument 413 atom_get_src_direct(atom_exec_context *ctx, uint8_t align, int *ptr) argument 439 atom_get_dst(atom_exec_context *ctx, int arg, uint8_t attr, int *ptr, uint32_t *saved, int print) argument 448 atom_skip_dst(atom_exec_context *ctx, int arg, uint8_t attr, int *ptr) argument 455 atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr, int *ptr, uint32_t val, uint32_t saved) argument 599 atom_op_add(atom_exec_context *ctx, int *ptr, int arg) argument 613 atom_op_and(atom_exec_context *ctx, int *ptr, int arg) argument 627 atom_op_beep(atom_exec_context *ctx, int *ptr, int arg) argument 632 atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg) argument 648 atom_op_clear(atom_exec_context *ctx, int *ptr, int arg) argument 660 atom_op_compare(atom_exec_context *ctx, int *ptr, int arg) argument 674 atom_op_delay(atom_exec_context *ctx, int *ptr, int arg) argument 686 atom_op_div(atom_exec_context *ctx, int *ptr, int arg) argument 703 atom_op_div32(atom_exec_context *ctx, int *ptr, int arg) argument 724 atom_op_eot(atom_exec_context *ctx, int *ptr, int arg) argument 729 atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) argument 783 atom_op_mask(atom_exec_context *ctx, int *ptr, int arg) argument 800 atom_op_move(atom_exec_context *ctx, int *ptr, int arg) argument 817 atom_op_mul(atom_exec_context *ctx, int *ptr, int arg) argument 828 atom_op_mul32(atom_exec_context *ctx, int *ptr, int arg) argument 842 atom_op_nop(atom_exec_context *ctx, int *ptr, int arg) argument 847 atom_op_or(atom_exec_context *ctx, int *ptr, int arg) argument 861 atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg) argument 867 atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg) argument 872 atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg) argument 877 atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg) argument 882 atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg) argument 896 atom_op_setfbbase(atom_exec_context *ctx, int *ptr, int arg) argument 903 atom_op_setport(atom_exec_context *ctx, int *ptr, int arg) argument 930 atom_op_setregblock(atom_exec_context *ctx, int *ptr, int arg) argument 937 atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg) argument 953 atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg) argument 969 atom_op_shl(atom_exec_context *ctx, int *ptr, int arg) argument 988 atom_op_shr(atom_exec_context *ctx, int *ptr, int arg) argument 1007 atom_op_sub(atom_exec_context *ctx, int *ptr, int arg) argument 1021 atom_op_switch(atom_exec_context *ctx, int *ptr, int arg) argument 1048 atom_op_test(atom_exec_context *ctx, int *ptr, int arg) argument 1060 atom_op_xor(atom_exec_context *ctx, int *ptr, int arg) argument 1074 atom_op_debug(atom_exec_context *ctx, int *ptr, int arg) argument 1080 atom_op_processds(atom_exec_context *ctx, int *ptr, int arg) argument 1221 amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size) argument 1286 amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size) argument 1309 atom_index_iio(struct atom_context *ctx, int base) argument 1323 atom_get_vbios_name(struct atom_context *ctx) argument 1371 atom_get_vbios_date(struct atom_context *ctx) argument 1399 atom_find_str_in_rom(struct atom_context *ctx, char *str, int start, int end, int maxlen) argument 1422 atom_get_vbios_pn(struct atom_context *ctx) argument 1463 atom_get_vbios_version(struct atom_context *ctx) argument 1498 struct atom_context *ctx = local 1559 amdgpu_atom_asic_init(struct atom_context *ctx) argument 1583 amdgpu_atom_destroy(struct atom_context *ctx) argument 1589 amdgpu_atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, uint8_t *frev, uint8_t *crev, uint16_t *data_start) argument 1610 amdgpu_atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev) argument [all...] |
H A D | bpf_jit_comp.c | 93 static inline void emit(const u32 insn, struct jit_ctx *ctx) argument 95 if (ctx->image != NULL) 96 ctx->image[ctx->idx] = cpu_to_le32(insn); 98 ctx->idx++; 102 const s32 val, struct jit_ctx *ctx) 109 emit(A64_MOVN(is64, reg, (u16)~lo, 0), ctx); local 111 emit(A64_MOVN(is64, reg, (u16)~hi, 16), ctx); local 113 emit(A64_MOVK(is64, reg, lo, 0), ctx); 116 emit(A64_MOVZ(is64, reg, lo, 0), ctx); 101 emit_a64_mov_i(const int is64, const int reg, const s32 val, struct jit_ctx *ctx) argument 130 emit_a64_mov_i64(const int reg, const u64 val, struct jit_ctx *ctx) argument 155 emit_bti(u32 insn, struct jit_ctx *ctx) argument 166 emit_addr_mov_i64(const int reg, const u64 val, struct jit_ctx *ctx) argument 180 emit_call(u64 target, struct jit_ctx *ctx) argument 185 emit(A64_BLR(tmp), ctx); local 188 bpf2a64_offset(int bpf_insn, int off, const struct jit_ctx *ctx) argument 217 epilogue_offset(const struct jit_ctx *ctx) argument 297 build_prologue(struct jit_ctx *ctx, bool ebpf_from_cbpf, bool is_exception_cb) argument 351 emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx); local 355 emit(A64_PUSH(r6, r7, A64_SP), ctx); local 356 emit(A64_PUSH(r8, r9, A64_SP), ctx); local 357 emit(A64_PUSH(fp, tcc, A64_SP), ctx); local 358 emit(A64_PUSH(fpb, A64_R(28), A64_SP), ctx); local 418 emit_bpf_tail_call(struct jit_ctx *ctx) argument 437 emit(A64_LDR32(tmp, r2, tmp), ctx); local 440 emit(A64_B_(A64_COND_CS, jmp_offset), ctx); local 449 emit(A64_B_(A64_COND_CS, jmp_offset), ctx); local 460 emit(A64_LDR64(prg, tmp, prg), ctx); local 466 emit(A64_LDR64(tmp, prg, tmp), ctx); local 469 emit(A64_BR(tmp), ctx); local 485 emit_lse_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx) argument 507 emit(A64_STADD(isdw, reg, src), ctx); local 510 emit(A64_MVN(isdw, tmp2, src), ctx); local 511 emit(A64_STCLR(isdw, reg, tmp2), ctx); local 514 emit(A64_STSET(isdw, reg, src), ctx); local 517 emit(A64_STEOR(isdw, reg, src), ctx); local 521 emit(A64_LDADDAL(isdw, src, reg, src), ctx); local 524 emit(A64_MVN(isdw, tmp2, src), ctx); local 525 emit(A64_LDCLRAL(isdw, src, reg, tmp2), ctx); local 528 emit(A64_LDSETAL(isdw, src, reg, src), ctx); local 531 emit(A64_LDEORAL(isdw, src, reg, src), ctx); local 535 emit(A64_SWPAL(isdw, src, reg, src), ctx); local 539 emit(A64_CASAL(isdw, src, reg, bpf2a64[BPF_REG_0]), ctx); local 549 emit_lse_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx) argument 555 emit_ll_sc_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx) argument 581 emit(A64_LDXR(isdw, tmp2, reg), ctx); local 583 emit(A64_ADD(isdw, tmp2, tmp2, src), ctx); local 585 emit(A64_AND(isdw, tmp2, tmp2, src), ctx); local 587 emit(A64_ORR(isdw, tmp2, tmp2, src), ctx); local 589 emit(A64_EOR(isdw, tmp2, tmp2, src), ctx); local 590 emit(A64_STXR(isdw, tmp2, reg, tmp3), ctx); local 601 emit(A64_MOV(isdw, ax, src), ctx); local 602 emit(A64_LDXR(isdw, src, reg), ctx); local 604 emit(A64_ADD(isdw, tmp2, src, ax), ctx); local 606 emit(A64_AND(isdw, tmp2, src, ax), ctx); local 608 emit(A64_ORR(isdw, tmp2, src, ax), ctx); local 610 emit(A64_EOR(isdw, tmp2, src, ax), ctx); local 611 emit(A64_STLXR(isdw, tmp2, reg, tmp3), ctx); local 618 emit(A64_MOV(isdw, tmp2, src), ctx); local 619 emit(A64_LDXR(isdw, src, reg), ctx); local 620 emit(A64_STLXR(isdw, tmp2, reg, tmp3), ctx); local 629 emit(A64_MOV(isdw, tmp2, r0), ctx); local 630 emit(A64_LDXR(isdw, r0, reg), ctx); local 631 emit(A64_EOR(isdw, tmp3, r0, tmp2), ctx); local 634 emit(A64_CBNZ(isdw, tmp3, jmp_offset), ctx); local 635 emit(A64_STLXR(isdw, src, reg, tmp3), ctx); local 677 build_plt(struct jit_ctx *ctx) argument 689 emit(A64_BR(tmp), ctx); local 695 build_epilogue(struct jit_ctx *ctx, bool is_exception_cb) argument 718 emit(A64_POP(fpb, A64_R(28), A64_SP), ctx); local 720 emit(A64_POP(fp, A64_R(26), A64_SP), ctx); local 723 emit(A64_POP(r8, r9, A64_SP), ctx); local 724 emit(A64_POP(r6, r7, A64_SP), ctx); local 727 emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx); local 736 emit(A64_RET(A64_LR), ctx); local 754 add_exception_handler(const struct bpf_insn *insn, struct jit_ctx *ctx, int dst_reg) argument 828 build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool extra_pass) argument 858 emit(A64_MOV(is64, dst, src), ctx); local 861 emit(A64_SXTB(is64, dst, src), ctx); local 864 emit(A64_SXTH(is64, dst, src), ctx); local 867 emit(A64_SXTW(is64, dst, src), ctx); local 874 emit(A64_ADD(is64, dst, dst, src), ctx); local 878 emit(A64_SUB(is64, dst, dst, src), ctx); local 882 emit(A64_AND(is64, dst, dst, src), ctx); local 886 emit(A64_ORR(is64, dst, dst, src), ctx); local 890 emit(A64_EOR(is64, dst, dst, src), ctx); local 894 emit(A64_MUL(is64, dst, dst, src), ctx); local 899 emit(A64_UDIV(is64, dst, dst, src), ctx); local 901 emit(A64_SDIV(is64, dst, dst, src), ctx); local 906 emit(A64_UDIV(is64, tmp, dst, src), ctx); local 908 emit(A64_SDIV(is64, tmp, dst, src), ctx); local 909 emit(A64_MSUB(is64, dst, dst, tmp, src), ctx); local 913 emit(A64_LSLV(is64, dst, dst, src), ctx); local 917 emit(A64_LSRV(is64, dst, dst, src), ctx); local 921 emit(A64_ASRV(is64, dst, dst, src), ctx); local 926 emit(A64_NEG(is64, dst, dst), ctx); local 941 emit(A64_REV16(is64, dst, dst), ctx); local 943 emit(A64_UXTH(is64, dst, dst), ctx); local 950 emit(A64_REV64(dst, dst), ctx); local 958 emit(A64_UXTH(is64, dst, dst), ctx); local 962 emit(A64_UXTW(is64, dst, dst), ctx); local 978 emit(A64_ADD_I(is64, dst, dst, imm), ctx); local 983 emit(A64_ADD(is64, dst, dst, tmp), ctx); local 989 emit(A64_SUB_I(is64, dst, dst, imm), ctx); local 994 emit(A64_SUB(is64, dst, dst, tmp), ctx); local 1004 emit(A64_AND(is64, dst, dst, tmp), ctx); local 1014 emit(A64_ORR(is64, dst, dst, tmp), ctx); local 1024 emit(A64_EOR(is64, dst, dst, tmp), ctx); local 1030 emit(A64_MUL(is64, dst, dst, tmp), ctx); local 1036 emit(A64_UDIV(is64, dst, dst, tmp), ctx); local 1038 emit(A64_SDIV(is64, dst, dst, tmp), ctx); local 1044 emit(A64_UDIV(is64, tmp, dst, tmp2), ctx); local 1046 emit(A64_SDIV(is64, tmp, dst, tmp2), ctx); local 1047 emit(A64_MSUB(is64, dst, dst, tmp, tmp2), ctx); local 1051 emit(A64_LSL(is64, dst, dst, imm), ctx); local 1055 emit(A64_LSR(is64, dst, dst, imm), ctx); local 1059 emit(A64_ASR(is64, dst, dst, imm), ctx); local 1070 emit(A64_B(jmp_offset), ctx); local 1093 emit(A64_CMP(is64, dst, src), ctx); local 1132 emit(A64_B_(jmp_cond, jmp_offset), ctx); local 1136 emit(A64_TST(is64, dst, src), ctx); local 1160 emit(A64_CMP_I(is64, dst, imm), ctx); local 1165 emit(A64_CMP(is64, dst, tmp), ctx); local 1175 emit(A64_TST(is64, dst, tmp), ctx); local 1206 emit(A64_B(jmp_offset), ctx); local 1253 emit(A64_LDRSWI(dst, src_adj, off_adj), ctx); local 1255 emit(A64_LDR32I(dst, src_adj, off_adj), ctx); local 1259 emit(A64_LDRSW(dst, src, tmp), ctx); local 1261 emit(A64_LDR32(dst, src, tmp), ctx); local 1267 emit(A64_LDRSHI(dst, src_adj, off_adj), ctx); local 1269 emit(A64_LDRHI(dst, src_adj, off_adj), ctx); local 1273 emit(A64_LDRSH(dst, src, tmp), ctx); local 1275 emit(A64_LDRH(dst, src, tmp), ctx); local 1281 emit(A64_LDRSBI(dst, src_adj, off_adj), ctx); local 1283 emit(A64_LDRBI(dst, src_adj, off_adj), ctx); local 1287 emit(A64_LDRSB(dst, src, tmp), ctx); local 1289 emit(A64_LDRB(dst, src, tmp), ctx); local 1294 emit(A64_LDR64I(dst, src_adj, off_adj), ctx); local 1297 emit(A64_LDR64(dst, src, tmp), ctx); local 1337 emit(A64_STR32I(tmp, dst_adj, off_adj), ctx); local 1340 emit(A64_STR32(tmp, dst, tmp2), ctx); local 1345 emit(A64_STRHI(tmp, dst_adj, off_adj), ctx); local 1348 emit(A64_STRH(tmp, dst, tmp2), ctx); local 1353 emit(A64_STRBI(tmp, dst_adj, off_adj), ctx); local 1356 emit(A64_STRB(tmp, dst, tmp2), ctx); local 1361 emit(A64_STR64I(tmp, dst_adj, off_adj), ctx); local 1364 emit(A64_STR64(tmp, dst, tmp2), ctx); local 1385 emit(A64_STR32I(src, dst_adj, off_adj), ctx); local 1388 emit(A64_STR32(src, dst, tmp), ctx); local 1393 emit(A64_STRHI(src, dst_adj, off_adj), ctx); local 1396 emit(A64_STRH(src, dst, tmp), ctx); local 1401 emit(A64_STRBI(src, dst_adj, off_adj), ctx); local 1404 emit(A64_STRB(src, dst, tmp), ctx); local 1409 emit(A64_STR64I(src, dst_adj, off_adj), ctx); local 1412 emit(A64_STR64(src, dst, tmp), ctx); local 1509 build_body(struct jit_ctx *ctx, bool extra_pass) argument 1550 validate_code(struct jit_ctx *ctx) argument 1563 validate_ctx(struct jit_ctx *ctx) argument 1583 struct jit_ctx ctx; member in struct:arm64_jit_data 1596 struct jit_ctx ctx; local 1813 invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l, int args_off, int retval_off, int run_ctx_off, bool save_ret) argument 1830 emit_a64_mov_i64(A64_R(10), l->cookie, ctx); local 1832 ctx); local 1838 emit_addr_mov_i64(A64_R(19), (const u64)p, ctx); local 1858 emit_addr_mov_i64(A64_R(1), (const u64)p->insnsi, ctx); local 1880 invoke_bpf_mod_ret(struct jit_ctx *ctx, struct bpf_tramp_links *tl, int args_off, int retval_off, int run_ctx_off, __le32 **branches) argument 1889 emit(A64_STR64I(A64_ZR, A64_SP, retval_off), ctx); local 1905 save_args(struct jit_ctx *ctx, int args_off, int nregs) argument 1910 emit(A64_STR64I(i, A64_SP, args_off), ctx); local 1915 restore_args(struct jit_ctx *ctx, int args_off, int nregs) argument 1920 emit(A64_LDR64I(i, A64_SP, args_off), ctx); local 1936 prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im, struct bpf_tramp_links *tlinks, void *func_addr, int nregs, u32 flags) argument 2023 emit(A64_PUSH(A64_FP, A64_R(9), A64_SP), ctx); local 2027 emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx); local 2035 emit_addr_mov_i64(A64_R(10), (const u64)func_addr, ctx); local 2051 emit_addr_mov_i64(A64_R(0), (const u64)im, ctx); local 2074 emit(A64_ADR(A64_LR, AARCH64_INSN_SIZE * 2), ctx); local 2095 emit_addr_mov_i64(A64_R(0), (const u64)im, ctx); local 2113 emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx); local 2114 emit(A64_POP(A64_FP, A64_R(9), A64_SP), ctx); local 2150 struct jit_ctx ctx = { local 2203 struct jit_ctx ctx = { local [all...] |