Lines Matching refs:ctx
28 #define to_nv_cspmu_ctx(cspmu) ((struct nv_cspmu_ctx *)(cspmu->impl.ctx))
214 const struct nv_cspmu_ctx *ctx = to_nv_cspmu_ctx(cspmu);
216 return ctx->event_attr;
222 const struct nv_cspmu_ctx *ctx = to_nv_cspmu_ctx(cspmu);
224 return ctx->format_attr;
230 const struct nv_cspmu_ctx *ctx = to_nv_cspmu_ctx(cspmu);
232 return ctx->name;
237 const struct nv_cspmu_ctx *ctx =
240 if (ctx->filter_mask == 0)
241 return ctx->filter_default_val;
243 return event->attr.config1 & ctx->filter_mask;
357 struct nv_cspmu_ctx *ctx;
362 ctx = devm_kzalloc(dev, sizeof(struct nv_cspmu_ctx), GFP_KERNEL);
363 if (!ctx)
376 ctx->name = nv_cspmu_format_name(cspmu, match);
377 ctx->filter_mask = match->filter_mask;
378 ctx->filter_default_val = match->filter_default_val;
379 ctx->event_attr = match->event_attr;
380 ctx->format_attr = match->format_attr;
382 cspmu->impl.ctx = ctx;