/* * Detach all contexts on the given AFU. */ void cxl_context_detach_all(struct cxl_afu *afu) { struct cxl_context *ctx; int tmp; rcu_read_lock(); idr_for_each_entry(&afu->contexts_idr, ctx, tmp) /* * Anything done in here needs to be setup before the IDR is * created and torn down after the IDR removed */ __detach_context(ctx); rcu_read_unlock(); }
/* Stop a context. Returns 0 on success, otherwise -Errno */ int cxl_stop_context(struct cxl_context *ctx) { return __detach_context(ctx); }
/* * Detach the given context from the AFU. This doesn't actually * free the context but it should stop the context running in hardware * (ie. prevent this context from generating any further interrupts * so that it can be freed). */ void cxl_context_detach(struct cxl_context *ctx) { __detach_context(ctx); }