| /linux/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
| H A D | ctxnv50.c | 170 static void nv50_gr_construct_mmio(struct nvkm_grctx *ctx); 171 static void nv50_gr_construct_xfer1(struct nvkm_grctx *ctx); 172 static void nv50_gr_construct_xfer2(struct nvkm_grctx *ctx); 177 nv50_grctx_generate(struct nvkm_grctx *ctx) in nv50_grctx_generate() argument 179 cp_set (ctx, STATE, RUNNING); in nv50_grctx_generate() 180 cp_set (ctx, XFER_SWITCH, ENABLE); in nv50_grctx_generate() 182 cp_bra (ctx, AUTO_SAVE, PENDING, cp_setup_save); in nv50_grctx_generate() 183 cp_bra (ctx, USER_SAVE, PENDING, cp_setup_save); in nv50_grctx_generate() 185 cp_name(ctx, cp_check_load); in nv50_grctx_generate() 186 cp_bra (ctx, AUTO_LOAD, PENDING, cp_setup_auto_load); in nv50_grctx_generate() [all …]
|
| H A D | ctxnv40.c | 159 nv40_gr_construct_general(struct nvkm_grctx *ctx) in nv40_gr_construct_general() argument 161 struct nvkm_device *device = ctx->device; in nv40_gr_construct_general() 164 cp_ctx(ctx, 0x4000a4, 1); in nv40_gr_construct_general() 165 gr_def(ctx, 0x4000a4, 0x00000008); in nv40_gr_construct_general() 166 cp_ctx(ctx, 0x400144, 58); in nv40_gr_construct_general() 167 gr_def(ctx, 0x400144, 0x00000001); in nv40_gr_construct_general() 168 cp_ctx(ctx, 0x400314, 1); in nv40_gr_construct_general() 169 gr_def(ctx, 0x400314, 0x00000000); in nv40_gr_construct_general() 170 cp_ctx(ctx, 0x400400, 10); in nv40_gr_construct_general() 171 cp_ctx(ctx, 0x400480, 10); in nv40_gr_construct_general() [all …]
|
| /linux/drivers/gpu/drm/panel/ |
| H A D | panel-boe-tv101wum-nl6.c | 59 #define nt36523_switch_page(ctx, page) \ argument 60 mipi_dsi_dcs_write_seq_multi(ctx, NT36523_DCS_SWITCH_PAGE, (page)) 62 static void nt36523_enable_reload_cmds(struct mipi_dsi_multi_context *ctx) in nt36523_enable_reload_cmds() argument 64 mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01); in nt36523_enable_reload_cmds() 69 struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi }; in boe_tv110c9m_init() local 71 nt36523_switch_page(&ctx, 0x20); in boe_tv110c9m_init() 72 nt36523_enable_reload_cmds(&ctx); in boe_tv110c9m_init() 73 mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0xd9); in boe_tv110c9m_init() 74 mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x78); in boe_tv110c9m_init() 75 mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x5a); in boe_tv110c9m_init() [all …]
|
| H A D | panel-raydium-rm67200.c | 19 void (*panel_setup)(struct mipi_dsi_multi_context *ctx); 36 static void raydium_rm67200_reset(struct raydium_rm67200 *ctx) in raydium_rm67200_reset() argument 38 if (ctx->reset_gpio) { in raydium_rm67200_reset() 39 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in raydium_rm67200_reset() 41 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in raydium_rm67200_reset() 43 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in raydium_rm67200_reset() 48 static void raydium_rm67200_write(struct mipi_dsi_multi_context *ctx, in raydium_rm67200_write() argument 53 mipi_dsi_generic_write_multi(ctx, d, ARRAY_SIZE(d)); in raydium_rm67200_write() 56 static void w552793baa_setup(struct mipi_dsi_multi_context *ctx) in w552793baa_setup() argument 58 raydium_rm67200_write(ctx, 0xfe, 0x21); in w552793baa_setup() [all …]
|
| H A D | panel-ilitek-ili9806e-dsi.c | 24 void (*init_sequence)(struct mipi_dsi_multi_context *ctx); 35 struct mipi_dsi_multi_context ctx = { .dsi = ili9806e->dsi }; in ili9806e_dsi_on() local 38 ili9806e->desc->init_sequence(&ctx); in ili9806e_dsi_on() 40 mipi_dsi_dcs_exit_sleep_mode_multi(&ctx); in ili9806e_dsi_on() 41 mipi_dsi_msleep(&ctx, 120); in ili9806e_dsi_on() 42 mipi_dsi_dcs_set_display_on_multi(&ctx); in ili9806e_dsi_on() 44 return ctx.accum_err; in ili9806e_dsi_on() 49 struct mipi_dsi_multi_context ctx = { .dsi = panel->dsi }; in ili9806e_dsi_off() local 51 mipi_dsi_dcs_set_display_off_multi(&ctx); in ili9806e_dsi_off() 52 mipi_dsi_dcs_enter_sleep_mode_multi(&ctx); in ili9806e_dsi_off() [all …]
|
| H A D | panel-raydium-rm68200.c | 101 static void rm68200_dcs_write_buf(struct rm68200 *ctx, const void *data, in rm68200_dcs_write_buf() argument 104 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_dcs_write_buf() 109 dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write buffer failed: %d\n", err); in rm68200_dcs_write_buf() 112 static void rm68200_dcs_write_cmd(struct rm68200 *ctx, u8 cmd, u8 value) in rm68200_dcs_write_cmd() argument 114 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_dcs_write_cmd() 119 dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write failed: %d\n", err); in rm68200_dcs_write_cmd() 122 #define dcs_write_seq(ctx, seq...) \ argument 126 rm68200_dcs_write_buf(ctx, d, ARRAY_SIZE(d)); \ 133 #define dcs_write_cmd_seq(ctx, cmd, seq...) \ argument 139 rm68200_dcs_write_cmd(ctx, cmd + i, d[i]); \ [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_tcp_custom_syncookie.c | 73 static int tcp_load_headers(struct tcp_syncookie *ctx) in tcp_load_headers() argument 75 ctx->data = (void *)(long)ctx->skb->data; in tcp_load_headers() 76 ctx->data_end = (void *)(long)ctx->skb->data_end; in tcp_load_headers() 77 ctx->eth = (struct ethhdr *)(long)ctx->skb->data; in tcp_load_headers() 79 if (ctx->eth + 1 > ctx->data_end) in tcp_load_headers() 82 switch (bpf_ntohs(ctx in tcp_load_headers() 126 tcp_reload_headers(struct tcp_syncookie * ctx) tcp_reload_headers() argument 161 tcp_v4_csum(struct tcp_syncookie * ctx,__wsum csum) tcp_v4_csum() argument 167 tcp_v6_csum(struct tcp_syncookie * ctx,__wsum csum) tcp_v6_csum() argument 173 tcp_validate_header(struct tcp_syncookie * ctx) tcp_validate_header() argument 202 next(struct tcp_syncookie * ctx,__u32 sz) next() argument 220 tcp_parse_option(__u32 index,struct tcp_syncookie * ctx) tcp_parse_option() argument 284 tcp_parse_options(struct tcp_syncookie * ctx) tcp_parse_options() argument 291 tcp_validate_sysctl(struct tcp_syncookie * ctx) tcp_validate_sysctl() argument 314 tcp_prepare_cookie(struct tcp_syncookie * ctx) tcp_prepare_cookie() argument 364 tcp_write_options(struct tcp_syncookie * ctx) tcp_write_options() argument 399 tcp_handle_syn(struct tcp_syncookie * ctx) tcp_handle_syn() argument 462 tcp_validate_cookie(struct tcp_syncookie * ctx) tcp_validate_cookie() argument 505 tcp_handle_ack(struct tcp_syncookie * ctx) tcp_handle_ack() argument 565 struct tcp_syncookie ctx = { tcp_custom_syncookie() local [all...] |
| H A D | test_sk_lookup.c | 76 int lookup_pass(struct bpf_sk_lookup *ctx) in lookup_pass() argument 82 int lookup_drop(struct bpf_sk_lookup *ctx) in lookup_drop() argument 88 int check_ifindex(struct bpf_sk_lookup *ctx) in check_ifindex() argument 90 if (ctx->ingress_ifindex == 1) in check_ifindex() 96 int reuseport_pass(struct sk_reuseport_md *ctx) in reuseport_pass() argument 102 int reuseport_drop(struct sk_reuseport_md *ctx) in reuseport_drop() argument 109 int redir_port(struct bpf_sk_lookup *ctx) in redir_port() argument 114 if (ctx->local_port != DST_PORT) in redir_port() 121 err = bpf_sk_assign(ctx, sk, 0); in redir_port() 128 int redir_ip4(struct bpf_sk_lookup *ctx) in redir_ip4() argument [all …]
|
| /linux/arch/powerpc/platforms/cell/spufs/ |
| H A D | context.c | 27 struct spu_context *ctx; in alloc_spu_context() local 29 ctx = kzalloc_obj(*ctx); in alloc_spu_context() 30 if (!ctx) in alloc_spu_context() 35 if (spu_init_csa(&ctx->csa)) in alloc_spu_context() 37 spin_lock_init(&ctx->mmio_lock); in alloc_spu_context() 38 mutex_init(&ctx->mapping_lock); in alloc_spu_context() 39 kref_init(&ctx->kref); in alloc_spu_context() 40 mutex_init(&ctx->state_mutex); in alloc_spu_context() 41 mutex_init(&ctx->run_mutex); in alloc_spu_context() 42 init_waitqueue_head(&ctx->ibox_wq); in alloc_spu_context() [all …]
|
| H A D | run.c | 17 struct spu_context *ctx = spu->ctx; in spufs_stop_callback() local 26 if (ctx) { in spufs_stop_callback() 30 ctx->csa.class_0_pending = spu->class_0_pending; in spufs_stop_callback() 31 ctx->csa.class_0_dar = spu->class_0_dar; in spufs_stop_callback() 34 ctx->csa.class_1_dsisr = spu->class_1_dsisr; in spufs_stop_callback() 35 ctx->csa.class_1_dar = spu->class_1_dar; in spufs_stop_callback() 45 wake_up_all(&ctx->stop_wq); in spufs_stop_callback() 49 int spu_stopped(struct spu_context *ctx, u32 *stat) in spu_stopped() argument 58 *stat = ctx->ops->status_read(ctx); in spu_stopped() 69 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags)) in spu_stopped() [all …]
|
| H A D | backing_ops.c | 34 static void gen_spu_event(struct spu_context *ctx, u32 event) in gen_spu_event() argument 40 ch0_cnt = ctx->csa.spu_chnlcnt_RW[0]; in gen_spu_event() 41 ch0_data = ctx->csa.spu_chnldata_RW[0]; in gen_spu_event() 42 ch1_data = ctx->csa.spu_chnldata_RW[1]; in gen_spu_event() 43 ctx->csa.spu_chnldata_RW[0] |= event; in gen_spu_event() 45 ctx->csa.spu_chnlcnt_RW[0] = 1; in gen_spu_event() 49 static int spu_backing_mbox_read(struct spu_context *ctx, u32 * data) in spu_backing_mbox_read() argument 54 spin_lock(&ctx->csa.register_lock); in spu_backing_mbox_read() 55 mbox_stat = ctx->csa.prob.mb_stat_R; in spu_backing_mbox_read() 61 *data = ctx->csa.prob.pu_mb_R; in spu_backing_mbox_read() [all …]
|
| /linux/drivers/ras/amd/atl/ |
| H A D | map.c | 15 static int df2_get_intlv_mode(struct addr_ctx *ctx) in df2_get_intlv_mode() argument 17 ctx->map.intlv_mode = FIELD_GET(DF2_INTLV_NUM_CHAN, ctx->map.base); in df2_get_intlv_mode() 19 if (ctx->map.intlv_mode == 8) in df2_get_intlv_mode() 20 ctx->map.intlv_mode = DF2_2CHAN_HASH; in df2_get_intlv_mode() 22 if (ctx->map.intlv_mode != NONE && in df2_get_intlv_mode() 23 ctx->map.intlv_mode != NOHASH_2CHAN && in df2_get_intlv_mode() 24 ctx->map.intlv_mode != DF2_2CHAN_HASH) in df2_get_intlv_mode() 30 static int df3_get_intlv_mode(struct addr_ctx *ctx) in df3_get_intlv_mode() argument 32 ctx->map.intlv_mode = FIELD_GET(DF3_INTLV_NUM_CHAN, ctx->map.base); in df3_get_intlv_mode() 36 static int df3p5_get_intlv_mode(struct addr_ctx *ctx) in df3p5_get_intlv_mode() argument [all …]
|
| H A D | dehash.c | 15 static int df2_dehash_addr(struct addr_ctx *ctx) in df2_dehash_addr() argument 19 intlv_bit_pos = ctx->map.intlv_bit_pos; in df2_dehash_addr() 20 intlv_bit = !!(BIT_ULL(intlv_bit_pos) & ctx->ret_addr); in df2_dehash_addr() 23 hashed_bit ^= FIELD_GET(BIT_ULL(12), ctx->ret_addr); in df2_dehash_addr() 24 hashed_bit ^= FIELD_GET(BIT_ULL(18), ctx->ret_addr); in df2_dehash_addr() 25 hashed_bit ^= FIELD_GET(BIT_ULL(21), ctx->ret_addr); in df2_dehash_addr() 26 hashed_bit ^= FIELD_GET(BIT_ULL(30), ctx->ret_addr); in df2_dehash_addr() 29 ctx->ret_addr ^= BIT_ULL(intlv_bit_pos); in df2_dehash_addr() 34 static int df3_dehash_addr(struct addr_ctx *ctx) in df3_dehash_addr() argument 39 hash_ctl_64k = FIELD_GET(DF3_HASH_CTL_64K, ctx->map.ctl); in df3_dehash_addr() [all …]
|
| /linux/drivers/base/regmap/ |
| H A D | regmap-mmio.c | 25 void (*reg_write)(struct regmap_mmio_context *ctx, 27 unsigned int (*reg_read)(struct regmap_mmio_context *ctx, 65 static void regmap_mmio_write8(struct regmap_mmio_context *ctx, in regmap_mmio_write8() argument 69 writeb(val, ctx->regs + reg); in regmap_mmio_write8() 72 static void regmap_mmio_write8_relaxed(struct regmap_mmio_context *ctx, in regmap_mmio_write8_relaxed() argument 76 writeb_relaxed(val, ctx->regs + reg); in regmap_mmio_write8_relaxed() 79 static void regmap_mmio_iowrite8(struct regmap_mmio_context *ctx, in regmap_mmio_iowrite8() argument 82 iowrite8(val, ctx->regs + reg); in regmap_mmio_iowrite8() 85 static void regmap_mmio_write16le(struct regmap_mmio_context *ctx, in regmap_mmio_write16le() argument 89 writew(val, ctx->regs + reg); in regmap_mmio_write16le() [all …]
|
| /linux/tools/testing/selftests/filesystems/epoll/ |
| H A D | epoll_wakeup_test.c | 43 static void kill_timeout(struct epoll_mtcontext *ctx) in kill_timeout() argument 46 pthread_kill(ctx->main, SIGUSR1); in kill_timeout() 47 pthread_kill(ctx->waiter, SIGUSR1); in kill_timeout() 53 struct epoll_mtcontext *ctx = data; in waiter_entry1a() local 55 if (epoll_wait(ctx->efd[0], &e, 1, -1) > 0) in waiter_entry1a() 56 __sync_fetch_and_add(&ctx->count, 1); in waiter_entry1a() 65 struct epoll_mtcontext *ctx = data; in waiter_entry1ap() local 67 pfd.fd = ctx->efd[0]; in waiter_entry1ap() 70 if (epoll_wait(ctx->efd[0], &e, 1, 0) > 0) in waiter_entry1ap() 71 __sync_fetch_and_add(&ctx in waiter_entry1ap() 80 struct epoll_mtcontext *ctx = data; waiter_entry1o() local 92 struct epoll_mtcontext *ctx = data; waiter_entry1op() local 107 struct epoll_mtcontext *ctx = data; waiter_entry2a() local 119 struct epoll_mtcontext *ctx = data; waiter_entry2ap() local 133 struct epoll_mtcontext *ctx = data; emitter_entry1() local 145 struct epoll_mtcontext *ctx = data; emitter_entry2() local 476 struct epoll_mtcontext ctx = { 0 }; TEST() local 519 struct epoll_mtcontext ctx = { 0 }; TEST() local 562 struct epoll_mtcontext ctx = { 0 }; TEST() local 611 struct epoll_mtcontext ctx = { 0 }; TEST() local 660 struct epoll_mtcontext ctx = { 0 }; TEST() local 703 struct epoll_mtcontext ctx = { 0 }; TEST() local 746 struct epoll_mtcontext ctx = { 0 }; TEST() local 795 struct epoll_mtcontext ctx = { 0 }; TEST() local 1198 struct epoll_mtcontext ctx = { 0 }; TEST() local 1250 struct epoll_mtcontext ctx = { 0 }; TEST() local 1302 struct epoll_mtcontext ctx = { 0 }; TEST() local 1354 struct epoll_mtcontext ctx = { 0 }; TEST() local 1406 struct epoll_mtcontext ctx = { 0 }; TEST() local 1457 struct epoll_mtcontext ctx = { 0 }; TEST() local 1508 struct epoll_mtcontext ctx = { 0 }; TEST() local 1559 struct epoll_mtcontext ctx = { 0 }; TEST() local 1610 struct epoll_mtcontext ctx = { 0 }; TEST() local 1662 struct epoll_mtcontext ctx = { 0 }; TEST() local 1714 struct epoll_mtcontext ctx = { 0 }; TEST() local 1766 struct epoll_mtcontext ctx = { 0 }; TEST() local 1819 struct epoll_mtcontext ctx = { 0 }; TEST() local 1876 struct epoll_mtcontext ctx = { 0 }; TEST() local 1933 struct epoll_mtcontext ctx = { 0 }; TEST() local 1990 struct epoll_mtcontext ctx = { 0 }; TEST() local 2046 struct epoll_mtcontext ctx = { 0 }; TEST() local 2098 struct epoll_mtcontext ctx = { 0 }; TEST() local 2150 struct epoll_mtcontext ctx = { 0 }; TEST() local 2202 struct epoll_mtcontext ctx = { 0 }; TEST() local 2255 struct epoll_mtcontext ctx = { 0 }; TEST() local 2311 struct epoll_mtcontext ctx = { 0 }; TEST() local 2364 struct epoll_mtcontext ctx = { 0 }; TEST() local 2420 struct epoll_mtcontext ctx = { 0 }; TEST() local 2704 struct epoll_mtcontext ctx = { 0 }; TEST() local 2769 struct epoll_mtcontext ctx = { 0 }; TEST() local 2834 struct epoll_mtcontext ctx = { 0 }; TEST() local 2899 struct epoll_mtcontext ctx = { 0 }; TEST() local 2965 struct epoll_mtcontext ctx = { 0 }; TEST() local 3035 struct epoll_mtcontext ctx = { 0 }; TEST() local 3093 struct epoll_mtcontext *ctx = ctx_; epoll59_thread() local 3123 struct epoll_mtcontext ctx = { 0 }; TEST() local 3169 struct epoll60_ctx *ctx = ctx_; epoll60_wait_thread() local 3224 count_waiters(struct epoll60_ctx * ctx) count_waiters() argument 3231 struct epoll60_ctx ctx = { 0 }; TEST() local 3307 struct epoll61_ctx *ctx = ctx_; epoll61_write_eventfd() local 3317 struct epoll61_ctx *ctx = ctx_; epoll61_epoll_with_timeout() local 3336 struct epoll61_ctx *ctx = ctx_; epoll61_blocking_epoll() local 3345 struct epoll61_ctx ctx; TEST() local 3463 struct epoll_mtcontext ctx = { 0 }; TEST() local [all...] |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/ |
| H A D | context.c | 6 bool mlx5hws_context_cap_dynamic_reparse(struct mlx5hws_context *ctx) in mlx5hws_context_cap_dynamic_reparse() argument 8 return IS_BIT_SET(ctx->caps->rtc_reparse_mode, MLX5_IFC_RTC_REPARSE_BY_STC); in mlx5hws_context_cap_dynamic_reparse() 11 u8 mlx5hws_context_get_reparse_mode(struct mlx5hws_context *ctx) in mlx5hws_context_get_reparse_mode() argument 14 if (mlx5hws_context_cap_dynamic_reparse(ctx)) in mlx5hws_context_get_reparse_mode() 21 static int hws_context_pools_init(struct mlx5hws_context *ctx) in hws_context_pools_init() argument 27 ret = mlx5hws_pat_init_pattern_cache(&ctx->pattern_cache); in hws_context_pools_init() 31 ret = mlx5hws_definer_init_cache(&ctx->definer_cache); in hws_context_pools_init() 37 max_log_sz = min(MLX5HWS_POOL_STC_LOG_SZ, ctx->caps->stc_alloc_log_max); in hws_context_pools_init() 38 pool_attr.alloc_log_sz = max(max_log_sz, ctx->caps->stc_alloc_log_gran); in hws_context_pools_init() 41 ctx->stc_pool = mlx5hws_pool_create(ctx, &pool_attr); in hws_context_pools_init() [all …]
|
| /linux/drivers/media/platform/mediatek/vcodec/decoder/ |
| H A D | mtk_vcodec_dec_stateful.c | 55 static struct vb2_buffer *get_display_buffer(struct mtk_vcodec_dec_ctx *ctx) in get_display_buffer() argument 61 mtk_v4l2_vdec_dbg(3, ctx, "[%d]", ctx->id); in get_display_buffer() 62 if (vdec_if_get_param(ctx, GET_PARAM_DISP_FRAME_BUFFER, in get_display_buffer() 64 mtk_v4l2_vdec_err(ctx, "[%d]Cannot get param : GET_PARAM_DISP_FRAME_BUFFER", in get_display_buffer() 65 ctx->id); in get_display_buffer() 70 mtk_v4l2_vdec_dbg(3, ctx, "No display frame buffer"); in get_display_buffer() 77 mutex_lock(&ctx->lock); in get_display_buffer() 79 mtk_v4l2_vdec_dbg(2, ctx, "[%d]status=%x queue id=%d to done_list %d", in get_display_buffer() 80 ctx->id, disp_frame_buffer->status, in get_display_buffer() 84 ctx->decoded_frame_cnt++; in get_display_buffer() [all …]
|
| H A D | vdec_drv_if.c | 17 int vdec_if_init(struct mtk_vcodec_dec_ctx *ctx, unsigned int fourcc) in vdec_if_init() argument 19 enum mtk_vdec_hw_arch hw_arch = ctx->dev->vdec_pdata->hw_arch; in vdec_if_init() 24 if (!ctx->dev->vdec_pdata->is_subdev_supported) { in vdec_if_init() 25 ctx->dec_if = &vdec_h264_slice_if; in vdec_if_init() 26 ctx->hw_id = MTK_VDEC_CORE; in vdec_if_init() 28 ctx->dec_if = &vdec_h264_slice_multi_if; in vdec_if_init() 29 ctx->hw_id = IS_VDEC_LAT_ARCH(hw_arch) ? MTK_VDEC_LAT0 : MTK_VDEC_CORE; in vdec_if_init() 33 ctx->dec_if = &vdec_h264_if; in vdec_if_init() 34 ctx->hw_id = MTK_VDEC_CORE; in vdec_if_init() 37 ctx->dec_if = &vdec_vp8_slice_if; in vdec_if_init() [all …]
|
| /linux/tools/perf/tests/ |
| H A D | expr.c | 61 static int test(struct expr_parse_ctx *ctx, const char *e, double val2) in test() argument 65 if (expr__parse(&val, ctx, e)) in test() 77 struct expr_parse_ctx *ctx; in test__expr() local 87 ctx = expr__ctx_new(); in test__expr() 88 TEST_ASSERT_VAL("expr__ctx_new", ctx); in test__expr() 89 expr__add_id_val(ctx, strdup("FOO"), 1); in test__expr() 90 expr__add_id_val(ctx, strdup("BAR"), 2); in test__expr() 92 ret = test(ctx, "1+1", 2); in test__expr() 93 ret |= test(ctx, "FOO+BAR", 3); in test__expr() 94 ret |= test(ctx, "(BAR/2)%2", 1); in test__expr() [all …]
|
| /linux/drivers/hwmon/ |
| H A D | pwm-fan.c | 81 struct pwm_fan_ctx *ctx = timer_container_of(ctx, t, rpm_timer); in sample_timer() local 82 unsigned int delta = ktime_ms_delta(ktime_get(), ctx->sample_start); in sample_timer() 86 for (i = 0; i < ctx->tach_count; i++) { in sample_timer() 87 struct pwm_fan_tach *tach = &ctx->tachs[i]; in sample_timer() 93 (ctx->pulses_per_revolution[i] * delta); in sample_timer() 96 ctx->sample_start = ktime_get(); in sample_timer() 99 mod_timer(&ctx->rpm_timer, jiffies + HZ); in sample_timer() 125 static int pwm_fan_switch_power(struct pwm_fan_ctx *ctx, bool on) in pwm_fan_switch_power() argument 129 if (!ctx->reg_en) in pwm_fan_switch_power() 132 if (!ctx->regulator_enabled && on) { in pwm_fan_switch_power() [all …]
|
| /linux/sound/soc/intel/atom/sst/ |
| H A D | sst.c | 195 struct intel_sst_drv *ctx = container_of(work, in sst_process_pending_msg() local 198 ctx->ops->post_message(ctx, NULL, false); in sst_process_pending_msg() 201 static int sst_workqueue_init(struct intel_sst_drv *ctx) in sst_workqueue_init() argument 203 INIT_LIST_HEAD(&ctx->memcpy_list); in sst_workqueue_init() 204 INIT_LIST_HEAD(&ctx->rx_list); in sst_workqueue_init() 205 INIT_LIST_HEAD(&ctx->ipc_dispatch_list); in sst_workqueue_init() 206 INIT_LIST_HEAD(&ctx->block_list); in sst_workqueue_init() 207 INIT_WORK(&ctx->ipc_post_msg_wq, sst_process_pending_msg); in sst_workqueue_init() 208 init_waitqueue_head(&ctx->wait_queue); in sst_workqueue_init() 210 ctx->post_msg_wq = in sst_workqueue_init() [all …]
|
| /linux/drivers/media/platform/chips-media/coda/ |
| H A D | coda-bit.c | 41 static void coda_free_bitstream_buffer(struct coda_ctx *ctx); 64 static void coda_command_async(struct coda_ctx *ctx, int cmd) in coda_command_async() argument 66 struct coda_dev *dev = ctx->dev; in coda_command_async() 72 coda_write(dev, ctx->bit_stream_param, in coda_command_async() 74 coda_write(dev, ctx->frm_dis_flg, in coda_command_async() 75 CODA_REG_BIT_FRM_DIS_FLG(ctx->reg_idx)); in coda_command_async() 76 coda_write(dev, ctx->frame_mem_ctrl, in coda_command_async() 78 coda_write(dev, ctx->workbuf.paddr, CODA_REG_BIT_WORK_BUF_ADDR); in coda_command_async() 88 coda_write(dev, ctx->idx, CODA_REG_BIT_RUN_INDEX); in coda_command_async() 89 coda_write(dev, ctx->params.codec_mode, CODA_REG_BIT_RUN_COD_STD); in coda_command_async() [all …]
|
| /linux/crypto/asymmetric_keys/ |
| H A D | x509_cert_parser.c | 64 struct x509_parse_context *ctx __free(kfree) = NULL; in x509_cert_parse() 77 ctx = kzalloc_obj(struct x509_parse_context); in x509_cert_parse() 78 if (!ctx) in x509_cert_parse() 81 ctx->cert = cert; in x509_cert_parse() 82 ctx->data = (unsigned long)data; in x509_cert_parse() 85 ret = asn1_ber_decoder(&x509_decoder, ctx, data, datalen); in x509_cert_parse() 90 if (ctx->raw_akid) { in x509_cert_parse() 92 ctx->raw_akid_size, ctx->raw_akid_size, ctx->raw_akid); in x509_cert_parse() 93 ret = asn1_ber_decoder(&x509_akid_decoder, ctx, in x509_cert_parse() 94 ctx->raw_akid, ctx->raw_akid_size); in x509_cert_parse() [all …]
|
| /linux/arch/riscv/net/ |
| H A D | bpf_jit_comp64.c | 68 static u8 bpf_to_rv_reg(int bpf_reg, struct rv_jit_context *ctx) in bpf_to_rv_reg() argument 78 __set_bit(reg, &ctx->flags); in bpf_to_rv_reg() 83 static bool seen_reg(int reg, struct rv_jit_context *ctx) in seen_reg() argument 92 return test_bit(reg, &ctx->flags); in seen_reg() 97 static void mark_fp(struct rv_jit_context *ctx) in mark_fp() argument 99 __set_bit(RV_CTX_F_SEEN_S5, &ctx->flags); in mark_fp() 102 static void mark_call(struct rv_jit_context *ctx) in mark_call() argument 104 __set_bit(RV_CTX_F_SEEN_CALL, &ctx->flags); in mark_call() 123 static void emit_sextw_alt(u8 *rd, u8 ra, struct rv_jit_context *ctx) in emit_sextw_alt() argument 125 emit_sextw(ra, *rd, ctx); in emit_sextw_alt() [all …]
|
| /linux/drivers/misc/ocxl/ |
| H A D | context.c | 11 struct ocxl_context *ctx; in ocxl_context_alloc() local 13 ctx = kzalloc_obj(*ctx); in ocxl_context_alloc() 14 if (!ctx) in ocxl_context_alloc() 17 ctx->afu = afu; in ocxl_context_alloc() 19 pasid = idr_alloc(&afu->contexts_idr, ctx, afu->pasid_base, in ocxl_context_alloc() 23 kfree(ctx); in ocxl_context_alloc() 29 ctx->pasid = pasid; in ocxl_context_alloc() 30 ctx->status = OPENED; in ocxl_context_alloc() 31 mutex_init(&ctx->status_mutex); in ocxl_context_alloc() 32 ctx->mapping = mapping; in ocxl_context_alloc() [all …]
|