struct execute_cb *cb = container_of(wrk, typeof(*cb), work);
i915_sw_fence_complete(cb->fence);
-#ifdef notyet
+#ifdef __linux__
kmem_cache_free(slab_execute_cbs, cb);
#else
pool_put(&slab_execute_cbs, cb);
if (llist_empty(&rq->execute_cb))
return;
- STUB();
-#ifdef notyet
llist_for_each_entry_safe(cb, cn,
llist_del_all(&rq->execute_cb),
work.node.llist)
fn(&cb->work);
-#endif
}
static void __notify_execute_cb_irq(struct i915_request *rq)
static bool irq_work_imm(struct irq_work *wrk)
{
-#ifdef notyet
+#ifdef __linux__
wrk->func(wrk);
#else
- STUB();
+ wrk->task.t_func(wrk);
#endif
return false;
}
if (i915_request_is_active(signal))
return 0;
- STUB();
- i915_sw_fence_await(&rq->submit);
- return -ENOSYS;
-#ifdef notyet
-
#ifdef __linux__
cb = kmem_cache_alloc(slab_execute_cbs, gfp);
#else
}
return 0;
-#endif
}
static bool fatal_error(int error)
-/* $OpenBSD: irq_work.h,v 1.8 2022/01/19 05:36:54 jsg Exp $ */
+/* $OpenBSD: irq_work.h,v 1.9 2022/07/27 07:08:34 jsg Exp $ */
/*
* Copyright (c) 2015 Mark Kettenis
*
#include <sys/systm.h>
#include <sys/task.h>
+#include <linux/llist.h>
+
struct workqueue_struct;
extern struct workqueue_struct *system_wq;
+struct irq_node {
+ struct llist_node llist;
+};
+
struct irq_work {
struct task task;
struct taskq *tq;
+ struct irq_node node;
};
typedef void (*irq_work_func_t)(struct irq_work *);