Lines Matching refs:ctx

72 static inline __unused void ctx_write_scr_el3_amvoffen(cpu_context_t *ctx, uint64_t amvoffen)  in ctx_write_scr_el3_amvoffen()  argument
74 uint64_t value = read_ctx_reg(get_el3state_ctx(ctx), CTX_SCR_EL3); in ctx_write_scr_el3_amvoffen()
79 write_ctx_reg(get_el3state_ctx(ctx), CTX_SCR_EL3, value); in ctx_write_scr_el3_amvoffen()
181 void amu_enable(cpu_context_t *ctx) in amu_enable() argument
189 ctx_write_scr_el3_amvoffen(ctx, 1U); in amu_enable()
416 struct amu_ctx *ctx; in amu_context_save() local
432 ctx = &amu_ctxs_[core_pos]; in amu_context_save()
449 ctx->group0_enable = read_amcntenset0_el0_px(); in amu_context_save()
450 write_amcntenclr0_el0_px(ctx->group0_enable); in amu_context_save()
454 ctx->group1_enable = read_amcntenset1_el0_px(); in amu_context_save()
455 write_amcntenclr1_el0_px(ctx->group1_enable); in amu_context_save()
466 ctx->group0_cnts[i] = amu_group0_cnt_read(i); in amu_context_save()
471 ctx->group1_cnts[i] = amu_group1_cnt_read(i); in amu_context_save()
485 ctx->group0_voffsets[j++] = amu_group0_voffset_read(i); in amu_context_save()
494 ctx->group1_voffsets[j++] = amu_group1_voffset_read(i); in amu_context_save()
507 struct amu_ctx *ctx; in amu_context_restore() local
524 ctx = &amu_ctxs_[core_pos]; in amu_context_restore()
543 amu_group0_cnt_write(i, ctx->group0_cnts[i]); in amu_context_restore()
548 amu_group1_cnt_write(i, ctx->group1_cnts[i]); in amu_context_restore()
562 amu_group0_voffset_write(i, ctx->group0_voffsets[j++]); in amu_context_restore()
571 amu_group1_voffset_write(i, ctx->group1_voffsets[j++]); in amu_context_restore()
580 write_amcntenset0_el0_px(ctx->group0_enable); in amu_context_restore()
584 write_amcntenset1_el0_px(ctx->group1_enable); in amu_context_restore()