Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nvidia 378.13 kernel 4.10 patch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Mon Feb 20, 2017 7:25 am    Post subject: Nvidia 378.13 kernel 4.10 patch Reply with quote

Hello.

Kernel 4.10 patch found here.
https://devtalk.nvidia.com/default/topic/994087/linux/387-13-patch-for-4-10-0-rc8-linus-master-/
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 361
Location: /home

PostPosted: Sat Feb 25, 2017 8:24 am    Post subject: Reply with quote

It worked. Thanks!
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3254
Location: de

PostPosted: Thu Mar 02, 2017 7:57 pm    Post subject: Reply with quote

Patch for nvidia-drivers-340.102

Took the patch from above and dropped everything, which isn't available in 340 branch. It compiled and seems to work so far (tested with Sauerbraten).

Code:
diff -ur work.orig/kernel/nv-linux.h work/kernel/nv-linux.h
--- work.orig/kernel/nv-linux.h   2017-03-02 20:07:06.155149811 +0100
+++ work/kernel/nv-linux.h   2017-03-02 20:09:39.871830734 +0100
@@ -270,7 +270,8 @@
 
 extern int nv_pat_mode;
 
-#if !defined(NV_VMWARE) && defined(CONFIG_HOTPLUG_CPU)
+//#if !defined(NV_VMWARE) && defined(CONFIG_HOTPLUG_CPU)
+#if 0
 #define NV_ENABLE_HOTPLUG_CPU
 #include <linux/cpu.h>              /* CPU hotplug support              */
 #include <linux/notifier.h>         /* struct notifier_block, etc       */
diff -ur work.orig/kernel/nv-p2p.c work/kernel/nv-p2p.c
--- work.orig/kernel/nv-p2p.c   2017-03-02 20:07:06.155149811 +0100
+++ work/kernel/nv-p2p.c   2017-03-02 20:11:52.313197256 +0100
@@ -112,7 +112,7 @@
 int nvidia_p2p_get_pages(
     uint64_t p2p_token,
     uint32_t va_space,
-    uint64_t virtual_address,
+    uint64_t address,
     uint64_t length,
     struct nvidia_p2p_page_table **page_table,
     void (*free_callback)(void * data),
@@ -136,7 +136,7 @@
         return -ENOMEM;
 
     status = rm_p2p_get_pages(sp, p2p_token, va_space,
-            virtual_address, length, &physical_addresses, &wreqmb_h,
+            address, length, &physical_addresses, &wreqmb_h,
             &rreqmb_h, &entries, *page_table,
             free_callback, data);
     if (status != RM_OK)
@@ -195,7 +195,7 @@
                 nvidia_p2p_page_t_cache);
     }
 
-    rm_p2p_put_pages(sp, p2p_token, va_space, virtual_address,
+    rm_p2p_put_pages(sp, p2p_token, va_space, address,
             *page_table);
 
     os_free_mem((*page_table)->pages);
@@ -232,7 +232,7 @@
 int nvidia_p2p_put_pages(
     uint64_t p2p_token,
     uint32_t va_space,
-    uint64_t virtual_address,
+    uint64_t address,
     struct nvidia_p2p_page_table *page_table
 )
 {
@@ -243,7 +243,7 @@
     if (sp == NULL)
         return -ENOMEM;
 
-    status = rm_p2p_put_pages(sp, p2p_token, va_space, virtual_address,
+    status = rm_p2p_put_pages(sp, p2p_token, va_space, address,
             page_table);
     if (status == RM_OK)
         nvidia_p2p_free_page_table(page_table);
Back to top
View user's profile Send private message
mbar
Veteran
Veteran


Joined: 19 Jan 2005
Posts: 1981
Location: Poland

PostPosted: Sat Mar 04, 2017 6:55 am    Post subject: Reply with quote

Newest version: https://gist.github.com/tpruzina/c4d9c0ca6bdbb6e78ab2126a7cdf8f1c
Back to top
View user's profile Send private message
brutico
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2014
Posts: 130

PostPosted: Thu Mar 16, 2017 12:26 pm    Post subject: Reply with quote

Could you explain step by step how the patch is applied
Back to top
View user's profile Send private message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 241

PostPosted: Thu Mar 16, 2017 9:39 pm    Post subject: Reply with quote

Normally you would create a directory in /etc/portage/patches matching the name of the package the patch is for.

For example:

mkdir -p /etc/portage/patches/x11-drivers/nvidia-drivers-340.102

Now you place the patches you want to apply in this folder.

cd /etc/portage/patches/x11-drivers/nvidia-drivers-340.102
vim NVIDIA-378.13-KERNEL-4.10.patch
:set paste
<PASTE THE PATCH>
:wq

finally remerge the package:

emerge =x11-drivers/nvidia-drivers-340.102
_________________
Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live.
Back to top
View user's profile Send private message
hurricane
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2004
Posts: 107

PostPosted: Sun Mar 26, 2017 6:49 pm    Post subject: Reply with quote

Can anyone adapt the newest version of the patch for nvidia-drivers-340.102 too?
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3254
Location: de

PostPosted: Mon Mar 27, 2017 5:36 am    Post subject: Reply with quote

I created a bug-report to integrate into portage:
https://bugs.gentoo.org/show_bug.cgi?id=613884
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum