On 05/06/2015 04:08 PM, Roman Bysh wrote:
On 05/06/2015 01:45 AM, Larry Finger wrote:
On 05/05/2015 03:56 PM, Roman Bysh wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all,
Is there a patch for the nVidia driver 340.76 so that it can install to kernel 4.0x? Or is the problem in the latest Tumbleweed kernel?
You might post the build error. It is possible that we would know the fix.
Larry
Larry,
I've attached to nvidia-installer.log. It's quite lengthy.
The patch I found is:
snip<------------------------------------------------------------
--- nv-pat.c.orig +++ nv-pat.c @@ -35,8 +35,13 @@ static inline void nv_disable_caches(uns unsigned long cr0 = read_cr0(); write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); wbinvd(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) *cr4 = read_cr4(); if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80); +#else + *cr4 = __read_cr4(); + if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80); +#endif __flush_tlb(); }
@@ -46,7 +51,11 @@ static inline void nv_enable_caches(unsi wbinvd(); __flush_tlb(); write_cr0((cr0 & 0x9fffffff)); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) if (cr4 & 0x80) write_cr4(cr4); +#else + if (cr4 & 0x80) __write_cr4(cr4); +#endif }
static int nv_determine_pat_mode(void)
snip<-------------------------------------------------------------
I think this patch would work if I copy it to /home/mantrid/NVIDIA-Linux-x86_64-340.76/kernel/ where nv-pat.c is located.
And apply: patch -p1 < nvidia-340.76-kernel-4.0.patch
Now if the patch was applied to the original "non-compressed" NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.76, shouldn't we change:
--- nv-pat.c.orig +++ nv-pat.c
to
--- /kernel/nv-pat.c.orig +++ /kernel/nv-pat.c
I'm new to creating patches.
Those are the errors you need to correct. Leave the patch the way it was, but you would need to use -p0, not -p1. The number controls how many directories are stripped. The second way would work with -p1, but you need to get rid of the leading /. The paths need to be relative, not absolute. Larry -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org