View previous topic :: View next topic |
Author |
Message |
fhede n00b

Joined: 15 Mar 2016 Posts: 43
|
|
Back to top |
|
 |
Juippisi Developer


Joined: 30 Sep 2005 Posts: 762 Location: /home
|
Posted: Sat Feb 25, 2017 8:24 am Post subject: |
|
|
It worked. Thanks! |
|
Back to top |
|
 |
musv Advocate


Joined: 01 Dec 2002 Posts: 3369 Location: de
|
Posted: Thu Mar 02, 2017 7:57 pm Post subject: |
|
|
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 |
|
 |
mbar Veteran


Joined: 19 Jan 2005 Posts: 1991 Location: Poland
|
|
Back to top |
|
 |
brutico Tux's lil' helper

Joined: 16 Feb 2014 Posts: 130
|
Posted: Thu Mar 16, 2017 12:26 pm Post subject: |
|
|
Could you explain step by step how the patch is applied |
|
Back to top |
|
 |
donmartio Apprentice


Joined: 11 Dec 2004 Posts: 261
|
Posted: Thu Mar 16, 2017 9:39 pm Post subject: |
|
|
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 |
|
 |
hurricane Tux's lil' helper


Joined: 15 Jul 2004 Posts: 107
|
Posted: Sun Mar 26, 2017 6:49 pm Post subject: |
|
|
Can anyone adapt the newest version of the patch for nvidia-drivers-340.102 too? |
|
Back to top |
|
 |
musv Advocate


Joined: 01 Dec 2002 Posts: 3369 Location: de
|
|
Back to top |
|
 |
|
|
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
|
|