Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #9 ("panic: <something>: called with spinlock or critical section held" on KabyLake) #39

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ __i915_request_await_execution(struct i915_request *rq,
if (hook) {
cb->hook = hook;
cb->signal = i915_request_get(signal);
#ifdef __linux__
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version > 1300127)
cb->work.func = irq_execute_cb_hook;
#elif defined(__FreeBSD__)
/* irq_work is just a workqueue for us */
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/i915_sw_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,11 @@ static void dma_i915_sw_fence_wake(struct dma_fence *dma,

i915_sw_fence_set_error_once(cb->fence, dma->error);
i915_sw_fence_complete(cb->fence);
#if defined(__FreeBSD__) && __FreeBSD_version > 1300127
kfree_async(cb);
#else
kfree(cb);
#endif
}

static void timer_i915_sw_fence_wake(struct timer_list *t)
Expand Down
5 changes: 5 additions & 0 deletions linuxkpi/gplv2/include/linux/llist.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <sys/param.h>
#if __FreeBSD_version < 1300128
#ifndef _LINUX_GPLV2_LLIST_H
#define _LINUX_GPLV2_LLIST_H
/*
Expand Down Expand Up @@ -223,3 +225,6 @@ struct llist_node *llist_reverse_order(struct llist_node *head);

#endif /* _LINUX_GPLV2_LLIST_H */

#else
#include_next <linux/llist.h>
#endif
3 changes: 3 additions & 0 deletions linuxkpi/gplv2/src/linux_llist.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <sys/param.h>
#if __FreeBSD_version < 1300128
/*
* Lock-less NULL terminated single linked list
*
Expand Down Expand Up @@ -99,3 +101,4 @@ struct llist_node *llist_reverse_order(struct llist_node *head)

return new_head;
}
#endif