mirror of
https://github.com/Frogging-Family/nvidia-all
synced 2024-11-01 09:20:18 +00:00
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
|
diff --git a/kernel-dkms/conftest.sh b/kernel-dkms/conftest.sh
|
||
|
index e8de161..04d6683 100755
|
||
|
--- a/kernel-dkms/conftest.sh
|
||
|
+++ b/kernel-dkms/conftest.sh
|
||
|
@@ -1780,11 +1780,14 @@ compile_test() {
|
||
|
# Determine if atomic64_t and associated functions are defined
|
||
|
CODE="
|
||
|
#include <asm/atomic.h>
|
||
|
+ #include <linux/version.h>
|
||
|
void conftest_atomic64(void) {
|
||
|
atomic64_t data;
|
||
|
atomic64_read(&data);
|
||
|
atomic64_set(&data, 0);
|
||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
|
||
|
atomic64_inc(&data);
|
||
|
+#endif
|
||
|
}"
|
||
|
|
||
|
compile_check_conftest "$CODE" "NV_ATOMIC64_PRESENT" "" "types"
|
||
|
diff --git a/kernel-dkms/nvidia-drm/nvidia-drm-gem-nvkms-memory.c b/kernel-dkms/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
|
||
|
index 1db7777..863bb77 100644
|
||
|
--- a/kernel-dkms/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
|
||
|
+++ b/kernel-dkms/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
|
||
|
@@ -345,7 +347,11 @@ static int __nv_drm_vma_fault(struct vm_area_struct *vma,
|
||
|
|
||
|
page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
|
||
|
|
||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
|
||
|
ret = vm_insert_pfn(vma, address, pfn + page_offset);
|
||
|
+#else
|
||
|
+ ret = vmf_insert_pfn(vma, address, pfn + page_offset);
|
||
|
+#endif
|
||
|
|
||
|
switch (ret) {
|
||
|
case 0:
|
||
|
--- a/kernel-dkms/nvidia/os-interface.c 2018-11-15 21:56:59.000000000 -0600
|
||
|
+++ b/kernel-dkms/nvidia/os-interface.c 2018-11-26 21:53:39.970635906 -0600
|
||
|
@@ -1670,7 +1670,7 @@
|
||
|
|
||
|
struct nv_ipmi_softc
|
||
|
{
|
||
|
- ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
|
||
|
+ struct ipmi_user *p_user;
|
||
|
spinlock_t msg_lock;
|
||
|
struct list_head msgs;
|
||
|
NvU32 seqNum; //request sequence number
|
||
|
@@ -1679,7 +1679,7 @@
|
||
|
static inline int
|
||
|
nv_ipmi_set_my_address
|
||
|
(
|
||
|
- ipmi_user_t user,
|
||
|
+ struct ipmi_user *user,
|
||
|
unsigned char address
|
||
|
)
|
||
|
{
|