Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/src/linux_compat.c
Context not available. | |||||
} | } | ||||
if (error) | if (error) | ||||
sysfs_remove_dir(kobj); | sysfs_remove_dir(kobj); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
Context not available. | |||||
struct vm_fault vmf; | struct vm_fault vmf; | ||||
/* fill out VM fault structure */ | /* fill out VM fault structure */ | ||||
vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT); | vmf.address = (unsigned long)((uintptr_t)pidx << PAGE_SHIFT); | ||||
hselasky: Is it needed to change type of vmf.address ? | |||||
Done Inline ActionsTo match changes in Linux 4.11. If not, we have to patch drm drivers all over the place. johalun0_gmail.com: To match changes in Linux 4.11. If not, we have to patch drm drivers all over the place. | |||||
vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; | vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; | ||||
vmf.pgoff = 0; | vmf.pgoff = 0; | ||||
vmf.page = NULL; | vmf.page = NULL; | ||||
vmf.vma = vmap; | |||||
vmap->vm_pfn_count = 0; | vmap->vm_pfn_count = 0; | ||||
vmap->vm_pfn_pcount = &vmap->vm_pfn_count; | vmap->vm_pfn_pcount = &vmap->vm_pfn_count; | ||||
vmap->vm_obj = vm_obj; | vmap->vm_obj = vm_obj; | ||||
err = vmap->vm_ops->fault(vmap, &vmf); | err = vmap->vm_ops->fault(&vmf); | ||||
while (vmap->vm_pfn_count == 0 && err == VM_FAULT_NOPAGE) { | while (vmap->vm_pfn_count == 0 && err == VM_FAULT_NOPAGE) { | ||||
kern_yield(PRI_USER); | kern_yield(PRI_USER); | ||||
err = vmap->vm_ops->fault(vmap, &vmf); | err = vmap->vm_ops->fault(&vmf); | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
{ | { | ||||
timer->expires = expires; | timer->expires = expires; | ||||
callout_reset(&timer->timer_callout, | callout_reset(&timer->timer_callout, | ||||
linux_timer_jiffies_until(expires), | linux_timer_jiffies_until(expires), | ||||
&linux_timer_callback_wrapper, timer); | &linux_timer_callback_wrapper, timer); | ||||
} | } | ||||
Context not available. |
Is it needed to change type of vmf.address ?