]>
Commit | Line | Data |
---|---|---|
79331cf5 JR |
1 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/common/inc/nv-list-helpers.h~ 2019-01-27 17:12:19.000000000 +0100 |
2 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/common/inc/nv-list-helpers.h 2019-05-07 19:39:34.895403211 +0200 | |
3 | @@ -23,6 +23,7 @@ | |
4 | #ifndef __NV_LIST_HELPERS_H__ | |
5 | #define __NV_LIST_HELPERS_H__ | |
6 | ||
7 | +#include <linux/version.h> | |
8 | #include <linux/list.h> | |
9 | #include "conftest.h" | |
10 | ||
11 | @@ -91,10 +91,12 @@ | |
12 | list_entry((pos)->member.next, typeof(*(pos)), member) | |
13 | #endif | |
14 | ||
15 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) | |
16 | static inline int list_is_first(const struct list_head *list, | |
17 | const struct list_head *head) | |
18 | { | |
19 | return list->prev == head; | |
20 | } | |
21 | +#endif | |
22 | ||
23 | #endif // __NV_LIST_HELPERS_H__ | |
24 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-uvm/uvm8.c.orig 2019-01-27 17:12:22.000000000 +0100 | |
25 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-uvm/uvm8.c 2019-05-07 20:36:42.676844249 +0200 | |
26 | @@ -166,13 +166,21 @@ | |
27 | // If a fault handler is not set, paths like handle_pte_fault in older kernels | |
28 | // assume the memory is anonymous. That would make debugging this failure harder | |
29 | // so we force it to fail instead. | |
30 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
31 | +static vm_fault_t uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf) | |
32 | +#else | |
33 | static int uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf) | |
34 | +#endif | |
35 | { | |
36 | UVM_DBG_PRINT_RL("Fault to address 0x%lx in disabled vma\n", nv_page_fault_va(vmf)); | |
37 | return VM_FAULT_SIGBUS; | |
38 | } | |
39 | ||
40 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
41 | +static vm_fault_t uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf) | |
42 | +#else | |
43 | static int uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf) | |
44 | +#endif | |
45 | { | |
46 | #if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG) | |
47 | return uvm_vm_fault_sigbus(vmf->vma, vmf); | |
48 | @@ -507,7 +515,11 @@ | |
49 | } | |
50 | } | |
51 | ||
52 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
53 | +static vm_fault_t uvm_vm_fault_wrapper(struct vm_fault *vmf) | |
54 | +#else | |
55 | static int uvm_vm_fault_wrapper(struct vm_fault *vmf) | |
56 | +#endif | |
57 | { | |
58 | #if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG) | |
59 | return uvm_vm_fault(vmf->vma, vmf); | |
60 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c.orig 2019-01-27 17:12:27.000000000 +0100 | |
61 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c 2019-05-07 20:39:24.748960946 +0200 | |
62 | @@ -55,6 +55,11 @@ | |
63 | #include <drm/drm_atomic_helper.h> | |
64 | #endif | |
65 | ||
66 | +#include <linux/version.h> | |
67 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
68 | +#include <drm/drm_probe_helper.h> | |
69 | +#endif | |
70 | + | |
71 | static struct nv_drm_device *dev_list = NULL; | |
72 | ||
73 | #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE) | |
74 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-encoder.c~ 2019-01-27 17:12:27.000000000 +0100 | |
75 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-encoder.c 2019-05-07 20:42:06.361103325 +0200 | |
76 | @@ -36,6 +36,11 @@ | |
77 | #include <drm/drm_atomic.h> | |
78 | #include <drm/drm_atomic_helper.h> | |
79 | ||
80 | +#include <linux/version.h> | |
81 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
82 | +#include <drm/drm_probe_helper.h> | |
83 | +#endif | |
84 | + | |
85 | static void nv_drm_encoder_destroy(struct drm_encoder *encoder) | |
86 | { | |
87 | struct nv_drm_encoder *nv_encoder = to_nv_encoder(encoder); | |
88 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c~ 2019-01-27 17:12:27.000000000 +0100 | |
89 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c 2019-05-07 20:43:20.487229513 +0200 | |
90 | @@ -35,6 +35,11 @@ | |
91 | #include <drm/drm_atomic.h> | |
92 | #include <drm/drm_atomic_helper.h> | |
93 | ||
94 | +#include <linux/version.h> | |
95 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
96 | +#include <drm/drm_probe_helper.h> | |
97 | +#endif | |
98 | + | |
99 | static void nv_drm_connector_destroy(struct drm_connector *connector) | |
100 | { | |
101 | struct nv_drm_connector *nv_connector = to_nv_connector(connector); | |
102 | --- NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c~ 2019-01-27 17:12:27.000000000 +0100 | |
103 | +++ NVIDIA-Linux-x86_64-390.116-no-compat32/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.c 2019-05-07 20:45:43.466195062 +0200 | |
104 | @@ -19,6 +19,7 @@ | |
105 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
106 | * DEALINGS IN THE SOFTWARE. | |
107 | */ | |
108 | +#include <linux/version.h> | |
109 | ||
110 | #include "nvidia-drm-conftest.h" | |
111 | ||
112 | @@ -268,12 +268,20 @@ | |
113 | */ | |
114 | ||
115 | #if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG) | |
116 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
117 | +static vm_fault_t nv_drm_vma_fault(struct vm_fault *vmf) | |
118 | +#else | |
119 | static int nv_drm_vma_fault(struct vm_fault *vmf) | |
120 | +#endif | |
121 | { | |
122 | return __nv_drm_vma_fault(vmf->vma, vmf); | |
123 | } | |
124 | #else | |
125 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) | |
126 | +static vm_fault_t nv_drm_vma_fault(struct vm_area_struct *vma, | |
127 | +#else | |
128 | static int nv_drm_vma_fault(struct vm_area_struct *vma, | |
129 | +#endif | |
130 | struct vm_fault *vmf) | |
131 | { | |
132 | return __nv_drm_vma_fault(vma, vmf); |