Tested without issues on i915, amdgpu, radeonkms.
Issues/unknowns:
**user_access_{begin|end} and copy_{to|from}_user**
The previous implementation "default" is in linux/uaccess.h.
Machine dependent implementation is in include/asm/uaccess.h.
The machine version is missing __{get,put}_user_size() functions so disabled for now.
What the best solution for FreeBSD here? Do we need user_access_{begin|end} (stac() / clac())?
Is there any idea make implementation for __{get,put}_user_size() ?
**{un}use_mm()**
Located in linux/mmu_context.h.
I left this empty for now. Maybe someone with more insight can figure out what we need to do here?
**TASK_KILLABLE and wait_event_killable()**
Used by drivers/gpu/drm/amd/scheduler/gpu_scheduler.c:224
Need impl in linux_scheduler.c?
Update: Added TASK_KILLABLE to TASK_NORMAL so that the assert don't cause panic in linux_add_to_sleepqueue().