Advertisement
Guest User

nv_patch_340.104_linux_kernel_4.14

a guest
Oct 12th, 2017
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 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;
  31. --- kernel/nv-drm.c 2017-09-21 12:58:23.901972670 +0200
  32. +++ kernel/nv-drm.c 2017-09-21 13:07:32.418269409 +0200
  33. @@ -173,7 +173,7 @@
  34. {
  35. int ret = 0;
  36. #if defined(NV_DRM_AVAILABLE)
  37. - ret = drm_pci_init(&nv_drm_driver, pci_driver);
  38. + ret = drm_legacy_pci_init(&nv_drm_driver, pci_driver);
  39. #endif
  40. return ret;
  41. }
  42. @@ -183,7 +183,7 @@
  43. )
  44. {
  45. #if defined(NV_DRM_AVAILABLE)
  46. - drm_pci_exit(&nv_drm_driver, pci_driver);
  47. + drm_legacy_pci_exit(&nv_drm_driver, pci_driver);
  48. #endif
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement