void intel_engine_cleanup_common(struct intel_engine_cs *engine)
{
	GEM_BUG_ON(!list_empty(&engine->active.requests));
	tasklet_kill(&engine->execlists.tasklet); /* flush the callback */

	cleanup_status_page(engine);
	intel_breadcrumbs_free(engine->breadcrumbs);

	intel_engine_fini_retire(engine);
	intel_engine_cleanup_cmd_parser(engine);

	if (engine->default_state)
		fput(engine->default_state);

	if (engine->kernel_context) {
		intel_context_unpin(engine->kernel_context);
		intel_context_put(engine->kernel_context);
	}
	GEM_BUG_ON(!llist_empty(&engine->barrier_tasks));

	intel_wa_list_free(&engine->ctx_wa_list);
	intel_wa_list_free(&engine->wa_list);
	intel_wa_list_free(&engine->whitelist);
}
void intel_engine_cleanup_common(struct intel_engine_cs *engine)
{
	GEM_BUG_ON(!list_empty(&engine->active.requests));
	tasklet_kill(&engine->execlists.tasklet);  

	cleanup_status_page(engine);
	intel_breadcrumbs_free(engine->breadcrumbs);

	intel_engine_fini_retire(engine);
	intel_engine_cleanup_cmd_parser(engine);

	if (engine->default_state)
		fput(engine->default_state);

	if (engine->kernel_context) {
		intel_context_unpin(engine->kernel_context);
		intel_context_put(engine->kernel_context);
	}
	GEM_BUG_ON(!llist_empty(&engine->barrier_tasks));

	intel_wa_list_free(&engine->ctx_wa_list);
	intel_wa_list_free(&engine->wa_list);
	intel_wa_list_free(&engine->whitelist);
}