Advertisement
Guest User

nv_patch_340.104_linux_kernel_4.13

a guest
Oct 12th, 2017
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. --- kernel/uvm/nvidia_uvm_lite.c
  2. +++ kernel/uvm/nvidia_uvm_lite.c
  3. @@ -818,8 +818,15 @@ done:
  4. }
  5.  
  6. #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
  7. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
  8. int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
  9. +#else
  10. +int _fault(struct vm_fault *vmf)
  11. +#endif
  12. {
  13. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
  14. + struct vm_area_struct *vma = vmf->vma;
  15. +#endif
  16. #if defined(NV_VM_FAULT_HAS_ADDRESS)
  17. unsigned long vaddr = vmf->address;
  18. #else
  19. @@ -866,7 +873,11 @@ static struct vm_operations_struct uvmlite_vma_ops =
  20. // it's dealing with anonymous mapping (see handle_pte_fault).
  21. //
  22. #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
  23. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
  24. int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
  25. +#else
  26. +int _sigbus_fault(struct vm_fault *vmf)
  27. +#endif
  28. {
  29. vmf->page = NULL;
  30. return VM_FAULT_SIGBUS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement