Advertisement
Guest User

nvidia-340_kernel-4.6.0.patch

a guest
May 19th, 2016
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. --- kernel/uvm/nvidia_uvm_lite.c 2015-11-09 08:44:53.000000000 +0300
  2. +++ kernel/uvm/nvidia_uvm_lite.c 2016-05-07 13:04:54.000000000 +0300
  3. @@ -42,7 +42,6 @@
  4. #error "Building uvmlite code without RM enabled!"
  5. #endif
  6.  
  7. -
  8. static struct cdev g_uvmlite_cdev;
  9.  
  10. // table of attached GUIDS
  11. @@ -785,7 +784,8 @@
  12. // a reference so that the fault handling logic is correct:
  13. //
  14. get_page(pTracking->uvmPage);
  15. - retValue = VM_FAULT_MINOR;
  16. + // VM_FAULT_MINOR was dropped, hardcode 0
  17. + retValue = 0;
  18. }
  19.  
  20. pRecord->isMapped = NV_TRUE;
  21. --- kernel/os-mlock.c 2015-11-09 08:44:53.000000000 +0300
  22. +++ kernel/os-mlock.c 2016-05-07 13:04:54.000000000 +0300
  23. @@ -45,7 +45,11 @@
  24. }
  25.  
  26. down_read(&mm->mmap_sem);
  27. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
  28. ret = get_user_pages(current, mm, (unsigned long)address,
  29. +#else
  30. + ret = get_user_pages_remote(current, mm, (unsigned long)address,
  31. +#endif
  32. page_count, write, force, user_pages, NULL);
  33. up_read(&mm->mmap_sem);
  34. pinned = ret;
  35. @@ -58,7 +62,11 @@
  36. else if (pinned < page_count)
  37. {
  38. for (i = 0; i < pinned; i++)
  39. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
  40. page_cache_release(user_pages[i]);
  41. +#else
  42. + put_page(user_pages[i]);
  43. +#endif
  44. os_free_mem(user_pages);
  45. return RM_ERR_INVALID_ADDRESS;
  46. }
  47. @@ -85,7 +93,11 @@
  48. {
  49. if (write)
  50. set_page_dirty_lock(user_pages[i]);
  51. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
  52. page_cache_release(user_pages[i]);
  53. +#else
  54. + put_page(user_pages[i]);
  55. +#endif
  56. }
  57.  
  58. os_free_mem(user_pages);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement